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