]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/SPECTRA/AliProtonQAAnalysis.h
Fixing coding conv. viols
[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                    AliStack *stack,
46                    AliESDEvent *esd);
47   TList *GetVertexQAList() const {return fQAVertexList;}
48
49   //QA histograms
50   void SetQAYPtBins(Int_t nbinsY, Double_t minY, Double_t maxY,
51                     Int_t nbinsPt, Double_t minPt, Double_t maxPt);
52   void RunQAAnalysis(AliStack *stack, 
53                      AliESDEvent *esd,
54                      const AliESDVertex *vertex);
55   void SetRunQAAnalysis();
56   TList *GetGlobalQAList() const {return fGlobalQAList;}
57
58   //Efficiency plots (reconstruction & PID)
59   void RunEfficiencyAnalysis(AliMCEvent *mcEvent, 
60                              AliESDEvent *esd,
61                              const AliESDVertex *vertex);
62   void RunEfficiencyAnalysis(AliStack *stack, 
63                              AliESDEvent *esd,
64                              const AliESDVertex *vertex);
65   void SetRunEfficiencyAnalysis(Bool_t gUseCuts) {
66     fRunEfficiencyAnalysis = kTRUE;
67     fUseCutsInEfficiency = gUseCuts;
68   }
69   TList *GetEfficiencyQAList() const {return fEfficiencyList;}
70
71   //MC analysis
72   void RunMCAnalysis(AliStack* stack);
73   void SetRunMCAnalysis() {fRunMCAnalysis = kTRUE;}
74   void SetMCProcessId(Int_t id) {
75     fMCProcessIdFlag = kTRUE;
76     fMCProcessId = id;
77   }
78   void SetMotherParticlePDGCode(Int_t pdgCode) {
79     fMotherParticlePDGCodeFlag = kTRUE;
80     fMotherParticlePDGCode = pdgCode;
81   }
82   TList *GetPDGList() const {return fPDGList;}
83   TList *GetMCProcessesList() const {return fMCProcessesList;}
84
85   TList *GetAcceptedCutList() const {return fAcceptedCutList;}
86   TList *GetRejectedCutList() const {return fRejectedCutList;}
87   TList *GetAcceptedDCAList() const {return fAcceptedDCAList;}
88   TList *GetRejectedDCAList() const {return fRejectedDCAList;}
89
90  private:
91   AliProtonQAAnalysis(const AliProtonQAAnalysis&); // Not implemented
92   AliProtonQAAnalysis& operator=(const AliProtonQAAnalysis&);// Not implemented
93
94   void     InitVertexQA();
95   void     InitQA();
96   void     InitMCAnalysis();
97   void     InitCutLists();
98   void     InitEfficiencyAnalysis();
99   void     FillQA(AliStack *stack,
100                   AliESDEvent *esd,
101                   const AliESDVertex *vertex, 
102                   AliESDtrack* track);
103  
104   Bool_t   IsLabelUsed(TArrayI array, Int_t label);
105   Int_t    ConvertPDGToInt(Int_t pdgCode) const;
106   
107   AliProtonAnalysisBase *fProtonAnalysisBase;//base analysis object
108
109   Int_t fNBinsY; //number of bins in eta or y
110   Float_t fMinY, fMaxY; //min & max value of eta or y
111   Int_t fNBinsPt;  //number of bins in pT
112   Float_t fMinPt, fMaxPt; //min & max value of pT
113   
114   //QA histograms
115   //Bool_t fQAHistograms; //Boolean to activate the QA histograms
116   TList *fGlobalQAList; //TList storing the directories for the QA histograms
117   TList *fQAVertexList; //TList storing the vertex QA plots
118   TList *fQA2DList; //TList storing the accepted primary/secondary (anti)protons
119   TList *fQAPrimaryProtonsAcceptedList; //list of the QA histos for accepted primary protons
120   TList *fQAPrimaryProtonsRejectedList; //list of the QA histos for rejected primary protons
121   TList *fQASecondaryProtonsAcceptedList; //list of the QA histos for accepted secondary protons
122   TList *fQASecondaryProtonsRejectedList; //list of the QA histos for rejected secondary protons
123   TList *fQAPrimaryAntiProtonsAcceptedList; //list of the QA histos for accepted primary antiprotons
124   TList *fQAPrimaryAntiProtonsRejectedList; //list of the QA histos for rejected primary antiprotons
125   TList *fQASecondaryAntiProtonsAcceptedList; //list of the QA histos for accepted secondary antiprotons
126   TList *fQASecondaryAntiProtonsRejectedList; //list of the QA histos for rejected secondary antiprotons
127
128   //MC analysis
129   TList *fPDGList; //list with the 3D histograms: y-pt-pdg (anti)protons
130   TList *fMCProcessesList; //list with the MC processes for every secondary (anti)proton
131   Bool_t fRunMCAnalysis; //run this part or not
132   Bool_t fMCProcessIdFlag; //flag to see if we should check the process id
133   UInt_t fMCProcessId; //process id based on the TMCProcess
134   Bool_t fMotherParticlePDGCodeFlag; //flag to see if we should check the pdg code of the mother particle
135   Int_t  fMotherParticlePDGCode; //pdg code of the mother particle
136
137   TList *fAcceptedCutList;// list of the cut parameters' histograms
138   TList *fRejectedCutList;// list of the cut parameters' histograms
139   TList *fAcceptedDCAList;// list of the DCA histograms
140   TList *fRejectedDCAList;// list of the DCA histograms
141
142   //Efficiency (reconstruction & PID)
143   Bool_t fRunEfficiencyAnalysis; //run this part or not
144   Bool_t fUseCutsInEfficiency;//use the cuts in the reco and pid efficiency
145
146   TList *fEfficiencyList;// list of the efficiency histograms
147
148   ClassDef(AliProtonQAAnalysis,1);
149 };
150
151 #endif