]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/TPCcalib/AliTPCcalibTracks.h
Up to date of the components (Marian, Lars, Alexander)
[u/mrichter/AliRoot.git] / TPC / TPCcalib / AliTPCcalibTracks.h
1 #ifndef AliTPCCALIBTRACKS_H
2 #define AliTPCCALIBTRACKS_H
3
4
5 #include <TNamed.h>
6 #include <TH2D.h>
7 #include <TF2.h>
8 #include <TSystem.h>
9 #include <TCollection.h>
10 #include <iostream>
11 using namespace std;
12
13 // #include "AliTPCClusterParam.h"
14
15
16 class AliTPCClusterParam;
17 class TTreeSRedirector;
18 class AliTPCROC;
19 class AliTPCseed;
20 class AliESDtrack;
21 class TH3F;
22 class TH1F;
23 class TH1I;
24 class TTreeSRedirector;
25 class AliTPCcalibTracksCuts;
26
27
28 class AliTPCcalibTracks : public TNamed {
29 public :
30    AliTPCcalibTracks();
31    AliTPCcalibTracks(AliTPCcalibTracks* ct);
32    AliTPCcalibTracks(const Text_t *name, const Text_t *title, AliTPCClusterParam *clusterParam, AliTPCcalibTracksCuts* cuts);
33    virtual ~AliTPCcalibTracks();
34    
35    void            Process(AliTPCseed *track, AliESDtrack *esd);
36    
37    Float_t         TPCBetheBloch(Float_t bg);
38    Bool_t          AcceptTrack(AliTPCseed * track); 
39    void            FillHistoCluster(AliTPCseed * track);
40    void            FillResolutionHistoLocal(AliTPCseed * track);
41    void            AlignUpDown(AliTPCseed * track, AliESDtrack *esd);
42    static  Int_t   GetBin(Float_t q, Int_t pad);
43    static  Int_t   GetBin(Int_t  iq, Int_t pad);
44    static  Float_t GetQ(Int_t bin);
45    static  Float_t GetPad(Int_t bin){return bin%3;}
46
47    Long64_t Merge(TCollection *li);
48    static AliTPCcalibTracks* TestMerge(AliTPCcalibTracks *ct, AliTPCClusterParam *clusterParam, Int_t nCalTracks = 50);
49    void     MakeReport(Int_t stat, char* pathName = "plots");
50    void     MakeAmpPlots(Int_t stat, char* pathName = "plots");
51    void     MakeDeltaPlots(char* pathName = "plots");
52    void     FitResolutionNew(char* pathName = "plots");
53    void     FitRMSNew(char* pathName = "plots");
54    void     MakeResPlotsQ(Int_t minEntries = 1,  Bool_t bDraw=kFALSE, char* pathName = "plots"); 
55    void     MakeResPlotsQTree(Int_t minEntries = 1, char* pathName = "plots"); 
56    void     Draw(Option_t* opt);
57    void     SetStyle();
58
59    static TH2D      *MakeDiff(TH2D * hfit, TF2 * func);
60    static TObjArray *FitProjections(TH3F * hfit, Int_t val = 2, Int_t minEntry=500, Bool_t bDraw=kFALSE);
61    
62 //protected:   
63    TObjArray* GetfArrayAmpRow() {return fArrayAmpRow;}
64    TObjArray* GetfArrayAmp() {return fArrayAmp;}
65    TObjArray* GetfArrayQDY() {return fArrayQDY;}
66    TObjArray* GetfArrayQDZ() {return fArrayQDZ;}
67    TObjArray* GetfArrayQRMSY() {return fArrayQRMSY;}
68    TObjArray* GetfArrayQRMSZ() {return fArrayQRMSZ;}
69    TH1F*      GetfDeltaY() {return fDeltaY;}
70    TH1F*      GetfDeltaZ() {return fDeltaZ;}
71    TObjArray* GetfResolY() {return fResolY;}
72    TObjArray* GetfResolZ() {return fResolZ;}
73    TObjArray* GetfRMSY() {return fRMSY;}
74    TObjArray* GetfRMSZ() {return fRMSZ;}
75    TH1I*      GetfHclus() {return fHclus;}
76    AliTPCcalibTracksCuts* GetCuts() {return fCuts;}
77
78    
79    
80 private:
81    AliTPCClusterParam *fClusterParam; //! pointer to cluster parameterization
82    TTreeSRedirector   *fDebugStream;  //! debug stream for
83    AliTPCROC *fROC;          //!
84    TObjArray *fArrayAmpRow; // array with amplitudes versus row for given sector 
85    TObjArray *fArrayAmp;    // array with amplitude for sectors
86    TObjArray *fArrayQDY;    // q binned delta Y histograms
87    TObjArray *fArrayQDZ;    // q binned delta Z histograms 
88    TObjArray *fArrayQRMSY;  // q binned delta Y histograms
89    TObjArray *fArrayQRMSZ;  // q binned delta Z histograms 
90    TH1F      *fDeltaY;      // integrated delta y histo
91    TH1F      *fDeltaZ;      // integrated delta z histo
92    TObjArray *fResolY;      // array of resolution histograms Y
93    TObjArray *fResolZ;      // array of resolution histograms Z
94    TObjArray *fRMSY;        // array of RMS histograms Y
95    TObjArray *fRMSZ;        // array of RMS histograms Z
96    AliTPCcalibTracksCuts *fCuts; // object with cuts, that is passed to the constructor
97    TH1I *fHclus;             // number of clusters per track
98
99 protected:         
100    ClassDef(AliTPCcalibTracks,1)
101 };
102
103 #endif
104
105
106
107
108 #ifndef AliTPCCALIBTRACKSCUTS_H
109 #define AliTPCCALIBTRACKSCUTS_H
110
111 class AliTPCcalibTracksCuts: public TNamed {
112    //////////////////////////////////////////////////////
113    //                                                  //
114    //     Class to specify cuts for track analysis     //
115    //     with AliTPCcalibTracks                       //
116    //                                                  //
117    //////////////////////////////////////////////////////
118
119 public:
120    AliTPCcalibTracksCuts(Int_t minClusters = 20, Float_t minRatio = 0.4, Float_t max1pt = 0.5,
121       Float_t edgeXZCutNoise = 0.13, Float_t edgeThetaCutNoise = 0.018):
122          TNamed("calibTracksCuts", "calibTracksCuts") {
123       // 
124       // Constuctor for AliTPCcalibTracksCuts
125       // specify the cuts to be set on the processed tracks
126       // 
127       fMinClusters = minClusters;
128       fMinRatio = minRatio;
129       fMax1pt = max1pt;
130       fEdgeYXCutNoise = edgeXZCutNoise;
131       fEdgeThetaCutNoise = edgeThetaCutNoise;
132    }
133    virtual ~AliTPCcalibTracksCuts(){cout << "AliTPCcalibTracksCuts destructor called, nothing happend." << endl;}
134    void SetMinClusters(Int_t minClusters){fMinClusters = minClusters;}
135    void SetMinRatio(Float_t minRatio){fMinRatio = minRatio;}
136    void SetMax1pt(Float_t max1pt){fMax1pt = max1pt;}
137    void SetEdgeXYCutNoise(Float_t edgeCutNoise){fEdgeYXCutNoise = edgeCutNoise;}
138    void SetEdgeThetaCutNoise(Float_t edgeCutNoise){fEdgeThetaCutNoise = edgeCutNoise;}
139    Int_t   GetMinClusters(){return fMinClusters;}
140    Float_t GetMinRatio(){return fMinRatio;}
141    Float_t GetMax1pt(){return fMax1pt;}
142    Float_t GetEdgeYXCutNoise(){return fEdgeYXCutNoise;}
143    Float_t GetEdgeThetaCutNoise(){return fEdgeThetaCutNoise;}
144    void Print(){
145       cout << "<AliTPCcalibTracksCuts>: The following cuts are specified: " << endl;
146       cout << "fMinClusters: " << fMinClusters << endl;
147       cout << "fMinRatio: " << fMinRatio << endl;
148       cout << "fMax1pt: " << fMax1pt << endl;
149       cout << "fEdgeYXCutNoise: " << fEdgeYXCutNoise << endl;
150       cout << "fEdgeThetaCutNoise: " << fEdgeThetaCutNoise << endl;
151    }  // Prints out the specified cuts
152    
153 private:
154    Int_t   fMinClusters;         // number of clusters
155    Float_t fMinRatio;            // kMinRratio = 0.4
156    Float_t fMax1pt;              // kMax1pt = 0.5
157    Float_t fEdgeYXCutNoise;      // kEdgeYXCutNoise = 0.13
158    Float_t fEdgeThetaCutNoise;   // kEdgeThetaCutNoise = 0.018
159
160 protected:         
161    ClassDef(AliTPCcalibTracksCuts,1)
162 };
163
164
165 #endif
166
167
168 #ifndef AliTPCCALIBTRACKSCUTS_H
169 #define AliTPCCALIBTRACKSCUTS_H
170
171
172 class AliTPCcalibTracksCuts: public TNamed {
173    //////////////////////////////////////////////////////
174    //                                                  //
175    //     Class to specify cuts for track analysis     //
176    //     with AliTPCcalibTracks                       //
177    //                                                  //
178    //////////////////////////////////////////////////////
179
180 public:
181    AliTPCcalibTracksCuts(Int_t minClusters = 20, Float_t minRatio = 0.4, Float_t max1pt = 0.5,
182       Float_t edgeXZCutNoise = 0.13, Float_t edgeThetaCutNoise = 0.018):
183          TNamed("calibTracksCuts", "calibTracksCuts") {
184       // 
185       // Constuctor for AliTPCcalibTracksCuts
186       // specify the cuts to be set on the processed tracks
187       // 
188       fMinClusters = minClusters;
189       fMinRatio = minRatio;
190       fMax1pt = max1pt;
191       fEdgeYXCutNoise = edgeXZCutNoise;
192       fEdgeThetaCutNoise = edgeThetaCutNoise;
193    }
194    virtual ~AliTPCcalibTracksCuts(){cout << "AliTPCcalibTracksCuts destructor called, nothing happend." << endl;}
195    void SetMinClusters(Int_t minClusters){fMinClusters = minClusters;}
196    void SetMinRatio(Float_t minRatio){fMinRatio = minRatio;}
197    void SetMax1pt(Float_t max1pt){fMax1pt = max1pt;}
198    void SetEdgeXYCutNoise(Float_t edgeCutNoise){fEdgeYXCutNoise = edgeCutNoise;}
199    void SetEdgeThetaCutNoise(Float_t edgeCutNoise){fEdgeThetaCutNoise = edgeCutNoise;}
200    Int_t   GetMinClusters(){return fMinClusters;}
201    Float_t GetMinRatio(){return fMinRatio;}
202    Float_t GetMax1pt(){return fMax1pt;}
203    Float_t GetEdgeYXCutNoise(){return fEdgeYXCutNoise;}
204    Float_t GetEdgeThetaCutNoise(){return fEdgeThetaCutNoise;}
205 //    void Print();  // Prints out the specified cuts
206    void Print(){
207       cout << "<AliTPCcalibTracksCuts>: The following cuts are specified: " << endl;
208       cout << "fMinClusters: " << fMinClusters << endl;
209       cout << "fMinRatio: " << fMinRatio << endl;
210       cout << "fMax1pt: " << fMax1pt << endl;
211       cout << "fEdgeYXCutNoise: " << fEdgeYXCutNoise << endl;
212       cout << "fEdgeThetaCutNoise: " << fEdgeThetaCutNoise << endl;
213    }  // Prints out the specified cuts
214
215       
216 private:
217    Int_t   fMinClusters;         // number of clusters
218    Float_t fMinRatio;            // kMinRratio = 0.4
219    Float_t fMax1pt;              // kMax1pt = 0.5
220    Float_t fEdgeYXCutNoise;      // kEdgeYXCutNoise = 0.13
221    Float_t fEdgeThetaCutNoise;   // kEdgeThetaCutNoise = 0.018
222
223 protected:         
224    ClassDef(AliTPCcalibTracksCuts,1)
225 };
226
227
228 #endif
229
230