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