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