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