Changes to run on PbPb events
[u/mrichter/AliRoot.git] / PWG1 / ITS / AliAnalysisTaskITSTrackingCheck.h
1 #ifndef AliAnalysisTaskITSTrackingCheck_cxx
2 #define AliAnalysisTaskITSTrackingCheck_cxx
3
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //*************************************************************************
8 // Class AliAnalysiTaskITSTrackingCheck
9 // AliAnalysisTask to extract from ESD tracks the information on the
10 // ITS tracking efficiency and resolutions
11 //
12 // Author: A.Dainese, andrea.dainese@pd.infn.it
13 //*************************************************************************
14
15 class TNtuple;
16 class TParticle;
17 class TH1F;
18 class AliESDEvent;
19 class AliESDVertex;
20 class AliESDfriend;
21 class AliESDtrackCuts;
22
23 #include "AliAnalysisTaskSE.h"
24
25 class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE 
26 {
27  public:
28     AliAnalysisTaskITSTrackingCheck();
29     AliAnalysisTaskITSTrackingCheck(const char *name);
30   virtual ~AliAnalysisTaskITSTrackingCheck(); 
31   
32   virtual void   UserCreateOutputObjects();
33   virtual void   UserExec(Option_t *option);
34   virtual void   Terminate(Option_t *);
35   Bool_t         GetReadMC() const { return fReadMC; }
36   void           SetReadMC(Bool_t flag=kTRUE) { fReadMC=flag; }
37   void           SetUsePhysSel() { fUsePhysSel=kTRUE; }
38   void           SetReadRPLabels(Bool_t flag=kTRUE) { fReadRPLabels=flag; }
39   void           SetFillNtuples(Bool_t flag=kTRUE) { fFillNtuples=flag; }
40   void           SetUseITSSAforNtuples(Bool_t flag=kTRUE) { fUseITSSAforNtuples=flag; }
41   void           SetESDtrackCutsTPC(AliESDtrackCuts *c) { fESDtrackCutsTPC=c; }
42   void           SetESDtrackCutsITSTPC(AliESDtrackCuts *c) { fESDtrackCutsITSTPC=c; }
43   
44  protected:
45   Bool_t       fReadMC; // read Monte Carlo
46   Bool_t       fReadRPLabels; // read MC labels from ITS.RecPoints
47   Bool_t       fFillNtuples; // fill expert ntuples
48   Bool_t       fUseITSSAforNtuples; // fill expert ntuples with ITSSA tracks
49   Bool_t       fUsePhysSel; // use AliPhysicsSelection
50   AliESDEvent  *fESD;    // ESD object
51   TList        *fOutput; //! list send on output slot 0
52   TH1F         *fHistNEvents; //! output hist
53   TH1F         *fHistNEventsFrac; //! output hist
54   TH1F         *fHistNtracks; //! output hist
55   TH1F         *fHistNclsITSMI; //! output hist
56   TH1F         *fHistNclsITSSA; //! output hist
57   TH1F         *fHistNclsITSSAInAcc; //! output hist
58   TH1F         *fHistClusterMapITSMI; //! output hist
59   TH1F         *fHistClusterMapITSMIok; //! output hist
60   TH1F         *fHistClusterMapITSMIbad; //! output hist
61   TH1F         *fHistClusterMapITSMIskipped; //! output hist
62   TH1F         *fHistClusterMapITSMIoutinz; //! output hist
63   TH1F         *fHistClusterMapITSMInorefit; //! output hist
64   TH1F         *fHistClusterMapITSMInocls; //! output hist
65   TH1F         *fHistClusterMapITSMIokoutinzbad; //! output hist
66   TH1F         *fHistClusterMapITSSA; //! output hist
67   TH1F         *fHistClusterMapITSSAok; //! output hist
68   TH1F         *fHistClusterMapITSSAbad; //! output hist
69   TH1F         *fHistClusterMapITSSAskipped; //! output hist
70   TH1F         *fHistClusterMapITSSAoutinz; //! output hist
71   TH1F         *fHistClusterMapITSSAnorefit; //! output hist
72   TH1F         *fHistClusterMapITSSAnocls; //! output hist
73   TH1F         *fHistClusterMapITSSAokoutinzbad; //! output hist
74   TH1F         *fHistClusterMapITSSAInAcc; //! output hist
75   TH1F         *fHistClusterMapITSSAokInAcc; //! output hist
76   TH1F         *fHistClusterMapITSSAbadInAcc; //! output hist
77   TH1F         *fHistClusterMapITSSAskippedInAcc; //! output hist
78   TH1F         *fHistClusterMapITSSAoutinzInAcc; //! output hist
79   TH1F         *fHistClusterMapITSSAnorefitInAcc; //! output hist
80   TH1F         *fHistClusterMapITSSAnoclsInAcc; //! output hist
81   TH1F         *fHistClusterMapITSSAokoutinzbadInAcc; //! output hist
82   TH1F         *fHistClusterMapModuleITSSAokInAcc; //! output hist
83   TH1F         *fHistClusterMapModuleITSSAbadInAcc; //! output hist
84   TH1F         *fHistClusterMapModuleITSSAnoclsInAcc; //! output hist
85   TH1F         *fHistClusterMapModuleITSMIokInAcc; //! output hist
86   TH1F         *fHistClusterMapModuleITSMIbadInAcc; //! output hist
87   TH1F         *fHistClusterMapModuleITSMInoclsInAcc; //! output hist
88   TH1F         *fHistZatSPDouter0ok; //! output hist
89   TH1F         *fHistZatSPDouter1ok; //! output hist
90   TH1F         *fHistZatSPDouter2ok; //! output hist
91   TH1F         *fHistZatSPDouter3ok; //! output hist
92   TH1F         *fHistZatSPDouter0notok; //! output hist
93   TH1F         *fHistZatSPDouter1notok; //! output hist
94   TH1F         *fHistZatSPDouter2notok; //! output hist
95   TH1F         *fHistZatSPDouter3notok; //! output hist
96   TH1F         *fHistxlocSDDok; //! output hist
97   TH1F         *fHistzlocSDDok; //! output hist
98   TH2F         *fHistxlocVSmodSDDok; //! output hist
99   TH1F         *fHistxlocSDDall; //! output hist
100   TH1F         *fHistzlocSDDall; //! output hist
101   TH1F         *fHistPhiTPCInAcc; //! output hist
102   TH1F         *fHistPtTPC; //! output hist
103   TH1F         *fHistPtTPCInAcc; //! output hist
104   TH1F         *fHistPtTPCInAccMCtwoSPD; //! output hist
105   TH1F         *fHistPtTPCInAccMConeSPD; //! output hist
106   TH2F         *fHistdEdxVSPtTPCInAcc; //! output hist
107   TH2F         *fHistdEdxVSPtITSTPCsel; //! output hist
108   TH2F         *fHistPtVSphiTPCInAcc; //! output hist
109   TH1F         *fHistPtTPCInAccNoTRDout; //! output hist
110   TH1F         *fHistPtTPCInAccNoTOFout; //! output hist
111   TH1F         *fHistPtTPCInAccWithPtTPCAtInnerWall; //! output hist
112   TH1F         *fHistPtTPCInAccWithPtTPCAtVtx; //! output hist
113   TH2F         *fHistDeltaPtTPC; //! output hist
114   TH1F         *fHistPtTPCInAccP; //! output hist
115   TH1F         *fHistPtTPCInAccS; //! output hist
116   TH1F         *fHistPtTPCInAccPfromStrange; //! output hist
117   TH1F         *fHistPtTPCInAccSfromStrange; //! output hist
118   TH1F         *fHistPtTPCInAccSfromMat; //! output hist
119   TH1F         *fHistPtITSMI2; //! output hist
120   TH1F         *fHistPtITSMI3; //! output hist
121   TH1F         *fHistPtITSMI4; //! output hist
122   TH1F         *fHistPtITSMI5; //! output hist
123   TH1F         *fHistPtITSMI6; //! output hist
124   TH1F         *fHistPtITSMISPD; //! output hist
125   TH1F         *fHistPtITSMIoneSPD; //! output hist
126   TH1F         *fHistPtITSMI2InAcc; //! output hist
127   TH1F         *fHistPtITSMI3InAcc; //! output hist
128   TH1F         *fHistPtITSMI4InAcc; //! output hist
129   TH1F         *fHistPtITSMI5InAcc; //! output hist
130   TH1F         *fHistPtITSMI6InAcc; //! output hist
131   TH1F         *fHistPtITSMISPDInAcc; //! output hist
132   TH1F         *fHistPtITSMIoneSPDInAcc; //! output hist
133   TH1F         *fHistPtITSMI2InAccFake; //! output hist
134   TH1F         *fHistPtITSMI3InAccFake; //! output hist
135   TH1F         *fHistPtITSMI4InAccFake; //! output hist
136   TH1F         *fHistPtITSMI5InAccFake; //! output hist
137   TH1F         *fHistPtITSMI6InAccFake; //! output hist
138   TH1F         *fHistPtITSMISPDInAccFake; //! output hist
139   TH1F         *fHistPtITSMIoneSPDInAccFake; //! output hist
140   TH1F         *fHistPtITSMIoneSPDthreeSDDSSDInAcc; //! output hist
141   TH1F         *fHistPtITSTPCsel; //! output hist
142   TH1F         *fHistPtITSTPCselP; //! output hist
143   TH1F         *fHistPtITSTPCselS; //! output hist
144   TH1F         *fHistPtITSTPCselPfromStrange; //! output hist
145   TH1F         *fHistPtITSTPCselSfromStrange; //! output hist
146   TH1F         *fHistPtITSTPCselSfromMat; //! output hist
147   TH1F         *fHistPtITSMI2InAccP; //! output hist
148   TH1F         *fHistPtITSMI3InAccP; //! output hist
149   TH1F         *fHistPtITSMI4InAccP; //! output hist
150   TH1F         *fHistPtITSMI5InAccP; //! output hist
151   TH1F         *fHistPtITSMI6InAccP; //! output hist
152   TH1F         *fHistPtITSMISPDInAccP; //! output hist
153   TH1F         *fHistPtITSMIoneSPDInAccP; //! output hist
154   TH1F         *fHistPtITSMI2InAccS; //! output hist
155   TH1F         *fHistPtITSMI3InAccS; //! output hist
156   TH1F         *fHistPtITSMI4InAccS; //! output hist
157   TH1F         *fHistPtITSMI5InAccS; //! output hist
158   TH1F         *fHistPtITSMI6InAccS; //! output hist
159   TH1F         *fHistPtITSMISPDInAccS; //! output hist
160   TH1F         *fHistPtITSMIoneSPDInAccS; //! output hist
161   TH1F         *fHistPtITSMIokbadoutinz6; //! output hist
162   TH1F         *fHistPtITSMIokbadoutinz4InAcc; //! output hist
163   TH1F         *fHistPtITSMIokbadoutinz5InAcc; //! output hist
164   TH1F         *fHistPtITSMIokbadoutinz6InAcc; //! output hist
165   TH1F         *fHistPhiITSMIokbadoutinz6InAcc; //! output hist
166   TH1F         *fHistRProdVtxInAccP; //! output hist
167   TH1F         *fHistRProdVtxInAccS; //! output hist
168   TH1F     *fHistd0rphiTPCInAccP150200; //! output hist
169   TH1F     *fHistd0rphiTPCInAccP500700; //! output hist
170   TH1F     *fHistd0rphiTPCInAccP10001500; //! output hist
171   TH1F     *fHistd0rphiTPCInAccS150200; //! output hist
172   TH1F     *fHistd0rphiTPCInAccS500700; //! output hist
173   TH1F     *fHistd0rphiTPCInAccS10001500; //! output hist
174   TH1F     *fHistd0rphiITSMISPDInAccP150200; //! output hist
175   TH1F     *fHistd0rphiITSMISPDInAccP500700; //! output hist
176   TH1F     *fHistd0rphiITSMISPDInAccP10001500; //! output hist
177   TH1F     *fHistd0rphiITSMISPDInAccS150200; //! output hist
178   TH1F     *fHistd0rphiITSMISPDInAccS500700; //! output hist
179   TH1F     *fHistd0rphiITSMISPDInAccS10001500; //! output hist
180   TH1F     *fHistd0rphiITSMIoneSPDInAccP150200; //! output hist
181   TH1F     *fHistd0rphiITSMIoneSPDInAccP350450; //! output hist
182   TH1F     *fHistd0rphiITSMIoneSPDInAccP500700; //! output hist
183   TH1F     *fHistd0rphiITSMIoneSPDInAccP10001500; //! output hist
184   TH1F     *fHistd0rphiITSMIoneSPDInAccP25004000; //! output hist
185   TH1F     *fHistd0rphiITSMIoneSPDInAccP40008000; //! output hist
186   TH1F     *fHistd0zITSMIoneSPDInAccP150200; //! output hist
187   TH1F     *fHistd0zITSMIoneSPDInAccP500700; //! output hist
188   TH1F     *fHistd0zITSMIoneSPDInAccP10001500; //! output hist
189   TH2F     *fHistd0zVSetaTPCInAccP10001500; //! output hist
190   TH2F     *fHistd0rphiVSphiITSMIoneSPDInAccP10001500; //! output hist
191   TH2F     *fHistd0rphiVSetaITSMIoneSPDInAccP10001500; //! output hist
192   TH1F     *fHistd0rphiITSMIoneSPDInAccS150200; //! output hist
193   TH1F     *fHistd0rphiITSMIoneSPDInAccS350450; //! output hist
194   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700; //! output hist
195   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700from22; //! output hist
196   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700from211; //! output hist
197   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700from310; //! output hist
198   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700from321; //! output hist
199   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700from3122; //! output hist
200   TH1F     *fHistd0rphiITSMIoneSPDInAccS10001500; //! output hist  
201   TH1F     *fHistd0rphiITSMIoneSPDInAccS25004000; //! output hist
202   TH1F     *fHistd0rphiITSMIoneSPDInAccS40008000; //! output hist
203   TH1F     *fHistd0rphiITSMIoneSPDInAccS150200fromStrange; //! output hist
204   TH1F     *fHistd0rphiITSMIoneSPDInAccS150200fromMat; //! output hist
205   TH1F     *fHistd0rphiITSMIoneSPDInAccS350450fromStrange; //! output hist
206   TH1F     *fHistd0rphiITSMIoneSPDInAccS350450fromMat; //! output hist
207   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700fromStrange; //! output hist
208   TH1F     *fHistd0rphiITSMIoneSPDInAccS500700fromMat; //! output hist
209   TH1F     *fHistd0rphiITSMIoneSPDInAccS10001500fromStrange; //! output hist
210   TH1F     *fHistd0rphiITSMIoneSPDInAccS10001500fromMat; //! output hist
211   TH1F     *fHistd0rphiITSMIoneSPDInAccS25004000fromStrange; //! output hist
212   TH1F     *fHistd0rphiITSMIoneSPDInAccS25004000fromMat; //! output hist
213   TH1F     *fHistd0rphiITSMIoneSPDInAccS40008000fromStrange; //! output hist
214   TH1F     *fHistd0rphiITSMIoneSPDInAccS40008000fromMat; //! output hist
215   TH1F     *fHistd0zITSMIoneSPDInAccS150200; //! output hist
216   TH1F     *fHistd0zITSMIoneSPDInAccS500700; //! output hist
217   TH1F     *fHistd0zITSMIoneSPDInAccS10001500; //! output hist
218   TH1F     *fHistPDGMoth; //! output hist
219   TH1F     *fHistPDGMoth150200; //! output hist
220   TH1F     *fHistPDGMoth500700; //! output hist
221   TH1F     *fHistPDGMoth10001500; //! output hist
222   TH1F     *fHistPDGTrk; //! output hist
223   TNtuple      *fNtupleESDTracks; //! output ntuple
224   TNtuple      *fNtupleITSAlignExtra; //! output ntuple
225   TNtuple      *fNtupleITSAlignSPDTracklets; //! output ntuple
226   Int_t         fCountsPerPtBin[11]; // track per pt bin
227   AliESDtrackCuts *fESDtrackCutsTPC; // cuts for TPC track
228   AliESDtrackCuts *fESDtrackCutsITSTPC; // cuts for TPC+ITS track
229
230  private:    
231
232   AliAnalysisTaskITSTrackingCheck(const AliAnalysisTaskITSTrackingCheck&); // not implemented
233   AliAnalysisTaskITSTrackingCheck& operator=(const AliAnalysisTaskITSTrackingCheck&); // not implemented
234   
235
236   Int_t NumberOfITSClustersMC(Int_t label,Int_t nModules=2198) const;
237   Int_t NumberOfITSClusters(Int_t idet,Float_t &xloc) const;
238   Double_t ParticleImpParMC(TParticle *part,AliESDVertex *vert,Double_t bzT) const;
239   Bool_t SelectPt(Double_t pt);
240   Int_t MakeITSflag(AliESDtrack *track) const;
241
242   ClassDef(AliAnalysisTaskITSTrackingCheck,9); // ITS tracks analysis
243 };
244
245 #endif