]>
Commit | Line | Data |
---|---|---|
33d8da67 | 1 | #ifndef AliAnalysisTaskEMCALPhoton_cxx\r |
2 | #define AliAnalysisTaskEMCALPhoton_cxx\r | |
3 | \r | |
4 | class TH1;\r | |
5 | class TH2;\r | |
6 | class TObjArray;\r | |
7 | class AliESDEvent;\r | |
8 | class AliMCEvent;\r | |
9 | class AliStack;\r | |
10 | class AliESDtrack;\r | |
11 | class AliESDtrackCuts;\r | |
12 | class AliESDCaloCells;\r | |
13 | class AliEMCALGeometry;\r | |
14 | class AliVCluster;\r | |
15 | class AliAnalysisTaskEMCALClusterizeFast;\r | |
16 | class TParticle;\r | |
17 | class MyHeaderObj;\r | |
18 | class MyConversionObj;\r | |
19 | class MyClusterObj;\r | |
20 | class MyCellObj;\r | |
21 | \r | |
22 | #include "AliAnalysisTaskSE.h"\r | |
23 | \r | |
24 | class AliAnalysisTaskEMCALPhoton : public AliAnalysisTaskSE {\r | |
25 | public:\r | |
26 | AliAnalysisTaskEMCALPhoton() : \r | |
27 | AliAnalysisTaskSE(), \r | |
28 | \r | |
29 | fTrCuts(0),\r | |
30 | fPrTrCuts(0),\r | |
31 | fSelTracks(0),\r | |
32 | fSelPrimTracks(0),\r | |
33 | fPhotConvArray(0),\r | |
34 | fMyClusts(0),\r | |
35 | fMyAltClusts(0),\r | |
36 | fMyCells(0),\r | |
37 | fMyTracks(0),\r | |
38 | fMyMcParts(0),\r | |
39 | fHeader(0x0),\r | |
40 | fCaloClusters(0),\r | |
41 | fCaloClustersNew(0),\r | |
42 | fEMCalCells(0),\r | |
43 | fGeom(0x0),\r | |
44 | fTimeResTOF(0),\r | |
45 | fMipResponseTPC(0),\r | |
46 | fGeoName("EMCAL_COMPLETEV1"),\r | |
47 | fPeriod("LHC11d"),\r | |
48 | fIsTrain(0),\r | |
49 | fIsMC(0),\r | |
50 | fIsGrid(0),\r | |
51 | fClusThresh(2.0),\r | |
52 | \r | |
53 | fClusterizer(0),\r | |
54 | fCaloClustersName("EmcalClusterv2"),\r | |
55 | \r | |
56 | fESD(0),\r | |
57 | fMCEvent(0),\r | |
58 | fStack(0x0),\r | |
59 | \r | |
60 | fOutputList(0),\r | |
61 | fTree(0),\r | |
62 | \r | |
63 | fNV0sBefAndAftRerun(0),\r | |
64 | fConversionVtxXY(0),\r | |
65 | fInvMassV0(0),\r | |
66 | fInvMassV0KF(0),\r | |
67 | fInvMassV0SS(0),\r | |
68 | fDedxPAll(0)\r | |
69 | \r | |
70 | \r | |
71 | {}\r | |
72 | AliAnalysisTaskEMCALPhoton(const char *name);\r | |
73 | virtual ~AliAnalysisTaskEMCALPhoton() {}\r | |
74 | \r | |
75 | void UserCreateOutputObjects();\r | |
76 | void UserExec(Option_t *option);\r | |
77 | void Terminate(Option_t *);\r | |
78 | \r | |
79 | void SetTrackCuts(AliESDtrackCuts *c) { fTrCuts = c; }\r | |
80 | void SetPrimTrackCuts(AliESDtrackCuts *c) { fPrTrCuts = c; }\r | |
81 | void SetTimeResTOF(Float_t tr = 130.) { fTimeResTOF = tr; }\r | |
82 | void SetMipResponseTPC(Float_t mr = 47.9) { fMipResponseTPC = mr; }\r | |
83 | void SetGeoName(const char *n) { fGeoName = n; }\r | |
84 | void SetPeriod(const char *n) { fPeriod = n; }\r | |
85 | void SetTrainMode(Bool_t t) { fIsTrain = t; }\r | |
86 | void SetGridMode(Bool_t g) { fIsGrid = g; }\r | |
87 | void SetClusThreshold(Double_t et) { fClusThresh = et; }\r | |
88 | void SetClusterizer(AliAnalysisTaskEMCALClusterizeFast *c) { fClusterizer = c; }\r | |
89 | void SetMcMode(Bool_t mc) { fIsMC = mc; }\r | |
90 | void FindConversions();\r | |
91 | void FillMyCells();\r | |
92 | void FillMyClusters();\r | |
93 | void FillMyAltClusters();\r | |
94 | void FillHighPtTracks();\r | |
95 | void FillMcPart(TParticle *mcP, Int_t ipart, Int_t itrack);\r | |
96 | void GetMcParts();\r | |
97 | Double_t GetTrackIsolation(Double_t cEta, Double_t cPhi, Double_t radius=0.2, Double_t pt=0.) const;\r | |
98 | Double_t GetPhiBandEt(Double_t cEta, Double_t cPhi, Double_t radius=0.2, Double_t pt=0.) const;\r | |
99 | // Double_t GetPhiBandEt(Double_t cEta, Double_t cPhi, Double_t radius=0.2, Double_t pt=0.) const;\r | |
100 | Double_t GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax);\r | |
101 | Double_t GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const; \r | |
102 | \r | |
103 | protected:\r | |
104 | AliESDtrackCuts *fTrCuts; // track cuts\r | |
105 | AliESDtrackCuts *fPrTrCuts; // primary track cuts\r | |
106 | TObjArray *fSelTracks; //!pointer to selected inclusive tracks\r | |
107 | TObjArray *fSelPrimTracks; //!pointer to selected primary tracks\r | |
108 | TClonesArray *fPhotConvArray; //!array of MyConversionObj\r | |
109 | TClonesArray *fMyClusts; //!array of MyClusterObj\r | |
110 | TClonesArray *fMyAltClusts; //!array of MyClusterObj from the alternative clusterizer\r | |
111 | TClonesArray *fMyCells; //!array of MyCellObj\r | |
112 | TClonesArray *fMyTracks; //!array of MyTrackObj\r | |
113 | TClonesArray *fMyMcParts; //!array of MyMcPartObj\r | |
114 | MyHeaderObj *fHeader; //!\r | |
115 | TRefArray *fCaloClusters; //!pointer to EMCal clusters\r | |
116 | TClonesArray *fCaloClustersNew; //!pointer to EMCal clusters v2\r | |
117 | AliESDCaloCells *fEMCalCells; //!pointer to EMCal cells\r | |
118 | AliEMCALGeometry *fGeom; // geometry utils\r | |
119 | Float_t fTimeResTOF; //TOF time resolution for track PID\r | |
120 | Float_t fMipResponseTPC; //TPC mip response for track pid\r | |
121 | TString fGeoName; // geometry name (def = EMCAL_FIRSTYEARV1)\r | |
122 | TString fPeriod; // string to the LHC period\r | |
123 | Bool_t fIsTrain; //variable to set train mode\r | |
124 | Bool_t fIsMC; //variable to switch mcparts branch on/off\r | |
125 | Bool_t fIsGrid; //variable to set grid mode\r | |
126 | Double_t fClusThresh; //!energy threshold for cluster be saved\r | |
127 | AliAnalysisTaskEMCALClusterizeFast *fClusterizer; //!pointer for alternative clusterizer\r | |
128 | TString fCaloClustersName; //alternative clusterizer name\r | |
129 | \r | |
130 | \r | |
131 | private:\r | |
132 | AliESDEvent *fESD; //! ESD object\r | |
133 | AliMCEvent *fMCEvent; //! MC event object\r | |
134 | AliStack *fStack; //!MC particles stack object\r | |
135 | \r | |
136 | TList *fOutputList; //! Output list\r | |
137 | TTree *fTree; //!output tree\r | |
138 | \r | |
139 | //conversion histograms\r | |
140 | TH2F *fNV0sBefAndAftRerun; //!check the number of V0s before and after rerun\r | |
141 | TH2F *fConversionVtxXY; //! X x Y of found conversion vertices\r | |
142 | TH1F *fInvMassV0; //!invariant mass from v0->GetEffMass()\r | |
143 | TH1F *fInvMassV0KF; //!invariant mass from the v0 tracks\r | |
144 | TH1F *fInvMassV0SS; //!invariant mass from the tracks in the "dirty" finder\r | |
145 | TH2F *fDedxPAll; //!dE/dx vs p of all selected tracks\r | |
146 | \r | |
147 | \r | |
148 | \r | |
149 | AliAnalysisTaskEMCALPhoton(const AliAnalysisTaskEMCALPhoton&); // not implemented\r | |
150 | AliAnalysisTaskEMCALPhoton& operator=(const AliAnalysisTaskEMCALPhoton&); // not implemented\r | |
151 | \r | |
152 | ClassDef(AliAnalysisTaskEMCALPhoton, 1); // example of analysis\r | |
153 | };\r | |
154 | \r | |
155 | #endif\r | |
156 | \r | |
157 | #ifndef MyObjs_h\r | |
158 | #define MyObjs_h\r | |
159 | \r | |
160 | class MyHeaderObj : public TObject\r | |
161 | {\r | |
162 | public: MyHeaderObj() :\r | |
163 | TObject(), fTrClassMask(0), fTrCluster(0), fV0Cent(0), fV0(0), fCl1Cent(0), \r | |
164 | fCl1(0), fTrCent(0), fTr(0), fNClus(0), fNCells(0) {;}\r | |
165 | public:\r | |
166 | ULong64_t fTrClassMask; // trigger class mask\r | |
167 | UChar_t fTrCluster; // trigger cluster mask\r | |
168 | Double32_t fV0Cent; //[0,0,16] v0 cent\r | |
169 | Double32_t fV0; //[0,0,16] v0 result used for cent \r | |
170 | Double32_t fCl1Cent; //[0,0,16] cl1 cent\r | |
171 | Double32_t fCl1; //[0,0,16] cl1 result used for cent \r | |
172 | Double32_t fTrCent; //[0,0,16] tr cent\r | |
173 | Double32_t fTr; //[0,0,16] tr result used for cent \r | |
174 | Int_t fNClus;\r | |
175 | Int_t fNCells;\r | |
176 | \r | |
177 | ClassDef(MyHeaderObj,2)\r | |
178 | };\r | |
179 | \r | |
180 | class MyConversionObj : public TObject\r | |
181 | {\r | |
182 | public: MyConversionObj() : \r | |
183 | TObject(), fPt(0), fEta(0), fPhi(0), fVR(0), fVEta(0), fVPhi(0), fMass(0), fMcLabel(-1),\r | |
184 | fNegPt(0), fNegEta(0), fNegPhi(0), fNegDedx(0), fNegMcLabel(-1),\r | |
185 | fPosPt(0), fPosEta(0), fPosPhi(0), fPosDedx(0), fPosMcLabel(-1) {;}\r | |
186 | public:\r | |
187 | Double32_t fPt; //[0,0,16] pt\r | |
188 | Double32_t fEta; //[0,0,16] eta\r | |
189 | Double32_t fPhi; //[0,0,16] phi\r | |
190 | Double32_t fVR; //[0,0,16] prod r (cylinder)\r | |
191 | Double32_t fVEta; //[0,0,16] prod eta\r | |
192 | Double32_t fVPhi; //[0,0,16] prod phi\r | |
193 | Double32_t fMass; //[0,0,16] if correctly filled, should be <50 MeV\r | |
194 | Short_t fMcLabel; //corresponding MC label\r | |
195 | \r | |
196 | //negative daughter\r | |
197 | Double32_t fNegPt; //[0,0,16] pt\r | |
198 | Double32_t fNegEta; //[0,0,16] eta\r | |
199 | Double32_t fNegPhi; //[0,0,16] phi\r | |
200 | Double32_t fNegDedx; //[0,0,16] if correctly filled, should be <50 MeV\r | |
201 | Short_t fNegMcLabel; //corresponding MC label\r | |
202 | \r | |
203 | //positive daughter\r | |
204 | Double32_t fPosPt; //[0,0,16] pt\r | |
205 | Double32_t fPosEta; //[0,0,16] eta\r | |
206 | Double32_t fPosPhi; //[0,0,16] phi\r | |
207 | Double32_t fPosDedx; //[0,0,16] if correctly filled, should be <50 MeV\r | |
208 | Short_t fPosMcLabel; //corresponding MC label\r | |
209 | \r | |
210 | ClassDef(MyConversionObj,1) // conversion class\r | |
211 | \r | |
212 | };\r | |
213 | class MyClusterObj : public TObject\r | |
214 | {\r | |
215 | public: MyClusterObj() : \r | |
216 | TObject(), fE(0), fEt(0), fR(0), fEta(0), fPhi(0), fN(0),fEmax(0),fTmax(0), fIdmax(0), fEcross(0),fDisp(-1), \r | |
217 | fM20(-1), fM02(-1),fTrDEta(0), fTrDPhi(0), fTrEp(0), fTrDedx(0), fTrIso01(0), fTrIso02(0), fTrIso03(0), fTrIso04(0), \r | |
218 | fTrPhiBand01(0), fTrPhiBand02(0), fTrPhiBand03(0), fTrPhiBand04(0), fCellsAbsId(""),fMcLabel(-1)\r | |
219 | {;}\r | |
220 | public:\r | |
221 | Double32_t fE;\r | |
222 | Double32_t fEt;\r | |
223 | Double32_t fR;\r | |
224 | Double32_t fEta;\r | |
225 | Double32_t fPhi;\r | |
226 | UShort_t fN;\r | |
227 | Double_t fEmax;\r | |
228 | Double_t fTmax;\r | |
229 | Short_t fIdmax;\r | |
230 | Double_t fEcross;\r | |
231 | Double32_t fDisp;\r | |
232 | Double32_t fM20;\r | |
233 | Double32_t fM02;\r | |
234 | Double32_t fTrDEta;\r | |
235 | Double32_t fTrDPhi;\r | |
236 | Double32_t fTrEp;\r | |
237 | Double32_t fTrDedx;\r | |
238 | Double32_t fTrIso01;\r | |
239 | Double32_t fTrIso02;\r | |
240 | Double32_t fTrIso03;\r | |
241 | Double32_t fTrIso04;\r | |
242 | Double32_t fTrPhiBand01;\r | |
243 | Double32_t fTrPhiBand02;\r | |
244 | Double32_t fTrPhiBand03;\r | |
245 | Double32_t fTrPhiBand04;\r | |
246 | TString fCellsAbsId; //cluster cells absid\r | |
247 | Short_t fMcLabel;\r | |
248 | \r | |
249 | \r | |
250 | \r | |
251 | ClassDef(MyClusterObj,6) // cluster class\r | |
252 | \r | |
253 | };\r | |
254 | \r | |
255 | class MyCellObj : public TObject\r | |
256 | {\r | |
257 | public: MyCellObj() : \r | |
258 | TObject(), fAbsID(-1), fE(0), fEt(0), fEta(0), fPhi(0), fTime(0)\r | |
259 | {;}\r | |
260 | public:\r | |
261 | Short_t fAbsID;\r | |
262 | Double32_t fE;\r | |
263 | Double32_t fEt;\r | |
264 | Double32_t fEta;\r | |
265 | Double32_t fPhi;\r | |
266 | Double32_t fTime;\r | |
267 | \r | |
268 | \r | |
269 | \r | |
270 | ClassDef(MyCellObj,1) // cell class\r | |
271 | \r | |
272 | };\r | |
273 | \r | |
274 | class MyTrackObj : public TObject\r | |
275 | {\r | |
276 | public: MyTrackObj() :\r | |
277 | TObject(), fPt(0), fEta(0), fPhi(0), fDedx(0), fCharge(0), fMcLabel(-1) {;}\r | |
278 | public:\r | |
279 | Double32_t fPt;\r | |
280 | Double32_t fEta;\r | |
281 | Double32_t fPhi;\r | |
282 | Double32_t fDedx;\r | |
283 | Short_t fCharge;\r | |
284 | Short_t fMcLabel;\r | |
285 | \r | |
286 | ClassDef(MyTrackObj,3)\r | |
287 | };\r | |
288 | \r | |
289 | class MyMcPartObj : public TObject\r | |
290 | {\r | |
291 | public: MyMcPartObj() :\r | |
292 | TObject(), fLabel(-1), fPdg(0), fPt(0), fEta(0), fPhi(0), \r | |
293 | fVR(0), fVEta(0), fVPhi(0), fMother(-1) {;}\r | |
294 | public:\r | |
295 | Short_t fLabel;\r | |
296 | Short_t fPdg;\r | |
297 | Double32_t fPt;\r | |
298 | Double32_t fEta;\r | |
299 | Double32_t fPhi;\r | |
300 | Double32_t fVR;\r | |
301 | Double32_t fVEta;\r | |
302 | Double32_t fVPhi;\r | |
303 | Short_t fMother;\r | |
304 | \r | |
305 | ClassDef(MyMcPartObj,1)\r | |
306 | };\r | |
307 | \r | |
308 | #endif\r |