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