Coverity fixes
[u/mrichter/AliRoot.git] / PWG2 / EVCHAR / AliAnalysisTaskSPDdNdEta.h
1 #ifndef ALIANALYSISTASKSPDDNDETA_H
2 #define ALIANALYSISTASKSPDDNDETA_H
3
4 ///////////////////////////////////////////////////////////////////////////
5 // Class AliAnalysisTaskSPDdNdEta                                        //
6 // Analysis task for dN/dEta reconstruction with the SPD                 //
7 //                                                                       //
8 // Author:  M. Nicassio (INFN Bari)                                      //
9 // Contact: Maria.Nicassio@ba.infn.it, Domenico.Elia@ba.infn.it          //
10 ///////////////////////////////////////////////////////////////////////////
11
12 class TH1F; 
13 class TH2F;
14 class TH3F;
15 class AliESDEvent;
16 class TList;
17 class AliTrackletAlg;
18 class AliMCParticle;
19
20 #include "AliAnalysisTaskSE.h"
21 #include "AliTriggerAnalysis.h"
22
23 class AliAnalysisTaskSPDdNdEta : public AliAnalysisTaskSE {
24  public:
25   AliAnalysisTaskSPDdNdEta(const char *name = "AliAnalysisTaskSPDdNdEta");
26   virtual ~AliAnalysisTaskSPDdNdEta(); 
27   
28   virtual void   UserCreateOutputObjects();
29   virtual void   UserExec(Option_t *option);
30   virtual void   Terminate(Option_t *);
31
32   enum MCCentralityBin{kcentral=1,kbin3to6=2,kbin6to9=3,kbin9to12=4,kbin12to15=5,kperipheral=6,kall=7};
33
34   void SetReadMC(Bool_t readmc = kFALSE) { fUseMC = readmc; }
35   void SetTrigger(AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
36   void SetReadTrackRefs(Bool_t readtr = kFALSE) { fTR = readtr; }
37   void SetRecoTracklets(Bool_t recotracklets = kFALSE) { fRecoTracklets = recotracklets; }
38   void SetMCCentralityBin(MCCentralityBin mccentrbin) {fMCCentralityBin=mccentrbin;}
39   void SetCentralityLowLim(Float_t centrlowlim) {fCentrLowLim=centrlowlim;}
40   void SetCentralityUpLim(Float_t centruplim) {fCentrUpLim=centruplim;}
41 //  void SetCentralityEst(TString centrest) {fCentrEst=centrest;}
42   void SetCentralityEst(Bool_t centrest) {fCentrEst=centrest;}
43   void SetMinClusterMultLay2(Int_t minClMultLay2=0) {fMinClMultLay2=minClMultLay2;}
44   void SetMaxClusterMultLay2(Int_t maxClMultLay2=0) {fMaxClMultLay2=maxClMultLay2;}
45   void SetMinV0Mult(Int_t minV0Mult=0) {fMinMultV0=minV0Mult;}
46   void SetVertexRange(Float_t vl=7.) {fVtxLim=vl;}
47   void SetPartSpecies(Bool_t partsp = kFALSE)  {fPartSpecies=partsp;}
48
49   void SetPhiWindow(Float_t w=0.08) {fPhiWindow=w;}
50   void SetThetaWindow(Float_t w=0.025) {fThetaWindow=w;}
51   void SetPhiShift(Float_t w=0.0045) {fPhiShift=w;}
52   void SetRemoveClustersFromOverlaps(Bool_t b = kFALSE) {fRemoveClustersFromOverlaps = b;}
53   void SetPhiOverlapCut(Float_t w=0.005) {fPhiOverlapCut=w;}
54   void SetZetaOverlapCut(Float_t w=0.05) {fZetaOverlapCut=w;}
55   void SetPhiRotationAngle(Float_t w=0.0) {fPhiRotationAngle=w;}
56   void SetPhiWindowAna(Float_t w=0.08) {fPhiWindowAna=w;}
57  
58   Bool_t IsDetectablePrimary(Int_t nref, AliMCParticle* mcpart);
59   Bool_t IsDetectedPrimary(Int_t nref, AliMCParticle* mcpart, Int_t Layer);
60
61  protected:
62   AliESDEvent *fmyESD;             // ! ESD object 
63   TList *fOutput;                  // ! output list send on output slot 1 
64
65   Bool_t fUseMC;                   // flag to enable the calculation of correction histograms
66   AliTriggerAnalysis::Trigger fTrigger;  
67   Bool_t fTR;                      // to read track references and calculate factors of track to particle correction 
68   Bool_t fRecoTracklets;           // flag to recostruct tracklets
69   
70   MCCentralityBin fMCCentralityBin; // to select MC centrality bin in which corrections are calculated
71   Float_t fCentrLowLim;             // to select centrality bin on data
72   Float_t fCentrUpLim;              // to select centrality bin on data
73 //  TString fCentrEst;                 // to select centrality estimator
74   Bool_t fCentrEst;                 // to select centrality estimator
75
76   Int_t fMinClMultLay2;             // to select multiplicity class
77   Int_t fMaxClMultLay2;             // to select multiplicity class
78   Int_t fMinMultV0;                 // to select centrality class 
79   Float_t fVtxLim;                  // to select vertex range
80   Bool_t fPartSpecies;              // to fill correction matrices for each part species (for syst studies)
81  
82   Float_t       fPhiWindow;                    // Search window in phi
83   Float_t       fThetaWindow;                  // Search window in theta
84   Float_t       fPhiShift;                     // Phi shift reference value (at 0.5 T)
85   Bool_t        fRemoveClustersFromOverlaps;   // Option to skip clusters in the overlaps
86   Float_t       fPhiOverlapCut;                // Fiducial window in phi for overlap cut
87   Float_t       fZetaOverlapCut;               // Fiducial window in eta for overlap cut
88   Float_t       fPhiRotationAngle;             // Angle to rotate the inner layer cluster for combinatorial reco only
89   Float_t       fPhiWindowAna;                 // Final analysis tracklet definition window in phi
90
91   AliTrackletAlg *fMultReco;       // tracklet reconstruction class
92
93
94   TH1F        *fV0Ampl;                     // ! V0 amplitudes to cut on centrality
95   TH2F        *fHistSPDRAWMultvsZ;          // ! data to be corrected 
96   TH2F        *fHistSPDRAWMultvsZTriggCentrEvts; // ! data to be corrected
97   TH2F        *fHistSPDRAWMultvsZCentrEvts; // ! data to be corrected
98
99   TH2F        *fHistSPDRAWEtavsZ;           // ! data to be corrected
100
101   TH1F        *fHistSPDmultEtacut;          // ! cluster inner layer and tracklet check histos
102   TH1F        *fHistSPDmult;                // ! cluster inner layer and tracklet check histos
103   TH1F        *fHistSPDmultcl1;             // ! cluster inner layer and tracklet check histos
104   TH1F        *fHistSPDmultcl2;             // ! cluster inner layer and tracklet check histos
105   TH2F        *fHistSPDmultcl1vscl2;        // ! cluster inner layer and tracklet check histos
106   TH2F        *fHistSPDmultvscl1;           // ! cluster inner layer and tracklet check histos
107   TH2F        *fHistSPDmultvscl2;           // ! cluster inner layer and tracklet check histos
108
109   TH1F        *fHistSPDeta;                 // ! cluster inner layer and tracklet check histos
110   TH1F        *fHistSPDphi;                 // ! cluster inner layer and tracklet check histos
111   TH1F        *fHistSPDtheta;               // ! cluster inner layer and tracklet check histos
112   TH1F        *fHistSPDdePhi;               // ! cluster inner layer and tracklet check histos
113   TH2F        *fHistSPDphivsSPDeta;         // ! cluster inner layer and tracklet check histos
114   TH1F        *fHistSPDdeTheta;             // ! cluster inner layer and tracklet check histos
115   
116   TH1F        *fHistSPDvtx;                 // ! SPD vertex distributions
117   TH1F        *fHistSPDvtxAnalysis;         // ! SPD vertex distributions
118   TH2F        *fHistSPDdePhideTheta;        // ! histogram for combinatorial background studies
119
120   TH1F        *fHistSPDphicl1;              // ! cluster inner layer and tracklet check histos
121   TH1F        *fHistSPDphicl2;              // ! cluster inner layer and tracklet check histos
122
123   TH2F* fHistBkgCorrDen;                    // ! track level correction histograms
124   TH2F* fHistReconstructedProtons;            // ! track level correction histograms
125   TH2F* fHistReconstructedKaons;            // ! track level correction histograms
126   TH2F* fHistReconstructedPions;            // ! track level correction histograms
127   TH2F* fHistReconstructedOthers;           // ! track level correction histograms
128   TH2F* fHistReconstructedSec;        // ! track level correction histograms
129
130   TH2F* fHistBkgCorrDenPrimGen;      // ! track level correction histograms
131   TH2F* fHistBkgCombLabels;          // ! track level correction histograms
132   TH2F* fHistBkgCorrNum;             // ! track level correction histograms
133   TH2F* fHistAlgEffNum;              // ! track level correction histograms
134   TH2F* fHistNonDetectableCorrDen;   // ! track level correction histograms
135
136   TH2F* fHistNonDetectableCorrNum;   // ! track level correction histograms
137   TH2F* fHistProtons;                // ! track level correction histograms
138   TH2F* fHistKaons;                  // ! track level correction histograms
139   TH2F* fHistPions;                  // ! track level correction histograms
140   TH2F* fHistOthers;                 // ! track level correction histograms
141   TH2F* fHistAllPrimaries;           // ! track level correction histograms
142   TH2F* fHistTrackCentrEvts;         // ! track level correction histograms
143   TH2F* fHistTrackTrigCentrEvts;     // ! track level correction histograms
144  
145   TH2F* fHistAllEvts;                // ! event level correction histograms
146   TH2F* fHistCentrEvts;              // ! event level correction histograms
147   TH2F* fHistTrigCentrEvts;          // ! event level correction histograms
148   TH2F* fHistSelEvts;                // ! event level correction histograms
149
150   TH1F* fHistMCmultEtacut;                // ! MC distributions
151   TH2F* fHistMCmultEtacutvsSPDmultEtacut; // ! MC distributions
152   TH2F* fHistMCmultEtacutvsSPDmultcl1;    // ! MC distributions
153   TH2F* fHistMCmultEtacutvsSPDmultcl2;    // ! MC distributions
154
155   TH1F* fHistMCvtxx;                 // ! MC vertex
156   TH1F* fHistMCvtxy;                 // ! MC vertex
157   TH1F* fHistMCvtxz;                 // ! MC vertex
158
159   TH2F* fHistRecvsGenImpactPar;      // ! impact parameter correlation (ZDC est vs gen)
160   TH1F* fHistMCNpart;                // ! distribution of number of participants from MC 
161
162   TH2F* fHistdPhidThetaPP;           // ! tracklet check histo
163   TH2F* fHistdPhidThetaSS;           // ! tracklet check histo
164   TH2F* fHistdPhidThetaComb;         // ! tracklet check histo
165
166   TH2F* fHistDeVtx;                  // ! check histo
167
168  private:    
169   AliAnalysisTaskSPDdNdEta(const AliAnalysisTaskSPDdNdEta&); // not implemented
170   AliAnalysisTaskSPDdNdEta& operator=(const AliAnalysisTaskSPDdNdEta&); // not implemented 
171   
172   ClassDef(AliAnalysisTaskSPDdNdEta, 5);  
173 };
174 #endif