]>
Commit | Line | Data |
---|---|---|
dc1455ee | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | /* $Id$ */ | |
4 | ||
51e6bc5a | 5 | /* Author: Redmer Alexander Bertens, rbertens@cern.ch, rbertens@nikhef.nl, r.a.bertens@uu.nl |
6 | * see implementation for additional information */ | |
7 | ||
dc1455ee | 8 | #ifndef AliJetFlowTools_H |
9 | #define AliJetFlowTools_H | |
10 | ||
549b5f40 | 11 | // root forward declarations |
4292ca60 | 12 | class TF1; |
e4b6d21a | 13 | class TF2; |
dc1455ee | 14 | class TH1D; |
15 | class TH2D; | |
d7ec324f | 16 | class TCanvas; |
dc1455ee | 17 | class TString; |
18 | class TArrayD; | |
53547ff2 | 19 | class TGraph; |
dc1455ee | 20 | class TGraphErrors; |
21 | class TObjArray; | |
4292ca60 | 22 | // aliroot forward declarations |
23 | class AliAnaChargedJetResponseMaker; | |
24 | class AliUnfolding; | |
25 | // root includes | |
dc1455ee | 26 | #include "TMatrixD.h" |
27 | #include "TList.h" | |
ad04a83c | 28 | #include "TDirectoryFile.h" |
dc1455ee | 29 | #include "TFile.h" |
4292ca60 | 30 | #include "TProfile.h" |
d7ec324f | 31 | #include "TVirtualPad.h" |
a39e4b2b | 32 | #include "TPaveText.h" |
33 | #include "TLegend.h" | |
20bd6574 | 34 | #include "TLatex.h" |
dc1455ee | 35 | //_____________________________________________________________________________ |
36 | class AliJetFlowTools { | |
37 | public: | |
38 | AliJetFlowTools(); | |
39 | protected: | |
53547ff2 RAB |
40 | ~AliJetFlowTools(); // not implemented (deliberately). object ownership is a bit messy in this class |
41 | // since most (or all) of the objects are owned by the input and output files | |
dc1455ee | 42 | public: |
51e6bc5a | 43 | // enumerators |
549b5f40 RAB |
44 | enum unfoldingAlgorithm { // type of unfolding alrogithm |
45 | kChi2, // chi^2 unfolding, implemented in AliUnfolding | |
46 | kBayesian, // Bayesian unfolding, implemented in RooUnfold | |
47 | kBayesianAli, // Bayesian unfolding, implemented in AliUnfolding | |
48 | kSVD, // SVD unfolding, implemented in RooUnfold | |
49 | kNone }; // no unfolding | |
50 | enum prior { // prior that is used for unfolding | |
51 | kPriorChi2, // prior from chi^2 method | |
18698978 | 52 | kPriorMeasured, // use measured spectrum as prior |
53 | kPriorPythia }; // use pythia spectrum as prior | |
549b5f40 | 54 | enum histoType { // histogram identifier, only used internally |
18698978 | 55 | kInPlaneSpectrum, // default style for spectrum |
53547ff2 RAB |
56 | kOutPlaneSpectrum, |
57 | kUnfoldedSpectrum, | |
58 | kFoldedSpectrum, | |
59 | kMeasuredSpectrum, | |
18698978 | 60 | kBar, // default style for bar histogram |
a39e4b2b | 61 | kRatio, // default style for ratio |
62 | kV2, // default style for v2 | |
6c3fa11d | 63 | kDeltaPhi, // default for delta phi |
18698978 | 64 | kEmpty }; // default style |
ef12d5a5 | 65 | // setters, interface to the class |
4292ca60 | 66 | void SetSaveFull(Bool_t b) {fSaveFull = b;} |
67 | void SetInputList(TList* list) { | |
68 | fInputList = list; | |
69 | fRefreshInput = kTRUE; | |
70 | } | |
dc1455ee | 71 | void SetOutputFileName(TString name) {fOutputFileName = name;} |
72 | void CreateOutputList(TString name) { | |
73 | // create a new output list and add it to the full output | |
ad04a83c | 74 | if(!fOutputFile) fOutputFile = new TFile(fOutputFileName.Data(), "RECREATE"); |
75 | fOutputFile->cd(); // avoid nested dirs | |
ef12d5a5 | 76 | if(name.EqualTo(fActiveString)) { |
77 | printf(Form(" > Warning, duplicate output list, renaming %s to %s_2 ! < \n", name.Data(), name.Data())); | |
78 | name+="_2"; | |
79 | } | |
dc1455ee | 80 | fActiveString = name; |
ad04a83c | 81 | fActiveDir = new TDirectoryFile(fActiveString.Data(), fActiveString.Data()); |
82 | fActiveDir->cd(); | |
dc1455ee | 83 | } |
c03f7598 | 84 | void SetCentralityBin(Int_t bin) { |
85 | // in case of one centraltiy | |
86 | fCentralityArray = new TArrayI(1); | |
87 | fCentralityArray->AddAt(bin, 0); | |
88 | // for one centrality there's no need for weights | |
89 | fCentralityWeights = new TArrayD(1); | |
90 | fCentralityWeights->AddAt(1., 0); | |
91 | } | |
1e01bfd6 | 92 | void SetMergeSpectrumBins(TArrayI* a) {fMergeBinsArray = a;} |
67d11165 | 93 | void SetCentralityBin(TArrayI* bins) { |
94 | fCentralityArray = bins; | |
c03f7598 | 95 | } |
96 | void SetCentralityWeight(TArrayD* weights) { | |
97 | fCentralityWeights = weights; | |
98 | if(!fCentralityArray) printf(" > Warning: centrality weights set, but bins are not defined! \n"); | |
67d11165 | 99 | } |
549b5f40 RAB |
100 | void SetDetectorResponse(TH2D* dr) {fDetectorResponse = dr;} |
101 | void SetJetFindingEfficiency(TH1D* e) {fJetFindingEff = e;} | |
102 | void SetBinsTrue(TArrayD* bins) {fBinsTrue = bins;} | |
103 | void SetBinsRec(TArrayD* bins) {fBinsRec = bins;} | |
104 | void SetBinsTruePrior(TArrayD* bins) {fBinsTruePrior = bins;} | |
105 | void SetBinsRecPrior(TArrayD* bins) {fBinsRecPrior = bins;} | |
106 | void SetSVDReg(Int_t r) {fSVDRegIn = r; fSVDRegOut = r;} | |
107 | void SetSVDReg(Int_t in, Int_t out) {fSVDRegIn = in; fSVDRegOut = out;} | |
108 | void SetSVDToy(Bool_t b, Float_t r) {fSVDToy = b; fJetRadius = r;} | |
109 | void SetBeta(Double_t b) {fBetaIn = b; fBetaOut = b;} | |
110 | void SetBeta(Double_t i, Double_t o) {fBetaIn = i; fBetaOut = o;} | |
111 | void SetBayesianIter(Int_t i) {fBayesianIterIn = i; fBayesianIterOut = i;} | |
112 | void SetBayesianIter(Int_t i, Int_t o) {fBayesianIterIn = i; fBayesianIterOut = o;} | |
113 | void SetBayesianSmooth(Float_t s) {fBayesianSmoothIn = s; fBayesianSmoothOut = s;} | |
114 | void SetBayesianSmooth(Float_t i, Float_t o) {fBayesianSmoothIn = i; fBayesianSmoothOut = o;} | |
115 | void SetAvoidRoundingError(Bool_t r) {fAvoidRoundingError = r;} | |
116 | void SetUnfoldingAlgorithm(unfoldingAlgorithm ua) {fUnfoldingAlgorithm = ua;} | |
117 | void SetPrior(prior p) {fPrior = p;} | |
18698978 | 118 | void SetPrior(prior p, TH1D* spectrum) {fPrior = p; fPriorUser = spectrum;} |
549b5f40 RAB |
119 | void SetNormalizeSpectra(Bool_t b) {fNormalizeSpectra = b;} |
120 | void SetNormalizeSpectra(Int_t e) { // use to normalize to this no of events | |
121 | fEventCount = e; | |
122 | fNormalizeSpectra = kFALSE; | |
4292ca60 | 123 | } |
549b5f40 RAB |
124 | void SetSmoothenPrior(Bool_t b, Float_t min = 50., Float_t max = 100., Float_t start= 75., Bool_t counts = kTRUE) { |
125 | fSmoothenPrior = b; | |
4292ca60 | 126 | fFitMin = min; |
127 | fFitMax = max; | |
128 | fFitStart = start; | |
549b5f40 | 129 | fSmoothenCounts = counts; |
4292ca60 | 130 | } |
549b5f40 | 131 | void SetTestMode(Bool_t t) {fTestMode = t;} |
ef12d5a5 | 132 | void SetEventPlaneResolution(Double_t r) {fEventPlaneRes = r;} |
133 | void SetUseDetectorResponse(Bool_t r) {fUseDetectorResponse = r;} | |
549b5f40 RAB |
134 | void SetUseDptResponse(Bool_t r) {fUseDptResponse = r;} |
135 | void SetTrainPowerFit(Bool_t t) {fTrainPower = t;} | |
486fb24e | 136 | void SetDphiUnfolding(Bool_t i) {fDphiUnfolding = i;} |
137 | void SetDphiDptUnfolding(Bool_t i) {fDphiDptUnfolding = i;} | |
138 | void SetExLJDpt(Bool_t i) {fExLJDpt = i;} | |
139 | void SetWeightFunction(TF1* w) {fResponseMaker->SetRMMergeWeightFunction(w);} | |
3e698d27 | 140 | void SetRMS(Bool_t r) {fRMS = r;} |
141 | void SetSymmRMS(Bool_t r) {fSymmRMS = r; fRMS = r;} | |
6c3fa11d | 142 | void SetRho0(Bool_t r) {fRho0 = r;} |
dc1455ee | 143 | void Make(); |
486fb24e | 144 | void MakeAU(); // test function, use with caution (09012014) |
4292ca60 | 145 | void Finish() { |
146 | fOutputFile->cd(); | |
5e11c41c | 147 | if(fRMSSpectrumIn) fRMSSpectrumIn->Write(); |
148 | if(fRMSSpectrumOut) fRMSSpectrumOut->Write(); | |
149 | if(fRMSRatio) fRMSRatio->Write(); | |
4292ca60 | 150 | fOutputFile->Close();} |
53547ff2 RAB |
151 | void PostProcess( |
152 | TString def, | |
486fb24e | 153 | Int_t columns = 4, |
87233f72 | 154 | Float_t rangeLow = 20, |
155 | Float_t rangeUp = 80, | |
53547ff2 | 156 | TString in = "UnfoldedSpectra.root", |
486fb24e | 157 | TString out = "ProcessedSpectra.root") const; |
a39e4b2b | 158 | void GetNominalValues( |
159 | TH1D*& ratio, | |
160 | TGraphErrors*& v2, | |
161 | TArrayI* in, | |
162 | TArrayI* out, | |
163 | TString inFile = "UnfoldedSpectra.root", | |
164 | TString outFile = "Nominal.root") const; | |
18698978 | 165 | void GetCorrelatedUncertainty( |
a39e4b2b | 166 | TGraphAsymmErrors*& corrRatio, |
167 | TGraphAsymmErrors*& corrV2, | |
f3ba6c8e | 168 | TArrayI* variationsIn, |
169 | TArrayI* variationsOut, | |
7b88bd32 | 170 | Bool_t sym, |
98d5b614 | 171 | TArrayI* variantions2ndIn, |
172 | TArrayI* variantions2ndOut, | |
7b88bd32 | 173 | Bool_t sym2nd, |
18698978 | 174 | TString type = "", |
24005d85 | 175 | TString type2 = "", |
f3ba6c8e | 176 | Int_t columns = 4, |
177 | Float_t rangeLow = 20, | |
178 | Float_t rangeUp = 80, | |
5159ed9e | 179 | Float_t corr = .5, |
f3ba6c8e | 180 | TString in = "UnfoldedSpectra.root", |
18698978 | 181 | TString out = "CorrelatedUncertainty.root") const; |
182 | void GetShapeUncertainty( | |
a39e4b2b | 183 | TGraphAsymmErrors*& shapeRatio, |
184 | TGraphAsymmErrors*& shapeV2, | |
18698978 | 185 | TArrayI* regularizationIn, |
186 | TArrayI* regularizationOut, | |
187 | TArrayI* trueBinIn = 0x0, | |
188 | TArrayI* trueBinOut = 0x0, | |
189 | TArrayI* recBinIn = 0x0, | |
190 | TArrayI* recBinOut = 0x0, | |
b2150106 | 191 | TArrayI* methodIn = 0x0, |
192 | TArrayI* methodOut = 0x0, | |
18698978 | 193 | Int_t columns = 4, |
194 | Float_t rangeLow = 20, | |
195 | Float_t rangeUp = 80, | |
196 | TString in = "UnfoldedSpectra.root", | |
197 | TString out = "ShapeUncertainty.root") const; | |
4292ca60 | 198 | Bool_t SetRawInput ( |
199 | TH2D* detectorResponse, // detector response matrix | |
200 | TH1D* jetPtIn, // in plane jet spectrum | |
201 | TH1D* jetPtOut, // out of plane jet spectrum | |
202 | TH1D* dptIn, // in plane delta pt distribution | |
203 | TH1D* dptOut, // out of plane delta pt distribution | |
204 | Int_t eventCount = 0); // event count (optional) | |
dc1455ee | 205 | // static const helper functions, mainly histogram manipulation |
206 | static TH1D* ResizeXaxisTH1D(TH1D* histo, Int_t low, Int_t up, TString suffix = ""); | |
207 | static TH2D* ResizeYaxisTH2D(TH2D* histo, TArrayD* x, TArrayD* y, TString suffix = ""); | |
512ced40 | 208 | static TH2D* NormalizeTH2D(TH2D* histo, Bool_t noError = kTRUE); |
53547ff2 | 209 | static TH1D* RebinTH1D(TH1D* histo, TArrayD* bins, TString suffix = "", Bool_t kill = kTRUE); |
4292ca60 | 210 | TH2D* RebinTH2D(TH2D* histo, TArrayD* binsTrue, TArrayD* binsRec, TString suffix = ""); |
d7ec324f | 211 | static TH2D* MatrixMultiplication(TH2D* a, TH2D* b, TString name = "CombinedResponse"); |
dc1455ee | 212 | static TH1D* NormalizeTH1D(TH1D* histo, Double_t scale = 1.); |
1e01bfd6 | 213 | static TH1D* MergeSpectrumBins(TArrayI* bins, TH1D* spectrum, TH2D* corr); |
4292ca60 | 214 | static TGraphErrors* GetRatio(TH1 *h1 = 0x0, TH1* h2 = 0x0, TString name = "", Bool_t appendFit = kFALSE, Int_t xmax = -1); |
35c03ef1 | 215 | static TGraphErrors* GetV2(TH1* h1 = 0x0, TH1* h2 = 0x0, Double_t r = 0., TString name = ""); |
1e01bfd6 | 216 | void ReplaceBins(TArrayI* array, TGraphAsymmErrors* graph); |
217 | void ReplaceBins(TArrayI* array, TGraphErrors* graph); | |
a39e4b2b | 218 | TGraphAsymmErrors* GetV2WithSystematicErrors( |
219 | TH1* h1, TH1* h2, Double_t r, TString name, | |
220 | TH1* relativeErrorInUp, | |
221 | TH1* relativeErrorInLow, | |
222 | TH1* relativeErrorOutUp, | |
24af86e7 | 223 | TH1* relativeErrorOutLow, |
224 | Float_t rho = 0.) const; | |
1e01bfd6 | 225 | static void GetSignificance( |
226 | TGraphErrors* n, // points with stat error | |
227 | TGraphAsymmErrors* shape, // points with shape error | |
228 | TGraphAsymmErrors* corr, // points with stat error | |
229 | Int_t low, // pt lower level | |
230 | Int_t up // pt upper level | |
231 | ); | |
e4b6d21a | 232 | static void MinimizeChi22d(); |
233 | static Double_t PhenixChi22d(const Double_t *xx ); | |
234 | static Double_t ConstructFunction2d(Double_t *x, Double_t *par); | |
235 | static TF2* ReturnFunction2d(); | |
a5ecaabe | 236 | static void MinimizeChi2nd(); |
237 | static Double_t PhenixChi2nd(const Double_t *xx ); | |
238 | static Double_t ConstructFunctionnd(Double_t *x, Double_t *par); | |
1e01bfd6 | 239 | static void MinimizeChi2(); |
a5ecaabe | 240 | static TF2* ReturnFunctionnd(); |
1e01bfd6 | 241 | static Double_t PhenixChi2(const Double_t *xx ); |
e4b6d21a | 242 | static Double_t ConstructFunction(Double_t *x, Double_t *par); |
243 | static TF1* ReturnFunction(); | |
549b5f40 | 244 | static void WriteObject(TObject* object, TString suffix = "", Bool_t kill = kTRUE); |
4292ca60 | 245 | static TH2D* ConstructDPtResponseFromTH1D(TH1D* dpt, Bool_t AvoidRoundingError); |
ef12d5a5 | 246 | static TH2D* GetUnityResponse(TArrayD* binsTrue, TArrayD* binsRec, TString suffix = ""); |
549b5f40 | 247 | void SaveConfiguration(Bool_t convergedIn, Bool_t convergedOut) const; |
d7ec324f | 248 | static TMatrixD* CalculatePearsonCoefficients(TMatrixD* covmat); |
549b5f40 | 249 | static TH1D* SmoothenPrior(TH1D* spectrum, TF1* function, Double_t min, Double_t max, Double_t start, Bool_t kill = kTRUE, Bool_t counts = kTRUE); |
18698978 | 250 | // set style |
251 | void SetTitleFontSize(Double_t s) {fTitleFontSize = s;} | |
20bd6574 | 252 | static void Style(Bool_t legacy = kFALSE); |
d7ec324f | 253 | static void Style(TCanvas* c, TString style = "PEARSON"); |
20bd6574 | 254 | static void Style(TVirtualPad* c, TString style = "SPECTRUM", Bool_t legacy = kFALSE); |
53547ff2 | 255 | static void Style(TLegend* l); |
20bd6574 | 256 | static void Style(TH1* h, EColor col = kBlue, histoType = kEmpty, Bool_t legacy = kFALSE); |
257 | static void Style(TGraph* h, EColor col = kBlue, histoType = kEmpty, Bool_t legacy = kFALSE); | |
a39e4b2b | 258 | static TLegend* AddLegend(TVirtualPad* p, Bool_t style = kFALSE) { |
259 | if(!style) return p->BuildLegend(.565, .663, .882, .883); | |
260 | else { | |
261 | TLegend* l = AddLegend(p, kFALSE); | |
262 | Style(l); | |
263 | return l; | |
264 | } | |
265 | } | |
e4b6d21a | 266 | static TPaveText* AddTPaveText( |
267 | // this text appears under the logo | |
268 | TString text, | |
269 | Int_t r = 2, | |
270 | Double_t a = .587, | |
271 | Double_t b = .695, | |
272 | Double_t c = .872, | |
273 | Double_t d = .801) { | |
274 | TPaveText* t(new TPaveText(a, b, c, d, "NDC")); | |
a39e4b2b | 275 | t->SetFillColor(0); |
276 | t->SetBorderSize(0); | |
277 | t->AddText(0.,0.,text.Data()); | |
e4b6d21a | 278 | t->AddText(0., 0., Form("#it{R} = 0.%i anti-#it{k}_{T}, |#eta_{jet}|<%.1f", r, .9-r/10.)); |
a39e4b2b | 279 | t->SetTextColor(kBlack); |
a39e4b2b | 280 | t->SetTextFont(42); |
e4b6d21a | 281 | t->SetTextSize(gStyle->GetTextSize()*.8); |
a39e4b2b | 282 | t->Draw("same"); |
283 | return t; | |
284 | } | |
e4b6d21a | 285 | static TPaveText* AddText( |
286 | TString text, | |
287 | EColor col, | |
288 | Double_t a = .2098, | |
289 | Double_t b = .5601, | |
290 | Double_t c = .613, | |
291 | Double_t d = .6211) { | |
292 | TPaveText* t(new TPaveText(a, b, c, d, "NDC")); | |
d06dbffe | 293 | t->SetFillColor(0); |
294 | t->SetBorderSize(0); | |
295 | t->AddText(0.,0.,text.Data()); | |
296 | t->SetTextColor(col); | |
d06dbffe | 297 | t->SetTextFont(42); |
e4b6d21a | 298 | t->SetTextSize(gStyle->GetTextSize()*.8); |
d06dbffe | 299 | t->Draw("same"); |
300 | return t; | |
301 | } | |
14ce5e08 | 302 | static TLatex* AddLogo(Int_t logo, Double_t xmin = .59, Double_t ymax = .81) { |
303 | if(logo == 0) return AddTLatex(xmin, ymax, "ALICE"); | |
304 | else if (logo == 1) return AddTLatex(xmin, ymax, "ALICE Preliminary"); | |
305 | else if (logo == 2) return AddTLatex(xmin, ymax, "ALICE Simulation"); | |
306 | return 0x0; | |
20bd6574 | 307 | } |
308 | static TLatex* AddSystem() { | |
309 | return AddTLatex(0.55, 87, "Pb-Pb #sqrt{#it{s}}}_{NN} = 2.76 TeV"); | |
310 | } | |
311 | static TLatex* AddTLatex(Double_t xmin, Double_t ymax, TString string) { | |
312 | TLatex* tex = new TLatex(xmin, ymax, string.Data()); | |
313 | tex->SetNDC(); | |
314 | tex->SetTextFont(42); | |
315 | tex->Draw("same"); | |
316 | return tex; | |
317 | } | |
d06dbffe | 318 | |
512ced40 | 319 | static void SavePadToPDF(TVirtualPad* pad) {pad->SaveAs(Form("%s.pdf", pad->GetName()));} |
4292ca60 | 320 | // interface to AliUnfolding, not necessary but nice to have all parameters in one place |
321 | static void SetMinuitStepSize(Float_t s) {AliUnfolding::SetMinuitStepSize(s);} | |
322 | static void SetMinuitPrecision(Float_t s) {AliUnfolding::SetMinuitPrecision(s);} | |
323 | static void SetMinuitPrecision(Int_t i) {AliUnfolding::SetMinuitMaxIterations(i);} | |
324 | static void SetMinuitStrategy(Double_t s) {AliUnfolding::SetMinuitStrategy(s);} | |
325 | static void SetDebug(Int_t d) {AliUnfolding::SetDebug(d);} | |
dc1455ee | 326 | private: |
327 | Bool_t PrepareForUnfolding(); | |
486fb24e | 328 | Bool_t PrepareForUnfolding(Int_t low, Int_t up); |
549b5f40 RAB |
329 | TH1D* GetPrior( const TH1D* measuredJetSpectrum, |
330 | const TH2D* resizedResponse, | |
331 | const TH1D* kinematicEfficiency, | |
332 | const TH1D* measuredJetSpectrumTrueBins, | |
333 | const TString suffix, | |
334 | const TH1D* jetFindingEfficiency); | |
486fb24e | 335 | TH1D* UnfoldWrapper( const TH1D* measuredJetSpectrum, |
336 | const TH2D* resizedResponse, | |
337 | const TH1D* kinematicEfficiency, | |
338 | const TH1D* measuredJetSpectrumTrueBins, | |
339 | const TString suffix, | |
340 | const TH1D* jetFindingEfficiency = 0x0); | |
549b5f40 RAB |
341 | TH1D* UnfoldSpectrumChi2( const TH1D* measuredJetSpectrum, |
342 | const TH2D* resizedResponse, | |
343 | const TH1D* kinematicEfficiency, | |
344 | const TH1D* measuredJetSpectrumTrueBins, | |
345 | const TString suffix, | |
346 | const TH1D* jetFindingEfficiency = 0x0); | |
347 | TH1D* UnfoldSpectrumSVD( const TH1D* measuredJetSpectrum, | |
348 | const TH2D* resizedResponse, | |
349 | const TH1D* kinematicEfficiency, | |
350 | const TH1D* measuredJetSpectrumTrueBins, | |
351 | const TString suffix, | |
352 | const TH1D* jetFindingEfficiency = 0x0); | |
353 | TH1D* UnfoldSpectrumBayesianAli( const TH1D* measuredJetSpectrum, | |
354 | const TH2D* resizedResponse, | |
355 | const TH1D* kinematicEfficiency, | |
356 | const TH1D* measuredJetSpectrumTrueBins, | |
357 | const TString suffix, | |
358 | const TH1D* jetFindingEfficiency = 0x0); | |
359 | TH1D* UnfoldSpectrumBayesian( const TH1D* measuredJetSpectrum, | |
360 | const TH2D* resizedResponse, | |
361 | const TH1D* kinematicEfficiency, | |
362 | const TH1D* measuredJetSpectrumTrueBins, | |
363 | const TString suffix, | |
364 | const TH1D* jetFindingEfficiency = 0x0); | |
18698978 | 365 | void DoIntermediateSystematics( |
366 | TArrayI* variationsIn, | |
367 | TArrayI* variationsOut, | |
368 | TH1D*& relativeErrorInUp, | |
369 | TH1D*& relativeErrorInLow, | |
370 | TH1D*& relativeErrorOutUp, | |
371 | TH1D*& relativeErrorOutLow, | |
372 | TH1D*& relativeSystematicIn, | |
373 | TH1D*& relativeSystematicOut, | |
a39e4b2b | 374 | TH1D*& nominal, |
375 | TH1D*& nominalIn, | |
376 | TH1D*& nominalOut, | |
18698978 | 377 | Int_t columns, |
378 | Float_t rangeLow, | |
379 | Float_t rangeUp, | |
380 | TFile* readMe, | |
d06dbffe | 381 | TString source = "", |
382 | Bool_t RMS = kFALSE) const; | |
4292ca60 | 383 | static void ResetAliUnfolding(); |
ef12d5a5 | 384 | // give object a unique name via the 'protect heap' functions. |
385 | // may seem redundant, but some internal functions of root (e.g. | |
386 | // ProjectionY()) check for existing objects by name and re-use them | |
f3ba6c8e | 387 | TH1D* ProtectHeap(TH1D* protect, Bool_t kill = kTRUE, TString suffix = "") const; |
388 | TH2D* ProtectHeap(TH2D* protect, Bool_t kill = kTRUE, TString suffix = "") const; | |
389 | TGraphErrors* ProtectHeap(TGraphErrors* protect, Bool_t kill = kTRUE, TString suffix = "") const; | |
dc1455ee | 390 | // members, accessible via setters |
4292ca60 | 391 | AliAnaChargedJetResponseMaker* fResponseMaker; // utility object |
3e698d27 | 392 | Bool_t fRMS; // systematic method |
393 | Bool_t fSymmRMS; // symmetric systematic method | |
6c3fa11d | 394 | Bool_t fRho0; // use the result obtained with the 'classic' fixed rho |
4292ca60 | 395 | TF1* fPower; // smoothening fit |
396 | Bool_t fSaveFull; // save all generated histograms to file | |
51e6bc5a | 397 | TString fActiveString; // identifier of active output |
398 | TDirectoryFile* fActiveDir; // active directory | |
399 | TList* fInputList; // input list | |
4292ca60 | 400 | Bool_t fRefreshInput; // re-read the input (called automatically if input list changes) |
51e6bc5a | 401 | TString fOutputFileName; // output file name |
402 | TFile* fOutputFile; // output file | |
1e01bfd6 | 403 | TArrayI* fCentralityArray; // array of centrality bins that are merged |
404 | TArrayI* fMergeBinsArray; // array of pt bins that are merged | |
c03f7598 | 405 | TArrayD* fCentralityWeights; // array of centrality weights |
51e6bc5a | 406 | TH2D* fDetectorResponse; // detector response |
53547ff2 | 407 | TH1D* fJetFindingEff; // jet finding efficiency |
4292ca60 | 408 | Double_t fBetaIn; // regularization strength, in plane unfolding |
409 | Double_t fBetaOut; // regularization strength, out of plane unfoldign | |
549b5f40 RAB |
410 | Int_t fBayesianIterIn; // bayesian regularization parameter, in plane unfolding |
411 | Int_t fBayesianIterOut; // bayesian regularization parameter, out plane unfolding | |
412 | Float_t fBayesianSmoothIn; // bayesian smoothening parameter (AliUnfolding) | |
413 | Float_t fBayesianSmoothOut; // bayesian smoothening parameter (AliUnfolding) | |
51e6bc5a | 414 | Bool_t fAvoidRoundingError; // set dpt to zero for small values far from the diagonal |
415 | unfoldingAlgorithm fUnfoldingAlgorithm; // algorithm used for unfolding | |
416 | prior fPrior; // prior for unfolding | |
18698978 | 417 | TH1D* fPriorUser; // user supplied prior (e.g. pythia spectrum) |
51e6bc5a | 418 | TArrayD* fBinsTrue; // pt true bins |
419 | TArrayD* fBinsRec; // pt rec bins | |
ef12d5a5 | 420 | TArrayD* fBinsTruePrior; // holds true bins for the chi2 prior for SVD. setting this is optional |
421 | TArrayD* fBinsRecPrior; // holds rec bins for the chi2 prior for SVD. setting this is optional | |
4292ca60 | 422 | Int_t fSVDRegIn; // svd regularization (a good starting point is half of the number of bins) |
423 | Int_t fSVDRegOut; // svd regularization out of plane | |
51e6bc5a | 424 | Bool_t fSVDToy; // use toy to estimate coveriance matrix for SVD method |
425 | Float_t fJetRadius; // jet radius (for SVD toy) | |
20abfcc4 | 426 | Int_t fEventCount; // number of events |
427 | Bool_t fNormalizeSpectra; // normalize spectra to event count | |
549b5f40 | 428 | Bool_t fSmoothenPrior; // smoothen the tail of the measured spectrum using a powerlaw fit |
4292ca60 | 429 | Float_t fFitMin; // lower bound of smoothening fit |
430 | Float_t fFitMax; // upper bound of smoothening fit | |
431 | Float_t fFitStart; // from this value, use smoothening | |
549b5f40 | 432 | Bool_t fSmoothenCounts; // fill smoothened spectrum with counts |
ef12d5a5 | 433 | Bool_t fTestMode; // unfold with unity response for testing |
4292ca60 | 434 | Bool_t fRawInputProvided; // input histograms provided, not read from file |
ef12d5a5 | 435 | Double_t fEventPlaneRes; // event plane resolution for current centrality |
436 | Bool_t fUseDetectorResponse; // add detector response to unfolding | |
549b5f40 | 437 | Bool_t fUseDptResponse; // add dpt response to unfolding |
ef12d5a5 | 438 | Bool_t fTrainPower; // don't clear the params of fPower for call to Make |
486fb24e | 439 | // might give more stable results, but possibly introduces |
ef12d5a5 | 440 | // a bias / dependency on previous iterations |
486fb24e | 441 | Bool_t fDphiUnfolding; // do the unfolding in in and out of plane orientation |
442 | Bool_t fDphiDptUnfolding; // do the unfolding in dphi and dpt bins (to fit v2) | |
443 | Bool_t fExLJDpt; // exclude randon cones with leading jet | |
18698978 | 444 | Double_t fTitleFontSize; // title font size |
dc1455ee | 445 | // members, set internally |
4292ca60 | 446 | TProfile* fRMSSpectrumIn; // rms of in plane spectra of converged unfoldings |
447 | TProfile* fRMSSpectrumOut; // rms of out of plane spectra of converged unfoldings | |
448 | TProfile* fRMSRatio; // rms of ratio of converged unfolded spectra | |
ef12d5a5 | 449 | TProfile* fRMSV2; // rms of v2 of converged unfolded spectra |
4292ca60 | 450 | TH2D* fDeltaPtDeltaPhi; // delta pt delta phi distribution |
451 | TH2D* fJetPtDeltaPhi; // jet pt delta phi distribution | |
452 | TH1D* fSpectrumIn; // in plane jet pt spectrum | |
453 | TH1D* fSpectrumOut; // out of plane jet pt spectrum | |
454 | TH1D* fDptInDist; // in plane dpt distribution | |
455 | TH1D* fDptOutDist; // out of plane dpt distribution | |
456 | TH2D* fDptIn; // in plane dpt matrix | |
457 | TH2D* fDptOut; // out plane dpt matrix | |
458 | TH2D* fFullResponseIn; // full response matrix, in plane | |
459 | TH2D* fFullResponseOut; // full response matrix, out of plane | |
a5ecaabe | 460 | |
dc1455ee | 461 | // copy and assignment |
462 | AliJetFlowTools(const AliJetFlowTools&); // not implemented | |
463 | AliJetFlowTools& operator=(const AliJetFlowTools&); // not implemented | |
464 | }; | |
465 | #endif | |
466 | //_____________________________________________________________________________ |