]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliAnaGammaDirect.h
Using AliITSgeomTGeo
[u/mrichter/AliRoot.git] / PWG4 / AliAnaGammaDirect.h
1 #ifndef ALIANAGAMMADIRECT_H
2 #define ALIANAGAMMADIRECT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id$ */
6
7 /* History of cvs commits:
8  *
9  * $Log$
10  * Revision 1.1  2007/01/23 17:17:29  schutz
11  * New Gamma package
12  *
13  *
14  */
15
16 //_________________________________________________________________________
17
18 // Class for the analysis of gamma  (gamma-jet, 
19 // gamma-hadron(Arleo, TODO))
20 // This class only contains 3 methods: one to fill lists of particles (ESDs) comming 
21 //  from the CTS (ITS+TPC) and the calorimeters; the other search in the 
22 //  corresponing calorimeter for the highest energy cluster, identify it as 
23 //  prompt photon(Shower Shape and Isolation Cut), the last method does the 
24 //  isolation selection
25 //
26 //  Class created from old AliPHOSGammaJet
27 //  (see AliRoot versions previous Release 4-09)
28
29 //*-- Author: Gustavo Conesa (INFN-LNF)
30
31 // --- ROOT system ---
32 #include <TParticle.h> 
33 #include <TClonesArray.h> 
34 #include <TTree.h> 
35 #include "AliAnalysisTask.h" 
36 #include <TH2F.h>
37
38 class AliESD ; 
39  
40 class AliAnaGammaDirect : public AliAnalysisTask {
41
42 public: 
43
44   AliAnaGammaDirect(const char *name) ; // default ctor
45   AliAnaGammaDirect(const AliAnaGammaDirect & g) ; // cpy ctor
46   virtual ~AliAnaGammaDirect() ; //virtual dtor
47
48   virtual void Exec(Option_t * opt = "") ;
49   virtual void ConnectInputData(Option_t *);
50   virtual void CreateOutputObjects();
51   virtual void Terminate(Option_t * opt = "");
52   
53   void InitParameters();
54   TTree *     GetChain()                const {return fChain ; }
55   AliESD *    GetESD()                  const {return fESD ; }
56   TObjArray * GetOutputContainer()      const {return fOutputContainer ; }
57   Double_t  GetMinGammaPt()    const {return fMinGammaPt ; }
58   TString    GetCalorimeter()       const {return fCalorimeter ; }
59   Bool_t      GetPrintInfo()           const {return fPrintInfo ; }
60   Float_t     GetConeSize()          const {return fConeSize ; }
61   Float_t     GetPtThreshold()      const {return fPtThreshold ; }
62   Float_t     GetPtSumThres()     const {return fPtSumThreshold ; }
63   Int_t        GetICMethod()          const {return fMakeICMethod ; }
64
65   Bool_t   IsEMCALPIDOn() const {return fEMCALPID ; }
66   Bool_t   IsPHOSPIDOn() const {return fPHOSPID ; }
67
68   void Print(const Option_t * opt)const;
69
70   void SetMinGammaPt(Double_t ptcut){fMinGammaPt =ptcut;}
71   void SetCalorimeter(TString calo){ fCalorimeter= calo ; }
72   void SetPrintInfo(Bool_t print){ fPrintInfo = print ; }
73   void SetConeSize(Float_t r)              {fConeSize = r ; }
74   void SetPtThreshold(Float_t pt)        {fPtThreshold = pt; };
75   void SetPtSumThreshold(Float_t pt) {fPtSumThreshold = pt; };
76   void SetICMethod(Int_t i )          {fMakeICMethod = i ; }
77   
78   void SetEMCALPIDOn(Bool_t pid){ fEMCALPID= pid ; }
79   void SetPHOSPIDOn(Bool_t pid){ fPHOSPID= pid ; }
80
81   void CreateParticleList(TClonesArray * particleList, 
82                           TClonesArray * plCh, TClonesArray * plNe, 
83                           TClonesArray * plNePHOS);
84   
85   
86   void GetPromptGamma(TClonesArray * plNe, TClonesArray * plCTS, TParticle * pGamma, Bool_t &Is)  const;
87   
88   void MakeIsolationCut(TClonesArray * plCTS, TClonesArray * plNe, 
89                         TParticle *pCandidate, Int_t index, 
90                         Bool_t &imcpt, Bool_t &icms, Float_t &ptsum) const ;
91   
92   void MakeHistos() ;
93   
94   
95  private:
96
97   TTree       *fChain ;   //!pointer to the analyzed TTree or TChain
98   AliESD       *fESD ;     //! Declaration of leave types
99   TObjArray  *fOutputContainer ; //! output data container
100   Bool_t        fPrintInfo ;      //Print most interesting information on screen
101   Double_t    fMinGammaPt ;  // Min pt in Calorimeter
102   TString      fCalorimeter ; //PHOS or EMCAL detects Gamma
103   Bool_t       fEMCALPID ;//Fill EMCAL particle lists with particles with corresponding pid
104   Bool_t       fPHOSPID;  //Fill PHOS particle lists with particles with corresponding pid
105   Float_t      fConeSize ; //Size of the isolation cone 
106   Float_t      fPtThreshold ; //Mimium pt of the particles in the cone to set isolation
107   Float_t      fPtSumThreshold ; //Mimium pt sum of the particles in the cone to set isolation  
108   Int_t        fMakeICMethod ; //Isolation cut method to be used
109                                            // 0: No isolation
110                                            // 1: Pt threshold method
111                                            // 2: Cone pt sum method
112   //Histograms  
113   TH1F * fhNGamma    ; 
114   TH2F * fhPhiGamma    ; 
115   TH2F * fhEtaGamma    ; 
116
117   ClassDef(AliAnaGammaDirect,0)
118 } ;
119  
120
121 #endif //ALIANAGAMMADIRECT_H
122
123
124