Go to the documentation of this file. 1 #ifndef PAIRANALYSISSIGNALEXT_H
2 #define PAIRANALYSISSIGNALEXT_H
78 fBinLimits =
new TArrayD(limits->GetNrows() - 1, limits->GetMatrixArray());
94 Double_t intMin2 = 0.,
95 Double_t intMax2 = 0.) {
158 Bool_t replaceValErr = kFALSE,
159 TH1F* mcShape = 0x0);
164 TString opt =
"pRnbsSmrc");
176 static TH1*
MergeObjects(TH1* obj1, TH1* obj2, Double_t val = +1.);
177 void Print(Option_t* option =
"")
const;
188 void Process(TObjArray*
const arrhist);
194 void Draw(
const Option_t* option =
"");
201 TObject* bla =
new TObject();
205 TObject* bla =
new TObject();
291 for (Int_t
i = 0;
i < arrhist->GetEntriesFast();
i++) {
292 if (!ref.CompareTo(arrhist->UncheckedAt(
i)->GetTitle()))
293 return arrhist->UncheckedAt(
i);
303 if (!arrhist)
return 0x0;
306 for (Int_t
i = 0;
i < arrhist->GetEntriesFast();
i++) {
307 if (!ref.CompareTo(arrhist->UncheckedAt(
i)->GetTitle())) {
308 return arrhist->UncheckedAt(
i);
323 fErrors(3) =
fValues(3) * TMath::Sqrt(epsSig * epsSig + epsBknd * epsBknd);
336 * TMath::Sqrt(be * be + TMath::Power(se * (s + 2 * b) / s, 2)) / 2
351 TF1* pfit = (TF1*) fit->Clone(
"pfit");
352 TF1* mfit = (TF1*) fit->Clone(
"mfit");
353 for (Int_t
i = 0;
i < fit->GetNpar();
i++) {
354 pfit->SetParameter(
i, fit->GetParameter(
i) + fit->GetParError(
i));
355 mfit->SetParameter(
i, fit->GetParameter(
i) - fit->GetParError(
i));
357 Double_t maxX = fit->GetMaximumX();
358 Double_t maxY = fit->GetHistogram()->GetMaximum();
359 Double_t xAxMin = fit->GetXmin();
360 Double_t xAxMax = fit->GetXmax();
362 Double_t fwhmMin = fit->GetX(.5 * maxY, xAxMin, maxX);
363 Double_t fwhmMax = fit->GetX(.5 * maxY, maxX, xAxMax);
364 Double_t pfwhmMin = pfit->GetX(.5 * maxY, xAxMin, maxX);
365 Double_t pfwhmMax = pfit->GetX(.5 * maxY, maxX, xAxMax);
366 Double_t mfwhmMin = mfit->GetX(.5 * maxY, xAxMin, maxX);
367 Double_t mfwhmMax = mfit->GetX(.5 * maxY, maxX, xAxMax);
368 Double_t pError = TMath::Abs((fwhmMax - fwhmMin) - (pfwhmMax - pfwhmMin));
369 Double_t mError = TMath::Abs((fwhmMax - fwhmMin) - (mfwhmMax - mfwhmMin));
370 fValues(5) = (fwhmMax - fwhmMin);
371 fErrors(5) = (pError >= mError ? pError : mError);
378 Int_t bin1 = hist->FindFirstBinAbove(hist->GetMaximum() / 2);
379 Int_t bin2 = hist->FindLastBinAbove(hist->GetMaximum() / 2);
380 fValues(5) = hist->GetBinCenter(bin2) - hist->GetBinCenter(bin1);
402 for (Int_t
i = 1;
i <= hfill->GetNbinsX();
i++) {
404 if (signal->IsA() == TF1::Class())
405 s =
static_cast<TF1*
>(signal)->Eval(hfill->GetBinCenter(
i));
407 s =
static_cast<TH1*
>(signal)->GetBinContent(
i);
408 se =
static_cast<TH1*
>(signal)->GetBinError(
i);
411 b = hbgrd->GetBinContent(
i);
412 be = hbgrd->GetBinError(
i);
414 Double_t
sgn = ((s + b) > 0. ? s / TMath::Sqrt(s + b) : 0.);
416 hfill->SetBinContent(
i,
sgn);
420 ?
sgn * TMath::Sqrt(be * be + TMath::Power(se * (s + 2 * b) / s, 2))
Double_t GetSignificance() const
ESignalExtractionMethod GetExtractionMethod() const
void Print(Option_t *option="") const
static const char * GetValueName(Int_t i)
static const char * fgkBackgroundMethodNames[11]
void SetMethod(EBackgroundMethod method)
Double_t GetMassWidthError() const
void SetCocktailContribution(TObjArray *arr, Bool_t subtract=kTRUE)
Double_t GetMatchChi2NDFError() const
void SetRebin(Int_t factor)
TH1 * GetBackgroundHistogram() const
TObject * GetPeakShape() const
EBackgroundMethod fMethod
TH1 * GetSignificanceHistogram() const
Bool_t IsCocktailSubtracted() const
TObject * FindObjectByTitle(TObjArray *arrhist, TString ref)
TH1 * GetSignalHistogram() const
void SetPlotRange(Double_t min, Double_t max)
void SetIntegralRange(Double_t min, Double_t max)
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
void SetRebin(TArrayD *limits)
PairAnalysisFunction * fExtrFunc
friend F32vec4 sgn(const F32vec4 &a)
Double_t GetScaleFactor() const
Double_t GetSBError() const
static const char * PairClassName(Int_t i)
Double_t GetMassError() const
TH1 * GetMCSignalShape() const
static const char * fgkValueNames[7]
void FillSignificance(TH1 *hfill, TObject *signal, TH1 *hbgrd)
TObject * DescribePeakShape(ESignalExtractionMethod method=kMCFitted, Bool_t replaceValErr=kFALSE, TH1F *mcShape=0x0)
TArrayD * GetRebinLimits() const
Double_t GetMassWidth() const
void SetMixingCorrection(Bool_t mixcorr=kTRUE)
Double_t ScaleHistograms(TH1 *histRaw, TH1 *histBackground, Double_t intMin, Double_t intMax)
Double_t GetScaleMin() const
Double_t GetBackground() const
void Draw(const Option_t *option="")
Double_t GetIntegralMin() const
Double_t GetScaleMax() const
void Process(TObjArray *const arrhist)
TH1 * GetRfactorHistogram() const
void SetNTrackRotations(Int_t iterations)
TObject * FindObject(TObjArray *arrhist, PairAnalysis::EPairType type) const
TH1 * GetCocktailHistogram() const
Double_t GetBackgroundError() const
void SetMCSignalShape(TH1F *hist)
void SetStatRebin(Double_t stat)
PairAnalysisSignalExt & operator=(const PairAnalysisSignalExt &c)
EScalingMethod fSclMethod
void SetRebin(TVectorD *limits)
TH1 * GetUnlikeSignHistogram() const
TObject * FindObject(const char *) const
Double_t GetSignificanceError() const
ESignalExtractionMethod fPeakMethod
const TVectorD & GetValues() const
static TH1 * MergeObjects(TH1 *obj1, TH1 *obj2, Double_t val=+1.)
Double_t GetScaleMin2() const
Double_t GetSignal() const
void SetSignificanceAndSOB()
static TObject * fgPeakShape
void SetScaleBackgroundTo(EScalingMethod method, Double_t intMin, Double_t intMax, Double_t intMin2=0., Double_t intMax2=0.)
const TVectorD & GetErrors() const
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
TH1 * GetSoverBHistogram() const
Double_t GetMatchChi2NDF() const
EBackgroundMethod GetMethod() const
Double_t GetScaleMax2() const
TPaveText * DrawStats(Double_t x1=0., Double_t y1=0., Double_t x2=0., Double_t y2=0., TString opt="pRnbsSmrc")
TObject * FindObject(const TObject *) const
static TH1F * fgHistSimPM
Double_t GetSignalError() const
void SetExtractionMethod(ESignalExtractionMethod method, PairAnalysisFunction *sigF=0x0)
Double_t GetIntegralMax() const