1 #ifndef AliAnalysisTaskEMCALPhoton_cxx
\r
2 #define AliAnalysisTaskEMCALPhoton_cxx
\r
11 class AliESDtrackCuts;
\r
12 class AliESDCaloCells;
\r
13 class AliEMCALGeometry;
\r
15 class AliAnalysisTaskEMCALClusterizeFast;
\r
17 class AliPhotonHeaderObj;
\r
18 class AliPhotonConvObj;
\r
19 class AliPhotonClusterObj;
\r
20 class AliPhotonCellObj;
\r
22 #include "AliAnalysisTaskSE.h"
\r
24 class AliAnalysisTaskEMCALPhoton : public AliAnalysisTaskSE {
\r
26 AliAnalysisTaskEMCALPhoton() :
\r
27 AliAnalysisTaskSE(),
\r
41 fCaloClustersNew(0),
\r
46 fGeoName("EMCAL_COMPLETEV1"),
\r
54 fCaloClustersName("EmcalClusterv2"),
\r
63 fNV0sBefAndAftRerun(0),
\r
64 fConversionVtxXY(0),
\r
72 AliAnalysisTaskEMCALPhoton(const char *name);
\r
73 virtual ~AliAnalysisTaskEMCALPhoton() {}
\r
75 void UserCreateOutputObjects();
\r
76 void UserExec(Option_t *option);
\r
77 void Terminate(Option_t *);
\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
92 void FillMyClusters();
\r
93 void FillMyAltClusters();
\r
94 void FillHighPtTracks();
\r
95 void FillMcPart(TParticle *mcP, Int_t ipart, Int_t itrack);
\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
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 AliPhotonConvObj
\r
109 TClonesArray *fMyClusts; //!array of AliPhotonClusterObj
\r
110 TClonesArray *fMyAltClusts; //!array of AliPhotonClusterObj from the alternative clusterizer
\r
111 TClonesArray *fMyCells; //!array of AliPhotonCellObj
\r
112 TClonesArray *fMyTracks; //!array of AliPhotonTrackObj
\r
113 TClonesArray *fMyMcParts; //!array of AliPhotonMcPartObj
\r
114 AliPhotonHeaderObj *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
132 AliESDEvent *fESD; //! ESD object
\r
133 AliMCEvent *fMCEvent; //! MC event object
\r
134 AliStack *fStack; //!MC particles stack object
\r
136 TList *fOutputList; //! Output list
\r
137 TTree *fTree; //!output tree
\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
149 AliAnalysisTaskEMCALPhoton(const AliAnalysisTaskEMCALPhoton&); // not implemented
\r
150 AliAnalysisTaskEMCALPhoton& operator=(const AliAnalysisTaskEMCALPhoton&); // not implemented
\r
152 ClassDef(AliAnalysisTaskEMCALPhoton, 1); // example of analysis
\r
157 #ifndef AliPhotonObjs_h
\r
158 #define AliPhotonObjs_h
\r
160 class AliPhotonHeaderObj : public TObject
\r
162 public: AliPhotonHeaderObj() :
\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
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
177 ClassDef(AliPhotonHeaderObj,2)
\r
180 class AliPhotonConvObj : public TObject
\r
182 public: AliPhotonConvObj() :
\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
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
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
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
210 ClassDef(AliPhotonConvObj,1) // conversion class
\r
213 class AliPhotonClusterObj : public TObject
\r
215 public: AliPhotonClusterObj() :
\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
234 Double32_t fTrDEta;
\r
235 Double32_t fTrDPhi;
\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
251 ClassDef(AliPhotonClusterObj,6) // cluster class
\r
255 class AliPhotonCellObj : public TObject
\r
257 public: AliPhotonCellObj() :
\r
258 TObject(), fAbsID(-1), fE(0), fEt(0), fEta(0), fPhi(0), fTime(0)
\r
270 ClassDef(AliPhotonCellObj,1) // cell class
\r
274 class AliPhotonTrackObj : public TObject
\r
276 public: AliPhotonTrackObj() :
\r
277 TObject(), fPt(0), fEta(0), fPhi(0), fDedx(0), fCharge(0), fMcLabel(-1) {;}
\r
286 ClassDef(AliPhotonTrackObj,3)
\r
289 class AliPhotonMcPartObj : public TObject
\r
291 public: AliPhotonMcPartObj() :
\r
292 TObject(), fLabel(-1), fPdg(0), fPt(0), fEta(0), fPhi(0),
\r
293 fVR(0), fVEta(0), fVPhi(0), fMother(-1) {;}
\r
305 ClassDef(AliPhotonMcPartObj,1)
\r