]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/SPECTRA/AliProtonQAAnalysis.h
-- modified cut analysis for Pb-Pb
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliProtonQAAnalysis.h
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 //
13 //    Origin: Panos Christakoglou | Panos.Christakoglou@cern.ch
14 //-------------------------------------------------------------------------
15
16 #include "TObject.h"
17 #include "TList.h"
18 #include "TArrayI.h"
19
20 class TF1;
21 class TH1F;
22 class TH3F;
23
24 class AliPID;
25 class AliESDEvent;
26 class AliESDtrack;
27 class AliStack;
28 class AliGenEventHeader;
29 class AliESDVertex;
30 class AliMCEvent;
31 class AliProtonAnalysisBase;
32
33 class AliProtonQAAnalysis : public TObject {
34  public:
35   AliProtonQAAnalysis();
36   virtual ~AliProtonQAAnalysis();
37
38   void SetBaseAnalysis(AliProtonAnalysisBase *const baseAnalysis) {
39     fProtonAnalysisBase = baseAnalysis;}
40   AliProtonAnalysisBase *GetProtonAnalysisBaseObject() const {
41     return fProtonAnalysisBase;}
42
43   //Vertex QA
44   void RunVertexQA(AliGenEventHeader *header,
45                    AliESDEvent *esd);
46   TList *GetVertexQAList() const {return fQAVertexList;}
47
48   //QA histograms
49   void SetQAYPtBins(Int_t nbinsY, Double_t *gY,
50                     Int_t nbinsPt, Double_t *gPt);
51   void SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
52                     Int_t nbinsPt, Double_t minPt, Double_t maxPt);
53   void RunQAAnalysis(AliStack *stack, 
54                      AliESDEvent *esd,
55                      const AliESDVertex *vertex);
56   void SetRunQAAnalysis();
57   TList *GetGlobalQAList() const {return fGlobalQAList;}
58
59   //Efficiency plots (reconstruction & PID & Cuts)
60   void RunReconstructionEfficiencyAnalysis(AliMCEvent *mcEvent, 
61                                            AliESDEvent *esd,
62                                            const AliESDVertex *vertex);
63   void RunPIDEfficiencyAnalysis(AliStack *stack, 
64                                 AliESDEvent *esd,
65                              const AliESDVertex *vertex);
66   void RunCutEfficiencyAnalysis(AliStack *stack,
67                                 AliESDEvent *esd,
68                                 const AliESDVertex *vertex);
69   void RunEfficiencyAnalysis(AliStack *stack, 
70                              AliESDEvent *esd,
71                              const AliESDVertex *vertex);
72   void SetRunEfficiencyAnalysis(Bool_t gUseCuts) {
73     fRunEfficiencyAnalysis = kTRUE;
74     fUseCutsInEfficiency = gUseCuts;
75   }
76   TList *GetEfficiencyQAList() const {return fEfficiencyList;}
77   TList *GetCutEfficiencyList() const {return fCutEfficiencyList;}
78
79   //MC analysis
80   void RunMCAnalysis(AliStack* stack);
81   void SetRunMCAnalysis() {fRunMCAnalysis = kTRUE;}
82   void SetMCProcessId(Int_t id) {
83     fMCProcessIdFlag = kTRUE;
84     fMCProcessId = id;
85   }
86   void SetMotherParticlePDGCode(Int_t pdgCode) {
87     fMotherParticlePDGCodeFlag = kTRUE;
88     fMotherParticlePDGCode = pdgCode;
89   }
90   TList *GetPDGList() const {return fPDGList;}
91   TList *GetMCProcessesList() const {return fMCProcessesList;}
92
93   TList *GetAcceptedCutList() const {return fAcceptedCutList;}
94   TList *GetRejectedCutList() const {return fRejectedCutList;}
95   TList *GetAcceptedDCAList() const {return fAcceptedDCAList;}
96   TList *GetRejectedDCAList() const {return fRejectedDCAList;}
97
98  private:
99   AliProtonQAAnalysis(const AliProtonQAAnalysis&); // Not implemented
100   AliProtonQAAnalysis& operator=(const AliProtonQAAnalysis&);// Not implemented
101
102   void     InitVertexQA();
103   void     InitQA();
104   void     InitMCAnalysis();
105   void     InitCutLists();
106   void     InitEfficiencyAnalysis();
107   void     FillQA(AliStack *stack,
108                   AliESDEvent *esd,
109                   const AliESDVertex *vertex, 
110                   AliESDtrack* track);
111  
112   Bool_t   IsLabelUsed(TArrayI array, Int_t label);
113   Int_t    ConvertPDGToInt(Int_t pdgCode) const;
114   
115   AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object
116
117   Int_t fNBinsY; //number of bins in eta or y
118   Float_t fMinY, fMaxY; //min & max value of eta or y
119   Double_t *fY; //table of y or eta values - asymmetric
120   Int_t fNBinsPt;  //number of bins in pT
121   Float_t fMinPt, fMaxPt; //min & max value of pT
122   Double_t *fPt; //table of pT values - asymmetric
123   Bool_t fUseAsymmetricBinning; //Flag showing if the asymmetric binning is used
124
125   //QA histograms
126   //Bool_t fQAHistograms; //Boolean to activate the QA histograms
127   TList *fGlobalQAList; //TList storing the directories for the QA histograms
128   TList *fQAVertexList; //TList storing the vertex QA plots
129   TList *fQA2DList; //TList storing the accepted primary/secondary (anti)protons
130   TList *fQAPrimaryProtonsAcceptedList; //list of the QA histos for accepted primary protons
131   TList *fQAPrimaryProtonsRejectedList; //list of the QA histos for rejected primary protons
132   TList *fQASecondaryProtonsAcceptedList; //list of the QA histos for accepted secondary protons
133   TList *fQASecondaryProtonsRejectedList; //list of the QA histos for rejected secondary protons
134   TList *fQAPrimaryAntiProtonsAcceptedList; //list of the QA histos for accepted primary antiprotons
135   TList *fQAPrimaryAntiProtonsRejectedList; //list of the QA histos for rejected primary antiprotons
136   TList *fQASecondaryAntiProtonsAcceptedList; //list of the QA histos for accepted secondary antiprotons
137   TList *fQASecondaryAntiProtonsRejectedList; //list of the QA histos for rejected secondary antiprotons
138
139   //MC analysis
140   TList *fPDGList; //list with the 3D histograms: y-pt-pdg (anti)protons
141   TList *fMCProcessesList; //list with the MC processes for every secondary (anti)proton
142   Bool_t fRunMCAnalysis; //run this part or not
143   Bool_t fMCProcessIdFlag; //flag to see if we should check the process id
144   UInt_t fMCProcessId; //process id based on the TMCProcess
145   Bool_t fMotherParticlePDGCodeFlag; //flag to see if we should check the pdg code of the mother particle
146   Int_t  fMotherParticlePDGCode; //pdg code of the mother particle
147
148   TList *fAcceptedCutList;// list of the cut parameters' histograms
149   TList *fRejectedCutList;// list of the cut parameters' histograms
150   TList *fAcceptedDCAList;// list of the DCA histograms
151   TList *fRejectedDCAList;// list of the DCA histograms
152
153   //Efficiency (reconstruction & PID)
154   Bool_t fRunEfficiencyAnalysis; //run this part or not
155   Bool_t fUseCutsInEfficiency;//use the cuts in the reco and pid efficiency
156
157   TList *fEfficiencyList;// list of the efficiency histograms
158   TList *fCutEfficiencyList;// list of the cut efficiency
159
160   ClassDef(AliProtonQAAnalysis,1);
161 };
162
163 #endif