]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/AliFlowWeighter.h
First V0 QAing version
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowWeighter.h
CommitLineData
9777bfcb 1//////////////////////////////////////////////////////////////////////
2//
3// $Id$
4//
5// Author: Emanuele Simili
6//
7//////////////////////////////////////////////////////////////////////
8//
9// Description: generates phi-weights and counts particle abundances .
327288af 10// So, in fact, you should run this thing before the analysis,
11// if you want to use phi-weight.
9777bfcb 12//
13//////////////////////////////////////////////////////////////////////
14
327288af 15#ifndef ALIFLOWWEIGHTER_H
16#define ALIFLOWWEIGHTER_H
9777bfcb 17
9777bfcb 18#include <TFile.h>
19#include "AliFlowConstants.h"
20
21class TH1F;
22class TH1D;
23class TOrdCollection;
327288af 24class TVector2;
9777bfcb 25
26class AliFlowTrack;
27class AliFlowV0;
28class AliFlowEvent;
29class AliFlowSelection;
9777bfcb 30
31class AliFlowWeighter {
32
33
34 public:
35
36 AliFlowWeighter(const AliFlowSelection* flowSelect = 0); // Constructor with selection object (default selection if no one given)
37 virtual ~AliFlowWeighter(); // Default destructor (no actions)
38
39 // Steps of the flow analysis
40 Bool_t Init() ; // Books wgt histograms, opens output file
41 Bool_t Finish() ; // Saves histograms, closes stuff
42
43 // Analysis of 1 event (can be called from outside)
44 Bool_t WeightEvent(AliFlowEvent* fFlowEvent = 0) ; // Runs on the event
45
46 // Output
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 ; }
50
327288af 51 void PrintBayesian(Int_t selN = 0) const ; // Prints normalized particle abundance (selN)
9777bfcb 52
53
54 protected:
55
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
59
60
61 private:
62
92016a03 63 // to make the code checker happy
64 AliFlowWeighter(const AliFlowWeighter &flowWgt) ; // Copy Constructor (dummy)
65 AliFlowWeighter &operator=(const AliFlowWeighter &flowAnal) ; // Assignment Operator
327288af 66
9777bfcb 67 // enumerators etc.
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
72
327288af 73 Int_t fPhiBins ; //! phi bins
74 Float_t fPhiMin ; //! i.e. 0
75 Float_t fPhiMax ; //! i.e. 2 Pi
9777bfcb 76
77 // Internal pointers
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
83
84 // PhiWgt File
85 TFile* fWgtFile ; //! phi weight file
86 TString fWgtFileName ; //! Wgt File Name (histograms for weight)
87
88 // Histograms
89 TOrdCollection* fPhiWgtHistList ; //! Weights: histogram list
327288af 90 struct AliHistFullHars
9777bfcb 91 {
327288af 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 ...
9777bfcb 104 };
105
327288af 106 struct AliHistFulls
9777bfcb 107 {
327288af 108 TH1F* fHistBayPidMult ; //! histogram ...
109 struct AliHistFullHars fHistFullHar[AliFlowConstants::kHars]; //! structure wgt, evts, trks, v0s (as defined above)
9777bfcb 110 };
327288af 111 struct AliHistFulls fHistFull[AliFlowConstants::kSels]; //! structure array ...
9777bfcb 112
113 ClassDef(AliFlowWeighter,0) // macro for rootcint
114};
115
116#endif
117
118
119