ROOT logo
AliRoot » TPC » AliTPCCalibViewer

class AliTPCCalibViewer: public TObject


Class for viewing/visualizing TPC calibration data
base on  TTree functionality for visualization

Create a list of AliTPCCalPads, arrange them in an TObjArray.
Pass this TObjArray to MakeTree and create the calibration Tree
While craating this tree some statistical information are calculated
Open the viewer with this Tree: AliTPCCalibViewer v("CalibTree.root")
Have fun!
EasyDraw("CETmean~-CETmean_mean", "A", "(CETmean~-CETmean_mean)>0")

If you like to click, we recommand you the
AliTPCCalibViewerGUI

THE DOCUMENTATION IS STILL NOT COMPLETED !!!!


Function Members (Methods)

public:
AliTPCCalibViewer()
AliTPCCalibViewer(const AliTPCCalibViewer& c)
AliTPCCalibViewer(TTree *const tree)
AliTPCCalibViewer(const char* fileName, const char* treeName = "calPads")
virtual~AliTPCCalibViewer()
voidTObject::AbstractMethod(const char* method) const
const char*AddAbbreviations(const Char_t* c, Bool_t printDrawCommand = kFALSE)
TFriendElement*AddFriend(const char* treename, const char* filename)
TFriendElement*AddFriend(const char* treename, TFile* file)
TFriendElement*AddFriend(TTree* tree, const char* alias, Bool_t warn = kFALSE)
TFriendElement*AddReferenceTree(const char* filename, const char* treename = "calPads", const char* refname = "R")
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
static voidCreateObjectList(const Char_t* filename, TObjArray* calibObjects)
virtual voidDelete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* opt = "")
virtual Long64_tDraw(const char* varexp, const TCut& selection, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0)
virtual Long64_tDraw(const char* varexp, const char* selection, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0)
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
Int_tDrawHisto1D(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* sigmas = "2;4;6", Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const
Int_tDrawHisto1D(const char* drawCommand, const char* sector, const char* cuts = 0, const char* sigmas = "2;4;6", Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const
virtual voidTObject::Dump() constMENU
Int_tEasyDraw(const char* drawCommand, const char* sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
Int_tEasyDraw(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
Int_tEasyDraw1D(const char* drawCommand, const char* sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
Int_tEasyDraw1D(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TString*Fit(const char* drawCommand, const char* formula, const char* cuts, Double_t& chi2, TVectorD& fitParam, TMatrixD& covMatrix)
voidFormatHistoLabels(TH1* histo) const
TString&GetAbbreviation()
TString&GetAppendString()
TObjArray*GetArrayOfCalPads()
static Int_tGetBin(Float_t value, Int_t nbins, Double_t binLow, Double_t binUp)
AliTPCCalPad*GetCalPad(const char* desiredData, const char* cuts = "", const char* calPadName = "NoName") const
AliTPCCalPad*GetCalPadOld(const char* desiredData, const char* cuts = "", const char* calPadName = "NoName") const
AliTPCCalROC*GetCalROC(const char* desiredData, UInt_t sector, const char* cuts = "") const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TObjArray*GetListOfNormalizationVariables(Bool_t printList = kFALSE) const
TObjArray*GetListOfVariables(Bool_t printList = kFALSE)
static Double_tGetLTM(Int_t n, const Double_t *const array, Double_t *const sigma = 0, Double_t fraction = 0.9)
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
TTree*GetTree() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
static TH1F*Integrate(TH1F *const histogram, Float_t mean = 0, Float_t sigma = 0, Float_t sigmaMax = 0, Float_t sigmaStep = -1)
Int_tIntegrate(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, const char* sigmas = "", Float_t sigmaStep = -1) const
Int_tIntegrate(const char* drawCommand, Int_t sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, const char* sigmas = "", Float_t sigmaStep = -1) const
static TH1F*Integrate(Int_t n, const Float_t *const array, Int_t nbins, Float_t binLow, Float_t binUp, Float_t mean = 0, Float_t sigma = 0, Float_t sigmaMax = 0, Float_t sigmaStep = -1)
Int_tIntegrateOld(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, const char* sigmas = "", Float_t sigmaStep = -1) const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
static voidMakeCalPadAliases(TTree* tree)
static voidMakeTree(const char* fileName, TObjArray* array, const char* mapFileName = 0, AliTPCCalPad *const outlierPad = 0, Float_t ltmFraction = 0.9)
static voidMakeTree(const char* outPutFileName, const Char_t* inputFileName, AliTPCCalPad* outlierPad = 0, Float_t ltmFraction = 0.9, const char* mapFileName = "$ALICE_ROOT/TPC/Calib/MapCalibrationObjects.root")
static voidMakeTreeWithObjects(const char* fileName, const TObjArray *const array, const char* mapFileName = 0)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AliTPCCalibViewer&operator=(const AliTPCCalibViewer& param)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetAbbreviation(const Char_t* abr)
voidSetAppendString(const Char_t* str)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
static TH1F*SigmaCut(TH1F *const histogram, Float_t mean, Float_t sigma, Float_t sigmaMax, Float_t sigmaStep = -1, Bool_t pm = kFALSE)
static TH1F*SigmaCut(Int_t n, const Double_t* array, Double_t mean, Double_t sigma, Int_t nbins, const Double_t* xbins, Double_t sigmaMax)
Int_tSigmaCut(const char* drawCommand, Int_t sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, Bool_t pm = kFALSE, const char* sigmas = "", Float_t sigmaStep = -1) const
Int_tSigmaCut(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, Bool_t pm = kFALSE, const char* sigmas = "", Float_t sigmaStep = -1) const
static TH1F*SigmaCut(Int_t n, const Float_t* array, Float_t mean, Float_t sigma, Int_t nbins, Float_t binLow, Float_t binUp, Float_t sigmaMax, Float_t sigmaStep = -1, Bool_t pm = kFALSE)
Int_tSigmaCutNew(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, Bool_t pm = kFALSE, const char* sigmas = "", Float_t sigmaStep = -1) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidDrawLines(TH1F* cutHistoMean, TVectorF nsigma, TLegend* legend, Int_t color, Bool_t pm) const
voidDrawLines(TGraph* graph, TVectorF nsigma, TLegend* legend, Int_t color, Bool_t pm) const
voidTObject::MakeZombie()

Data Members

protected:
TStringfAbbreviationthe abreviation for '.fElements'
TStringfAppendString'.fElements', stored in a TStrig
TFile*fFilefile that contains a calPads tree (e.g. written by AliTPCCalPad::MakeTree(...)
TObjArray*fListOfObjectsToBeDeletedObjects, that will be deleted when the destructor ist called
TTree*fTreetree containing visualization data (e.g. written by AliTPCCalPad::MakeTree(...)
Bool_tfTreeMustBeDeleteddecides weather the tree must be deleted in destructor or not

Class Charts

Inheritance Chart:
TObject
AliTPCCalibViewer

Function documentation

AliTPCCalibViewer()
 Default constructor

AliTPCCalibViewer(const AliTPCCalibViewer& c)
 dummy AliTPCCalibViewer copy constructor
 not yet working!!!

AliTPCCalibViewer(TTree *const tree)
 Constructor that initializes the calibration viewer

AliTPCCalibViewer(const char* fileName, const char* treeName = "calPads")
 Constructor to initialize the calibration viewer
 the file 'fileName' contains the tree 'treeName'

~AliTPCCalibViewer()
 AliTPCCalibViewer destructor
 all objects will be deleted, the file will be closed, the pictures will disappear

void Delete(Option_t* option = "")
 Should be called from AliTPCCalibViewerGUI class only.
 If you use Delete() do not call the destructor.
 All objects (except those contained in fListOfObjectsToBeDeleted) will be deleted, the file will be closed.

const char* AddAbbreviations(const Char_t* c, Bool_t printDrawCommand = kFALSE)
 Replace all "<variable>" with "<variable><fAbbreviation>" (Adds forgotten "~")
 but take care on the statistical information, like "CEQmean_Mean"
 and also take care on correct given variables, like "CEQmean~"

 For each variable out of "listOfVariables":
 - 'Save' correct items:
   - form <replaceString>, take <variable>'s first char, add <removeString>, add rest of <variable>, e.g. "C!#EQmean" (<removeString> = "!#")
   - For each statistical information in "listOfNormalizationVariables":
     - ReplaceAll <variable><statistical_Information> with <replaceString><statistical_Information>
   - ReplaceAll <variable><abbreviation> with <replaceString><abbreviation>, e.g. "CEQmean~" -> "C!#EQmean~"
   - ReplaceAll <variable><appendStr> with <replaceString><appendStr>, e.g. "CEQmean.fElements" -> "C!#EQmean.fElements"

 - Do actual replacing:
   - ReplaceAll <variable> with <variable><fAbbreviation>, e.g. "CEQmean" -> "CEQmean~"

 - Undo saving:
   - For each statistical information in "listOfNormalizationVariables":
     - ReplaceAll <replaceString><statistical_Information> with <variable><statistical_Information>
   - ReplaceAll <replaceString><abbreviation> with <variable><abbreviation>, e.g. "C!#EQmean~" -> "CEQmean~"
   - ReplaceAll <replaceString><appendStr> with <variable><appendStr>, e.g. "C!#EQmean.fElements" -> "CEQmean.fElements"

 Now all the missing "~" should be added.
Int_t EasyDraw(const char* drawCommand, const char* sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
 easy drawing of data, use '~' for abbreviation of '.fElements'
 example: EasyDraw("CETmean~-CETmean_mean", "A", "(CETmean~-CETmean_mean)>0")
 sector: sector-number - only the specified sector will be drwawn
         'A'/'C' or 'a'/'c' - side A/C will be drawn
         'ALL' - whole TPC will be drawn, projected on one side
 cuts: specifies cuts
 drawOptions: draw options like 'same'
 writeDrawCommand: write the command, that is passed to TTree::Draw

Int_t EasyDraw(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
 easy drawing of data, use '~' for abbreviation of '.fElements'
 example: EasyDraw("CETmean~-CETmean_mean", 34, "(CETmean~-CETmean_mean)>0")
 sector: sector-number - only the specified sector will be drwawn
 cuts: specifies cuts
 drawOptions: draw options like 'same'
 writeDrawCommand: write the command, that is passed to TTree::Draw

Int_t EasyDraw1D(const char* drawCommand, const char* sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
 easy drawing of data, use '~' for abbreviation of '.fElements'
 example: EasyDraw("CETmean~-CETmean_mean", "A", "(CETmean~-CETmean_mean)>0")
 sector: sector-number - the specified sector will be drwawn
         'A'/'C' or 'a'/'c' - side A/C will be drawn
         'ALL' - whole TPC will be drawn, projected on one side
 cuts: specifies cuts
 drawOptions: draw options like 'same'
 writeDrawCommand: write the command, that is passed to TTree::Draw

Int_t EasyDraw1D(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* drawOptions = 0, Bool_t writeDrawCommand = kFALSE) const
 easy drawing of data, use '~' for abbreviation of '.fElements'
 example: EasyDraw("CETmean~-CETmean_mean", 34, "(CETmean~-CETmean_mean)>0")
 sector: sector-number - the specified sector will be drwawn
 cuts: specifies cuts
 drawOptions: draw options like 'same'
 writeDrawCommand: write the command, that is passed to TTree::Draw

void FormatHistoLabels(TH1* histo) const
 formats title and axis labels of histo
 removes '.fElements'

Int_t DrawHisto1D(const char* drawCommand, Int_t sector, const char* cuts = 0, const char* sigmas = "2;4;6", Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const
 Easy drawing of data, in principle the same as EasyDraw1D
 Difference: A line for the mean / median / LTM is drawn
 in 'sigmas' you can specify in which distance to the mean/median/LTM you want to see a line in sigma-units, separated by ';'
 example: sigmas = "2; 4; 6;"  at 2 #sigma, 4 #sigma and 6 #sigma  a line is drawn.
 "plotMean", "plotMedian" and "plotLTM": what kind of lines do you want to see?

Int_t DrawHisto1D(const char* drawCommand, const char* sector, const char* cuts = 0, const char* sigmas = "2;4;6", Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const
 Easy drawing of data, in principle the same as EasyDraw1D
 Difference: A line for the mean / median / LTM is drawn
 in 'sigmas' you can specify in which distance to the mean/median/LTM you want to see a line in sigma-units, separated by ';'
 example: sigmas = "2; 4; 6;"  at 2 #sigma, 4 #sigma and 6 #sigma  a line is drawn.
 "plotMean", "plotMedian" and "plotLTM": what kind of lines do you want to see?

Int_t SigmaCut(const char* drawCommand, Int_t sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, Bool_t pm = kFALSE, const char* sigmas = "", Float_t sigmaStep = -1) const
 Creates a histogram S(t, #mu, #sigma), where you can see, how much of the data are inside sigma-intervals around the mean value
 The data of the distribution f(x, #mu, #sigma) are given in 'array', 'n' specifies the length of the array
 'mean' and 'sigma' are #mu and  #sigma of the distribution in 'array', to be specified by the user
 'nbins': number of bins, 'binLow': first bin, 'binUp': last bin
 sigmaMax: up to which sigma around the mean/median/LTM the histogram is generated (in units of sigma, t #sigma)
 sigmaStep: the binsize of the generated histogram

f(x, #mu, #sigma)     #Rightarrow       S(t, #mu, #sigma) = (#int_{#mu}^{#mu + t #sigma} f(x, #mu, #sigma) dx + #int_{#mu}^{#mu - t #sigma} f(x, #mu, #sigma) dx) / (#int_{-#infty}^{+#infty} f(x, #mu, #sigma) dx)


 Creates a histogram, where you can see, how much of the data are inside sigma-intervals
 around the mean/median/LTM
 with drawCommand, sector and cuts you specify your input data, see EasyDraw
 sigmaMax: up to which sigma around the mean/median/LTM the histogram is generated (in units of sigma)
 sigmaStep: the binsize of the generated histogram
 plotMean/plotMedian/plotLTM: specifies where to put the center

Int_t SigmaCut(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, Bool_t pm = kFALSE, const char* sigmas = "", Float_t sigmaStep = -1) const
 Creates a histogram, where you can see, how much of the data are inside sigma-intervals
 around the mean/median/LTM
 with drawCommand, sector and cuts you specify your input data, see EasyDraw
 sigmaMax: up to which sigma around the mean/median/LTM the histogram is generated (in units of sigma)
 sigmaStep: the binsize of the generated histogram
 plotMean/plotMedian/plotLTM: specifies where to put the center

Int_t SigmaCutNew(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, Bool_t pm = kFALSE, const char* sigmas = "", Float_t sigmaStep = -1) const
 Creates a histogram, where you can see, how much of the data are inside sigma-intervals
 around the mean/median/LTM
 with drawCommand, sector and cuts you specify your input data, see EasyDraw
 sigmaMax: up to which sigma around the mean/median/LTM the histogram is generated (in units of sigma)
 sigmaStep: the binsize of the generated histogram
 plotMean/plotMedian/plotLTM: specifies where to put the center

Int_t Integrate(const char* drawCommand, Int_t sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, const char* sigmas = "", Float_t sigmaStep = -1) const
 Creates an integrated histogram S(t, #mu, #sigma), out of the input distribution distribution f(x, #mu, #sigma), given in "histogram"
 "mean" and "sigma" are #mu and  #sigma of the distribution in "histogram", to be specified by the user
 sigmaMax: up to which sigma around the mean/median/LTM you want to integrate
 if "igma == 0" and "sigmaMax == 0" the whole histogram is integrated
 "sigmaStep": the binsize of the generated histogram, -1 means, that the maximal reasonable stepsize is used
 The actual work is done on the array.

f(x, #mu, #sigma)     #Rightarrow       S(t, #mu, #sigma) = #int_{-#infty}^{#mu + t #sigma} f(x, #mu, #sigma) dx / #int_{-#infty}^{+#infty} f(x, #mu, #sigma) dx

Int_t IntegrateOld(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, const char* sigmas = "", Float_t sigmaStep = -1) const
 Creates an integrated histogram S(t, #mu, #sigma), out of the input distribution distribution f(x, #mu, #sigma), given in "histogram"
 "mean" and "sigma" are #mu and  #sigma of the distribution in "histogram", to be specified by the user
 sigmaMax: up to which sigma around the mean/median/LTM you want to integrate
 if "igma == 0" and "sigmaMax == 0" the whole histogram is integrated
 "sigmaStep": the binsize of the generated histogram, -1 means, that the maximal reasonable stepsize is used
 The actual work is done on the array.

f(x, #mu, #sigma)     #Rightarrow       S(t, #mu, #sigma) = #int_{-#infty}^{#mu + t #sigma} f(x, #mu, #sigma) dx / #int_{-#infty}^{+#infty} f(x, #mu, #sigma) dx

Int_t Integrate(const char* drawCommand, const char* sector, const char* cuts = 0, Float_t sigmaMax = 5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE, const char* sigmas = "", Float_t sigmaStep = -1) const
 Creates an integrated histogram S(t, #mu, #sigma), out of the input distribution distribution f(x, #mu, #sigma), given in "histogram"
 "mean" and "sigma" are #mu and  #sigma of the distribution in "histogram", to be specified by the user
 sigmaMax: up to which sigma around the mean/median/LTM you want to integrate
 if "igma == 0" and "sigmaMax == 0" the whole histogram is integrated
 "sigmaStep": the binsize of the generated histogram, -1 means, that the maximal reasonable stepsize is used
 The actual work is done on the array.

f(x, #mu, #sigma)     #Rightarrow       S(t, #mu, #sigma) = #int_{-#infty}^{#mu + t #sigma} f(x, #mu, #sigma) dx / #int_{-#infty}^{+#infty} f(x, #mu, #sigma) dx

void DrawLines(TH1F* cutHistoMean, TVectorF nsigma, TLegend* legend, Int_t color, Bool_t pm) const
 Private function for SigmaCut(...) and Integrate(...)
 Draws lines into the given histogram, specified by "nsigma", the lines are addeed to the legend

void DrawLines(TGraph* graph, TVectorF nsigma, TLegend* legend, Int_t color, Bool_t pm) const
 Private function for SigmaCut(...) and Integrate(...)
 Draws lines into the given histogram, specified by "nsigma", the lines are addeed to the legend

Int_t GetBin(Float_t value, Int_t nbins, Double_t binLow, Double_t binUp)
 Returns the 'bin' for 'value'
 The interval between 'binLow' and 'binUp' is divided into 'nbins' equidistant bins
 avoid index out of bounds error: 'if (bin < binLow) bin = binLow' and vice versa

GetBin(value) = #frac{nbins - 1}{binUp - binLow} #upoint (value - binLow) +1

Double_t GetLTM(Int_t n, const Double_t *const array, Double_t *const sigma = 0, Double_t fraction = 0.9)
  returns the LTM and sigma

TH1F* SigmaCut(TH1F *const histogram, Float_t mean, Float_t sigma, Float_t sigmaMax, Float_t sigmaStep = -1, Bool_t pm = kFALSE)
 Creates a cumulative histogram S(t, #mu, #sigma), where you can see, how much of the data are inside sigma-intervals around the mean value
 The data of the distribution f(x, #mu, #sigma) are given in 'histogram'
 'mean' and 'sigma' are #mu and  #sigma of the distribution in 'histogram', to be specified by the user
 sigmaMax: up to which sigma around the mean/median/LTM the histogram is generated (in units of sigma, t #sigma)
 sigmaStep: the binsize of the generated histogram, -1 means, that the maximal reasonable stepsize is used
 pm: Decide weather t > 0 (first case) or t arbitrary (secound case)
 The actual work is done on the array.

f(x, #mu, #sigma)     #Rightarrow       S(t, #mu, #sigma) = (#int_{#mu}^{#mu + t #sigma} f(x, #mu, #sigma) dx + #int_{#mu}^{#mu - t #sigma} f(x, #mu, #sigma) dx) / (#int_{-#infty}^{+#infty} f(x, #mu, #sigma) dx),    for  t > 0

output of MACRO_AliTPCCalibViewer_SigmaCut_3_8_cAliTPCCalibViewer1
      {
         Float_t mean = 0;
         Float_t sigma = 1.5;
         Float_t sigmaMax = 4;
         gROOT->SetStyle("Plain");
         TH1F *distribution = new TH1F("Distrib1", "Distribution f(x, #mu, #sigma)", 1000,-5,5);
         TRandom rand(23);
         for (Int_t i = 0; i <50000;i++) distribution->Fill(rand.Gaus(mean, sigma));
         Float_t *ar = distribution->GetArray();
         
         TCanvas* macro_example_canvas = new TCanvas("cAliTPCCalibViewer1", "", 350, 350);
         macro_example_canvas->Divide(0,3);
         TVirtualPad *pad1 = macro_example_canvas->cd(1);
         pad1->SetGridy();
         pad1->SetGridx();
         distribution->Draw();
         TVirtualPad *pad2 = macro_example_canvas->cd(2);
         pad2->SetGridy();
         pad2->SetGridx();
         
         TH1F *shist = AliTPCCalibViewer::SigmaCut(distribution, mean, sigma, sigmaMax);
         shist->SetNameTitle("Cumulative","Cumulative S(t, #mu, #sigma)");
         shist->Draw();  
         TVirtualPad *pad3 = macro_example_canvas->cd(3);
         pad3->SetGridy();
         pad3->SetGridx();
         TH1F *shistPM = AliTPCCalibViewer::SigmaCut(distribution, mean, sigma, sigmaMax, -1, kTRUE);
         shistPM->Draw();   
         return macro_example_canvas;
      }  
      

TH1F* SigmaCut(Int_t n, const Float_t* array, Float_t mean, Float_t sigma, Int_t nbins, Float_t binLow, Float_t binUp, Float_t sigmaMax, Float_t sigmaStep = -1, Bool_t pm = kFALSE)
 Creates a histogram S(t, #mu, #sigma), where you can see, how much of the data are inside sigma-intervals around the mean value
 The data of the distribution f(x, #mu, #sigma) are given in 'array', 'n' specifies the length of the array
 'mean' and 'sigma' are #mu and  #sigma of the distribution in 'array', to be specified by the user
 'nbins': number of bins, 'binLow': first bin, 'binUp': last bin
 sigmaMax: up to which sigma around the mean/median/LTM the histogram is generated (in units of sigma, t #sigma)
 sigmaStep: the binsize of the generated histogram
 Here the actual work is done.
TH1F* SigmaCut(Int_t n, const Double_t* array, Double_t mean, Double_t sigma, Int_t nbins, const Double_t* xbins, Double_t sigmaMax)
 SigmaCut for variable binsize
 NOT YET IMPLEMENTED !!!

TH1F* Integrate(TH1F *const histogram, Float_t mean = 0, Float_t sigma = 0, Float_t sigmaMax = 0, Float_t sigmaStep = -1)
 Creates an integrated histogram S(t, #mu, #sigma), out of the input distribution distribution f(x, #mu, #sigma), given in "histogram"
 "mean" and "sigma" are #mu and  #sigma of the distribution in "histogram", to be specified by the user
 sigmaMax: up to which sigma around the mean/median/LTM you want to integrate
 if "igma == 0" and "sigmaMax == 0" the whole histogram is integrated
 "sigmaStep": the binsize of the generated histogram, -1 means, that the maximal reasonable stepsize is used
 The actual work is done on the array.

f(x, #mu, #sigma)     #Rightarrow       S(t, #mu, #sigma) = #int_{-#infty}^{#mu + t #sigma} f(x, #mu, #sigma) dx / #int_{-#infty}^{+#infty} f(x, #mu, #sigma) dx



TH1F* Integrate(Int_t n, const Float_t *const array, Int_t nbins, Float_t binLow, Float_t binUp, Float_t mean = 0, Float_t sigma = 0, Float_t sigmaMax = 0, Float_t sigmaStep = -1)
 Creates an integrated histogram S(t, #mu, #sigma), out of the input distribution distribution f(x, #mu, #sigma), given in "histogram"
 "mean" and "sigma" are #mu and  #sigma of the distribution in "histogram", to be specified by the user
 sigmaMax: up to which sigma around the mean/median/LTM you want to integrate
 if "igma == 0" and "sigmaMax == 0" the whole histogram is integrated
 "sigmaStep": the binsize of the generated histogram, -1 means, that the maximal reasonable stepsize is used
 Here the actual work is done.
AliTPCCalPad* GetCalPadOld(const char* desiredData, const char* cuts = "", const char* calPadName = "NoName") const
 creates a AliTPCCalPad out of the 'desiredData'
 the functionality of EasyDraw1D is used
 calPadName specifies the name of the created AliTPCCalPad
  - this takes a while -

AliTPCCalPad* GetCalPad(const char* desiredData, const char* cuts = "", const char* calPadName = "NoName") const
 creates a AliTPCCalPad out of the 'desiredData'
 the functionality of EasyDraw1D is used
 calPadName specifies the name of the created AliTPCCalPad
  - this takes a while -

AliTPCCalROC* GetCalROC(const char* desiredData, UInt_t sector, const char* cuts = "") const
 creates a AliTPCCalROC out of the desiredData
 the functionality of EasyDraw1D is used
 sector specifies the sector of the created AliTPCCalROC

TObjArray* GetListOfVariables(Bool_t printList = kFALSE)
 scan the tree  - produces a list of available variables in the tree
 printList: print the list to the screen, after the scan is done

TObjArray* GetListOfNormalizationVariables(Bool_t printList = kFALSE) const
 produces a list of available variables for normalization in the tree
 printList: print the list to the screen, after the scan is done

TFriendElement* AddReferenceTree(const char* filename, const char* treename = "calPads", const char* refname = "R")
 add a reference tree to the current tree
 by default the treename is 'calPads' and the reference treename is 'R'

TObjArray* GetArrayOfCalPads()
 Returns a TObjArray with all AliTPCCalPads that are stored in the tree
  - this takes a while -

TString* Fit(const char* drawCommand, const char* formula, const char* cuts, Double_t& chi2, TVectorD& fitParam, TMatrixD& covMatrix)
 fit an arbitrary function, specified by formula into the data, specified by drawCommand and cuts
 returns chi2, fitParam and covMatrix
 returns TString with fitted formula

void MakeTreeWithObjects(const char* fileName, const TObjArray *const array, const char* mapFileName = 0)
 Write tree with all available information
 im mapFileName is speciefied, the Map information are also written to the tree
 AliTPCCalPad-Objects are written directly to the tree, so that they can be accessd later on
 (does not work!!!)

void MakeTree(const char* fileName, TObjArray* array, const char* mapFileName = 0, AliTPCCalPad *const outlierPad = 0, Float_t ltmFraction = 0.9)
 Write a tree with all available information
 if mapFileName is speciefied, the Map information are also written to the tree
 pads specified in outlierPad are not used for calculating statistics
 The following statistical information on the basis of a ROC are calculated:
 "_Median", "_Mean", "_LTM", "_RMS_LTM"
 "_Median_OutlierCutted", "_Mean_OutlierCutted", "_RMS_OutlierCutted", "_LTM_OutlierCutted", "_RMS_LTM_OutlierCutted"
 The following position variables are available:
 "row", "pad", "lx", "ly", "gx", "gy", "rpad", "channel"

 The tree out of this function is the basis for the AliTPCCalibViewer and the AliTPCCalibViewerGUI.
void MakeCalPadAliases(TTree* tree)
 make standard aliases for standard calibration trees

void MakeTree(const char* outPutFileName, const Char_t* inputFileName, AliTPCCalPad* outlierPad = 0, Float_t ltmFraction = 0.9, const char* mapFileName = "$ALICE_ROOT/TPC/Calib/MapCalibrationObjects.root")
 Function to create a calibration Tree with all available information.
 See also documentation to MakeTree
 the file "inputFileName" must be in the following format (see also CreateObjectList):
 (each colum separated by tabs, "dependingOnType" can have 2 or 3 colums)

 type	path	dependingOnType

 type == "CE":
 dependingOnType = CETmean	CEQmean	CETrms

 type == "Pulser":
 dependingOnType = PulserTmean	PulsterQmean	PulserTrms

 type == "Pedestals":
 dependingOnType = Pedestals	Noise

 type == "CalPad":
 dependingOnType = NameInFile	NameToWriteToFile


void CreateObjectList(const Char_t* filename, TObjArray* calibObjects)
 Function to create a TObjArray out of a given file
 the file must be in the following format:
 (each colum separated by tabs, "dependingOnType" can have 2 or 3 colums)


 type	path	dependingOnType

 type == "CE":
 dependingOnType = CETmean	CEQmean	CETrms

 type == "Pulser":
 dependingOnType = PulserTmean	PulsterQmean	PulserTrms

 type == "Pedestals":
 dependingOnType = Pedestals	Noise

 type == "CalPad":
 dependingOnType = NameInFile	NameToWriteToFile



TString& GetAbbreviation()
{ return fAbbreviation; }
TString& GetAppendString()
{ return fAppendString; }
void SetAbbreviation(const Char_t* abr)
{ fAbbreviation = abr; }
void SetAppendString(const Char_t* str)
{ fAppendString = str; }
void Draw(Option_t* opt = "")
{ fTree->Draw(opt); }
Long64_t Draw(const char* varexp, const TCut& selection, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0)
{ return fTree->Draw(varexp, selection, option, nentries, firstentry); }
Long64_t Draw(const char* varexp, const char* selection, Option_t* option = "", Long64_t nentries = 1000000000, Long64_t firstentry = 0)
{ return fTree->Draw(varexp, selection, option, nentries, firstentry); }
TFriendElement* AddFriend(const char* treename, const char* filename)
{return fTree->AddFriend(treename, filename);}
TFriendElement* AddFriend(TTree* tree, const char* alias, Bool_t warn = kFALSE)
{return fTree->AddFriend(tree, alias, warn);}
TFriendElement* AddFriend(const char* treename, TFile* file)
{return fTree->AddFriend(treename, file);}
TTree * GetTree() const
{ return fTree;}