]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliGammaMCReader.h
Online (ideal) calibration file for the new naming of the directory
[u/mrichter/AliRoot.git] / PWG4 / AliGammaMCReader.h
1 #ifndef ALIGAMMAMCREADER_H
2 #define ALIGAMMAMCREADER_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 // Class for reading data (Kinematics) in order to do prompt gamma correlations
15 //  Class created from old AliPHOSGammaJet
16 //  (see AliRoot versions previous Release 4-09)
17
18 //*-- Author: Gustavo Conesa (INFN-LNF)
19
20 // --- ROOT system ---
21 #include <TParticle.h> 
22 #include <TClonesArray.h> 
23 #include "AliStack.h"
24 #include "AliGammaReader.h" 
25  
26 class TH2F ; 
27
28 class AliGammaMCReader : public AliGammaReader {
29
30 public: 
31
32   AliGammaMCReader() ; // ctor
33   AliGammaMCReader(const AliGammaMCReader & g) ; // cpy ctor
34   AliGammaMCReader & operator = (const AliGammaMCReader & g) ;//cpy assignment
35   virtual ~AliGammaMCReader() {;} //virtual dtor
36
37   enum decay_t {kNoDecay, kGeantDecay, kDecay, kDecayGamma};
38  
39   void InitParameters();
40
41   Bool_t  IsInEMCAL(Double_t phi, Double_t eta) ;
42   Bool_t  IsInPHOS(Double_t phi, Double_t eta) ;
43
44   Int_t    GetDecayPi0Flag() const {return fDecayPi0 ; }
45
46   void Print(const Option_t * opt)const;
47   
48   void SetDecayPi0Flag(Int_t d){ fDecayPi0 = d ; }
49
50   void SetCheckOverlapping(Bool_t check){fCheckOverlapping = check ;}
51   Bool_t IsCheckOverlappingOn() {return fCheckOverlapping ;}
52
53   private:
54   
55   void CaseDecayGamma(Int_t index, TParticle * particle, AliStack * stack,
56                       TClonesArray * plEMCAL, Int_t &indexEMCAL,
57                       TClonesArray * plPHOS, Int_t &indexPHOS);
58   
59   void CaseGeantDecay(TParticle * particle, AliStack * stack,
60                       TClonesArray * plEMCAL, Int_t &indexEMCAL,
61                       TClonesArray * plPHOS, Int_t &indexPHOS);
62   
63   void CasePi0Decay(TParticle * particle, TClonesArray * plEMCAL, Int_t &indexEMCAL,
64                     TClonesArray * plPHOS, Int_t &indexPHOS);
65   
66   void CreateParticleList(TObject * stack, TObject * ,
67                           TClonesArray * plCh, TClonesArray * plEMCAL, 
68                           TClonesArray * plPHOS, TClonesArray * plParton,TClonesArray *,TClonesArray *);
69   
70   void FillListWithDecayGammaOrPi0(TParticle * pPi0, TParticle * pdaug0, TParticle * pdaug1,
71                                    TClonesArray * plEMCAL, Int_t &indexEMCAL,
72                                    TClonesArray * plPHOS, Int_t &indexPHOS);  
73   void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2);//, Double_t &angle);
74   
75   
76   private:
77   
78   Int_t      fDecayPi0; //Decay Pi0.
79   Bool_t   fCheckOverlapping; // if True, check if gammas from decay overlapp in calorimeters.
80   
81   ClassDef(AliGammaMCReader,1)
82 } ;
83
84
85 #endif //ALIGAMMAMCREADER_H
86
87
88