1 #ifndef AliAnalysisTaskEMCALPhoton_h
2 #define AliAnalysisTaskEMCALPhoton_h
13 class AliESDtrackCuts;
14 class AliESDCaloCells;
16 class AliAODCaloCells;
17 class AliEMCALGeometry;
18 class AliOADBContainer;
21 class AliAnalysisTaskEMCALClusterizeFast;
24 class AliPhotonHeaderObj;
25 class AliPhotonConvObj;
26 class AliPhotonClusterObj;
27 class AliPhotonCellObj;
29 #include "AliAnalysisTaskSE.h"
31 class AliAnalysisTaskEMCALPhoton : public AliAnalysisTaskSE {
33 AliAnalysisTaskEMCALPhoton();
34 AliAnalysisTaskEMCALPhoton(const char *name);
35 virtual ~AliAnalysisTaskEMCALPhoton() {}
37 void UserCreateOutputObjects();
38 void UserExec(Option_t *option);
39 void Terminate(Option_t *);
41 void SetTrackCuts(AliESDtrackCuts *c) { fTrCuts = c; }
42 void SetPrimTrackCuts(AliESDtrackCuts *c) { fPrTrCuts = c; }
43 void SetTimeResTOF(Float_t tr = 130.) { fTimeResTOF = tr; }
44 void SetMipResponseTPC(Float_t mr = 47.9) { fMipResponseTPC = mr; }
45 void SetGeoName(const char *n) { fGeoName = n; }
46 void SetPeriod(const char *n) { fPeriod = n; }
47 void SetTrainMode(Bool_t t) { fIsTrain = t; }
48 void SetGridMode(Bool_t g) { fIsGrid = g; }
49 void SetClusThreshold(Double_t et) { fClusThresh = et; }
50 void SetClusterizer(AliAnalysisTaskEMCALClusterizeFast *c) { fClusterizer = c; }
51 void SetMcMode(Bool_t mc) { fIsMC = mc; }
52 void SetDebugMode(Bool_t d) { fDebug = d; }
53 void SetRedoV0(Bool_t v) { fRedoV0 = v; }
54 void FindConversions();
56 void FillMyClusters();
57 void FillMyAltClusters();
59 void FillMcPart( Int_t itrack, Int_t label);
61 Double_t GetMcIsolation( Int_t itrack, Double_t radius, Double_t pt) const;
62 Double_t GetTrackIsolation(Double_t cEta, Double_t cPhi, Double_t radius=0.2, Double_t pt=0.) const;
63 Double_t GetPhiBandEt(Double_t cEta, Double_t cPhi, Double_t radius=0.2, Double_t pt=0.) const;
64 // Double_t GetPhiBandEt(Double_t cEta, Double_t cPhi, Double_t radius=0.2, Double_t pt=0.) const;
65 Double_t GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax);
66 Double_t GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const;
69 AliESDtrackCuts *fTrCuts; // track cuts
70 AliESDtrackCuts *fPrTrCuts; // primary track cuts
71 TObjArray *fSelTracks; //!pointer to selected inclusive tracks
72 TObjArray *fSelPrimTracks; //!pointer to selected primary tracks
73 TClonesArray *fTracks; //!track input array
74 TClonesArray *fPhotConvArray; //!array of AliPhotonConvObj
75 TClonesArray *fMyClusts; //!array of AliPhotonClusterObj
76 TClonesArray *fMyAltClusts; //!array of AliPhotonClusterObj from the alternative clusterizer
77 TClonesArray *fMyCells; //!array of AliPhotonCellObj
78 TClonesArray *fMyTracks; //!array of AliPhotonTrackObj
79 TClonesArray *fMyMcParts; //!array of AliPhotonMcPartObj
80 AliPhotonHeaderObj *fHeader; //!
81 AliOADBContainer *fOADBContainer; //!OADB container used to load misalignment matrices
82 TClonesArray *fCaloClusters; //!pointer to EMCal clusters
83 TClonesArray *fCaloClustersNew; //!pointer to EMCal clusters v2
84 TClonesArray *fAODMCParticles; //!MC particles array for AOD analysis
85 AliVCaloCells *fVCells; //!pointer to EMCal cells
86 AliEMCALGeometry *fGeom; // geometry utils
87 Float_t fTimeResTOF; //TOF time resolution for track PID
88 Float_t fMipResponseTPC; //TPC mip response for track pid
89 TString fGeoName; // geometry name (def = EMCAL_FIRSTYEARV1)
90 TString fPeriod; // string to the LHC period
91 Bool_t fIsTrain; //variable to set train mode
92 Bool_t fIsMC; //variable to switch mcparts branch on/off
93 Bool_t fDebug; //variable to switch debug on/off
94 Bool_t fRedoV0; //variable to recalculate V0s - must be off for A-A collisions
95 Bool_t fIsGrid; //variable to set grid mode
96 Double_t fClusThresh; //!energy threshold for cluster be saved
97 AliAnalysisTaskEMCALClusterizeFast *fClusterizer; //!pointer for alternative clusterizer
98 TString fCaloClustersName; //alternative clusterizer name
103 AliESDEvent *fESD; //! ESD object
104 AliAODEvent *fAOD; //! AOD object
105 AliVEvent *fVev; //!virtual event obj
106 AliMCEvent *fMCEvent; //! MC event object
107 AliStack *fStack; //!MC particles stack object
108 TGeoHMatrix *fGeomMatrix[12];//! Geometry misalignment matrices for EMCal
110 TList *fOutputList; //! Output list
111 TTree *fTree; //!output tree
112 Int_t fMyMcIndex; //!counter of the saved mc particlesx
114 //conversion histograms
115 TH2F *fNV0sBefAndAftRerun; //!check the number of V0s before and after rerun
116 TH2F *fConversionVtxXY; //! X x Y of found conversion vertices
117 TH1F *fInvMassV0; //!invariant mass from v0->GetEffMass()
118 TH1F *fInvMassV0KF; //!invariant mass from the v0 tracks
119 TH1F *fInvMassV0SS; //!invariant mass from the tracks in the "dirty" finder
120 TH2F *fDedxPAll; //!dE/dx vs p of all selected tracks
124 AliAnalysisTaskEMCALPhoton(const AliAnalysisTaskEMCALPhoton&); // not implemented
125 AliAnalysisTaskEMCALPhoton& operator=(const AliAnalysisTaskEMCALPhoton&); // not implemented
127 ClassDef(AliAnalysisTaskEMCALPhoton, 1); // example of analysis
132 #ifndef AliPhotonObjs_h
133 #define AliPhotonObjs_h
135 class AliPhotonHeaderObj : public TObject
137 public: AliPhotonHeaderObj() :
138 TObject(), fInputFileName(""),fRunNumber(0), fTrClassMask(0), fTrCluster(0), fV0Cent(0), fV0(0), fCl1Cent(0),
139 fCl1(0), fTrCent(0), fTr(0), fNClus(0), fNCells(0), fTrackMult(0), fNMcParts(0) {;}
141 TString fInputFileName; // used for normalization purposes in MC productions
142 Int_t fRunNumber; // event run number
143 ULong64_t fTrClassMask; // trigger class mask
144 UChar_t fTrCluster; // trigger cluster mask
145 Double32_t fV0Cent; //[0,0,16] v0 cent
146 Double32_t fV0; //[0,0,16] v0 result used for cent
147 Double32_t fCl1Cent; //[0,0,16] cl1 cent
148 Double32_t fCl1; //[0,0,16] cl1 result used for cent
149 Double32_t fTrCent; //[0,0,16] tr cent
150 Double32_t fTr; //[0,0,16] tr result used for cent
156 ClassDef(AliPhotonHeaderObj,6)
159 class AliPhotonConvObj : public TObject
161 public: AliPhotonConvObj() :
162 TObject(), fPt(0), fEta(0), fPhi(0), fVR(0), fVEta(0), fVPhi(0), fMass(0), fMcLabel(-1),
163 fNegPt(0), fNegEta(0), fNegPhi(0), fNegDedx(0), fNegMcLabel(-1),
164 fPosPt(0), fPosEta(0), fPosPhi(0), fPosDedx(0), fPosMcLabel(-1) {;}
166 Double32_t fPt; //[0,0,16] pt
167 Double32_t fEta; //[0,0,16] eta
168 Double32_t fPhi; //[0,0,16] phi
169 Double32_t fVR; //[0,0,16] prod r (cylinder)
170 Double32_t fVEta; //[0,0,16] prod eta
171 Double32_t fVPhi; //[0,0,16] prod phi
172 Double32_t fMass; //[0,0,16] if correctly filled, should be <50 MeV
173 Short_t fMcLabel; //corresponding MC label
176 Double32_t fNegPt; //[0,0,16] pt
177 Double32_t fNegEta; //[0,0,16] eta
178 Double32_t fNegPhi; //[0,0,16] phi
179 Double32_t fNegDedx; //[0,0,16] if correctly filled, should be <50 MeV
180 Short_t fNegMcLabel; //corresponding MC label
183 Double32_t fPosPt; //[0,0,16] pt
184 Double32_t fPosEta; //[0,0,16] eta
185 Double32_t fPosPhi; //[0,0,16] phi
186 Double32_t fPosDedx; //[0,0,16] if correctly filled, should be <50 MeV
187 Short_t fPosMcLabel; //corresponding MC label
189 ClassDef(AliPhotonConvObj,1) // conversion class
192 class AliPhotonClusterObj : public TObject
194 public: AliPhotonClusterObj() :
195 TObject(), fE(0), fEt(0), fR(0), fEta(0), fPhi(0), fN(0),fEmax(0),fTmax(0), fIdmax(0), fEcross(0),fDisp(-1),
196 fM20(-1), fM02(-1),fTrDEta(0), fTrDPhi(0), fTrEp(-1), fTrDedx(-1), fTrIso01(0), fTrIso02(0), fTrIso03(0), fTrIso04(0),
197 fTrPhiBand01(0), fTrPhiBand02(0), fTrPhiBand03(0), fTrPhiBand04(0), fCellsAbsId(""),fMcLabel(-1)
221 Double32_t fTrPhiBand01;
222 Double32_t fTrPhiBand02;
223 Double32_t fTrPhiBand03;
224 Double32_t fTrPhiBand04;
225 TString fCellsAbsId; //cluster cells absid
230 ClassDef(AliPhotonClusterObj,6) // cluster class
234 class AliPhotonCellObj : public TObject
236 public: AliPhotonCellObj() :
237 TObject(), fAbsID(-1), fE(0), fEt(0), fEta(0), fPhi(0), fTime(0)
249 ClassDef(AliPhotonCellObj,1) // cell class
253 class AliPhotonTrackObj : public TObject
255 public: AliPhotonTrackObj() :
256 TObject(), fPt(0), fEta(0), fPhi(0), fDedx(0), fCharge(0), fMcLabel(-1) {;}
265 ClassDef(AliPhotonTrackObj,3)
268 class AliPhotonMcPartObj : public TObject
270 public: AliPhotonMcPartObj() :
271 TObject(), fLabel(-1), fPdg(0), fPt(0), fEta(0), fPhi(0),
272 fVR(0), fVEta(0), fVPhi(0), fMother(-1), fFirstD(-1),
273 fLastD(-1), fStatus(-1), fIso(-1), fIso3(-1) {;}
288 Double32_t fIso3; //in cone of radius 0.3
290 ClassDef(AliPhotonMcPartObj,3)