2 /* derived from AliSelector.h,v 1.10 2006/08/15 jgrosseo Exp $ */
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
16 #include <TSelector.h>
21 #include <TObjArray.h>
25 #include <TParticlePDG.h>
26 #include <TDatabasePDG.h>
29 // #include "AliESD.h"
30 // #include "AliESDtrack.h"
31 // #include "AliKalmanTrack.h"
32 // #include "AliITStrackV2.h"
33 // #include "AliESDVertex.h"
34 // #include "AliESDv0.h"
37 #include "AliFlowEvent.h"
38 #include "AliFlowConstants.h"
49 class AliSelectorFlow : public TSelector {
53 virtual ~AliSelectorFlow();
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();
65 //void SetFlowEventFileName(TString name) ;
66 //TString GetFlowEventFileName() ;
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 ;
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
80 TTree* GetKinematics();
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
93 AliFlowEvent* pFlowEvent ; //! pointer to flow event
94 AliFlowTrack* pFlowTrack; //! pointer to flow track
95 AliFlowV0* pFlowV0; //! pointer to flow V0
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
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)
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
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
130 Float_t fMagField ; //! magnetic field from the ESD
133 void DeleteKinematicsFile();
135 TFile* fKineFile; //! pointer to Kinematics.root if the file was opened
137 AliSelectorFlow(const AliSelectorFlow&);
138 AliSelectorFlow& operator=(const AliSelectorFlow&);
140 ClassDef(AliSelectorFlow,0);