1 //////////////////////////////////////////////////////////////////////
5 // Author: Emanuele Simili
7 //////////////////////////////////////////////////////////////////////
9 // Description: generates phi-weights and counts particle abundances .
11 //////////////////////////////////////////////////////////////////////
13 #ifndef ALIFLOWEIGHTER_H
14 #define ALIFLOWEIGHTER_H
18 #include "AliFlowConstants.h"
27 class AliFlowSelection;
30 class AliFlowWeighter {
35 AliFlowWeighter(const AliFlowSelection* flowSelect = 0); // Constructor with selection object (default selection if no one given)
36 virtual ~AliFlowWeighter(); // Default destructor (no actions)
38 // Steps of the flow analysis
39 Bool_t Init() ; // Books wgt histograms, opens output file
40 Bool_t Finish() ; // Saves histograms, closes stuff
42 // Analysis of 1 event (can be called from outside)
43 Bool_t WeightEvent(AliFlowEvent* fFlowEvent = 0) ; // Runs on the event
46 void SetWgtFileName(TString name) { fWgtFileName = name ; } // Sets output file name
47 void SetWgtFile(TFile* file) { fWgtFile = file ; fWgtFileName = fWgtFile->GetName() ; } // Sets output file
48 TString GetWgtFileName() const { return fWgtFileName ; }
50 void PrintBayesian(Int_t selN = 0) ; // Prints normalized particle abundance (selN)
55 // Internal methods to fill the histogram
56 void TracksLoop(TObjArray* fFlowTracks) ; // Fills Phi and PId histograms
57 Bool_t Weightening() ; // Calculates weights and fills PhiWgt histograms
63 Int_t fEventNumber ; //! progressive enumeration of AliFlowEvents
64 Int_t fTrackNumber ; //! progressive enumeration of AliFlowTracks
65 Int_t fNumberOfV0s ; //! total number of V0s in the current event
66 Int_t fNumberOfTracks ; //! total number of tracks in the current event
73 AliFlowEvent* fFlowEvent ; //! pointer to AliFlowEvent
74 AliFlowTrack* fFlowTrack ; //! pointer to AliFlowTrack
75 AliFlowSelection* fFlowSelect ; // selection object
76 TObjArray* fFlowTracks ; //! pointer to the TrackCollection
77 //Float_t fVertex[3] ; //! Event's Vertex position
80 TFile* fWgtFile ; //! phi weight file
81 TString fWgtFileName ; //! Wgt File Name (histograms for weight)
84 TOrdCollection* fPhiWgtHistList ; //! Weights: histogram list
91 TH1D* fHistPhiWgtPlus;
92 TH1D* fHistPhiWgtMinus;
95 TH1D* fHistPhiFlatPlus;
96 TH1D* fHistPhiFlatMinus;
97 TH1D* fHistPhiFlatAll;
102 friend struct fHistFulls;
105 TH1F* fHistBayPidMult;
106 struct fHistFullHars fHistFullHar[Flow::nHars]; // wgt, evts, trks, v0s (as defined above)
108 struct fHistFulls fHistFull[Flow::nSels]; //!
110 ClassDef(AliFlowWeighter,0) // macro for rootcint