]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FLOW/Attic/AliFlowKineMaker.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FLOW / Attic / AliFlowKineMaker.h
1 //////////////////////////////////////////////////////////////////////
2 //
3 // $Id: AliFlowKineMaker.h 18618 2007-05-16 15:38:22Z snelling $
4 //
5 // Author: Emanuele Simili
6 //
7 //////////////////////////////////////////////////////////////////////
8 //
9 // Description: parser class from KineTree (pure MC simulation) to 
10 //  AliFlowEvent . It does not use the AliRunLoades, but simply 
11 //  gets the KineTree as an imput (a macro mast provide them).
12 //
13 //////////////////////////////////////////////////////////////////////
14
15 #ifndef ALIFLOWKINEMAKER_H
16 #define ALIFLOWKINEMAKER_H
17
18 class AliFlowEvent ;
19 class AliFlowTrack ;
20 class AliFlowV0 ;
21 class TClonesArray ;
22
23 class TParticle ;
24 class TParticlePDG ;
25 class TTree ;
26 //class AliRun ;
27 //class AliRunLoader ;
28 //class AliStack ;
29
30 class AliFlowKineMaker { 
31
32   public:
33   
34     AliFlowKineMaker();
35     virtual ~AliFlowKineMaker();
36
37   // FLOW SPECIFIC METHODS (to fill the flowEvents)
38     AliFlowEvent*  FillFlowEvent(TTree* fKTree) ;          // fills up evt quantities 
39     AliFlowTrack*  FillFlowTrack(TParticle* fParticle) ;   // fills up track quantities ; 
40     AliFlowV0*     FillFlowV0(TParticle* fParticle) ;      // fills up v0 quantities ;
41
42   // USEFULL METHODS
43     Double_t       Norm(Double_t nu[3]) ;                   // norm of a non-vector 3 array      
44     Double_t       Phi(Double_t nu[3]) ;                    // phi of a non-vector 3 array       
45     Double_t       Pt(Double_t nu[3]) ;                     // pt of a non-vector 3 array       
46     Double_t       Eta(Double_t nu[3]) ;                    // eta of a non-vector 3 array       
47
48   // Cut METHODS
49     Bool_t         CheckTrack(TParticle* fParticle) const ; // checks the particle (applies particle cuts, returns the particle charge)
50     Bool_t         CheckEvent(TTree* fKTree) const ;        // checks the KineTree (dummy)
51     void           PrintCutList() ;                         // prints the list of cuts
52
53     void           SetAbsEtaCut(Float_t aEta)               { fAbsEta = aEta ; }                        // exclude tracks with eta > aEta 
54     void           SetECut(Float_t eLow, Float_t eUp)       { fElow = eLow ; fEup = eUp ; }             // exclude tracks below and above .. GeV 
55     void           SetLabelCut(Int_t labLo, Int_t labHi)    { fLabel[0] = labLo ; fLabel[1] = labHi ; } // exclude tracks outside label interval
56     void           SetPrimaryCut(Bool_t prim = kTRUE)       { fPrimary = prim ; }                       // exclude secundaries 
57
58   // Get METHODS
59     Int_t          GetNgoodTracks() const                   { return fGoodTracks ; }      
60     Int_t          GetNgoodV0s() const                      { return fGoodV0s ; }         
61     Int_t          GetNgoodTracksEta() const                { return fGoodTracksEta ; } 
62     Int_t          GetNposiTracks() const                   { return fPosiTracks ; }    
63     Int_t          GetNnegaTracks() const                   { return fNegaTracks ; }    
64     Int_t          GetNunconstrained()  const               { return fUnconstrained ; } 
65     Int_t          GetBayesian(Int_t i = 2) const           { return fBayesianAll[i] ; }
66     Float_t        GetBayesianNorm(Int_t i = 2) const       { return (Float_t)fBayesianAll[i] / (Float_t)fSumAll ; }
67
68
69  protected:
70  
71   // enumerators                            
72     Int_t            fEventNumber ;                         //! progressive enumeration of KineTree events
73     Int_t            fPartNumber ;                          //! progressive enumeration of TParticle
74
75     Int_t            fGoodTracks ;                          //! enumerator for good tracks
76     Int_t            fGoodV0s ;                             //! enumerator for good v0s
77     Int_t            fGoodTracksEta ;                       //! enumerator for good tracks in the good eta range (-0.9..0.9)
78     Int_t            fPosiTracks ;                          //! enumerator for positive tracks
79     Int_t            fNegaTracks ;                          //! enumerator for negative tracks
80     Int_t            fUnconstrained ;                       //! enumerator for tracks not constrainable
81     Int_t            fBayesianAll[6] ;                      //! final particles abundance -> AliFlowEvent (see Bayesian P.Id.)
82     Int_t            fSumAll ;                              //! total particles abundance (all kind)
83
84     Int_t            fCutEvts ;                             //! total enumerator for discarded events
85     Int_t            fCutParts ;                            //! total enumerator for discarded particles
86
87   // Flags
88     Bool_t           fNewAli ;                              //! enables the new features (since AliRoot 12/2006) 
89     Bool_t           fLoopParts ;                           //! flag to loop over tracks 
90
91     Int_t            fCounter ;                             //! number of processed events
92
93
94  private:
95
96   // to make the code checker happy
97    AliFlowKineMaker(const AliFlowKineMaker &flowMak) ;            // Copy Constructor (dummy)
98    AliFlowKineMaker &operator=(const AliFlowKineMaker &flowMak) ; // Assignment Operator (dummy)
99
100   // KineTree stuff
101     TTree*           fKTree ;                               //! KineTree
102     TParticle*       fParticle ;                            //! TParticle (momentum, decay, etc.)
103     TParticlePDG*    fParticlePDG ;                         //! TParticlePDG (type, charge, etc.)
104     Int_t            fCharge ;                              //! charge of the TParticlePDG
105     Float_t          fVertex[3] ;                           //! primary vertex  
106 //    AliStack*        fStack ;                             //! particle stack
107 //    AliRunLoader*    fRunLoader ;                         //! AliRunLoader
108 //    AliRun*          gAlice ;                             //! pointer to the AliRun (gAlice)
109
110     Int_t            fRunID;                                //! last run ID
111     Int_t            fNumberOfEvents ;                      //! total number of KineTree events in file
112     Int_t            fNumberOfParticles ;                   //! total number of TParticles in the current event
113     Float_t          fMagField ;                            //! magnetic field from the ESD
114
115   // Flow
116     AliFlowEvent*    fFlowEvent ;                           //! pointer to flow event
117     AliFlowTrack*    fFlowTrack;                            //! pointer to flow track
118     AliFlowV0*       fFlowV0;                               //! pointer to flow V0
119
120   // Tracks cuts
121     Float_t fAbsEta;                                        // exclude tracks with |eta| bigger than 
122     Float_t fElow ;                                         // exclude tracks below .. GeV (~total Momentum)
123     Float_t fEup ;                                          // exclude tracks above .. GeV (~total Momentum)
124     Int_t   fLabel[2] ;                                     // exclude tracks outside label interval
125     Bool_t  fPrimary ;                                      // exclude secundary tracks 
126     
127   ClassDef(AliFlowKineMaker,1);
128 };                      
129
130 #endif
131