]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliAnaGammaDirect.h
FMD zero-misalignment objects using symbolic names (Raffaele)
[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  *
11  */
12
13 //_________________________________________________________________________
14
15 // Class for the analysis of gamma  (gamma-jet, 
16 // gamma-hadron(Arleo, TODO))
17 // This class only contains 3 methods: one to fill lists of particles (ESDs) comming 
18 //  from the CTS (ITS+TPC) and the calorimeters: The other search in the 
19 //  corresponing calorimeter for the highest energy cluster, identify it as 
20 //  prompt photon(Shower Shape (done) and Isolation Cut (TODO in new class?)).
21 //
22 //  Class created from old AliPHOSGammaJet
23 //  (see AliRoot versions previous Release 4-09)
24
25 //*-- Author: Gustavo Conesa (INFN-LNF)
26
27 // --- ROOT system ---
28 #include <TROOT.h>
29 #include <TChain.h>
30 #include "TTask.h"
31 #include "TArrayD.h"
32 #include "TChain.h"
33 #include <TH2F.h>
34 #include <TTree.h> 
35 #include <TParticle.h> 
36 #include "AliAnalysisTask.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   virtual void Exec(Option_t * opt = "") ;
48   virtual void Init(Option_t * opt = "");
49   virtual void Terminate(Option_t * opt = "");
50   
51   TTree *     GetChain()                const {return fChain ; }
52   AliESD *    GetESD()                  const {return fESD ; }
53   TObjArray * GetOutputContainer()      const {return fOutputContainer ; }
54   Double_t  GetMinGammaPt()    const {return fMinGammaPt ; }
55   TString    GetCalorimeter()       const {return fCalorimeter ; }
56   Bool_t      GetPrintInfo()           const {return fPrintInfo ; }
57   Float_t     GetConeSize()          const {return fConeSize ; }
58   Float_t     GetPtThreshold()      const {return fPtThreshold ; }
59   Float_t     GetPtSumThres()     const {return fPtSumThreshold ; }
60   Int_t        GetICMethod()          const {return fMakeICMethod ; }
61
62   Bool_t   IsEMCALPIDOn() const {return fEMCALPID ; }
63   Bool_t   IsPHOSPIDOn() const {return fPHOSPID ; }
64
65   void Print(const Option_t * opt)const;
66
67   void SetMinGammaPt(Double_t ptcut){fMinGammaPt =ptcut;}
68   void SetCalorimeter(TString calo){ fCalorimeter= calo ; }
69   void SetPrintInfo(Bool_t print){ fPrintInfo = print ; }
70   void SetConeSize(Float_t r)              {fConeSize = r ; }
71   void SetPtThreshold(Float_t pt)        {fPtThreshold = pt; };
72   void SetPtSumThreshold(Float_t pt) {fPtSumThreshold = pt; };
73   void SetICMethod(Int_t i )          {fMakeICMethod = i ; }
74   
75   void SetConeSizes(Int_t i, Float_t r)              {fConeSizes[i] = r ; }
76   void SetPtThresholds(Int_t i, Float_t pt)        {fPtThresholds[i] = pt; };
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         fNCones   ; //Number of cone sizes to test
109   Int_t         fNPtThres ; //Number of ptThres to test
110   Float_t     fConeSizes[10] ; // Arrat with cones to test
111   Float_t     fPtThresholds[10] ; // Array with pt thresholds to test
112   Int_t        fMakeICMethod ; //Isolation cut method to be used
113                                            // 0: No isolation
114                                            // 1: Pt threshold method
115                                            // 2: Cone pt sum method
116                                            // 3: Study both methods for several cones and pt.
117   //Histograms  
118   TH1F * fhNGamma    ; 
119   TH2F * fhPhiGamma    ; 
120   TH2F * fhEtaGamma    ; 
121   TH1F * fhPtCandidate ;
122   TH1F* fhPtThresIsolated[10][10] ;
123   TH2F* fhPtSumIsolated[10] ;
124
125   ClassDef(AliAnaGammaDirect,0)
126 } ;
127  
128
129 #endif //ALIANAGAMMADIRECT_H
130
131
132