8 #include <TParameter.h>
35 Set(method, cut1, cut2, cut3, cut4, cut5);
49 if (&o ==
this)
return *
this;
77 fCuts[1] = fmd2i >= 0 ? fmd2i : fmd1i;
78 fCuts[2] = fmd2o >= 0 ? fmd2o : fmd1i * oFac;
79 fCuts[3] = fmd3i >= 0 ? fmd3i : fmd1i;
80 fCuts[4] = fmd3o >= 0 ? fmd3o : fmd1i * oFac;
92 Warning(what,
"*** DEPRECATED - use AliFMDMultCuts::Set instead ***");
93 Set(method, fmd1i, fmd2i, fmd2o, fmd3i, fmd3o);
100 Warning(
"SetIncludeSigma",
101 "*** DEPRECATED - use AliFMDMultCuts::Set instead ***");
117 case 1: idx = 0;
break;
118 case 2: idx = 1 + ((r ==
'I' || r ==
'i') ? 0 : 1);
break;
119 case 3: idx = 3 + ((r ==
'I' || r ==
'i') ? 0 : 1);
break;
121 if (idx < 0)
return -
kBad;
138 DGUARD(fDebug, 5,
"Get mult cut for FMD%d%c (method %d) @ etabin=%d",
142 Warning(
"GetMultCut",
"Got bad cut parameter for FMD%d%c ieta=%d",
149 DMSG(fDebug, 5,
"-> %8.4f", param);
182 Warning(
"GetMultCut",
"No energy loss fits obtained from manager");
184 DMSG(fDebug, 5,
"-> %8.4f", rcut);
202 DGUARD(fDebug, 5,
"Get mult cut for FMD%d%c @ eta=%8.4f",
207 DMSG(fDebug, 5,
"bin=%4d", iEta);
223 return latex ?
"c=X" :
"fixed value";
225 return latex ?
"c=X#times#Delta_{p}":
"fraction of MPV";
227 return latex ?
"range" :
"c: lower fit bound";
229 return latex ?
"c=#Delta_{p}-X#times#xi" :
"landau width";
231 return latex ?
"c=#Delta_{p}-X#times(#xi+#sigma)" :
"landau+sigma width";
233 return latex ?
"c:P(#Delta<c)<X" :
"probability";
235 return latex ?
"c:?" :
"unknown";
242 if (m.EqualTo(
"fixed value") || m.Contains(
"fix"))
244 else if (m.EqualTo(
"fraction of mpv") || m.Contains(
"mpv"))
246 else if (m.EqualTo(
"fit range") || m.Contains(
"fit"))
248 else if (m.EqualTo(
"landau width") || m.Contains(
"xi") ||
250 else if (m.EqualTo(
"landau+sigma width") || m.Contains(
"sig"))
252 else if (m.EqualTo(
"probability") || m.Contains(
"prob"))
261 DGUARD(fDebug, 5,
"Fill Histogram %s with cuts", h->GetName());
263 TAxis* yAxis = h->GetYaxis();
264 for (
Int_t iy = 1; iy <= yAxis->GetNbins(); iy++) {
265 TString lab(yAxis->GetBinLabel(iy));
270 DMSG(fDebug, 5,
"FMD%d%c", det, rng);
272 for (
Int_t ix = 1; ix <= h->GetNbinsX(); ix++) {
273 Double_t eta = h->GetXaxis()->GetBinCenter(ix);
275 DMSG(fDebug, 10,
"FMD%s bin=%4d -> eta=%8.4f -> %8.4f",
276 lab.Data(), ix, eta,
c);
278 if (c > 0) h->SetBinContent(ix, iy, c);
288 if (name && name[0] !=
'\0') {
307 if (!l)
return false;
309 if (name && name[0] !=
'\0') {
310 ll =
static_cast<TList*
>(l->FindObject(name));
312 if (!ll)
return false;
314 TObject* meth = ll->FindObject(
"method");
315 TObject* fmd1i = ll->FindObject(
"fmd1i");
316 TObject* fmd2i = ll->FindObject(
"fmd2i");
317 TObject* fmd2o = ll->FindObject(
"fmd2o");
318 TObject* fmd3i = ll->FindObject(
"fmd3i");
319 TObject* fmd3o = ll->FindObject(
"fmd3o");
341 #define PF(N,V,...) \
342 AliForwardUtil::PrintField(N,V, ## __VA_ARGS__)
343 #define PFB(N,FLAG) \
345 AliForwardUtil::PrintName(N); \
346 std::cout << std::boolalpha << (FLAG) << std::noboolalpha << std::endl; \
348 #define PFV(N,VALUE) \
350 AliForwardUtil::PrintName(N); \
351 std::cout << (VALUE) << std::endl; } while(false)
357 gROOT->IncreaseDirLevel();
359 gROOT->IncreaseDirLevel();
365 gROOT->DecreaseDirLevel();
366 gROOT->DecreaseDirLevel();
void Print(Option_t *option="") const
return jsonbuilder str().c_str()
static EMethod String2Method(const char *str)
ClassImp(AliFMDMultCuts) AliFMDMultCuts
Double_t GetCutParam(UShort_t d, Char_t r) const
#define DMSG(L, N, F,...)
void SetIncludeSigma(Bool_t in)
void DepSet(const char *what, EMethod method, Double_t fmd1i, Double_t fmd2i=-1, Double_t fmd2o=-1, Double_t fmd3i=-1, Double_t fmd3o=-1)
Double_t GetMultCut(UShort_t d, Char_t r, Double_t eta, Bool_t errors) const
AliFMDMultCuts & operator=(const AliFMDMultCuts &o)
static const char * Method2String(EMethod method, Bool_t latex)
Double_t GetLowerBound(UShort_t d, Char_t r, Int_t etaBin, Double_t f) const
const char * GetMethodString(Bool_t latex=false) const
void Output(TList *l, const char *name=0) const
Int_t FindEtaBin(Double_t eta) const
Various utilities used in PWGLF/FORWARD.
void Set(EMethod method, Double_t fmd1i, Double_t fmd2i=-1, Double_t fmd2o=-1, Double_t fmd3i=-1, Double_t fmd3o=-1)
static void GetParameter(TObject *o, UShort_t &value)
Bool_t Input(TList *l, const char *name)
const AliFMDCorrELossFit * GetELossFit() const
#define DGUARD(L, N, F,...)
static TObject * MakeParameter(const char *name, UShort_t value)
void FillHistogram(TH2 *h) const
static AliForwardCorrectionManager & Instance()
Double_t GetLowCut() const