15 minutes interval for calculation of drift correction
[u/mrichter/AliRoot.git] / TPC / AliTPCcalibTracks.h
CommitLineData
10757ee9 1#ifndef AliTPCCALIBTRACKS_H
2#define AliTPCCALIBTRACKS_H
3
4
5///////////////////////////////////////////////////////////////////////////////
6// //
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. //
16// //
17// //
18///////////////////////////////////////////////////////////////////////////////
19
20
21
c32da879 22#include <AliTPCcalibBase.h>
10757ee9 23class TF2;
24class TH3F;
25class TH1F;
26class TH1I;
27class TH2I;
28class TH2D;
29class TCollection;
30class TTreeSRedirector;
31class TLinearFitter;
32class AliTPCClusterParam;
33class TTreeSRedirector;
34class AliTPCROC;
35class AliTPCseed;
36class AliESDtrack;
37class AliTPCclusterMI;
38class AliTPCcalibTracksCuts;
39class AliTPCCalPadRegion;
40class AliTPCCalPad;
41class TChain;
9c171b96 42class TTree;
10757ee9 43class TMutex;
d11c5a19 44class AliESDEvent;
10757ee9 45
46using namespace std;
47
c32da879 48class AliTPCcalibTracks : public AliTPCcalibBase {
10757ee9 49public :
50 AliTPCcalibTracks(); // default constructor
b42cf9ed 51 AliTPCcalibTracks(const AliTPCcalibTracks&calibTracks); // copy constructor
9c171b96 52 AliTPCcalibTracks(const Text_t *name, const Text_t *title, AliTPCClusterParam *clusterParam, AliTPCcalibTracksCuts* cuts, Int_t logLevel = 0);
b42cf9ed 53 AliTPCcalibTracks & operator=(const AliTPCcalibTracks& calibTracks);
9c171b96 54
55 virtual ~AliTPCcalibTracks(); // destructor
56
0ffd2ae1 57 virtual void Process(AliTPCseed *track); // to be called by the Selector
d11c5a19 58 void Process(AliESDEvent *event) {AliTPCcalibBase::Process(event);};
59 void Process(AliESDtrack *track, Int_t runNo=-1){AliTPCcalibBase::Process(track,runNo);};
9c171b96 60 virtual Long64_t Merge(TCollection *li);
af6a50bb 61 void AddHistos(AliTPCcalibTracks* calib);
f78da5ae 62 void MakeResPlotsQTree(Int_t minEntries = 100, const char* pathName = "plots");
1bfaa9e9 63 static void MakeQPosNormAll(TTree * chain, AliTPCClusterParam * param, Int_t maxPoints=1000000);
f78da5ae 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
9c171b96 65 //
10757ee9 66
9c171b96 67
68 Int_t AcceptTrack(AliTPCseed * track);
69 void FillResolutionHistoLocal(AliTPCseed * track); // the MAIN-FUNCTION, called for each track to fill the histograms, called by Process(...)
70 static TH2D* MakeDiff(TH2D * hfit, TF2 * func);
71
72 static AliTPCcalibTracks* TestMerge(AliTPCcalibTracks *ct, AliTPCClusterParam *clusterParam, Int_t nCalTracks = 50);
73
74 void SetStyle() const;
75 void Draw(Option_t* opt); // draw some exemplaric histograms for fast result-check
f78da5ae 76 void MakeAmpPlots(Int_t stat, const char* pathName = "plots");
77 void MakeDeltaPlots(const char* pathName = "plots");
78 void MakeChargeVsDriftLengthPlotsOld(const char* pathName = "plots");
79 void MakeChargeVsDriftLengthPlots(const char* pathName = "plots");
80 void FitResolutionNew(const char* pathName = "plots");
81 void FitRMSNew(const char* pathName = "plots");
9c171b96 82
c416172f 83 TObjArray* GetfArrayAmpRow() const {return fArrayAmpRow;}
84 TObjArray* GetfArrayAmp() const {return fArrayAmp;}
85 TObjArray* GetfArrayQDY() const {return fArrayQDY;}
86 TObjArray* GetfArrayQDZ() const {return fArrayQDZ;}
87 TObjArray* GetfArrayQRMSY() const {return fArrayQRMSY;}
88 TObjArray* GetfArrayQRMSZ() const {return fArrayQRMSZ;}
89 TObjArray* GetfArrayChargeVsDriftlength() const {return fArrayChargeVsDriftlength;}
90 TH1F* GetfDeltaY() const {return fDeltaY;}
91 TH1F* GetfDeltaZ() const {return fDeltaZ;}
92 TObjArray* GetfResolY() const {return fResolY;}
93 TObjArray* GetfResolZ() const {return fResolZ;}
94 TObjArray* GetfRMSY() const {return fRMSY;}
95 TObjArray* GetfRMSZ() const {return fRMSZ;}
96 TH1I* GetfHclus() const {return fHclus;}
97 TH1I* GetfRejectedTracksHisto() const {return fRejectedTracksHisto;}
98 TH1I* GetfHclusterPerPadrow() const {return fHclusterPerPadrow;}
99 TH1I* GetfHclusterPerPadrowRaw() const {return fHclusterPerPadrowRaw;}
100 TH2I* GetfClusterCutHisto() const {return fClusterCutHisto;}
101 AliTPCCalPad* GetfCalPadClusterPerPad() const {return fCalPadClusterPerPad; }
102 AliTPCCalPad* GetfCalPadClusterPerPadRaw() const {return fCalPadClusterPerPadRaw;}
103 AliTPCCalPadRegion* GetCalPadRegionchargeVsDriftlength() const {return fcalPadRegionChargeVsDriftlength;}
9c171b96 104 AliTPCcalibTracksCuts* GetCuts() {return fCuts;}
af6a50bb 105 void MakeHistos(); //make THnSparse
10757ee9 106protected:
10757ee9 107
10757ee9 108private:
d11c5a19 109
10757ee9 110 static Int_t GetBin(Float_t q, Int_t pad);
111 static Int_t GetBin(Int_t iq, Int_t pad);
112 static Float_t GetQ(Int_t bin);
113 static Float_t GetPad(Int_t bin);
114 void FillResolutionHistoLocalDebugPart(AliTPCseed *track, AliTPCclusterMI *cluster0, Int_t irow, Float_t angley, Float_t anglez, Int_t nclFound, Int_t kDelta);
9f0beaf7 115 AliTPCClusterParam *fClusterParam; // pointer to cluster parameterization
10757ee9 116 AliTPCROC *fROC; //!
af6a50bb 117 THnSparse *fHisDeltaY; // THnSparse - delta Y
118 THnSparse *fHisDeltaZ; // THnSparse - delta Z
119 THnSparse *fHisRMSY; // THnSparse - rms Y
120 THnSparse *fHisRMSZ; // THnSparse - rms Z
121 THnSparse *fHisQmax; // THnSparse - qmax
122 THnSparse *fHisQtot; // THnSparse - qtot
123
124
10757ee9 125 TObjArray *fArrayAmpRow; // array with amplitudes versus row for given sector
126 TObjArray *fArrayAmp; // array with amplitude for sectors
127 TObjArray *fArrayQDY; // q binned delta Y histograms
128 TObjArray *fArrayQDZ; // q binned delta Z histograms
129 TObjArray *fArrayQRMSY; // q binned delta Y histograms
130 TObjArray *fArrayQRMSZ; // q binned delta Z histograms
131 TObjArray *fArrayChargeVsDriftlength; // array of arrays of TProfiles with charge vs. driftlength for each padsize and sector
132 AliTPCCalPadRegion *fcalPadRegionChargeVsDriftlength; // CalPadRegion, one TProfile for charge vs. driftlength for each padsize and sector
af6a50bb 133
10757ee9 134 TH1F *fDeltaY; // integrated delta y histo
135 TH1F *fDeltaZ; // integrated delta z histo
136 TObjArray *fResolY; // array of resolution histograms Y
137 TObjArray *fResolZ; // array of resolution histograms Z
138 TObjArray *fRMSY; // array of RMS histograms Y
139 TObjArray *fRMSZ; // array of RMS histograms Z
140 AliTPCcalibTracksCuts *fCuts; // object with cuts, that is passed to the constructor
141 TH1I *fHclus; // number of clusters per track
142 TH1I *fRejectedTracksHisto; // histogram of rejecteced tracks, the number coresponds to the failed cut
143 TH1I *fHclusterPerPadrow; // histogram showing the number of clusters per padRow
144 TH1I *fHclusterPerPadrowRaw;// histogram showing the number of clusters per padRow before cuts on clusters are applied
145 TH2I *fClusterCutHisto; // histogram showing in which padRow the clusters were cutted by which criterium
146 AliTPCCalPad *fCalPadClusterPerPad; // AliTPCCalPad showing the number of clusters per Pad
147 AliTPCCalPad *fCalPadClusterPerPadRaw; // AliTPCCalPad showing the number of clusters per Pad before cuts on clusters are applied
9c171b96 148 ClassDef(AliTPCcalibTracks,1)
10757ee9 149
10757ee9 150};
151
152#endif