]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/CaloCalib/AliAnalysisTaskEMCALPi0PbPb.h
Updated D0 systematic errors for PbPb 40-80
[u/mrichter/AliRoot.git] / PWG4 / CaloCalib / AliAnalysisTaskEMCALPi0PbPb.h
CommitLineData
6bf90832 1#ifndef AliAnalysisTaskEMCALPi0PbPb_h
2#define AliAnalysisTaskEMCALPi0PbPb_h
ea3fd2d5 3
4// $Id$
5
fa443410 6class TAxis;
f5d4ab70 7class TClonesArray;
296ea9b4 8class TH1;
9class TH2;
f5d4ab70 10class TNtuple;
717fe7de 11class TObjArray;
12class AliAODCaloCells;
13class AliAODCaloCluster;
ea3fd2d5 14class AliAODEvent;
296ea9b4 15class AliAODTrack;
788ca675 16class AliAODVertex;
d595acbb 17class AliEMCALGeoUtils;
296ea9b4 18class AliEMCALRecoUtils;
717fe7de 19class AliESDCaloCells;
ea3fd2d5 20class AliESDCaloCluster;
717fe7de 21class AliESDEvent;
0ec74551 22class AliESDTrack;
788ca675 23class AliESDVertex;
0ec74551 24class AliESDtrackCuts;
38727e64 25class AliMCParticle;
788ca675 26class AliStaHeader;
27class AliStaVertex;
ea3fd2d5 28
29#include "AliAnalysisTaskSE.h"
30
31class AliAnalysisTaskEMCALPi0PbPb : public AliAnalysisTaskSE {
32 public:
d595acbb 33 AliAnalysisTaskEMCALPi0PbPb(const char *name=0);
ea3fd2d5 34 virtual ~AliAnalysisTaskEMCALPi0PbPb();
35
286b47a5 36 void UserCreateOutputObjects();
37 void UserExec(Option_t *option);
38 void Terminate(Option_t *);
717fe7de 39
b6c599fe 40 void SetAsymMax(Double_t asymMax) { fAsymMax = asymMax; }
41 void SetCentrality(const char *n) { fCentVar = n; }
286b47a5 42 void SetCentralityRange(Double_t from, Double_t to) { fCentFrom=from; fCentTo=to; }
b6c599fe 43 void SetClusName(const char *n) { fClusName = n; }
a49742b5 44 void SetDoAfterburner(Bool_t b) { fDoAfterburner = b; }
b6c599fe 45 void SetDoTrackMatWithGeom(Bool_t b) { fDoTrMatGeom = b; }
46 void SetFillNtuple(Bool_t b) { fDoNtuple = b; }
47 void SetGeoName(const char *n) { fGeoName = n; }
38727e64 48 void SetGeoUtils(AliEMCALGeoUtils *geo) { fGeom = geo; }
b6c599fe 49 void SetIsoDist(Double_t d) { fIsoDist = d; }
38727e64 50 void SetL0TimeRange(Int_t l, Int_t h) { fMinL0Time=l; fMaxL0Time=h; }
3a952328 51 void SetMarkCells(const char *n) { fMarkCells = n; }
38727e64 52 void SetMcMode(Bool_t b) { fMcMode = b; }
b6c599fe 53 void SetMinClusEnergy(Double_t e) { fMinE = e; }
54 void SetMinEcc(Double_t ecc) { fMinEcc = ecc; }
55 void SetMinErat(Double_t erat) { fMinErat = erat; }
3a952328 56 void SetMinNClustersPerTrack(Double_t m) { fMinNClusPerTr = m; }
b6c599fe 57 void SetNminCells(Int_t n) { fNminCells = n; }
3a952328 58 void SetPrimTrackCuts(AliESDtrackCuts *c) { fPrimTrCuts = c; }
38727e64 59 void SetRecoUtils(AliEMCALRecoUtils *reco) { fReco = reco; }
b6c599fe 60 void SetTrClassNames(const char *n) { fTrClassNames = n; }
61 void SetTrackCuts(AliESDtrackCuts *c) { fTrCuts = c; }
3a952328 62 void SetTrainMode(Bool_t b) { fTrainMode = b; }
b6c599fe 63 void SetUseQualFlag(Bool_t b) { fUseQualFlag = b; }
d595acbb 64 void SetVertexRange(Double_t z1, Double_t z2) { fVtxZMin=z1; fVtxZMax=z2; }
717fe7de 65
66 protected:
38727e64 67 virtual void CalcCaloTriggers();
296ea9b4 68 virtual void CalcClusterProps();
b6c599fe 69 virtual void CalcPrimTracks();
38727e64 70 virtual void CalcMcInfo();
3a952328 71 virtual void CalcTracks();
323834f0 72 virtual void ClusterAfterburner();
76332037 73 virtual void FillCellHists();
74 virtual void FillClusHists();
788ca675 75 virtual void FillNtuple();
323834f0 76 virtual void FillOtherHists();
788ca675 77 virtual void FillPionHists();
38727e64 78 virtual void FillMcHists();
788ca675 79 void FillVertex(AliStaVertex *v, const AliESDVertex *esdv);
80 void FillVertex(AliStaVertex *v, const AliAODVertex *aodv);
0fbe8d4f 81 Double_t GetCellIsolation(Double_t cEta, Double_t cPhi, Double_t radius=0.2) const;
82 Double_t GetCellEnergy(const AliVCluster *c) const;
83 Double_t GetMaxCellEnergy(const AliVCluster *c) const { Short_t id=-1; return GetMaxCellEnergy(c,id); }
84 Double_t GetMaxCellEnergy(const AliVCluster *c, Short_t &id) const;
85 Int_t GetNCells(const AliVCluster *c, Double_t emin=0.) const;
86 void GetSigma(const AliVCluster *c, Double_t &sigmaMax, Double_t &sigmaMin) const;
87 Double_t GetTrackIsolation(Double_t cEta, Double_t cPhi, Double_t radius=0.2, Double_t pt=0.) const;
88 Double_t GetTrigEnergy(const AliVCluster *c) const;
89 Bool_t IsShared(const AliVCluster *c) const;
38727e64 90 void PrintDaughters(AliMCParticle *p) const;
91 void PrintTrackRefs(AliMCParticle *p) const;
286b47a5 92
717fe7de 93 // input members
6eb6260e 94 TString fCentVar; // variable for centrality determination
95 Double_t fCentFrom; // min centrality (def=0)
96 Double_t fCentTo; // max centrality (def=100)
97 Double_t fVtxZMin; // min primary vertex z (def=-10cm)
98 Double_t fVtxZMax; // max primary vertex z (def=+10cm)
99 Bool_t fUseQualFlag; // if true use quality flag for centrality
100 TString fClusName; // cluster branch name (def="")
101 Bool_t fDoNtuple; // if true write out ntuple
a49742b5 102 Bool_t fDoAfterburner; // if true run after burner
f224d35b 103 Double_t fAsymMax; // maximum energy asymmetry (def=1)
104 Int_t fNminCells; // minimum number of cells attached to cluster (def=1)
296ea9b4 105 Double_t fMinE; // minimum cluster energy (def=0.1 GeV/c)
f224d35b 106 Double_t fMinErat; // minimum emax/ec ratio (def=0)
107 Double_t fMinEcc; // minimum eccentricity (def=0)
6bf90832 108 TString fGeoName; // geometry name (def = EMCAL_FIRSTYEARV1)
b6c599fe 109 Double_t fMinNClusPerTr; // minimum number of cluster per track (def=50)
296ea9b4 110 Double_t fIsoDist; // isolation distance (def=0.2)
b3ee6797 111 TString fTrClassNames; // trigger class names
112 AliESDtrackCuts *fTrCuts; // track cuts
3a952328 113 AliESDtrackCuts *fPrimTrCuts; // track cuts
b6c599fe 114 Bool_t fDoTrMatGeom; // track matching including geometry
3a952328 115 Bool_t fTrainMode; // train mode with minimal number of resources
116 TString fMarkCells; // list of mark cells to monitor
117 Int_t fMinL0Time; // minimum accepted time for trigger
118 Int_t fMaxL0Time; // maximum accepted time for trigger
38727e64 119 Bool_t fMcMode; // monte carlo mode
120 AliEMCALGeoUtils *fGeom; // geometry utils
121 AliEMCALRecoUtils *fReco; // reco utils
122
f5d4ab70 123 // derived members (ie with ! after //)
27c2e3d9 124 Bool_t fIsGeoMatsSet; //!indicate that geo matrices are set
d9f26424 125 ULong64_t fNEvs; //!accepted events
6eb6260e 126 TList *fOutput; //!container of output histograms
b3ee6797 127 TObjArray *fTrClassNamesArr; //!array of trig class names
6eb6260e 128 AliESDEvent *fEsdEv; //!pointer to input esd event
129 AliAODEvent *fAodEv; //!pointer to input aod event
130 TObjArray *fRecPoints; //!pointer to rec points (AliAnalysisTaskEMCALClusterizeFast)
131 TObjArray *fEsdClusters; //!pointer to esd clusters
132 AliESDCaloCells *fEsdCells; //!pointer to esd cells
133 TObjArray *fAodClusters; //!pointer to aod clusters
134 AliAODCaloCells *fAodCells; //!pointer to aod cells
135 TAxis *fPtRanges; //!pointer to pt ranges
296ea9b4 136 TObjArray *fSelTracks; //!pointer to selected tracks
3a952328 137 TObjArray *fSelPrimTracks; //!pointer to selected primary tracks
138 Int_t fNAmpInTrigger; //!number of cells to keep trigger statistic
139 Float_t *fAmpInTrigger; //!amplitude for calo cells which are part of trigger
788ca675 140 // ntuple
141 TTree *fNtuple; //!pointer to ntuple
142 AliStaHeader *fHeader; //!pointer to header
143 AliStaVertex *fPrimVert; //!pointer to primary vertex
144 AliStaVertex *fSpdVert; //!pointer to SPD vertex
145 AliStaVertex *fTpcVert; //!pointer to TPC vertex
146 TClonesArray *fClusters; //!pointer to clusters
3a952328 147 TClonesArray *fTriggers; //!pointer to triggers
717fe7de 148 // histograms
296ea9b4 149 TH1 *fHCuts; //!histo for cuts
150 TH1 *fHVertexZ; //!histo for vtxz
151 TH1 *fHVertexZ2; //!histo for vtxz after vtx cuts
152 TH1 *fHCent; //!histo for cent
153 TH1 *fHCentQual; //!histo for cent after quality flag cut
b3ee6797 154 TH1 *fHTclsBeforeCuts; //!histo for trigger classes before cuts
155 TH1 *fHTclsAfterCuts; //!histo for trigger classes after cuts
156
d595acbb 157 // histograms for cells
296ea9b4 158 TH2 **fHColuRow; //!histo for cell column and row
159 TH2 **fHColuRowE; //!histo for cell column and row weight energy
160 TH1 **fHCellMult; //!histo for cell multiplicity in module
161 TH1 *fHCellE; //!histo for cell energy
162 TH1 *fHCellH; //!histo for highest cell energy
163 TH1 *fHCellM; //!histo for mean cell energy (normalized to hit cells)
164 TH1 *fHCellM2; //!histo for mean cell energy (normalized to all cells)
165 TH1 **fHCellFreqNoCut; //!histo for cell frequency without cut
2e4d8148 166 TH1 **fHCellFreqCut100M; //!histo for cell frequency with cut 100MeV
167 TH1 **fHCellFreqCut300M; //!histo for cell frequency with cut 300MeV
168 TH1 **fHCellFreqE; //!histo for cell frequency weighted with energy
296ea9b4 169 TH1 **fHCellCheckE; //!histo for cell E distribution for given channels
fa443410 170 // histograms for clusters
296ea9b4 171 TH1 *fHClustEccentricity; //!histo for cluster eccentricity
172 TH2 *fHClustEtaPhi; //!histo for cluster eta vs. phi
173 TH2 *fHClustEnergyPt; //!histo for cluster energy vs. pT
174 TH2 *fHClustEnergySigma; //!histo for cluster energy vs. variance over long axis
175 TH2 *fHClustSigmaSigma; //!histo for sigma vs. lambda_0 comparison
176 TH2 *fHClustNCellEnergyRatio; //!histo for cluster n tow vs. energy ratio
b6c599fe 177 // histograms for track matching
178 TH1 *fHMatchDr; //!histo for dR track cluster matching
179 TH1 *fHMatchDz; //!histo for dZ track cluster matching
180 TH1 *fHMatchEp; //!histo for E/p track cluster matching
fa443410 181 // histograms for pion candidates
296ea9b4 182 TH2 *fHPionEtaPhi; //!histo for pion eta vs. phi
183 TH2 *fHPionMggPt; //!histo for pion mass vs. pT
184 TH2 *fHPionMggAsym; //!histo for pion mass vs. asym
185 TH2 *fHPionMggDgg; //!histo for pion mass vs. opening angle
186 TH1 *fHPionInvMasses[21]; //!histos for invariant mass plots
38727e64 187 // histograms for MC
ea3fd2d5 188
ea3fd2d5 189 private:
717fe7de 190 AliAnalysisTaskEMCALPi0PbPb(const AliAnalysisTaskEMCALPi0PbPb&); // not implemented
191 AliAnalysisTaskEMCALPi0PbPb &operator=(const AliAnalysisTaskEMCALPi0PbPb&); // not implemented
ea3fd2d5 192
38727e64 193 ClassDef(AliAnalysisTaskEMCALPi0PbPb, 9) // Analysis task for neutral pions in Pb+Pb
ea3fd2d5 194};
ea3fd2d5 195#endif
788ca675 196
197#ifndef AliStaObjs_h
198#define AliStaObjs_h
199class AliStaHeader
200{
201 public:
202 AliStaHeader() : fRun(0), fOrbit(0), fPeriod(0), fBx(0), fL0(0), fL1(0), fL2(0),
203 fTrClassMask(0), fTrCluster(0), fOffTriggers(0), fFiredTriggers(),
5fe1ca23 204 fTcls(0), fV0Cent(0), fV0(0), fCl1Cent(0), fCl1(0), fTrCent(0), fTr(0),
205 fCqual(-1), fPsi(0), fPsiRes(0), fNSelTr(0), fNSelPrimTr(0),
206 fNCells(0), fNCells1(0), fNCells2(0), fNCells5(0),
207 fNClus(0), fNClus1(0), fNClus2(0), fNClus5(0),
208 fMaxCellE(0), fMaxClusE(0) {;}
788ca675 209 virtual ~AliStaHeader() {;}
788ca675 210
211 public:
212 Int_t fRun; // run number
213 UInt_t fOrbit; // orbit number
214 UInt_t fPeriod; // period number
215 UShort_t fBx; // bunch crossing id
216 UInt_t fL0; // l0 trigger bits
217 UInt_t fL1; // l1 trigger bits
218 UShort_t fL2; // l2 trigger bits
219 ULong64_t fTrClassMask; // trigger class mask
220 UChar_t fTrCluster; // trigger cluster mask
221 UInt_t fOffTriggers; // fired offline triggers for this event
222 TString fFiredTriggers; // string with fired triggers
223 UInt_t fTcls; // custom trigger definition
224 Double32_t fV0Cent; //[0,0,16] v0 cent
5fe1ca23 225 Double32_t fV0; //[0,0,16] v0 result used for cent
788ca675 226 Double32_t fCl1Cent; //[0,0,16] cl1 cent
5fe1ca23 227 Double32_t fCl1; //[0,0,16] cl1 result used for cent
788ca675 228 Double32_t fTrCent; //[0,0,16] tr cent
5fe1ca23 229 Double32_t fTr; //[0,0,16] tr result used for cent
788ca675 230 Int_t fCqual; // centrality quality
b6c599fe 231 Double32_t fPsi; //[0,0,16] event-plane angle
232 Double32_t fPsiRes; //[0,0,16] event-plane ange resolution
5fe1ca23 233 UShort_t fNSelTr; // # selected tracks
234 UShort_t fNSelPrimTr; // # selected tracks (primary)
235 UShort_t fNCells; // # cells
236 UShort_t fNCells1; // # cells > 1 GeV
237 UShort_t fNCells2; // # cells > 2 GeV
238 UShort_t fNCells5; // # cells > 5 GeV
239 UShort_t fNClus; // # clus
240 UShort_t fNClus1; // # clus > 1 GeV
241 UShort_t fNClus2; // # clus > 2 GeV
242 UShort_t fNClus5; // # clus > 5 GeV
243 Double32_t fMaxCellE; //[0,0,16] maximum cell energy
244 Double32_t fMaxClusE; //[0,0,16] maximum clus energy
788ca675 245
5fe1ca23 246 ClassDef(AliStaHeader,3) // Header class
788ca675 247};
248
249class AliStaVertex
250{
251 public:
252 AliStaVertex(Double_t x=0, Double_t y=0, Double_t z=0) : fVx(x), fVy(y), fVz(z), fVc(-1), fDisp(0), fZres(0),
253 fChi2(0), fSt(0), fIs3D(0), fIsZ(0) {;}
254 virtual ~AliStaVertex() {;}
255
256 public:
257 Double_t fVx; //[0,0,16] vertex x
258 Double_t fVy; //[0,0,16] vertex y
259 Double_t fVz; //[0,0,16] vertex z
260 Double_t fVc; //[0,0,16] number of contributors to vertex
261 Double_t fDisp; //[0,0,16] dispersion
262 Double_t fZres; //[0,0,16] z-resolution
263 Double_t fChi2; //[0,0,16] chi2 of fit
264 Bool_t fSt; // status bit
265 Bool_t fIs3D; // is vertex from 3D
266 Bool_t fIsZ; // is vertex from Z only
267
268 ClassDef(AliStaVertex,1) // Vertex class
269};
270
271class AliStaCluster : public TObject
272{
273 public:
b6c599fe 274 AliStaCluster() : TObject(), fE(0), fR(0), fEta(0), fPhi(0), fN(0), fN1(0), fN3(0), fIdMax(0), fEmax(0),
f3582e89 275 fDbc(-1), fDisp(-1), fM20(0), fM02(0), fEcc(0), fSig(0), fIsTrackM(0), fTrDz(0), fTrDr(-1),
276 fTrEp(0), fTrIso(0), fTrIso1(0), fTrIso2(0), fCeIso(0), fCeCore(0), fIsTrigM(0), fTrigE(-1),
0fbe8d4f 277 fTrigMaskE(-1), fIsShared(0) {;}
788ca675 278
279 public:
280 Double32_t fE; //[0,0,16] energy
38727e64 281 Double32_t fR; //[0,0,16] radius (cylinder)
788ca675 282 Double32_t fEta; //[0,0,16] eta
283 Double32_t fPhi; //[0,0,16] phi
284 UChar_t fN; // number of cells
285 UChar_t fN1; // number of cells > 100 MeV
286 UChar_t fN3; // number of cells > 300 MeV
287 UShort_t fIdMax; // id maximum cell
288 Double32_t fEmax; //[0,0,16] energy of maximum cell
289 Double32_t fDbc; //[0,0,16] distance to nearest bad channel
290 Double32_t fDisp; //[0,0,16] cluster dispersion, for shape analysis
291 Double32_t fM20; //[0,0,16] 2-nd moment along the main eigen axis
292 Double32_t fM02; //[0,0,16] 2-nd moment along the second eigen axis
293 Double32_t fEcc; //[0,0,16] eccentricity
294 Double32_t fSig; //[0,0,16] sigma
f3582e89 295 Bool_t fIsTrackM; // if true then track values are set
788ca675 296 Double32_t fTrDz; //[0,0,16] dZ to nearest track
3a952328 297 Double32_t fTrDr; //[0,0,16] dR to nearest track (in x,y)
788ca675 298 Double32_t fTrEp; //[0,0,16] E/P to nearest track
299 Double32_t fTrIso; //[0,0,16] track isolation
b6c599fe 300 Double32_t fTrIso1; //[0,0,16] track isolation (pt>1GeV/c)
301 Double32_t fTrIso2; //[0,0,16] track isolation (pt>2GeV/c)
788ca675 302 Double32_t fCeIso; //[0,0,16] cell isolation
3a952328 303 Double32_t fCeCore; //[0,0,16] cell content in R=0.025
f3582e89 304 Bool_t fIsTrigM; // if true then trigger values are set
3a952328 305 Double32_t fTrigE; //[0,0,16] trigger tower energy
306 Double32_t fTrigMaskE; //[0,0,16] masked trigger tower energy
0fbe8d4f 307 Bool_t fIsShared; // =true then extends across more than one super module
3a952328 308
0fbe8d4f 309 ClassDef(AliStaCluster,4) // Cluster class
3a952328 310};
311
38727e64 312class AliStaTrackRef : public TObject
313{
314 public:
315 AliStaTrackRef() : TObject(), fR(0), fEta(0), fPhi(0), fId(-1), fMo(-1) {}
316
317 public:
318 Double32_t fR; //[0,0,16] r (cylinder)
319 Double32_t fEta; //[0,0,16] eta
320 Double32_t fPhi; //[0,0,16] phi
321 Short_t fId; // id
322 Short_t fMo; // mother index
323
324 ClassDef(AliStaTrackRef,1) // Track reference class
325};
326
3a952328 327class AliStaTrigger : public TObject
328{
329 public:
330 AliStaTrigger() : TObject(), fE(0), fEta(0), fPhi(0), fAmp(0), fMinTime(0), fMaxTime(0) {}
331
332 public:
333 Double32_t fE; //[0,0,16] energy
334 Double32_t fEta; //[0,0,16] eta
335 Double32_t fPhi; //[0,0,16] phi
336 Double32_t fAmp; //[0,0,16] amplitude
337 Short_t fMinTime; // minimum L0 "time"
338 Short_t fMaxTime; // maximum L0 "time"
788ca675 339
3a952328 340 ClassDef(AliStaTrigger,1) // Trigger class
788ca675 341};
38727e64 342
343
344#if 0
345class AliStaPart : public TObject
346{
347 public:
348 AliStaTrigger() : TObject(), fE(0), fEta(0), fPhi(0), fAmp(0), fMinTime(0), fMaxTime(0) {}
349
350 public:
351 Double32_t fE; //[0,0,16] pt
352 Double32_t fEta; //[0,0,16] eta
353 Double32_t fPhi; //[0,0,16] phi
354 Int_t fId; //[0,0,16] id
355
356 ClassDef(AliStaTrigger,1) // Trigger class
357};
358#endif
359
788ca675 360#endif