]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliSelectorFlow.h
Adding needed includes
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliSelectorFlow.h
1 /* $Id$ */
2 /* derived from AliSelector.h,v 1.10 2006/08/15 jgrosseo Exp $ */
3
4 // This selector is only dependent on the ESD library, if you need the whole of AliROOT use AliSelectorRL
5 #ifndef ALISELECTORFLOW_H
6 #define ALISELECTORFLOW_H
7
8 // ANSI things
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <iostream>
12 #include <vector>
13
14 // ROOT things
15 #include <TROOT.h>
16 #include <TSelector.h>
17 #include <TVector3.h>
18 #include <TVector.h>
19 #include <TObject.h>
20 #include <TString.h>
21 #include <TObjArray.h>
22 #include <TFile.h>
23 #include <TTree.h>
24 #include <TChain.h>
25 #include <TParticlePDG.h>
26 #include <TDatabasePDG.h>
27
28 // // AliRoot things
29 // #include "AliESD.h"
30 // #include "AliESDtrack.h"
31 // #include "AliKalmanTrack.h"
32 // #include "AliITStrackV2.h"
33 // #include "AliESDVertex.h"
34 // #include "AliESDv0.h"
35
36 // FLOW things
37 #include "AliFlowEvent.h"
38 #include "AliFlowConstants.h"
39
40 class TFile;
41 class TChain;
42 class TTree;
43 class TParticle;
44
45 class AliESD;
46 class AliESDtrack;
47 class AliESDv0;
48
49 class AliSelectorFlow : public TSelector {
50
51   public:
52     AliSelectorFlow();
53     virtual ~AliSelectorFlow();
54
55     virtual Int_t   Version() const {return 1;}
56     virtual void    Begin(TTree*);
57     virtual void    SlaveBegin(TTree* tree);
58     virtual void    Init(TTree *tree);
59     virtual Bool_t  Notify();
60     virtual Bool_t  Process(Long64_t entry);
61     virtual void    SlaveTerminate();
62     virtual void    Terminate();
63
64   // output file name
65     //void    SetFlowEventFileName(TString name) ;
66     //TString GetFlowEventFileName() ;
67
68   // FLOW SPECIFIC METHODS (to fill the flowEvents)
69     AliFlowEvent*       FillFlowEvent(AliESD* fESD) ;            // fills up evt quantities 
70     AliFlowTrack*       FillFlowTrack(AliESDtrack* fTrack) ;     // fills up track quantities (global & constrained) ; p.id. & bayesian calculation ; 
71     AliFlowV0*          FillFlowV0(AliESDv0* fV0) ;              // fills up v0 quantities ; links v0 to tracks and back ;
72
73   // USEFULL METHODS (to use 3-arrays)
74     Double_t       Norm(Double_t nu[3]) ;                        // norm of a non-vector 3 array      
75     Double_t       Phi(Double_t nu[3]) ;                         // phi of a non-vector 3 array       
76     Double_t       Pt(Double_t nu[3]) ;                          // pt of a non-vector 3 array       
77     Double_t       Eta(Double_t nu[3]) ;                         // eta of a non-vector 3 array       
78
79  protected:
80     TTree*  GetKinematics();
81     void CheckOptions();
82
83     TTree       *fTree;           //! pointer to the TTree containing the events
84     AliESD*          fESD;                //! "ESD" branch in fChain
85     AliESDtrack*     fTrack;              //! "ESD track" 
86     AliESDv0*        fV0;                 //! "ESD v0" 
87     Int_t            fCountFiles ;        // number of processed file
88     TString          fFlowEventFileName ; //! output file name 
89
90  private:
91
92     TFile*        pFlowfile ;
93     AliFlowEvent* pFlowEvent ;          //! pointer to flow event
94     AliFlowTrack* pFlowTrack;           //! pointer to flow track
95     AliFlowV0*    pFlowV0;              //! pointer to flow V0
96  
97   // enumerators                             
98     Int_t       fRunID;                 //! last run ID
99     Int_t       fEventNumber ;          //! progressive enumeration of ESD events
100     Int_t       fTrackNumber ;          //! progressive enumeration of ESD tracks
101     Int_t       fV0Number ;             //! progressive enumeration of ESD V0
102     Int_t       fNumberOfEvents ;       //! total number of ESD events in file
103     Int_t       fNumberOfTracks ;       //! total number of tracks in the current event
104     Int_t       fNumberOfV0s ;          //! total number of v0s in the current event
105   // other enumerators                       
106     Int_t       fGoodTracks ;           //! enumerator for good tracks
107     Int_t       fGoodV0s ;              //! enumerator for good v0s
108     Int_t       fGoodTracksEta ;        //! enumerator for good tracks in the good eta range (-0.9..0.9)
109     Int_t       fPosiTracks ;           //! enumerator for positive tracks
110     Int_t       fNegaTracks ;           //! enumerator for negative tracks
111     Int_t       fUnconstrained ;        //! enumerator for tracks not constrainable
112     Int_t       fBayesianAll[5] ;       //! final particles abundance -> AliFlowEvent (see Bayesian P.Id.)
113     Int_t       fSumAll ;               //! total particles abundance (all kind)
114
115     Int_t       fCutEvts ;              //! total enumerator for discarded events
116     Int_t       fCutTrks ;              //! total enumerator for discarded tracks
117     Int_t       fCutV0s ;               //! total enumerator for discarded V0s
118  
119   // Flags
120     Bool_t      fLoopV0 ;               //! flag to loop over v0s 
121     Bool_t      fDoNothing ;            //! flag for a dummy execution 
122     Bool_t      fOnFlyAnalysis ;        //! flag for on-fly analysis 
123
124   // Cuts
125     Float_t fEtrkLow ;
126     Float_t fEtrkHig ;
127     Int_t   fHitsTrk ;
128
129   // ...
130     Float_t     fMagField ;             //! magnetic field from the ESD
131  
132  
133     void DeleteKinematicsFile();
134
135     TFile*        fKineFile;            //! pointer to Kinematics.root if the file was opened
136
137     AliSelectorFlow(const AliSelectorFlow&);
138     AliSelectorFlow& operator=(const AliSelectorFlow&);
139
140   ClassDef(AliSelectorFlow,0);
141 };
142
143 #endif