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