]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowMaker.h
new version with selector
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowMaker.h
1 //////////////////////////////////////////////////////////////////////
2 //
3 // $Id$
4 //
5 // Author: Emanuele Simili
6 //
7 //////////////////////////////////////////////////////////////////////
8 //
9 // Description: parser class from AliESD to AliFlowEvent . 
10 //
11 //////////////////////////////////////////////////////////////////////
12
13 #ifndef ALIFLOWMAKER_H
14 #define ALIFLOWMAKER_H
15
16 class AliFlowEvent ;
17 class AliFlowTrack ;
18 class AliFlowV0 ;
19
20 class AliESD ;
21 class AliESDVertex ;
22 class AliESDtrack ;
23 class AliESDv0 ;
24
25 class AliFlowMaker  {
26
27   public:
28     AliFlowMaker();
29     virtual ~AliFlowMaker();
30
31   // FLOW SPECIFIC METHODS (to fill the flowEvents)
32     AliFlowEvent*  FillFlowEvent(AliESD* fESD) ;            // fills up evt quantities 
33     AliFlowTrack*  FillFlowTrack(AliESDtrack* fTrack) ;     // fills up track quantities (global & constrained) ; p.id. & bayesian calculation ; 
34     AliFlowV0*     FillFlowV0(AliESDv0* fV0) ;              // fills up v0 quantities ; links v0 to tracks and back ;
35
36   // USEFULL METHODS
37     Double_t       Norm(Double_t nu[3]) ;                   // norm of a non-vector 3 array      
38     Double_t       Phi(Double_t nu[3]) ;                    // phi of a non-vector 3 array       
39     Double_t       Pt(Double_t nu[3]) ;                     // pt of a non-vector 3 array       
40     Double_t       Eta(Double_t nu[3]) ;                    // eta of a non-vector 3 array       
41
42   // Cut METHODS
43     Bool_t         CheckTrack(AliESDtrack* fTrack) ;        // checks track (applies track cuts)
44     Bool_t         CheckV0(AliESDv0* fV0) ;                 // checks v0 (dummy)
45     Bool_t         CheckEvent(AliESD* fESD) ;               // checks event (dummy)
46     void           PrintCutList() ;                         // prints the list of cuts
47     void           SetNHitsCut(Int_t nHits)                 { fNHits = nHits ; }                        // exclude tracks with less than .. TPC hits 
48     void           SetECut(Float_t eLow, Float_t eUp)       { fElow = eLow ; fEup = eUp ; }             // exclude tracks below and above .. GeV 
49     void           SetLabelCut(Int_t labLo, Int_t labHi)    { fLabel[0] = labLo ; fLabel[1] = labHi ; } // exclude tracks outside label interval
50
51   // Get METHODS
52     Int_t          GetNgoodTracks()                         { return fGoodTracks ; }      
53     Int_t          GetNgoodV0s()                            { return fGoodV0s ; }         
54     Int_t          GetNgoodTracksEta()                      { return fGoodTracksEta ; } 
55     Int_t          GetNposiTracks()                         { return fPosiTracks ; }    
56     Int_t          GetNnegaTracks()                         { return fNegaTracks ; }    
57     Int_t          GetNunconstrained()                      { return fUnconstrained ; } 
58     Int_t          GetBayesian(Int_t i = 2)                 { return fBayesianAll[i] ; }
59     Float_t        GetBayesianNorm(Int_t i = 2)             { return (Float_t)fBayesianAll[i] / (Float_t)fSumAll ; }
60
61  protected:
62  
63   // enumerators                            
64     Int_t            fEventNumber ;                         //! progressive enumeration of ESD events
65     Int_t            fTrackNumber ;                         //! progressive enumeration of ESD tracks
66     Int_t            fV0Number ;                            //! progressive enumeration of ESD V0
67
68     Int_t            fGoodTracks ;                          //! enumerator for good tracks
69     Int_t            fGoodV0s ;                             //! enumerator for good v0s
70     Int_t            fGoodTracksEta ;                       //! enumerator for good tracks in the good eta range (-0.9..0.9)
71     Int_t            fPosiTracks ;                          //! enumerator for positive tracks
72     Int_t            fNegaTracks ;                          //! enumerator for negative tracks
73     Int_t            fUnconstrained ;                       //! enumerator for tracks not constrainable
74     Int_t            fBayesianAll[5] ;                      //! final particles abundance -> AliFlowEvent (see Bayesian P.Id.)
75     Int_t            fSumAll ;                              //! total particles abundance (all kind)
76
77     Int_t            fCutEvts ;                             //! total enumerator for discarded events
78     Int_t            fCutTrks ;                             //! total enumerator for discarded tracks
79     Int_t            fCutV0s ;                              //! total enumerator for discarded V0s
80  
81   // Flags
82     Bool_t           fNewAli ;                              //! enables the new ESD features (since AliRoot 12/2006) 
83     Bool_t           fLoopTrks ;                            //! flag to loop over tracks 
84     Bool_t           fLoopV0s ;                             //! flag to loop over v0s 
85
86     Int_t            fCounter ;                             //! number of processed events
87
88  private:
89
90   // ESDs
91     AliESD*          fESD;                                  //! "ESD" branch in fChain
92     AliESDtrack*     fTrack;                                //! "ESD track" 
93     AliESDv0*        fV0;                                   //! "ESD v0" 
94     AliESDVertex*    fVertex;                               //! "ESD primary vertex"  
95
96     Int_t            fRunID;                                //! last run ID
97     Int_t            fNumberOfEvents ;                      //! total number of ESD events in file
98     Int_t            fNumberOfTracks ;                      //! total number of tracks in the current event
99     Int_t            fNumberOfV0s ;                         //! total number of v0s in the current event
100     Float_t          fMagField ;                            //! magnetic field from the ESD
101
102   // Flow
103     AliFlowEvent*    fFlowEvent ;                           //! pointer to flow event
104     AliFlowTrack*    fFlowTrack;                            //! pointer to flow track
105     AliFlowV0*       fFlowV0;                               //! pointer to flow V0
106
107   // Tracks cuts
108     Int_t   fNHits;                                         // exclude tracks with less than .. TPC hits 
109     Float_t fElow ;                                         // exclude tracks below .. GeV (~total Momentum)
110     Float_t fEup ;                                          // exclude tracks above .. GeV (~total Momentum)
111     Int_t   fLabel[2] ;                                     // exclude tracks outside label interval
112  
113   ClassDef(AliFlowMaker,0);
114 };                      
115
116 #endif