]>
Commit | Line | Data |
---|---|---|
6bf90832 | 1 | #ifndef AliAnalysisTaskEMCALPi0PbPb_h |
2 | #define AliAnalysisTaskEMCALPi0PbPb_h | |
ea3fd2d5 | 3 | |
4 | // $Id$ | |
5 | ||
fa443410 | 6 | class TAxis; |
f5d4ab70 | 7 | class TClonesArray; |
296ea9b4 | 8 | class TH1; |
9 | class TH2; | |
f5d4ab70 | 10 | class TNtuple; |
717fe7de | 11 | class TObjArray; |
12 | class AliAODCaloCells; | |
13 | class AliAODCaloCluster; | |
ea3fd2d5 | 14 | class AliAODEvent; |
296ea9b4 | 15 | class AliAODTrack; |
788ca675 | 16 | class AliAODVertex; |
d595acbb | 17 | class AliEMCALGeoUtils; |
296ea9b4 | 18 | class AliEMCALRecoUtils; |
717fe7de | 19 | class AliESDCaloCells; |
ea3fd2d5 | 20 | class AliESDCaloCluster; |
717fe7de | 21 | class AliESDEvent; |
0ec74551 | 22 | class AliESDTrack; |
788ca675 | 23 | class AliESDVertex; |
0ec74551 | 24 | class AliESDtrackCuts; |
788ca675 | 25 | class AliStaHeader; |
26 | class AliStaVertex; | |
ea3fd2d5 | 27 | |
28 | #include "AliAnalysisTaskSE.h" | |
29 | ||
30 | class AliAnalysisTaskEMCALPi0PbPb : public AliAnalysisTaskSE { | |
31 | public: | |
d595acbb | 32 | AliAnalysisTaskEMCALPi0PbPb(const char *name=0); |
ea3fd2d5 | 33 | virtual ~AliAnalysisTaskEMCALPi0PbPb(); |
34 | ||
286b47a5 | 35 | void UserCreateOutputObjects(); |
36 | void UserExec(Option_t *option); | |
37 | void Terminate(Option_t *); | |
717fe7de | 38 | |
d595acbb | 39 | void SetAsymMax(Double_t asymMax) { fAsymMax = asymMax; } |
286b47a5 | 40 | void SetCentrality(const char *name) { fCentVar = name; } |
41 | void SetCentralityRange(Double_t from, Double_t to) { fCentFrom=from; fCentTo=to; } | |
42 | void SetClusName(const char *name) { fClusName = name; } | |
a49742b5 | 43 | void SetDoAfterburner(Bool_t b) { fDoAfterburner = b; } |
2e4d8148 | 44 | void SetDoTrackMatWithGeom(Bool_t b) { fDoTrackMatWithGeom = b; } |
45 | void SetDoTrackVtxConstrain(Bool_t b) { fDoConstrain = b; } | |
f5d4ab70 | 46 | void SetFillNtuple(Bool_t b) { fDoNtuple = b; } |
6bf90832 | 47 | void SetGeoName(const char *n) { fGeoName = n; } |
296ea9b4 | 48 | void SetIsoDist(Double_t d) { fIsoDist = d; } |
6bf90832 | 49 | void SetMinClusEnergy(Double_t e) { fMinE = e; } |
f224d35b | 50 | void SetMinEcc(Double_t ecc) { fMinEcc = ecc; } |
51 | void SetMinErat(Double_t erat) { fMinErat = erat; } | |
296ea9b4 | 52 | void SetMinNClustersPerTrack(Double_t mct) { fMinNClustPerTrack = mct; } |
53 | void SetMinPtPerMatchedTrack(Double_t mpt) { fMinPtPerTrack = mpt; } | |
a49742b5 | 54 | void SetNminCells(Int_t n) { fNminCells = n; } |
b3ee6797 | 55 | void SetTrClassNames(const char *n) { fTrClassNames = n; } |
0ec74551 | 56 | void SetTrackCuts(AliESDtrackCuts *c) { fTrCuts = c; } |
76332037 | 57 | void SetUseQualFlag(Bool_t b) { fUseQualFlag = b; } |
d595acbb | 58 | void SetVertexRange(Double_t z1, Double_t z2) { fVtxZMin=z1; fVtxZMax=z2; } |
717fe7de | 59 | |
60 | protected: | |
296ea9b4 | 61 | virtual void CalcClusterProps(); |
62 | virtual void CalcTracks(); | |
323834f0 | 63 | virtual void ClusterAfterburner(); |
76332037 | 64 | virtual void FillCellHists(); |
65 | virtual void FillClusHists(); | |
788ca675 | 66 | virtual void FillNtuple(); |
323834f0 | 67 | virtual void FillOtherHists(); |
788ca675 | 68 | virtual void FillPionHists(); |
69 | void FillVertex(AliStaVertex *v, const AliESDVertex *esdv); | |
70 | void FillVertex(AliStaVertex *v, const AliAODVertex *aodv); | |
71 | ||
296ea9b4 | 72 | Double_t GetCellIsolation(Double_t cEta, Double_t cPhi, Double_t radius=0.2) const; |
788ca675 | 73 | Double_t GetMaxCellEnergy(AliVCluster *c) const { Short_t id=-1; return GetMaxCellEnergy(c,id); } |
74 | Double_t GetMaxCellEnergy(AliVCluster *c, Short_t &id) const; | |
296ea9b4 | 75 | Int_t GetNCells(AliVCluster *c, Double_t emin=0.) const; |
76 | void GetSigma(AliVCluster *c, Double_t &sigmaMax, Double_t &sigmaMin) const; | |
77 | Double_t GetTrackIsolation(Double_t cEta, Double_t cPhi, Double_t radius=0.2) const; | |
286b47a5 | 78 | |
296ea9b4 | 79 | class ClusProps { |
80 | public: | |
81 | ClusProps() : fTrIndex(-1), fTrDz(-1), fTrDr(-1), fTrDist(-1), fTrEp(0), | |
82 | fTrIso(0), fTrLowPtIso(0), fCellIso(0) {} | |
83 | void Reset() { fTrIndex=-1; fTrDz=-1; fTrDr=-1; fTrDist=-1; fTrEp=0; fTrIso=0; fTrLowPtIso=0; fCellIso=0; } | |
84 | Int_t fTrIndex; | |
85 | Double_t fTrDz; | |
86 | Double_t fTrDr; | |
87 | Double_t fTrDist; | |
88 | Double_t fTrEp; | |
89 | Double_t fTrIso; | |
90 | Double_t fTrLowPtIso; | |
91 | Double_t fCellIso; | |
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) |
296ea9b4 | 109 | Double_t fMinNClustPerTrack; // minimum number of cluster per track (def=50) |
110 | Double_t fMinPtPerTrack; // minimum pT per track (def=0.25 GeV/c) | |
111 | Double_t fIsoDist; // isolation distance (def=0.2) | |
b3ee6797 | 112 | TString fTrClassNames; // trigger class names |
113 | AliESDtrackCuts *fTrCuts; // track cuts | |
2e4d8148 | 114 | Bool_t fDoTrackMatWithGeom; // track matching including geometry |
115 | Bool_t fDoConstrain; // if true constrain tracks to vertex | |
296ea9b4 | 116 | |
f5d4ab70 | 117 | // derived members (ie with ! after //) |
d9f26424 | 118 | ULong64_t fNEvs; //!accepted events |
119 | AliEMCALGeoUtils *fGeom; //!geometry utils | |
296ea9b4 | 120 | AliEMCALRecoUtils *fReco; //!geometry utils |
6eb6260e | 121 | TList *fOutput; //!container of output histograms |
b3ee6797 | 122 | TObjArray *fTrClassNamesArr; //!array of trig class names |
6eb6260e | 123 | AliESDEvent *fEsdEv; //!pointer to input esd event |
124 | AliAODEvent *fAodEv; //!pointer to input aod event | |
125 | TObjArray *fRecPoints; //!pointer to rec points (AliAnalysisTaskEMCALClusterizeFast) | |
126 | TObjArray *fEsdClusters; //!pointer to esd clusters | |
127 | AliESDCaloCells *fEsdCells; //!pointer to esd cells | |
128 | TObjArray *fAodClusters; //!pointer to aod clusters | |
129 | AliAODCaloCells *fAodCells; //!pointer to aod cells | |
130 | TAxis *fPtRanges; //!pointer to pt ranges | |
296ea9b4 | 131 | TObjArray *fSelTracks; //!pointer to selected tracks |
132 | ClusProps fClusProps[1000]; //!array of cluster properties | |
788ca675 | 133 | // ntuple |
134 | TTree *fNtuple; //!pointer to ntuple | |
135 | AliStaHeader *fHeader; //!pointer to header | |
136 | AliStaVertex *fPrimVert; //!pointer to primary vertex | |
137 | AliStaVertex *fSpdVert; //!pointer to SPD vertex | |
138 | AliStaVertex *fTpcVert; //!pointer to TPC vertex | |
139 | TClonesArray *fClusters; //!pointer to clusters | |
717fe7de | 140 | // histograms |
296ea9b4 | 141 | TH1 *fHCuts; //!histo for cuts |
142 | TH1 *fHVertexZ; //!histo for vtxz | |
143 | TH1 *fHVertexZ2; //!histo for vtxz after vtx cuts | |
144 | TH1 *fHCent; //!histo for cent | |
145 | TH1 *fHCentQual; //!histo for cent after quality flag cut | |
b3ee6797 | 146 | TH1 *fHTclsBeforeCuts; //!histo for trigger classes before cuts |
147 | TH1 *fHTclsAfterCuts; //!histo for trigger classes after cuts | |
148 | ||
d595acbb | 149 | // histograms for cells |
296ea9b4 | 150 | TH2 **fHColuRow; //!histo for cell column and row |
151 | TH2 **fHColuRowE; //!histo for cell column and row weight energy | |
152 | TH1 **fHCellMult; //!histo for cell multiplicity in module | |
153 | TH1 *fHCellE; //!histo for cell energy | |
154 | TH1 *fHCellH; //!histo for highest cell energy | |
155 | TH1 *fHCellM; //!histo for mean cell energy (normalized to hit cells) | |
156 | TH1 *fHCellM2; //!histo for mean cell energy (normalized to all cells) | |
157 | TH1 **fHCellFreqNoCut; //!histo for cell frequency without cut | |
2e4d8148 | 158 | TH1 **fHCellFreqCut100M; //!histo for cell frequency with cut 100MeV |
159 | TH1 **fHCellFreqCut300M; //!histo for cell frequency with cut 300MeV | |
160 | TH1 **fHCellFreqE; //!histo for cell frequency weighted with energy | |
296ea9b4 | 161 | TH1 **fHCellCheckE; //!histo for cell E distribution for given channels |
fa443410 | 162 | // histograms for clusters |
296ea9b4 | 163 | TH1 *fHClustEccentricity; //!histo for cluster eccentricity |
164 | TH2 *fHClustEtaPhi; //!histo for cluster eta vs. phi | |
165 | TH2 *fHClustEnergyPt; //!histo for cluster energy vs. pT | |
166 | TH2 *fHClustEnergySigma; //!histo for cluster energy vs. variance over long axis | |
167 | TH2 *fHClustSigmaSigma; //!histo for sigma vs. lambda_0 comparison | |
168 | TH2 *fHClustNCellEnergyRatio; //!histo for cluster n tow vs. energy ratio | |
fa443410 | 169 | // histograms for pion candidates |
296ea9b4 | 170 | TH2 *fHPionEtaPhi; //!histo for pion eta vs. phi |
171 | TH2 *fHPionMggPt; //!histo for pion mass vs. pT | |
172 | TH2 *fHPionMggAsym; //!histo for pion mass vs. asym | |
173 | TH2 *fHPionMggDgg; //!histo for pion mass vs. opening angle | |
174 | TH1 *fHPionInvMasses[21]; //!histos for invariant mass plots | |
ea3fd2d5 | 175 | |
ea3fd2d5 | 176 | private: |
717fe7de | 177 | AliAnalysisTaskEMCALPi0PbPb(const AliAnalysisTaskEMCALPi0PbPb&); // not implemented |
178 | AliAnalysisTaskEMCALPi0PbPb &operator=(const AliAnalysisTaskEMCALPi0PbPb&); // not implemented | |
ea3fd2d5 | 179 | |
2e4d8148 | 180 | ClassDef(AliAnalysisTaskEMCALPi0PbPb, 5); // Analysis task for neutral pions in Pb+Pb |
ea3fd2d5 | 181 | }; |
ea3fd2d5 | 182 | #endif |
788ca675 | 183 | |
184 | #ifndef AliStaObjs_h | |
185 | #define AliStaObjs_h | |
186 | class AliStaHeader | |
187 | { | |
188 | public: | |
189 | AliStaHeader() : fRun(0), fOrbit(0), fPeriod(0), fBx(0), fL0(0), fL1(0), fL2(0), | |
190 | fTrClassMask(0), fTrCluster(0), fOffTriggers(0), fFiredTriggers(), | |
191 | fTcls(0), fV0Cent(0), fCl1Cent(0), fTrCent(0), fCqual(-1) {;} | |
192 | virtual ~AliStaHeader() {;} | |
193 | ULong64_t GetEventId() const { | |
194 | return (((ULong64_t)fPeriod << 36) | | |
195 | ((ULong64_t)fOrbit << 12) | | |
196 | (ULong64_t)fBx); | |
197 | } | |
198 | ||
199 | public: | |
200 | Int_t fRun; // run number | |
201 | UInt_t fOrbit; // orbit number | |
202 | UInt_t fPeriod; // period number | |
203 | UShort_t fBx; // bunch crossing id | |
204 | UInt_t fL0; // l0 trigger bits | |
205 | UInt_t fL1; // l1 trigger bits | |
206 | UShort_t fL2; // l2 trigger bits | |
207 | ULong64_t fTrClassMask; // trigger class mask | |
208 | UChar_t fTrCluster; // trigger cluster mask | |
209 | UInt_t fOffTriggers; // fired offline triggers for this event | |
210 | TString fFiredTriggers; // string with fired triggers | |
211 | UInt_t fTcls; // custom trigger definition | |
212 | Double32_t fV0Cent; //[0,0,16] v0 cent | |
213 | Double32_t fCl1Cent; //[0,0,16] cl1 cent | |
214 | Double32_t fTrCent; //[0,0,16] tr cent | |
215 | Int_t fCqual; // centrality quality | |
216 | ||
217 | ClassDef(AliStaHeader,1) // Header class | |
218 | }; | |
219 | ||
220 | class AliStaVertex | |
221 | { | |
222 | public: | |
223 | 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), | |
224 | fChi2(0), fSt(0), fIs3D(0), fIsZ(0) {;} | |
225 | virtual ~AliStaVertex() {;} | |
226 | ||
227 | public: | |
228 | Double_t fVx; //[0,0,16] vertex x | |
229 | Double_t fVy; //[0,0,16] vertex y | |
230 | Double_t fVz; //[0,0,16] vertex z | |
231 | Double_t fVc; //[0,0,16] number of contributors to vertex | |
232 | Double_t fDisp; //[0,0,16] dispersion | |
233 | Double_t fZres; //[0,0,16] z-resolution | |
234 | Double_t fChi2; //[0,0,16] chi2 of fit | |
235 | Bool_t fSt; // status bit | |
236 | Bool_t fIs3D; // is vertex from 3D | |
237 | Bool_t fIsZ; // is vertex from Z only | |
238 | ||
239 | ClassDef(AliStaVertex,1) // Vertex class | |
240 | }; | |
241 | ||
242 | class AliStaCluster : public TObject | |
243 | { | |
244 | public: | |
245 | AliStaCluster() : TObject(), fE(0), fR(0), fEta(0), fPhi(0), fN(0), fN1(0), fN3(0), fIdMax(0), fEmax(0), | |
246 | fDbc(0), fDisp(0), fM20(0), fM02(0), fEcc(0), fSig(0), fTrDz(0), fTrDr(-1), fTrEp(0), | |
247 | fTrIso(0), fCeIso(0) {;} | |
248 | ||
249 | // void GetMom(TLorentzVector& p, Double_t *vertex=0); | |
250 | ||
251 | public: | |
252 | Double32_t fE; //[0,0,16] energy | |
253 | Double32_t fR; //[0,0,16] radius | |
254 | Double32_t fEta; //[0,0,16] eta | |
255 | Double32_t fPhi; //[0,0,16] phi | |
256 | UChar_t fN; // number of cells | |
257 | UChar_t fN1; // number of cells > 100 MeV | |
258 | UChar_t fN3; // number of cells > 300 MeV | |
259 | UShort_t fIdMax; // id maximum cell | |
260 | Double32_t fEmax; //[0,0,16] energy of maximum cell | |
261 | Double32_t fDbc; //[0,0,16] distance to nearest bad channel | |
262 | Double32_t fDisp; //[0,0,16] cluster dispersion, for shape analysis | |
263 | Double32_t fM20; //[0,0,16] 2-nd moment along the main eigen axis | |
264 | Double32_t fM02; //[0,0,16] 2-nd moment along the second eigen axis | |
265 | Double32_t fEcc; //[0,0,16] eccentricity | |
266 | Double32_t fSig; //[0,0,16] sigma | |
267 | Double32_t fTrDz; //[0,0,16] dZ to nearest track | |
268 | Double32_t fTrDr; //[0,0,16] dR to nearest track (in x,y; if neg then no match) | |
269 | Double32_t fTrEp; //[0,0,16] E/P to nearest track | |
270 | Double32_t fTrIso; //[0,0,16] track isolation | |
271 | Double32_t fCeIso; //[0,0,16] cell isolation | |
272 | ||
273 | ClassDef(AliStaCluster,1) // Cluster class | |
274 | }; | |
275 | #endif |