1 #ifndef ALITPCCALIBVIEWER_H
2 #define ALITPCCALIBVIEWER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 /* $Id: AliTPCCalibViewer.h,v */
8 ///////////////////////////////////////////////////
10 // TPC calibration viewer/visualization class //
11 // use Tree for visualization //
12 ///////////////////////////////////////////////////
17 #include "AliTPCCalPad.h"
18 #include "AliTPCCalROC.h"
19 #include "TFriendElement.h"
22 class AliTPCCalibViewer : public TObject {
25 AliTPCCalibViewer(const AliTPCCalibViewer &c);
26 AliTPCCalibViewer(TTree* tree);
27 AliTPCCalibViewer(char* fileName, char* treeName = "calPads");
28 AliTPCCalibViewer &operator = (const AliTPCCalibViewer & param);
29 virtual ~AliTPCCalibViewer();
30 virtual void Delete(Option_t* option = "");
32 virtual void Draw(Option_t* opt="") { fTree->Draw(opt); }
33 virtual 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); };
34 virtual 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); };
36 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'
37 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'
38 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'
39 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'
40 Int_t DrawHisto1D(const char* type, Int_t sector, TVectorF& nsigma, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const; // draws 1d histograms and superimposes mean, median, ltm and several sigma cuts
41 void SigmaCut(const char* type, Int_t sector, Float_t sigmaMax = 5, Float_t sigmaStep = 0.5, Bool_t plotMean = kTRUE, Bool_t plotMedian = kTRUE, Bool_t plotLTM = kTRUE) const; // draws fraction of used pads over different sigma cuts
43 AliTPCCalPad* GetCalPad(const char* desiredData, char* cuts = "", char* calPadName = "NoName") const; // returns an AliTPCCalPad object containing the specified data with cuts applied
44 AliTPCCalROC* GetCalROC(const char* desiredData, UInt_t sector, char* cuts = "") const; // returns an AliTPCCalROC object containing the specified data for sector with cuts applied
46 TObjArray* GetArrayOfCalPads();
47 TObjArray* GetListOfVariables(Bool_t printList = kFALSE);
48 TObjArray* GetListOfNormalizationVariables(Bool_t printList = kFALSE);
50 static void MakeTreeWithObjects(const char * fileName, TObjArray * array, const char * mapFileName = 0);
51 static void MakeTree(const char * fileName, TObjArray * array, const char * mapFileName = 0, AliTPCCalPad* outlierPad = 0, Float_t ltmFraction = 0.9);
53 TFriendElement* AddReferenceTree(const char* filename, const char* treename = "calPads", const char* refname = "R");
54 TFriendElement* AddFriend(const char* treename, const char* filename) {return fTree->AddFriend(treename, filename);};
55 TFriendElement* AddFriend(TTree* tree, const char* alias, Bool_t warn=kFALSE) {return fTree->AddFriend(tree, alias, warn);};
56 TFriendElement* AddFriend(const char* treename, TFile* file) {return fTree->AddFriend(treename, file);};
57 TTree * GetTree() { return fTree;}
59 TString* Fit(const char* drawCommand, const char* formula, const char* cuts, Double_t & chi2, TVectorD &fitParam, TMatrixD &covMatrix);
62 TTree* fTree; // tree containing visualization data (e.g. written by AliTPCCalPad::MakeTree(...)
63 TFile* fFile; // file that contains a calPads tree (e.g. written by AliTPCCalPad::MakeTree(...)
64 TObjArray* fListOfObjectsToBeDeleted; //Objects, that will be deleted when the destructor ist called
65 Bool_t fTreeMustBeDeleted; // decides weather the tree must be deleted in destructor or not
67 ClassDef(AliTPCCalibViewer,1) // TPC calibration viewer class