![]() |
AliPhysics
fc9925d (fc9925d)
|
Public Types | |
typedef TList | Container |
Public Member Functions | |
AliTrackletdNdetaUtils () | |
virtual | ~AliTrackletdNdetaUtils () |
Static Public Member Functions | |
Service functions to check histogram consistencies | |
static Bool_t | CheckAxisNBins (const char *which, const TAxis *a1, const TAxis *a2) |
static Bool_t | CheckAxisLimits (const char *which, const TAxis *a1, const TAxis *a2) |
static Bool_t | CheckAxisBins (const char *which, const TAxis *a1, const TAxis *a2) |
static Bool_t | CheckAxisLabels (const char *which, const TAxis *a1, const TAxis *a2) |
static Bool_t | CheckAxis (const char *which, const TAxis *a1, const TAxis *a2, Bool_t alsoLbls) |
static Bool_t | CheckConsistency (const TH1 *h1, const TH1 *h2) |
Utilities | |
static TObject * | GetO (Container *parent, const char *name, TClass *cls) |
static TObject * | GetO (TDirectory *parent, const char *name, TClass *cls) |
static TH1 * | GetH1 (Container *parent, const char *name) |
static TH2 * | GetH2 (Container *parent, const char *name) |
static Container * | GetC (Container *parent, const char *name) |
static Container * | GetC (TDirectory *parent, const char *name) |
static Double_t | GetD (Container *parent, const char *name, Double_t def=-1) |
static Int_t | GetI (Container *parent, const char *name, Int_t def=-1) |
static Int_t | GetB (Container *parent, const char *name, Bool_t def=false) |
static TH1 * | CopyH1 (Container *parent, const char *name, const char *newName=0) |
static TH2 * | CopyH2 (Container *parent, const char *name, const char *newName=0) |
static TH1 * | Make1D (Container &c, const TString &name, const TString &title, Color_t color, Style_t style, const TAxis &xAxis) |
static TH2 * | Make2D (Container &c, const TString &name, const TString &title, Color_t color, Style_t style, const TAxis &xAxis, const TAxis &yAxis) |
static TH1 * | Scale (TH1 *h, Double_t x, Double_t xe) |
static TH2 * | Scale (TH2 *h, Double_t x, Double_t xe) |
static TH2 * | Scale (TH2 *h, TH1 *s) |
static void | FixAxis (TAxis &axis, const char *title=0) |
static void | ScaleAxis (TAxis &axis, Double_t fact=1) |
static void | SetAxis (TAxis &axis, Int_t n, Double_t *borders) |
static void | SetAxis (TAxis &axis, const TString &spec, const char *sep=":,") |
static void | SetAxis (TAxis &axis, Int_t n, Double_t l, Double_t h) |
static void | SetAxis (TAxis &axis, Int_t n, Double_t m) |
static void | PrintAxis (const TAxis &axis, Int_t nSig=2, const char *alt=0) |
static TH2 * | ScaleToIPz (TH2 *h, TH1 *ipZ, Bool_t full=false) |
static TH1 * | AverageOverIPz (TH2 *h, const char *name, UShort_t mode, TH1 *ipz, TH2 *mask=0) |
static TObject * | CloneAndAdd (Container *c, TObject *o) |
static Double_t | Integrate (TH1 *h, Double_t min, Double_t max, Double_t &err) |
static Double_t | RatioE (Double_t n, Double_t en, Double_t d, Double_t ed, Double_t &er) |
static Double_t | RatioE2 (Double_t n, Double_t e2n, Double_t d, Double_t e2d, Double_t &e2r) |
Protected Member Functions | |
ClassDef (AliTrackletdNdetaUtils, 1) | |
Class with utlity functions
Definition at line 24 of file AliTrackletdNdetaUtils.C.
Definition at line 27 of file AliTrackletdNdetaUtils.C.
|
inline |
Dummy constructor
Definition at line 31 of file AliTrackletdNdetaUtils.C.
|
inlinevirtual |
Dummy destructor
Definition at line 35 of file AliTrackletdNdetaUtils.C.
|
static |
Average primary particle \(\mathrm{d}N_{\mathrm{ch}}/\mathrm{d}\\eta\) over \(\mathrm{IP}_z\)
Mode can be one of
h | Histogram |
name | Name of projection |
mode | Mode of operation. |
ipz | Vertex distribution |
mask | Optional mask - if a bin is zero here, do not count it in average. |
Definition at line 994 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawdNdeta(), and AliTrackletdNdetaMCTask::CentBin::MasterFinalize().
|
static |
Check that axis definitions are compatible
which | Which axis we're checking |
a1 | First axis |
a2 | Second axis |
alsoLbls | If true, also check labels |
Definition at line 532 of file AliTrackletdNdetaUtils.C.
Referenced by CheckConsistency().
|
static |
In case of non-uniform bins, check each bin edge to see if they are the same
which | Which axis we're checking |
a1 | First axis |
a2 | Second axis |
Definition at line 472 of file AliTrackletdNdetaUtils.C.
Referenced by CheckAxis().
|
static |
Check if all bin labels (if specified) are the same
which | Which axis we're checking |
a1 | First axis |
a2 | Second axis |
Definition at line 499 of file AliTrackletdNdetaUtils.C.
Referenced by CheckAxis().
|
static |
Check axis limits (min,max) are the same
which | Which axis we're checking |
a1 | First axis |
a2 | Second axis |
Definition at line 458 of file AliTrackletdNdetaUtils.C.
Referenced by CheckAxis().
|
static |
Check if both axis have the same number of bins
which | Which axis is being checked |
a1 | First axis |
a2 | Second axis |
Definition at line 446 of file AliTrackletdNdetaUtils.C.
Referenced by CheckAxis().
Check if two histograms are compatible by checking each defined axis.
h1 | First histogram |
h2 | Second histogram |
Definition at line 544 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::Run().
|
protected |
Clone an object and add to container
c | Container to add to |
o | Object to clone |
Definition at line 1081 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaMCTask::CentBin::MakeAlpha(), AliTrackletdNdetaTask::HistoSet::MasterFinalize(), AliTrackletdNdetaTask::CentBin::MasterFinalize(), AliTrackletdNdetaTask::MasterFinalize(), AliTrackletdNdetaMCTask::CentBin::MasterFinalize(), and AliTrackletdNdetaMCTask::MasterFinalize().
|
static |
Get a copy of a 1D histogram from a container
parent | Container |
name | Name of histogram |
newName | Optional new name of copy |
Definition at line 729 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawdNdeta(), AliTrackletdNdetaTask::CentBin::EstimateBackground(), AliTrackletdNdetaPost::Make2Stack(), and AliTrackletdNdetaPost::Run().
|
static |
Get a copy of a 2D histogram from a container
parent | Container |
name | Name of histogram |
newName | Optional new name of copy |
Definition at line 740 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawAlpha(), AliTrackletdNdetaPost::DrawBackground(), AliTrackletdNdetaPost::DrawdNdeta(), and AliTrackletdNdetaTask::CentBin::EstimateBackground().
|
static |
Fix axis attributes
axis | Axis to fix |
title | Possible title for axis |
Definition at line 849 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaTask::AliTrackletdNdetaTask(), AliTrackletdNdetaTask::InitCentBins(), AliTrackletdNdetaMCTask::MakePdgAxis(), ScaleAxis(), SetAxis(), and AliTrackletdNdetaTask::WorkerInit().
|
static |
Get a boolean value from a container
parent | Parent container |
name | Name of parameter |
def | Default value if not found |
Definition at line 718 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawParams().
|
static |
Get a container from a container
parent | Container |
name | Name of container |
Definition at line 686 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawAlpha(), AliTrackletdNdetaPost::DrawBackground(), AliTrackletdNdetaPost::DrawdNdeta(), AliTrackletdNdetaPost::DrawParams(), AliTrackletdNdetaTask::HistoSet::FinalizeInit(), AliTrackletdNdetaTask::CentBin::FinalizeInit(), AliTrackletdNdetaPost::FindDelta(), AliTrackletdNdetaPost::FindSub(), AliTrackletdNdetaPost::GetDeltaScale(), AliTrackletdNdetaPost::GetDeltaScaleDist(), AliTrackletdNdetaMCTask::CentBin::MasterFinalize(), AliTrackletdNdetaPost::ProcessBin(), and AliTrackletdNdetaPost::Run().
|
static |
Get a container from a directory
parent | Container |
name | Name of container |
Definition at line 692 of file AliTrackletdNdetaUtils.C.
|
static |
Get a double-precision value from a container
parent | Parent container |
name | Name of parameter |
def | Default value if not found |
Definition at line 697 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawParams(), AliTrackletdNdetaTask::CentBin::EstimateBackground(), AliTrackletdNdetaPost::GetDeltaScale(), and AliTrackletdNdetaPost::Run().
Get a 1D histogram from a container
parent | Container |
name | Name of histogram |
Definition at line 675 of file AliTrackletdNdetaUtils.C.
Referenced by CopyH1(), AliTrackletdNdetaPost::DrawdNdeta(), AliTrackletdNdetaPost::DrawGeneral(), AliTrackletdNdetaPost::DrawSim(), AliTrackletdNdetaPost::DrawSpecies(), AliTrackletdNdetaTask::CentBin::EstimateBackground(), AliTrackletdNdetaTask::HistoSet::FinalizeInit(), AliTrackletdNdetaTask::CentBin::FinalizeInit(), AliTrackletdNdetaPost::FindDelta(), AliTrackletdNdetaPost::FindSub(), AliTrackletdNdetaPost::GetDeltaIntDist(), AliTrackletdNdetaTask::MasterFinalize(), AliTrackletdNdetaMCTask::CentBin::MasterFinalize(), AliTrackletdNdetaMCTask::MasterFinalize(), and AliTrackletdNdetaPost::Run().
Get a 2D histogram from a container
parent | Container |
name | Name of histogram |
Definition at line 680 of file AliTrackletdNdetaUtils.C.
Referenced by CopyH2(), AliTrackletdNdetaPost::DrawAlpha(), AliTrackletdNdetaPost::DrawBackground(), AliTrackletdNdetaPost::DrawClusters(), AliTrackletdNdetaTask::CentBin::EstimateBackground(), AliTrackletdNdetaTask::HistoSet::FinalizeInit(), AliTrackletdNdetaPost::GetDeltaIntDist(), AliTrackletdNdetaMCTask::CentBin::MakeAlpha(), AliTrackletdNdetaTask::MasterFinalize(), and AliTrackletdNdetaMCTask::CentBin::MasterFinalize().
Get a integer value from a container
parent | Parent container |
name | Name of parameter |
def | Default value if not found |
Definition at line 708 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawParams().
|
static |
Get an object from a container.
parent | Container |
name | Name of object |
cls | If not null, check if object has this type |
Definition at line 627 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawSim(), GetB(), GetC(), GetD(), GetH1(), GetH2(), and GetI().
|
static |
Get an object from a directory.
parent | directory |
name | Name of object |
cls | If not null, check if object has this type |
Definition at line 651 of file AliTrackletdNdetaUtils.C.
|
static |
Helper function to integrate a histogram. Note, for symmetric histograms, both sides are integrate, and the errors added in quadrature.
h | Histogram to integrate |
min | Least limint |
max | Largest limit |
err | On return, the error on the integral (95% CL) |
Definition at line 1097 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::GetDeltaIntDist(), and AliTrackletdNdetaTask::HistoSet::MasterFinalize().
|
static |
Service function to make a 1D histogram from an axis definition
name | Name of histogram |
title | Title of histogram |
xAxis | X axis to use |
c | Container |
color | Color |
style | Marker style |
Definition at line 751 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaTask::HistoSet::WorkerInit(), AliTrackletdNdetaTask::CentBin::WorkerInit(), AliTrackletdNdetaTask::WorkerInit(), and AliTrackletdNdetaMCTask::CentBin::WorkerInit().
|
static |
Service function to make a 2D histogram from axis definitions
name | Name of histogram |
title | Title of histogram |
xAxis | X axis definition |
yAxis | Y axis definition |
c | Container |
color | Color |
style | Marker style |
Definition at line 794 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaTask::HistoSet::WorkerInit(), AliTrackletdNdetaTask::WorkerInit(), and AliTrackletdNdetaMCTask::CentBin::WorkerInit().
|
static |
Print axis
axis | Axis to print |
nSig | Number of significant digits |
alt | Atlernate name |
Definition at line 941 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaTask::Print().
|
static |
Calculate ratio and error on ratio
n | Numerator value |
en | Numerator error |
d | Denominator value |
ed | Denominator error |
er | On return, ratio error |
Definition at line 1120 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawdNdeta(), AliTrackletdNdetaTask::CentBin::EstimateBackground(), and AliTrackletdNdetaPost::GetDeltaScale().
|
static |
Calculate ratio and error on ratio
n | Numerator value |
e2n | Squared numerator error |
d | Denominator value |
e2d | Squared denominator error |
e2r | On return, squared ratio error |
Definition at line 1132 of file AliTrackletdNdetaUtils.C.
Scale a histogram by factor with error propagation
h | Histogram to scale |
x | Scalar |
xe | Error on scalar |
Definition at line 610 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaPost::DrawdNdeta(), and AliTrackletdNdetaTask::CentBin::EstimateBackground().
Scale a histogram by factor with error propagation
h | Histogram to scale |
x | Scalar |
xe | Error on scalar |
Definition at line 591 of file AliTrackletdNdetaUtils.C.
Scale the two dimensional histogram with content of the 1-dimensional histogram (over X)
h | Histogram to scale |
s | The scalar histogram |
Definition at line 569 of file AliTrackletdNdetaUtils.C.
Scale bins of an axis by constant factor. The number of bins remains the same.
axis | Axis to modify |
fact | Factor to scale by |
Definition at line 865 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaMCTask::CentBin::WorkerInit().
Scale each Y-row of input histogram to the number of events in second histogram. Also scale to bin-width in X direction.
h | Input histogram |
ipZ | Histogram to scale by |
full | If true, do error propegation of IPz errors |
Definition at line 957 of file AliTrackletdNdetaUtils.C.
Referenced by AliTrackletdNdetaTask::HistoSet::MasterFinalize(), and AliTrackletdNdetaMCTask::CentBin::MasterFinalize().
Set an axis based on bin borders
axis | Axis to set |
n | Number of bins |
borders | Bin borders (n+1 entries) |
Definition at line 879 of file AliTrackletdNdetaUtils.C.
Referenced by SetAxis(), AliTrackletdNdetaTask::SetCentralityAxis(), AliTrackletdNdetaTask::SetEtaAxis(), AliTrackletdNdetaTask::SetIPzAxis(), and AliTrackletdNdetaTask::SetPhiAxis().
|
static |
Set an axis based on test string of specs. The token separator is given in sep.
axis | Axis to set |
spec | Specification |
sep | Token separate |
Definition at line 885 of file AliTrackletdNdetaUtils.C.
Set axis with least and largest values
axis | Axis to set |
n | Number of bins |
l | Least value |
h | Largest value |
Definition at line 927 of file AliTrackletdNdetaUtils.C.
Set a symmetric axis
axis | Axis to set |
n | Number of bins |
m | Maximum absolute value |
Definition at line 936 of file AliTrackletdNdetaUtils.C.