- added tasks by Jason Kamin to PWGGA/EMCALTasks
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliAnalysisTaskEMCALMesonGGSDM.h
1 #ifndef ALIANALYSISTASKEMCALMESONGGSDM_H
2 #define ALIANALYSISTASKEMCALMESONGGSDM_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 #include "AliAnalysisUtils.h"
26
27 class AliAnalysisTaskEMCALMesonGGSDM : public AliAnalysisTaskSE {
28  public:
29   AliAnalysisTaskEMCALMesonGGSDM();
30   AliAnalysisTaskEMCALMesonGGSDM(const char *name);
31   virtual ~AliAnalysisTaskEMCALMesonGGSDM();
32     
33   virtual void     UserCreateOutputObjects();
34   virtual void     UserExec(Option_t *option);
35   virtual void     Terminate(Option_t *);
36     
37   void         SetMcMode(Bool_t b)                 { fMcMode       = b;             }
38   void         SetRecalScheme(Int_t kRecalibrator) { fRecalibrator = kRecalibrator; }
39   void         SetMyMCType(char *kMyMCType)        { fMyMCType     = kMyMCType; }
40   void         SetdRmin_ClustTrack(Double_t kdRmin_ClustTrack)    { fdRmin_ClustTrack = kdRmin_ClustTrack; }
41   void         SetFidPhiMinMax(Double_t kPhimin, Double_t kPhimax){ fPhimin = kPhimin; fPhimax = kPhimax; }
42   void         SetFidEtaMinMax(Double_t kEtamin, Double_t kEtamax){ fEtamin = kEtamin; fEtamax = kEtamax; }
43   
44  private:
45   static const int zvtx_bins = 16;
46   static const int mult_bins = 25;
47   static const unsigned int poolDepth = 20;
48   
49   Int_t GetMultBin(Int_t mult);
50   Int_t GetZvtxBin(Double_t vertZ);
51   Int_t isGoodEsdCluster(AliESDCaloCluster* esdclust);
52   Int_t isGoodAodCluster(AliAODCaloCluster* aodclust);
53   Double_t getDeltaPhi(TLorentzVector p1, TLorentzVector p2);
54   Double_t getDeltaEta(TLorentzVector p1, TLorentzVector p2);
55   Double_t PrivateEnergyRecal(Double_t energy, Int_t iCalib);
56   Double_t GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const;
57   Int_t IsPhysPrimJ(AliMCEvent *mcEvent, Int_t iTrack);
58   Int_t IsLongLivedOrK(Int_t MyPDGcode);
59   Int_t IsMyMCHeaderType(Int_t iTrack, char *MyType, AliMCEvent *mcEvent) const;
60
61   TList           *fOutput;        //! Output list
62   Bool_t           fMcMode;                 // monte carlo mode
63   char            *fMyMCType;               // monte carlo primary particles
64   Int_t            fRecalibrator;           // custom recalibrator? 
65   Double_t         fdRmin_ClustTrack; // Cuts. 
66   Double_t         fPhimin;           // Cuts. 
67   Double_t         fPhimax;           // Cuts. 
68   Double_t         fEtamin;           // Cuts. 
69   Double_t         fEtamax;           // Cuts. 
70   AliESDtrackCuts *fTrackCuts;              // Track cuts
71   AliESDEvent     *fEsdEv;                  //!pointer to input esd event
72   AliAODEvent     *fAodEv;                  //!pointer to input aod event
73   TH1F            *h1_nClusters;  //!  # of clusters/evt
74   TH1F            *h1_zvtx;  //!  # of clusters/evt
75   TH1F            *h1_trigger;  //!  # of clusters/evt
76   TH1F            *h1_M;        //!  Mass spectrum
77   TH1F            *h1_M_mix;    //!  Mass spectrum
78   TH1F            *h1_E;        //!  energy spectrum
79   TH2F            *h2_PhiEtaCluster;        //!  phi vs eta for the cluster CoG
80   TH2F            *h2_PhiEtaClusterCut;     //!  phi vs eta for the cluster CoG w/ cuts
81   TH2F            *h2_PhiEtaMaxCell;        //!  phi vs eta for the maximum cell
82   TH2F            *h2_PhiEtaMaxCellCut;     //!  phi vs eta for the maximum cell w/ cuts
83   TH1F            *h1_dR_ClustTrk;        //!  Track Matching
84   TH2F            *h2_gE_RecTruth; //! gamma E, rec/truth, first bin is primaries, second is non-primaries
85   TH2F            *h2_eop_E;        //!  e over p vs E. simple
86   TH2F            *h2_eop_pT;        //!  e over p vs pT. simple
87   TH2F            *h2_E_time;        //!  cluster energy vs time.
88   
89   TH1F            *h1_Pi0TruthPt;        //!  Pt spectrum from MC! 
90   TH1F            *h1_K0Pi0TruthPt;        //!  Pt spectrum from MC! 
91   TH1F            *h1_PriPi0TruthPt;        //!  Pt spectrum from MC! 
92   TH1F            *h1_PhysPi0TruthPt;        //!  Pt spectrum from MC! 
93
94   TH1F            *h1_Pi0TruthPtEmcal;        //!  Pt spectrum from MC! 
95   TH1F            *h1_K0Pi0TruthPtEmcal;        //!  Pt spectrum from MC! 
96   TH1F            *h1_PriPi0TruthPtEmcal;        //!  Pt spectrum from MC! 
97   TH1F            *h1_PhysPi0TruthPtEmcal;        //!  Pt spectrum from MC! 
98
99   TH1F            *h1_Pi0TruthPtPhi2piEta065;        //!  Pt spectrum from MC! 
100   TH1F            *h1_K0Pi0TruthPtPhi2piEta065;        //!  Pt spectrum from MC! 
101   TH1F            *h1_PriPi0TruthPtPhi2piEta065;        //!  Pt spectrum from MC! 
102   TH1F            *h1_PhysPi0TruthPtPhi2piEta065;        //!  Pt spectrum from MC! 
103
104   TH1F            *h1_Pi0TruthPtPhi2piEta1;        //!  Pt spectrum from MC!   
105   TH1F            *h1_K0Pi0TruthPtPhi2piEta1;        //!  Pt spectrum from MC!   
106   TH1F            *h1_PriPi0TruthPtPhi2piEta1;        //!  Pt spectrum from MC!   
107   TH1F            *h1_PhysPi0TruthPtPhi2piEta1;        //!  Pt spectrum from MC!   
108
109   TH2F            *h2_Pi0TruthPhiEta;    //!  etaphi spectrum from MC! 
110   TH2F            *h2_PriPi0TruthPhiEta;    //!  etaphi spectrum from MC! 
111   TH2F            *h2_Pi0TruthPhiEtaEmcal;    //!  etaphi spectrum from MC! 
112   TH2F            *h2_PriPi0TruthPhiEtaEmcal;    //!  etaphi spectrum from MC! 
113
114   TH1F            *h1_TruthPhotonsEmcal;        //!  Pt spectrum from MC! 
115   TH2F            *h2_TruthPhotonsPhiEta;        //!  Pt spectrum from MC! 
116   TH1F            *h1_PhotonsEmcal;        //!  Pt spectrum from MC! 
117   TH1F            *h1_PhotonsNCellsCut;        //!  Pt spectrum from MC! 
118   TH1F            *h1_PhotonsTrackMatchCut;        //!  Pt spectrum from MC! 
119   TH1F            *h1_PhotonsAllCut;        //!  Pt spectrum from MC! 
120   TH2F            *h2_PhotonsPhiEtaIsEmcal;        //!  Pt spectrum from MC! 
121
122   TH1F            *h1_dR_RealMC;        //!  Pt spectrum from MC! 
123   TH2F            *h2_Mpt_Pri;       //!  2dimensional mass vs mom primary pions
124   TH2F            *h2_Mpt_Sec;       //!  2dimensional mass vs mom secondary pions
125   TH3F            *h3_MptR_Sec;       //!  2dimensional mass vs production radius, secondary pions
126   TH3F            *h3_MptR_K0s;       //!  2dimensional mass vs production radius, K0s pions
127   TH3F            *h3_MptR_Mat;       //!  2dimensional mass vs production radius, pions from material
128   TH2F            *h2_PtR_MatM;       //!  2dimensional pt vs production radius, pions from material (that merged). pi mass assumed.
129   TH2F            *h2_Mpt_Pri_conv;       //!  2dimensional mass vs mom primary pions
130   TH2F            *h2_Mpt_Sec_conv;       //!  2dimensional mass vs mom secondary pions
131   TH3F            *h3_MptR_Sec_conv;       //!  2dimensional mass vs production radius, secondary pions
132   TH3F            *h3_MptR_K0s_conv;       //!  2dimensional mass vs production radius, K0s pions
133   TH3F            *h3_MptR_Mat_conv;       //!  2dimensional mass vs production radius, pions from material
134   TH1F            *h1_eConversionR;        //!  conversion point (radius)
135   TH1F            *h1_PriPi0Mother;       //!  the parent ID of every sec pi0 mother
136   TH1F            *h1_SecPi0Mother;       //!  the parent ID of every pri pi0 mother
137
138   TH1F            *h1_Chi2;       //!  pseudorapidity spectrum
139   TH1F            *h1_nTrkMatch;       //!  pseudorapidity spectrum
140   TH1F            *h1_nCells;       //!  pseudorapidity spectrum
141   TH1F            *h1_ClusterDisp;       //!  cluster dispersion
142   TH2F            *h2_Ellipse;       //!  ellipse axis?
143   TH2F            *h2_EtaPt;       //!  2d histogram Y - pseudorap spectrum
144   TH3F            *h3_MptAsymm;       //!  2dimensional E vs mom
145   TH3F            *h3_MptAsymm_mix;       //!  2dimensional E vs mom
146   TH2F            *h2_dphi_deta;       //!  2dimensional E vs mom
147   TH2F            *h2_dphi_deta_mix;       //!  2dimensional E vs mom
148   TH2F            *h2_DispRes;       //!  2dimensional E vs mom
149   TH2F            *h2_cells_M02;       //!  
150
151   //AliPIDCombined *fPIDCombined; // for E/p
152   //AliPIDResponse *fPIDResponse; // for E/p
153
154   std::vector<TLorentzVector> Photons[poolDepth][zvtx_bins][mult_bins]; //!
155   std::vector<Int_t> TriggerList; //!
156   
157   AliAnalysisUtils*   fHelperClass;           //! Vertex selection helper
158
159   AliAnalysisTaskEMCALMesonGGSDM(const AliAnalysisTaskEMCALMesonGGSDM&); // not implemented
160   AliAnalysisTaskEMCALMesonGGSDM& operator=(const AliAnalysisTaskEMCALMesonGGSDM&); // not implemented
161     
162   ClassDef(AliAnalysisTaskEMCALMesonGGSDM, 1); // example of analysis
163 };
164 #endif