- added tasks by Jason Kamin to PWGGA/EMCALTasks
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliAnalysisTaskSDMGammaMC.h
1 #ifndef ALIANALYSISTASKSDMGAMMAMC_H
2 #define ALIANALYSISTASKSDMGAMMAMC_H
3
4 class TF1;
5 class TH1F;
6 class TH2F;
7 class TH3F;
8 class TH1D;
9 class TH2D;
10 class TH3D;
11 class TNtuple;
12 class TList;
13 class AliESDEvent;
14 class AliAODEvent;
15 class AliESDtrackCuts;
16 class AliESDCaloCluster;
17 class AliAODCaloCluster;
18 class AliMCEvent;
19 class AliMCParticle;
20 class AliEMCALGeometry;
21
22 #ifndef ALIANALYSISTASKSE_H
23 #include "AliAnalysisTaskSE.h"
24 #endif
25
26 class AliAnalysisTaskSDMGammaMC : public AliAnalysisTaskSE {
27  public:
28   AliAnalysisTaskSDMGammaMC();
29   AliAnalysisTaskSDMGammaMC(const char *name);
30   virtual ~AliAnalysisTaskSDMGammaMC();
31     
32   virtual void     UserCreateOutputObjects();
33   virtual void     UserExec(Option_t *option);
34   virtual void     Terminate(Option_t *);
35     
36   void         SetMcMode(Bool_t b) { fMcMode = b; }
37   void         SetRecalScheme(Int_t kRecalibrator) { fRecalibrator = kRecalibrator; }
38   void         SetFidPhiMinMax(Double_t kPhimin, Double_t kPhimax){ fPhimin = kPhimin; fPhimax = kPhimax; }
39   void         SetFidEtaMinMax(Double_t kEtamin, Double_t kEtamax){ fEtamin = kEtamin; fEtamax = kEtamax; }
40   
41  private:
42   static const int zvtx_bins = 16;
43   static const int mult_bins = 25;
44   static const unsigned int poolDepth = 25;
45   
46   Int_t GetMultBin(Int_t mult);
47   Int_t GetZvtxBin(Double_t vertZ);
48   Int_t isGoodEsdCluster(AliESDCaloCluster* esdclust);
49   Int_t isGoodAodCluster(AliAODCaloCluster* aodclust);
50   Double_t getDeltaPhi(TLorentzVector p1, TLorentzVector p2);
51   Double_t getDeltaEta(TLorentzVector p1, TLorentzVector p2);
52   Double_t PrivateEnergyRecal(Double_t energy, Int_t iCalib);
53
54   TList           *fOutput;        //! Output list
55   Bool_t           fMcMode;                 // monte carlo mode
56   Int_t            fRecalibrator;           // custom recalibrator? 
57   Double_t         fPhimin;           // Cuts. 
58   Double_t         fPhimax;           // Cuts. 
59   Double_t         fEtamin;           // Cuts. 
60   Double_t         fEtamax;           // Cuts. 
61   AliESDtrackCuts *fTrackCuts;     // Track cuts
62   AliESDEvent     *fEsdEv;                  //!pointer to input esd event
63   AliAODEvent     *fAodEv;                  //!pointer to input aod event
64   TH1F            *h1_nClusters;  //!  # of clusters/evt
65   TH1F            *h1_zvtx;  //!  # of clusters/evt
66   TH1F            *h1_trigger;  //!  # of clusters/evt
67   TH1F            *h1_E;        //!  energy spectrum
68   TH1F            *h1_Phi;        //!  Pt spectrum
69
70   TH2F            *h2_PiMotherID; //! first bin is primaries, second is non-primaries
71   TH2F            *h2_GaMotherID; //! first bin is primaries, second is non-primaries
72   TH3F            *h3_gE_RecTruth; //! E_in/E_rec vs E_rec (for 4 categories)
73   TH3F            *h3_gE_RecTruth_ncellscut; //! E_in/E_rec vs E_rec (for 4 categories)
74   
75   TH1F            *h1_Pi0TruthPt;        //!  Pt spectrum from MC! 
76   TH1F            *h1_PriPi0TruthPt;        //!  Pt spectrum from MC! 
77   TH1F            *h1_Pi0TruthPtEmcal;        //!  Pt spectrum from MC! 
78   TH1F            *h1_PriPi0TruthPtEmcal;        //!  Pt spectrum from MC! 
79
80   TH2F            *h2_Pi0TruthPhiEta;    //!  etaphi spectrum from MC! 
81   TH2F            *h2_PriPi0TruthPhiEta;    //!  etaphi spectrum from MC! 
82   TH2F            *h2_Pi0TruthPhiEtaEmcal;    //!  etaphi spectrum from MC! 
83   TH2F            *h2_PriPi0TruthPhiEtaEmcal;    //!  etaphi spectrum from MC! 
84
85   TH1F            *h1_TruthPhotonsEmcal;        //!  Pt spectrum from MC! 
86   TH2F            *h2_TruthPhotonsPhiEta;        //!  Pt spectrum from MC! 
87   TH1F            *h1_PhotonsEmcal;        //!  Pt spectrum from MC! 
88   TH1F            *h1_PhotonsNCellsCut;        //!  Pt spectrum from MC! 
89   TH1F            *h1_PhotonsTrackMatchCut;        //!  Pt spectrum from MC! 
90   TH1F            *h1_PhotonsAllCut;        //!  Pt spectrum from MC! 
91   TH2F            *h2_PhotonsPhiEtaIsEmcal;        //!  Pt spectrum from MC! 
92
93   TH1F            *h1_dR_RealMC;        //!  Pt spectrum from MC! 
94
95   TH1F            *h1_Eta;       //!  pseudorapidity spectrum
96   TH1F            *h1_Chi2;       //!  pseudorapidity spectrum
97   TH1F            *h1_nTrkMatch;       //!  pseudorapidity spectrum
98   TH1F            *h1_nCells;       //!  pseudorapidity spectrum
99   TH1F            *h1_ClusterDisp;       //!  cluster dispersion
100   TH2F            *h2_Ellipse;       //!  ellipse axis?
101   TH2F            *h2_EtaPt;       //!  2d histogram Y - pseudorap spectrum
102   TH2F            *h2_dphi_deta;       //!  2dimensional E vs mom
103   TH2F            *h2_dphi_deta_mix;       //!  2dimensional E vs mom
104   TH2F            *h2_DispRes;       //!  2dimensional E vs mom
105   TH2F            *h2_cells_M02;       //!  
106
107   std::vector<TLorentzVector> Photons[poolDepth][zvtx_bins][mult_bins];
108   std::vector<Int_t> TriggerList;
109   
110   AliAnalysisTaskSDMGammaMC(const AliAnalysisTaskSDMGammaMC&); // not implemented
111   AliAnalysisTaskSDMGammaMC& operator=(const AliAnalysisTaskSDMGammaMC&); // not implemented
112     
113   ClassDef(AliAnalysisTaskSDMGammaMC, 1); // example of analysis
114 };
115 #endif