Additional forward declaration
[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 SetMinClusterMultLay2(Int_t minClMultLay2=0) {fMinClMultLay2=minClMultLay2;}
43
44   void SetPhiWindow(Float_t w=0.08) {fPhiWindow=w;}
45   void SetThetaWindow(Float_t w=0.025) {fThetaWindow=w;}
46   void SetPhiShift(Float_t w=0.0045) {fPhiShift=w;}
47   void SetRemoveClustersFromOverlaps(Bool_t b = kFALSE) {fRemoveClustersFromOverlaps = b;}
48   void SetPhiOverlapCut(Float_t w=0.005) {fPhiOverlapCut=w;}
49   void SetZetaOverlapCut(Float_t w=0.05) {fZetaOverlapCut=w;}
50   void SetPhiRotationAngle(Float_t w=0.0) {fPhiRotationAngle=w;}
51   void SetPhiWindowAna(Float_t w=0.08) {fPhiWindowAna=w;}
52  
53   Bool_t IsDetectablePrimary(Int_t nref, AliMCParticle* mcpart);
54   Bool_t IsDetectedPrimary(Int_t nref, AliMCParticle* mcpart, Int_t Layer);
55
56  protected:
57   AliESDEvent *fmyESD;             // ! ESD object 
58   TList *fOutput;                  // ! output list send on output slot 1 
59
60   Bool_t fUseMC;                   // flag to enable the calculation of correction histograms
61   Bool_t fPbPb;                    // flag to analyze PbPb data 
62   AliTriggerAnalysis::Trigger fTrigger;  
63   Bool_t fTR;                      // to read track references and calculate factors of track to particle correction 
64   Bool_t fRecoTracklets;           // flag to recostruct tracklets
65   
66   MCCentralityBin fMCCentralityBin; // to select MC centrality bin in which corrections are calculated
67   Float_t fCentrLowLim;             // to select centrality bin on data
68   Float_t fCentrUpLim;              // to select centrality bin on data
69   TString fCentrEst;                // to select centrality estimator
70   Int_t fMinClMultLay2;             // to select multiplicity class
71
72   Float_t       fPhiWindow;                    // Search window in phi
73   Float_t       fThetaWindow;                  // Search window in theta
74   Float_t       fPhiShift;                     // Phi shift reference value (at 0.5 T)
75   Bool_t        fRemoveClustersFromOverlaps;   // Option to skip clusters in the overlaps
76   Float_t       fPhiOverlapCut;                // Fiducial window in phi for overlap cut
77   Float_t       fZetaOverlapCut;               // Fiducial window in eta for overlap cut
78   Float_t       fPhiRotationAngle;             // Angle to rotate the inner layer cluster for combinatorial reco only
79   Float_t       fPhiWindowAna;                 // Final analysis tracklet definition window in phi
80
81   AliTrackletAlg *fMultReco;       // tracklet reconstruction class
82
83   TH2F        *fHistSPDRAWMultvsZ;          // ! data to be corrected 
84   TH2F        *fHistSPDRAWMultvsZTriggCentrEvts; // ! data to be corrected
85   TH2F        *fHistSPDRAWMultvsZCentrEvts; // ! data to be corrected
86
87   TH2F        *fHistSPDRAWEtavsZ;           // ! data to be corrected
88
89   TH1F        *fHistSPDmultEtacut;          // ! cluster inner layer and tracklet check histos
90   TH1F        *fHistSPDmult;                // ! cluster inner layer and tracklet check histos
91   TH1F        *fHistSPDmultcl1;             // ! cluster inner layer and tracklet check histos
92   TH1F        *fHistSPDmultcl2;             // ! cluster inner layer and tracklet check histos
93   TH2F        *fHistSPDmultcl1vscl2;        // ! cluster inner layer and tracklet check histos
94   TH2F        *fHistSPDmultvscl1;        // ! cluster inner layer and tracklet check histos
95   TH2F        *fHistSPDmultvscl2;        // ! cluster inner layer and tracklet check histos
96
97   TH1F        *fHistSPDeta;                 // ! cluster inner layer and tracklet check histos
98   TH1F        *fHistSPDphi;                 // ! cluster inner layer and tracklet check histos
99   TH1F        *fHistSPDtheta;               // ! cluster inner layer and tracklet check histos
100   TH1F        *fHistSPDdePhi;               // ! cluster inner layer and tracklet check histos
101   TH2F        *fHistSPDphivsSPDeta;         // ! cluster inner layer and tracklet check histos
102   TH1F        *fHistSPDdeTheta;             // ! cluster inner layer and tracklet check histos
103   
104   TH1F        *fHistSPDvtx;                 // ! SPD vertex distributions
105   TH1F        *fHistSPDvtxAnalysis;         // ! SPD vertex distributions
106   TH2F        *fHistSPDdePhideTheta;        // ! histogram for combinatorial background studies
107
108   TH1F        *fHistSPDphicl1;                 // ! cluster inner layer and tracklet check histos
109   TH1F        *fHistSPDphicl2;                 // ! cluster inner layer and tracklet check histos
110
111   TH2F* fHistBkgCorrDen;             // ! track level correction histograms
112   TH2F* fHistBkgCorrDenPrimGen;      // ! track level correction histograms
113   TH2F* fHistBkgCorrNum;             // ! track level correction histograms
114   TH2F* fHistAlgEffNum;              // ! track level correction histograms
115   TH2F* fHistNonDetectableCorrDen;   // ! track level correction histograms
116
117   TH2F* fHistNonDetectableCorrNum;   // ! track level correction histograms
118   TH2F* fHistAllPrimaries;           // ! track level correction histograms
119   TH2F* fHistTrackCentrEvts;         // ! track level correction histograms
120   TH2F* fHistTrackTrigCentrEvts;     // ! track level correction histograms
121  
122   TH2F* fHistAllEvts;                // ! event level correction histograms
123   TH2F* fHistCentrEvts;              // ! event level correction histograms
124   TH2F* fHistTrigCentrEvts;          // ! event level correction histograms
125   TH2F* fHistSelEvts;                // ! event level correction histograms
126
127   TH1F* fHistMCmultEtacut;           // ! MC distributions
128   TH2F* fHistMCmultEtacutvsSPDmultEtacut; // ! MC distributions
129   TH2F* fHistMCmultEtacutvsSPDmultcl1;  // ! MC distributions
130   TH2F* fHistMCmultEtacutvsSPDmultcl2;  // ! MC distributions
131
132   TH1F* fHistMCvtxx;                 // ! MC vertex
133   TH1F* fHistMCvtxy;                 // ! MC vertex
134   TH1F* fHistMCvtxz;                 // ! MC vertex
135
136   TH2F* fHistRecvsGenImpactPar;      // ! impact parameter correlation (ZDC est vs gen)
137   TH1F* fHistMCNpart;                // ! distribution of number of participants from MC 
138
139   TH1F* fHistdPhiPP;                 // ! tracklet check histo
140   TH1F* fHistdPhiSS;                 // ! tracklet check histo
141   TH1F* fHistdPhiComb;               // ! tracklet check histo
142
143   TH2F* fHistDeVtx;                  // ! check histo
144
145  private:    
146   AliAnalysisTaskSPDdNdEta(const AliAnalysisTaskSPDdNdEta&); // not implemented
147   AliAnalysisTaskSPDdNdEta& operator=(const AliAnalysisTaskSPDdNdEta&); // not implemented 
148   
149   ClassDef(AliAnalysisTaskSPDdNdEta, 3);  
150 };
151
152 #endif