]>
Commit | Line | Data |
---|---|---|
3e6c06f4 | 1 | #ifndef ALIPROTONQAANALYSIS_H |
2 | #define ALIPROTONQAANALYSIS_H | |
3 | ||
4 | /* See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | /* $Id: AliProtonQAAnalysis.h 29114 2008-10-03 16:49:02Z pchrist $ */ | |
8 | ||
9 | //------------------------------------------------------------------------- | |
10 | // Class AliProtonQAAnalysis | |
11 | // This is the class for the baryon (proton) analysis | |
12 | // | |
dd3fa486 | 13 | // Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch |
3e6c06f4 | 14 | //------------------------------------------------------------------------- |
15 | ||
16 | #include "TObject.h" | |
17 | #include "TH1I.h" | |
18 | #include "TList.h" | |
9c0b9f24 | 19 | #include "TArrayI.h" |
3e6c06f4 | 20 | |
21 | #include "AliPID.h" | |
22 | ||
23 | class TF1; | |
3e6c06f4 | 24 | class TH1F; |
d4733690 | 25 | class TH3F; |
3e6c06f4 | 26 | |
27 | class AliESDEvent; | |
28 | class AliESDtrack; | |
29 | class AliStack; | |
6667f3a7 | 30 | class AliESDVertex; |
3e6c06f4 | 31 | |
32 | class AliProtonQAAnalysis : public TObject { | |
33 | public: | |
34 | AliProtonQAAnalysis(); | |
35 | virtual ~AliProtonQAAnalysis(); | |
36 | ||
dd3fa486 | 37 | void SetEtaMode() {fAnalysisEtaMode = kTRUE;} |
38 | ||
3e6c06f4 | 39 | void UseTPCOnly() {fUseTPCOnly = kTRUE;} |
0326e385 | 40 | void UseHybridTPC() {fUseTPCOnly = kTRUE; fUseHybridTPC = kTRUE;} |
6667f3a7 | 41 | |
3e6c06f4 | 42 | //Cut functions |
0008a5a6 | 43 | void SetPointOnITSLayer1() {fPointOnITSLayer1Flag = kTRUE;} |
44 | void SetPointOnITSLayer2() {fPointOnITSLayer2Flag = kTRUE;} | |
45 | void SetPointOnITSLayer3() {fPointOnITSLayer3Flag = kTRUE;} | |
46 | void SetPointOnITSLayer4() {fPointOnITSLayer4Flag = kTRUE;} | |
47 | void SetPointOnITSLayer5() {fPointOnITSLayer5Flag = kTRUE;} | |
48 | void SetPointOnITSLayer6() {fPointOnITSLayer6Flag = kTRUE;} | |
3e6c06f4 | 49 | void SetMinITSClusters(Int_t minITSClusters) { |
50 | fMinITSClusters = minITSClusters; | |
51 | fMinITSClustersFlag = kTRUE; | |
52 | } | |
53 | void SetMaxChi2PerITSCluster(Double_t maxChi2PerITSCluster) { | |
54 | fMaxChi2PerITSCluster = maxChi2PerITSCluster; | |
55 | fMaxChi2PerITSClusterFlag = kTRUE; | |
56 | } | |
57 | void SetMinTPCClusters(Int_t minTPCClusters) { | |
58 | fMinTPCClusters = minTPCClusters; | |
59 | fMinTPCClustersFlag = kTRUE; | |
60 | } | |
61 | void SetMaxChi2PerTPCCluster(Double_t maxChi2PerTPCCluster) { | |
62 | fMaxChi2PerTPCCluster = maxChi2PerTPCCluster; | |
63 | fMaxChi2PerTPCClusterFlag = kTRUE; | |
64 | } | |
65 | void SetMaxCov11(Double_t maxCov11) { | |
66 | fMaxCov11 = maxCov11; fMaxCov11Flag = kTRUE;} | |
67 | void SetMaxCov22(Double_t maxCov22) { | |
68 | fMaxCov22 = maxCov22; fMaxCov22Flag = kTRUE;} | |
69 | void SetMaxCov33(Double_t maxCov33) { | |
70 | fMaxCov33 = maxCov33; fMaxCov33Flag = kTRUE;} | |
71 | void SetMaxCov44(Double_t maxCov44) { | |
72 | fMaxCov44 = maxCov44; fMaxCov44Flag = kTRUE;} | |
73 | void SetMaxCov55(Double_t maxCov55) { | |
74 | fMaxCov55 = maxCov55; fMaxCov55Flag = kTRUE;} | |
75 | void SetMaxSigmaToVertex(Double_t maxSigmaToVertex) { | |
76 | fMaxSigmaToVertex = maxSigmaToVertex; | |
77 | fMaxSigmaToVertexFlag = kTRUE; | |
78 | } | |
79 | void SetMaxSigmaToVertexTPC(Double_t maxSigmaToVertex) { | |
80 | fMaxSigmaToVertexTPC = maxSigmaToVertex; | |
81 | fMaxSigmaToVertexTPCFlag = kTRUE; | |
82 | } | |
83 | void SetMaxDCAXY(Double_t maxDCAXY) { | |
84 | fMaxDCAXY = maxDCAXY; | |
85 | fMaxDCAXYFlag = kTRUE; | |
86 | } | |
87 | void SetMaxDCAXYTPC(Double_t maxDCAXY) { | |
88 | fMaxDCAXYTPC = maxDCAXY; | |
89 | fMaxDCAXYTPCFlag = kTRUE; | |
90 | } | |
91 | void SetMaxDCAZ(Double_t maxDCAZ) { | |
92 | fMaxDCAZ = maxDCAZ; | |
93 | fMaxDCAZFlag = kTRUE; | |
94 | } | |
95 | void SetMaxDCAZTPC(Double_t maxDCAZ) { | |
96 | fMaxDCAZTPC = maxDCAZ; | |
97 | fMaxDCAZTPCFlag = kTRUE; | |
98 | } | |
99 | void SetMaxConstrainChi2(Double_t maxConstrainChi2) { | |
100 | fMaxConstrainChi2 = maxConstrainChi2; | |
101 | fMaxConstrainChi2Flag = kTRUE; | |
102 | } | |
103 | void SetITSRefit() {fITSRefitFlag = kTRUE;} | |
104 | void SetTPCRefit() {fTPCRefitFlag = kTRUE;} | |
105 | void SetESDpid() {fESDpidFlag = kTRUE;} | |
106 | void SetTPCpid() {fTPCpidFlag = kTRUE;} | |
107 | ||
3e6c06f4 | 108 | //Prior probabilities |
109 | void SetPriorProbabilities(Double_t *partFrac) { | |
110 | for(Int_t i = 0; i < AliPID::kSPECIESN; i++) fPartFrac[i] = partFrac[i];} | |
111 | void SetPriorProbabilityFunctions(TF1 *felectron, TF1 *fmuon, TF1 *fpion, TF1 *fkaon, TF1 *fproton) { | |
112 | fFunctionProbabilityFlag = kTRUE; | |
113 | fElectronFunction = felectron; | |
114 | fMuonFunction = fmuon; | |
115 | fPionFunction = fpion; | |
116 | fKaonFunction = fkaon; | |
117 | fProtonFunction = fproton; | |
118 | } | |
119 | Double_t GetParticleFraction(Int_t i, Double_t p); | |
120 | ||
9c0b9f24 | 121 | //QA histograms |
122 | void SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY, | |
123 | Int_t nbinsPt, Double_t minPt, Double_t maxPt); | |
6667f3a7 | 124 | void RunQAAnalysis(AliStack *stack, |
125 | AliESDEvent *esd, | |
126 | const AliESDVertex *vertex); | |
9c0b9f24 | 127 | void SetRunQAAnalysis(); |
128 | TList *GetGlobalQAList() {return fGlobalQAList;} | |
129 | ||
130 | //Efficiency plots (reconstruction & PID) | |
6667f3a7 | 131 | void RunEfficiencyAnalysis(AliStack *stack, |
132 | AliESDEvent *esd, | |
133 | const AliESDVertex *vertex); | |
dd3fa486 | 134 | void SetRunEfficiencyAnalysis(Bool_t gUseCuts) { |
e13bbda6 | 135 | fRunEfficiencyAnalysis = kTRUE; |
e13bbda6 | 136 | fUseCutsInEfficiency = gUseCuts; |
137 | } | |
9c0b9f24 | 138 | TList *GetEfficiencyQAList() {return fEfficiencyList;} |
9c0b9f24 | 139 | |
d4733690 | 140 | //MC analysis |
141 | void RunMCAnalysis(AliStack* stack); | |
142 | void SetRunMCAnalysis() {fRunMCAnalysis = kTRUE;} | |
5b8133c7 | 143 | void SetMCProcessId(Int_t id) { |
144 | fMCProcessIdFlag = kTRUE; | |
145 | fMCProcessId = id; | |
146 | } | |
147 | void SetMotherParticlePDGCode(Int_t pdgCode) { | |
148 | fMotherParticlePDGCodeFlag = kTRUE; | |
149 | fMotherParticlePDGCode = pdgCode; | |
150 | } | |
d4733690 | 151 | TList *GetPDGList() {return fPDGList;} |
152 | TList *GetMCProcessesList() {return fMCProcessesList;} | |
153 | ||
5b8133c7 | 154 | TList *GetAcceptedCutList() {return fAcceptedCutList;} |
155 | TList *GetRejectedCutList() {return fRejectedCutList;} | |
156 | TList *GetAcceptedDCAList() {return fAcceptedDCAList;} | |
157 | TList *GetRejectedDCAList() {return fRejectedDCAList;} | |
158 | ||
3e6c06f4 | 159 | private: |
160 | AliProtonQAAnalysis(const AliProtonQAAnalysis&); // Not implemented | |
9c0b9f24 | 161 | AliProtonQAAnalysis& operator=(const AliProtonQAAnalysis&);// Not implemented |
3e6c06f4 | 162 | |
6667f3a7 | 163 | Bool_t IsAccepted(AliESDEvent *esd, |
164 | const AliESDVertex *vertex, | |
165 | AliESDtrack *track); | |
3e23254a | 166 | Bool_t IsInPhaseSpace(AliESDtrack *track); |
9c0b9f24 | 167 | |
3e23254a | 168 | void FillQA(AliStack *stack, |
169 | AliESDEvent *esd, | |
170 | const AliESDVertex *vertex, | |
171 | AliESDtrack *track); | |
9c0b9f24 | 172 | |
173 | void InitQA(); | |
d4733690 | 174 | void InitMCAnalysis(); |
5b8133c7 | 175 | void InitCutLists(); |
9c0b9f24 | 176 | void InitEfficiencyAnalysis(); |
177 | ||
178 | Bool_t IsLabelUsed(TArrayI array, Int_t label); | |
d4733690 | 179 | Int_t ConvertPDGToInt(Int_t pdgCode); |
3e6c06f4 | 180 | Float_t GetSigmaToVertex(AliESDtrack* esdTrack); |
181 | Double_t Rapidity(Double_t Px, Double_t Py, Double_t Pz); | |
182 | ||
dd3fa486 | 183 | Bool_t fAnalysisEtaMode; //run the QA in eta or y |
184 | ||
185 | Int_t fNBinsY; //number of bins in eta or y | |
186 | Float_t fMinY, fMaxY; //min & max value of eta or y | |
3e6c06f4 | 187 | Int_t fNBinsPt; //number of bins in pT |
188 | Float_t fMinPt, fMaxPt; //min & max value of pT | |
189 | ||
190 | //cuts | |
191 | Int_t fMinTPCClusters, fMinITSClusters; //min TPC & ITS clusters | |
192 | Double_t fMaxChi2PerTPCCluster, fMaxChi2PerITSCluster; //max chi2 per TPC & ITS cluster | |
193 | Double_t fMaxCov11, fMaxCov22, fMaxCov33, fMaxCov44, fMaxCov55; //max values of cov. matrix | |
194 | Double_t fMaxSigmaToVertex; //max sigma to vertex cut | |
195 | Double_t fMaxSigmaToVertexTPC; //max sigma to vertex cut | |
196 | Double_t fMaxDCAXY, fMaxDCAXYTPC; //max DCA xy | |
197 | Double_t fMaxDCAZ, fMaxDCAZTPC; //max DCA z | |
198 | Double_t fMaxConstrainChi2; //max constrain chi2 - vertex | |
199 | Bool_t fMinTPCClustersFlag, fMinITSClustersFlag; //shows if this cut is used or not | |
200 | Bool_t fMaxChi2PerTPCClusterFlag, fMaxChi2PerITSClusterFlag; //shows if this cut is used or not | |
201 | Bool_t fMaxCov11Flag, fMaxCov22Flag, fMaxCov33Flag, fMaxCov44Flag, fMaxCov55Flag; //shows if this cut is used or not | |
202 | Bool_t fMaxSigmaToVertexFlag; //shows if this cut is used or not | |
203 | Bool_t fMaxSigmaToVertexTPCFlag; //shows if this cut is used or not | |
204 | Bool_t fMaxDCAXYFlag, fMaxDCAXYTPCFlag; //shows if this cut is used or not | |
205 | Bool_t fMaxDCAZFlag, fMaxDCAZTPCFlag; //shows if this cut is used or not | |
206 | Bool_t fMaxConstrainChi2Flag; //shows if this cut is used or not | |
207 | Bool_t fITSRefitFlag, fTPCRefitFlag; //shows if this cut is used or not | |
208 | Bool_t fESDpidFlag, fTPCpidFlag; //shows if this cut is used or not | |
0008a5a6 | 209 | Bool_t fPointOnITSLayer1Flag, fPointOnITSLayer2Flag; //shows if this cut is used or not |
210 | Bool_t fPointOnITSLayer3Flag, fPointOnITSLayer4Flag; //shows if this cut is used or not | |
211 | Bool_t fPointOnITSLayer5Flag, fPointOnITSLayer6Flag; //shows if this cut is used or not | |
212 | ||
3e6c06f4 | 213 | //QA histograms |
214 | //Bool_t fQAHistograms; //Boolean to activate the QA histograms | |
215 | TList *fGlobalQAList; //TList storing the directories for the QA histograms | |
216 | TList *fQA2DList; //TList storing the accepted primary/secondary (anti)protons | |
217 | TList *fQAPrimaryProtonsAcceptedList; //list of the QA histos for accepted primary protons | |
218 | TList *fQAPrimaryProtonsRejectedList; //list of the QA histos for rejected primary protons | |
219 | TList *fQASecondaryProtonsAcceptedList; //list of the QA histos for accepted secondary protons | |
220 | TList *fQASecondaryProtonsRejectedList; //list of the QA histos for rejected secondary protons | |
221 | TList *fQAPrimaryAntiProtonsAcceptedList; //list of the QA histos for accepted primary antiprotons | |
222 | TList *fQAPrimaryAntiProtonsRejectedList; //list of the QA histos for rejected primary antiprotons | |
223 | TList *fQASecondaryAntiProtonsAcceptedList; //list of the QA histos for accepted secondary antiprotons | |
224 | TList *fQASecondaryAntiProtonsRejectedList; //list of the QA histos for rejected secondary antiprotons | |
225 | ||
226 | //pid | |
227 | Bool_t fFunctionProbabilityFlag; //flag: kTRUE if functions used | |
228 | Double_t fPartFrac[10]; //prior probabilities | |
229 | TF1 *fElectronFunction; //momentum dependence of the prior probs | |
230 | TF1 *fMuonFunction; //momentum dependence of the prior probs | |
231 | TF1 *fPionFunction; //momentum dependence of the prior probs | |
232 | TF1 *fKaonFunction; //momentum dependence of the prior probs | |
233 | TF1 *fProtonFunction; //momentum dependence of the prior probs | |
234 | ||
235 | //Detectors | |
236 | Bool_t fUseTPCOnly; //kTRUE if TPC only information is used | |
0326e385 | 237 | Bool_t fUseHybridTPC; //kTRUE if TPC info is used for momentum - PID and ITS for vertex & points |
3e6c06f4 | 238 | |
d4733690 | 239 | //MC analysis |
240 | TList *fPDGList; //list with the 3D histograms: y-pt-pdg (anti)protons | |
241 | TList *fMCProcessesList; //list with the MC processes for every secondary (anti)proton | |
242 | Bool_t fRunMCAnalysis; //run this part or not | |
5b8133c7 | 243 | Bool_t fMCProcessIdFlag; //flag to see if we should check the process id |
244 | UInt_t fMCProcessId; //process id based on the TMCProcess | |
245 | Bool_t fMotherParticlePDGCodeFlag; //flag to see if we should check the pdg code of the mother particle | |
246 | Int_t fMotherParticlePDGCode; //pdg code of the mother particle | |
247 | ||
248 | TList *fAcceptedCutList;// list of the cut parameters' histograms | |
249 | TList *fRejectedCutList;// list of the cut parameters' histograms | |
250 | TList *fAcceptedDCAList;// list of the DCA histograms | |
251 | TList *fRejectedDCAList;// list of the DCA histograms | |
d4733690 | 252 | |
9c0b9f24 | 253 | //Efficiency (reconstruction & PID) |
254 | Bool_t fRunEfficiencyAnalysis; //run this part or not | |
e13bbda6 | 255 | Bool_t fUseCutsInEfficiency;//use the cuts in the reco and pid efficiency |
256 | ||
9c0b9f24 | 257 | TList *fEfficiencyList;// list of the efficiency histograms |
258 | ||
3e6c06f4 | 259 | ClassDef(AliProtonQAAnalysis,0); |
260 | }; | |
261 | ||
262 | #endif |