]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliGammaMCReader.h
mc handler should not be set in the analysis task, but in the startup analysis macro...
[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 class TArrayI ;
22
23 // --- AliRoot system ---
24 #include "AliGammaReader.h" 
25  
26 class AliGammaMCReader : public AliGammaReader {
27
28 public: 
29
30   AliGammaMCReader() ; // ctor
31   AliGammaMCReader(const AliGammaMCReader & g) ; // cpy ctor
32   AliGammaMCReader & operator = (const AliGammaMCReader & g) ;//cpy assignment
33   virtual ~AliGammaMCReader() ;//virtual dtor
34
35   enum DecayType {kNoDecay, kGeantDecay, kDecay, kDecayGamma};
36  
37   void InitParameters();
38
39   Bool_t  IsInEMCAL(Double_t phi, Double_t eta) const ;
40   Bool_t  IsInPHOS(Double_t phi, Double_t eta) const ;
41
42   Int_t    GetDecayPi0Flag() const {return fDecayPi0 ; }
43
44   void Print(const Option_t * opt) const;
45   
46   void SetDecayPi0Flag(Int_t d){ fDecayPi0 = d ; }
47
48   void SetCheckOverlapping(Bool_t check){fCheckOverlapping = check ;}
49   Bool_t IsCheckOverlappingOn() const {return fCheckOverlapping ;}
50
51   void SetPhotonStatus(TParticle* pphoton, TParticle* mother);
52
53   void AddNeutralParticlesArray(TArrayI & array)  
54   { fNeutralParticlesArray   = new TArrayI(array) ; }
55   TArrayI * GetNeutralParticlesArray() const   {return  fNeutralParticlesArray;}
56
57   private:
58   
59   void CaseDecayGamma(Int_t index, TParticle * particle, AliStack * stack,
60                       TClonesArray * plEMCAL, Int_t &indexEMCAL,
61                       TClonesArray * plPHOS, Int_t &indexPHOS);
62   
63   void CaseGeantDecay(TParticle * particle, AliStack * stack,
64                       TClonesArray * plEMCAL, Int_t &indexEMCAL,
65                       TClonesArray * plPHOS, Int_t &indexPHOS);
66   
67   void CasePi0Decay(TParticle * particle, TClonesArray * plEMCAL, Int_t &indexEMCAL,
68                     TClonesArray * plPHOS, Int_t &indexPHOS);
69   
70   void CreateParticleList(TObject * stack, TObject * ,
71                           TClonesArray * plCh, TClonesArray * plEMCAL, 
72                           TClonesArray * plPHOS, TClonesArray * plParton,TClonesArray *,TClonesArray *);
73   
74   void FillListWithDecayGammaOrPi0(TParticle * pPi0, TParticle * pdaug0, TParticle * pdaug1,
75                                    TClonesArray * plEMCAL, Int_t &indexEMCAL,
76                                    TClonesArray * plPHOS, Int_t &indexPHOS);  
77   void MakePi0Decay(TLorentzVector &p0, TLorentzVector &p1, TLorentzVector &p2);//, Double_t &angle);
78   
79   Bool_t SkipNeutralParticles(Int_t pdg) const ;
80  
81   private:
82   
83   Int_t      fDecayPi0; //Options to study pi0 decay
84   Bool_t   fCheckOverlapping; // if True, check if gammas from decay overlapp in calorimeters.
85   TArrayI * fNeutralParticlesArray ; //Do not keep neutral particles of the list.
86  
87   ClassDef(AliGammaMCReader,1)
88 } ;
89
90
91 #endif //ALIGAMMAMCREADER_H
92
93
94