]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h
including task to produce final histograms on isolated photon analysis
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliAnalysisTaskEMCALIsoPhoton.h
1 #ifndef AliAnalysisTaskEMCALIsoPhoton_cxx\r
2 #define AliAnalysisTaskEMCALIsoPhoton_cxx\r
3 \r
4 class TH1;\r
5 class TH2;\r
6 class TObjArray;\r
7 class AliESDEvent;\r
8 class AliESDtrack;\r
9 class AliESDtrackCuts;\r
10 class AliVCluster;\r
11 \r
12 #include "AliAnalysisTaskSE.h"\r
13 \r
14 class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {\r
15  public:\r
16   AliAnalysisTaskEMCALIsoPhoton() : \r
17   AliAnalysisTaskSE(), \r
18   \r
19     fCaloClusters(0),\r
20     fSelPrimTracks(0),\r
21     fEMCalCells(0),\r
22     fPrTrCuts(0),\r
23 \r
24     fGeom(0x0),\r
25   \r
26     fESD(0),\r
27   \r
28     fOutputList(0),\r
29 \r
30     fEvtSel(0),\r
31 \r
32     fPVtxZ(0),                   //!primary vertex Z before cut\r
33     fCellAbsIdVsAmpl(0),         //!cell abs id vs cell amplitude (energy)\r
34     fNClusHighClusE(0),          //!total number of clusters vs. highest clus energy in the event\r
35     fM02Et(0),                   //!M02 vs Et for all clusters\r
36     fM02EtTM(0),                 //!M02 vs Et for clusters with track-match (dEta=0.01 && dPhi=0.025)\r
37     fM02EtCeIso1(0),             //!M02 vs Et for clusters with isolation neutral Et<1GeV\r
38     fM02EtCeIso2(0),             //!M02 vs Et for clusters with isolation neutral Et<2GeV\r
39     fM02EtCeIso5(0),             //!M02 vs Et for clusters with isolation neutral Et<5GeV\r
40     fM02EtTrIso1(0),             //!M02 vs Et for clusters with isolation charged Et<1GeV\r
41     fM02EtTrIso2(0),             //!M02 vs Et for clusters with isolation charged Et<2GeV\r
42     fM02EtTrIso5(0),             //!M02 vs Et for clusters with isolation charged Et<5GeV\r
43     fM02EtAllIso1(0),            //!M02 vs Et for clusters with isolation total Et<1GeV\r
44     fM02EtAllIso2(0),            //!M02 vs Et for clusters with isolation total Et<2GeV\r
45     fM02EtAllIso5(0),            //!M02 vs Et for clusters with isolation total Et<5GeV\r
46     fCeIsoVsEtPho(0),            //!Neutral isolation Et vs. cluster Et, 0.05<M02<0.30\r
47     fTrIsoVsEtPho(0),            //!Charged isolation Et vs. cluster Et, 0.05<M02<0.30\r
48     fAllIsoVsEtPho(0),           //!Total isolation Et vs. cluster Et, 0.05<M02<0.30\r
49     //track matched stuff\r
50     fM02EtCeIso1TM(0),           //!Track-matched M02 vs Et for clusters with isolation neutral Et<1GeV\r
51     fM02EtCeIso2TM(0),           //!Track-matched M02 vs Et for clusters with isolation neutral Et<2GeV\r
52     fM02EtCeIso5TM(0),           //!Track-matched M02 vs Et for clusters with isolation neutral Et<5GeV\r
53     fM02EtTrIso1TM(0),           //!Track-matched M02 vs Et for clusters with isolation charged Et<1GeV\r
54     fM02EtTrIso2TM(0),           //!Track-matched M02 vs Et for clusters with isolation charged Et<2GeV\r
55     fM02EtTrIso5TM(0),           //!Track-matched M02 vs Et for clusters with isolation charged Et<5GeV\r
56     fM02EtAllIso1TM(0),          //!Track-matched M02 vs Et for clusters with isolation total Et<1GeV\r
57     fM02EtAllIso2TM(0),          //!Track-matched M02 vs Et for clusters with isolation total Et<2GeV\r
58     fM02EtAllIso5TM(0),          //!Track-matched M02 vs Et for clusters with isolation total Et<5GeV\r
59     fCeIsoVsEtPhoTM(0),          //!Track-matched Neutral isolation Et vs. cluster Et, 0.05<M02<0.30\r
60     fTrIsoVsEtPhoTM(0),          //!Track-matched Charged isolation Et vs. cluster Et, 0.05<M02<0.30\r
61     fAllIsoVsEtPhoTM(0)          //!Track-matched Total isolation Et vs. cluster Et, 0.05<M02<0.30\r
62 \r
63 \r
64     \r
65   \r
66   \r
67   {}\r
68   AliAnalysisTaskEMCALIsoPhoton(const char *name);\r
69   virtual ~AliAnalysisTaskEMCALIsoPhoton() {}\r
70 \r
71   void   UserCreateOutputObjects();\r
72   void   UserExec(Option_t *option);\r
73   void   Terminate(Option_t *);\r
74 \r
75   void         SetGeoName(const char *n)              { fGeoName            = n;       }\r
76   void         SetPeriod(const char *n)               { fPeriod             = n;       }\r
77   void         SetTrainMode(Bool_t t)                 { fIsTrain            = t;       }\r
78   void         SetExotCut(Double_t c)                 { fExoticCut          = c;       }\r
79   void         SetIsoConeR(Double_t r)                { fIsoConeR           = r;       }\r
80   void         SetPrimTrackCuts(AliESDtrackCuts *c)   { fPrTrCuts           = c;       }\r
81   void         FillClusHists();\r
82   void         GetCeIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core);\r
83   void         GetTrIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core);\r
84   Double_t     GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax);\r
85   Double_t     GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const; \r
86 \r
87 \r
88 \r
89 \r
90   \r
91  protected:\r
92   TRefArray             *fCaloClusters;          //!pointer to EMCal clusters\r
93   TObjArray             *fSelPrimTracks;         //!pointer to ESD primary tracks\r
94   AliESDCaloCells       *fEMCalCells;            //!pointer to EMCal cells\r
95   AliESDtrackCuts       *fPrTrCuts;              //!pointer to hold the prim track cuts\r
96   AliEMCALGeometry      *fGeom;                   // geometry utils\r
97   TString               fGeoName;                // geometry name (def = EMCAL_FIRSTYEARV1)\r
98   TString               fPeriod;                 // string to the LHC period\r
99   Bool_t                fIsTrain;                //variable to set train mode\r
100   Double_t              fExoticCut;              //variable to set the cut on exotic clusters\r
101   Double_t              fIsoConeR;               //variable to set the isolation cone radius\r
102   \r
103  private:\r
104   AliESDEvent *fESD;      //! ESD object\r
105 \r
106 \r
107   \r
108   TList       *fOutputList; //! Output list\r
109   //histograms for events with 1+ track pt>1\r
110   \r
111   TH1F        *fEvtSel;                  //!evt selection counter: 0=all trg, 1=pv cut \r
112   TH1F        *fPVtxZ;                   //!primary vertex Z before cut\r
113   TH2F        *fCellAbsIdVsAmpl;         //!cell abs id vs cell amplitude (energy)\r
114   TH2F        *fNClusHighClusE;          //!total number of clusters vs. highest clus energy in the event\r
115   TH2F        *fM02Et;                   //!M02 vs Et for all clusters\r
116   TH2F        *fM02EtTM;                 //!M02 vs Et for clusters with track-match (dEta=0.01 && dPhi=0.025)\r
117   TH2F        *fM02EtCeIso1;             //!M02 vs Et for clusters with isolation neutral Et<1GeV\r
118   TH2F        *fM02EtCeIso2;             //!M02 vs Et for clusters with isolation neutral Et<2GeV\r
119   TH2F        *fM02EtCeIso5;             //!M02 vs Et for clusters with isolation neutral Et<5GeV\r
120   TH2F        *fM02EtTrIso1;             //!M02 vs Et for clusters with isolation charged Et<1GeV\r
121   TH2F        *fM02EtTrIso2;             //!M02 vs Et for clusters with isolation charged Et<2GeV\r
122   TH2F        *fM02EtTrIso5;             //!M02 vs Et for clusters with isolation charged Et<5GeV\r
123   TH2F        *fM02EtAllIso1;            //!M02 vs Et for clusters with isolation total Et<1GeV\r
124   TH2F        *fM02EtAllIso2;            //!M02 vs Et for clusters with isolation total Et<2GeV\r
125   TH2F        *fM02EtAllIso5;            //!M02 vs Et for clusters with isolation total Et<5GeV\r
126   TH2F        *fCeIsoVsEtPho;            //!Neutral isolation Et vs. cluster Et, 0.05<M02<0.30\r
127   TH2F        *fTrIsoVsEtPho;            //!Charged isolation Et vs. cluster Et, 0.05<M02<0.30\r
128   TH2F        *fAllIsoVsEtPho;           //!Total isolation Et vs. cluster Et, 0.05<M02<0.30\r
129   //track matched stuff\r
130   TH2F        *fM02EtCeIso1TM;           //!Track-matched M02 vs Et for clusters with isolation neutral Et<1GeV\r
131   TH2F        *fM02EtCeIso2TM;           //!Track-matched M02 vs Et for clusters with isolation neutral Et<2GeV\r
132   TH2F        *fM02EtCeIso5TM;           //!Track-matched M02 vs Et for clusters with isolation neutral Et<5GeV\r
133   TH2F        *fM02EtTrIso1TM;           //!Track-matched M02 vs Et for clusters with isolation charged Et<1GeV\r
134   TH2F        *fM02EtTrIso2TM;           //!Track-matched M02 vs Et for clusters with isolation charged Et<2GeV\r
135   TH2F        *fM02EtTrIso5TM;           //!Track-matched M02 vs Et for clusters with isolation charged Et<5GeV\r
136   TH2F        *fM02EtAllIso1TM;          //!Track-matched M02 vs Et for clusters with isolation total Et<1GeV\r
137   TH2F        *fM02EtAllIso2TM;          //!Track-matched M02 vs Et for clusters with isolation total Et<2GeV\r
138   TH2F        *fM02EtAllIso5TM;          //!Track-matched M02 vs Et for clusters with isolation total Et<5GeV\r
139   TH2F        *fCeIsoVsEtPhoTM;          //!Track-matched Neutral isolation Et vs. cluster Et, 0.05<M02<0.30\r
140   TH2F        *fTrIsoVsEtPhoTM;          //!Track-matched Charged isolation Et vs. cluster Et, 0.05<M02<0.30\r
141   TH2F        *fAllIsoVsEtPhoTM;         //!Track-matched Total isolation Et vs. cluster Et, 0.05<M02<0.30\r
142 \r
143 \r
144 \r
145    \r
146   AliAnalysisTaskEMCALIsoPhoton(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented\r
147   AliAnalysisTaskEMCALIsoPhoton& operator=(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented\r
148   \r
149   ClassDef(AliAnalysisTaskEMCALIsoPhoton, 1); // example of analysis\r
150 };\r
151 \r
152 #endif\r