9 #ifndef __StGlauberHistogramMaker_h__
10 #define __StGlauberHistogramMaker_h__
28 const TString title,
const TString ytitle,
29 const Int_t ybin,
const Double_t ymin,
const Double_t ymax,
30 const Bool_t isUnitWeight=kTRUE);
40 virtual void Fill(
const Double_t y,
const Double_t weight);
46 virtual void Finish(
const TString type) ;
48 const TString GetName()
const ;
55 const TString mTitle ;
56 const TString mYTitle ;
58 const Double_t mYmin ;
59 const Double_t mYmax ;
60 const Bool_t mIsUnitWeight ;
66 static const TString mXAxisName[mNXaxis] ;
67 static const TString mXAxisTitle[mNXaxis] ;
68 static const Int_t mXAxisBin[mNXaxis] ;
69 static const Double_t mXAxisMax[mNXaxis] ;
71 std::vector<Double_t> mXaxis ;
73 std::vector<TH1*> mHistogram1D ;
74 std::vector<TH2*> mHistogram2D ;
75 std::vector<TProfile*> mProfile ;
76 std::vector<TProfile*> mWeight ;
78 TString mTableDirectory ;
87 void Fill2D(std::vector<TH2*> collection,
const Double_t y,
const Double_t weight) ;
88 void FillProfile(std::vector<TProfile*> collection,
const Double_t y) ;
89 void Fill(
const TString type,
const Double_t y,
const Double_t weight) ;
92 void DoWeightCorrection(std::vector<TH1*> collection1d, std::vector<TProfile*> collectionp) ;
95 void WriteTable(std::vector<TH1*> collection,
const TString name) ;
100 const TString GetHistogramName(
const TString name,
const UInt_t ix)
const ;
101 TH1* GetTH1D(
const TString name,
const UInt_t ix) ;
102 TH2* GetTH2D(
const TString name,
const UInt_t ix) ;
103 TProfile* GetTProfile(
const TString name,
const UInt_t ix,
const TString title=
"Profile") ;
void FillProfile(std::vector< TProfile * > collection, const Double_t y)
void WriteTable(std::vector< TH1 * > collection, const TString name)
Write text table, average quantity vs centrality (table: table_{mName}_vs_centrality.txt)
void SetTableDirectory(const TString directory)
Default destructor.
void SetXaxis(const StGlauberTree &tree, const StCentralityMaker ¢ralityMaker, const TString type)
Initialize histograms.
void DoWeightCorrection(std::vector< TH1 * > collection1d, std::vector< TProfile * > collectionp)
Calculate sum(w*val)/sum(w) for each profile histogram.
virtual void Reset()
Debug flag.
virtual void Fill(const Double_t y, const Double_t weight)
Set X-axis variable.
void DebugOn()
Get histogram name.
void Fill2D(std::vector< TH2 * > collection, const Double_t y, const Double_t weight)
Check xAxis has been filled, abort if empty.
UInt_t GetNXaxis() const
Naxis.
virtual void Finish(const TString type)
Fill histogram 'y' value with 'weight'.
Bool_t IsXaxisOk() const
Reset all data members.
void WriteGraphs(std::vector< TH1 * > collection)
Write TGraphErrors (vs centrality, 0-80%)