1 #ifndef AliTPCCALIBTRACKS_H
2 #define AliTPCCALIBTRACKS_H
5 ///////////////////////////////////////////////////////////////////////////////
7 // Class to analyse tracks for calibration //
8 // to be used as a component in AliTPCSelectorTracks //
9 // In the constructor you have to specify name and title //
10 // to get the Object out of a file. //
11 // The parameter 'clusterParam', a AliTPCClusterParam object //
12 // (needed for TPC cluster error and shape parameterization) //
13 // Normally you get this object out of the file 'TPCClusterParam.root' //
14 // In the parameter 'cuts' the cuts are specified, that decide //
15 // weather a track will be accepted for calibration or not. //
18 ///////////////////////////////////////////////////////////////////////////////
22 #include <AliTPCcalibBase.h>
23 #include "THnSparse.h"
32 class TTreeSRedirector;
34 class AliTPCClusterParam;
35 class TTreeSRedirector;
39 class AliTPCclusterMI;
40 class AliTPCcalibTracksCuts;
49 class AliTPCcalibTracks : public AliTPCcalibBase {
51 AliTPCcalibTracks(); // default constructor
52 AliTPCcalibTracks(const AliTPCcalibTracks&calibTracks); // copy constructor
53 AliTPCcalibTracks(const Text_t *name, const Text_t *title, AliTPCClusterParam *clusterParam, AliTPCcalibTracksCuts* cuts, Int_t logLevel = 0);
54 AliTPCcalibTracks & operator=(const AliTPCcalibTracks& calibTracks);
56 virtual ~AliTPCcalibTracks(); // destructor
58 virtual void Process(AliTPCseed *track); // to be called by the Selector
59 void Process(AliESDEvent *event) {AliTPCcalibBase::Process(event);};
60 void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
61 virtual Long64_t Merge(TCollection *li);
62 void AddHistos(AliTPCcalibTracks* calib);
63 void MakeResPlotsQTree(Int_t minEntries = 100, const char* pathName = "plots");
64 void MakeReport(Int_t stat, const char* pathName = "plots"); // calls all functions that procude pictures, results are written to pathName, stat is the minimal statistic threshold
66 Int_t AcceptTrack(AliTPCseed * track);
67 void FillResolutionHistoLocal(AliTPCseed * track); // the MAIN-FUNCTION, called for each track to fill the histograms, called by Process(...)
70 void SetStyle() const;
72 TObjArray* GetfArrayQDY() const {return fArrayQDY;}
73 TObjArray* GetfArrayQDZ() const {return fArrayQDZ;}
74 TObjArray* GetfArrayQRMSY() const {return fArrayQRMSY;}
75 TObjArray* GetfArrayQRMSZ() const {return fArrayQRMSZ;}
76 TObjArray* GetfResolY() const {return fResolY;}
77 TObjArray* GetfResolZ() const {return fResolZ;}
78 TObjArray* GetfRMSY() const {return fRMSY;}
79 TObjArray* GetfRMSZ() const {return fRMSZ;}
80 TH1I* GetfRejectedTracksHisto() const {return fRejectedTracksHisto;}
81 TH2I* GetfClusterCutHisto() const {return fClusterCutHisto;}
82 AliTPCCalPad* GetfCalPadClusterPerPad() const {return fCalPadClusterPerPad; }
83 AliTPCCalPad* GetfCalPadClusterPerPadRaw() const {return fCalPadClusterPerPadRaw;}
84 AliTPCcalibTracksCuts* GetCuts() {return fCuts;}
85 void MakeHistos(); //make THnSparse
86 int UpdateClusterParam( AliTPCClusterParam *cParam, Bool_t MirrorZ=1, Bool_t MirrorPad=1, Bool_t MirrorAngle=1, Int_t MinStat=10 );
88 static void MakeSummaryTree(THnSparse *hisInput, TTreeSRedirector *pcstream, Int_t ptype);
89 static int GetTHnStat( const THnBase *H, THnBase *&Mean, THnBase *&Sigma, THnBase *&Entr );
90 static int CreateWaveCorrection( const THnBase *DeltaY, THnBase *&MeanY, THnBase *&SigmaY, THnBase *&EntrY,
91 Bool_t MirrorZ=1, Bool_t MirrorPad=1, Bool_t MirrorAngle=1, Int_t MinStat=10 );
97 static Int_t GetBin(Float_t q, Int_t pad);
98 static Int_t GetBin(Int_t iq, Int_t pad);
99 static Float_t GetQ(Int_t bin);
100 static Float_t GetPad(Int_t bin);
101 AliTPCClusterParam *fClusterParam; // pointer to cluster parameterization
104 THnSparse *fHisDeltaY; // THnSparse - delta Y
105 THnSparse *fHisDeltaZ; // THnSparse - delta Z
106 THnSparse *fHisRMSY; // THnSparse - rms Y
107 THnSparse *fHisRMSZ; // THnSparse - rms Z
108 THnSparse *fHisQmax; // THnSparse - qmax
109 THnSparse *fHisQtot; // THnSparse - qtot
112 TObjArray *fArrayQDY; // q binned delta Y histograms
113 TObjArray *fArrayQDZ; // q binned delta Z histograms
114 TObjArray *fArrayQRMSY; // q binned delta Y histograms
115 TObjArray *fArrayQRMSZ; // q binned delta Z histograms
117 TObjArray *fResolY; // array of resolution histograms Y
118 TObjArray *fResolZ; // array of resolution histograms Z
119 TObjArray *fRMSY; // array of RMS histograms Y
120 TObjArray *fRMSZ; // array of RMS histograms Z
121 AliTPCcalibTracksCuts *fCuts; // object with cuts, that is passed to the constructor
122 TH1I *fRejectedTracksHisto; // histogram of rejecteced tracks, the number coresponds to the failed cut
123 TH2I *fClusterCutHisto; // histogram showing in which padRow the clusters were cutted by which criterium
124 AliTPCCalPad *fCalPadClusterPerPad; // AliTPCCalPad showing the number of clusters per Pad
125 AliTPCCalPad *fCalPadClusterPerPadRaw; // AliTPCCalPad showing the number of clusters per Pad before cuts on clusters are applied
126 ClassDef(AliTPCcalibTracks,2)