1 //////////////////////////////////////////////////////////////////////
3 // $Id: AliFlowWeighter.h 18618 2007-05-16 15:38:22Z snelling $
5 // Author: Emanuele Simili
7 //////////////////////////////////////////////////////////////////////
9 // Description: generates phi-weights and counts particle abundances .
10 // So, in fact, you should run this thing before the analysis,
11 // if you want to use phi-weight.
13 //////////////////////////////////////////////////////////////////////
15 #ifndef ALIFLOWWEIGHTER_H
16 #define ALIFLOWWEIGHTER_H
19 #include "AliFlowConstants.h"
29 class AliFlowSelection;
31 class AliFlowWeighter {
36 AliFlowWeighter(const AliFlowSelection* flowSelect = 0); // Constructor with selection object (default selection if no one given)
37 virtual ~AliFlowWeighter(); // Default destructor (no actions)
39 // Steps of the flow analysis
40 Bool_t Init() ; // Books wgt histograms, opens output file
41 Bool_t Finish() ; // Saves histograms, closes stuff
43 // Analysis of 1 event (can be called from outside)
44 Bool_t WeightEvent(AliFlowEvent* fFlowEvent = 0) ; // Runs on the event
47 void SetWgtFileName(TString name) { fWgtFileName = name ; } // Sets output file name
48 void SetWgtFile(TFile* file) { fWgtFile = file ; fWgtFileName = fWgtFile->GetName() ; } // Sets output file
49 TString GetWgtFileName() const { return fWgtFileName ; }
51 void PrintBayesian(Int_t selN = 0) const ; // Prints normalized particle abundance (selN)
56 // Internal methods to fill the histogram
57 void TracksLoop(TObjArray* fFlowTracks) ; // Fills Phi and PId histograms
58 Bool_t Weightening() ; // Calculates weights and fills PhiWgt histograms
63 // to make the code checker happy
64 AliFlowWeighter(const AliFlowWeighter &flowWgt) ; // Copy Constructor (dummy)
65 AliFlowWeighter &operator=(const AliFlowWeighter &flowAnal) ; // Assignment Operator
68 Int_t fEventNumber ; //! progressive enumeration of AliFlowEvents
69 Int_t fTrackNumber ; //! progressive enumeration of AliFlowTracks
70 Int_t fNumberOfV0s ; //! total number of V0s in the current event
71 Int_t fNumberOfTracks ; //! total number of tracks in the current event
73 Int_t fPhiBins ; //! phi bins
74 Float_t fPhiMin ; //! i.e. 0
75 Float_t fPhiMax ; //! i.e. 2 Pi
78 AliFlowEvent* fFlowEvent ; //! pointer to AliFlowEvent
79 AliFlowTrack* fFlowTrack ; //! pointer to AliFlowTrack
80 AliFlowSelection* fFlowSelect ; // selection object
81 TObjArray* fFlowTracks ; //! pointer to the TrackCollection
82 //Float_t fVertex[3] ; //! Event's Vertex position
85 TFile* fWgtFile ; //! phi weight file
86 TString fWgtFileName ; //! Wgt File Name (histograms for weight)
89 TOrdCollection* fPhiWgtHistList ; //! Weights: histogram list
90 struct AliHistFullHars
92 TH1D* fHistPhiPlus; //! histogram ...
93 TH1D* fHistPhiMinus; //! histogram ...
94 TH1D* fHistPhiAll; //! histogram ...
95 TH1D* fHistPhi; //! histogram ...
96 TH1D* fHistPhiWgtPlus; //! histogram ...
97 TH1D* fHistPhiWgtMinus; //! histogram ...
98 TH1D* fHistPhiWgtAll; //! histogram ...
99 TH1D* fHistPhiWgt; //! histogram ...
100 TH1D* fHistPhiFlatPlus; //! histogram ...
101 TH1D* fHistPhiFlatMinus; //! histogram ...
102 TH1D* fHistPhiFlatAll; //! histogram ...
103 TH1D* fHistPhiFlat; //! histogram ...
108 TH1F* fHistBayPidMult ; //! histogram ...
109 struct AliHistFullHars fHistFullHar[AliFlowConstants::kHars]; //! structure wgt, evts, trks, v0s (as defined above)
111 struct AliHistFulls fHistFull[AliFlowConstants::kSels]; //! structure array ...
113 ClassDef(AliFlowWeighter,0) // macro for rootcint