#include <GenericTnPFitter.h>
|
void | fit (TH1 *pass, TH1 *all) override |
|
| GaussianPlusLinearFitter (bool verbose=false) |
|
| ~GaussianPlusLinearFitter () override=default |
|
| AbstractFitter (bool verbose_=false) |
|
TString | calculateEfficiency (TH3 *pass, TH3 *all, int massDimension, TProfile2D *&eff, TProfile2D *&effChi2, const TString &plotName="") |
|
TString | calculateEfficiency (TH2 *pass, TH2 *all, int massDimension, TProfile *&eff, TProfile *&effChi2, const TString &plotName="") |
|
double | getChi2 () |
|
double | getEfficiency () |
|
double | getEfficiencyError () |
|
void | savePlot (const TString &name) |
|
void | setup (double expectedMean_, double massLow, double massHigh, double expectedSigma_) |
|
virtual | ~AbstractFitter ()=default |
|
Definition at line 269 of file GenericTnPFitter.h.
◆ GaussianPlusLinearFitter()
dqmTnP::GaussianPlusLinearFitter::GaussianPlusLinearFitter |
( |
bool |
verbose = false | ) |
|
|
inline |
Definition at line 280 of file GenericTnPFitter.h.
References dqmTnP::AbstractFitter::simPdf.
283 slopeFail(
"slopeFail",
"slopeFail", 0., -1., 1.),
285 slopePass(
"slopePass",
"slopePass", 0., -1., 1.),
RooRealVar nBackgroundFail
RooFormulaVar nSignalFail
AbstractFitter(bool verbose_=false)
RooFormulaVar nSignalPass
RooRealVar nBackgroundPass
◆ ~GaussianPlusLinearFitter()
dqmTnP::GaussianPlusLinearFitter::~GaussianPlusLinearFitter |
( |
| ) |
|
|
overridedefault |
◆ fit()
void dqmTnP::GaussianPlusLinearFitter::fit |
( |
TH1 * |
pass, |
|
|
TH1 * |
all |
|
) |
| |
|
inlineoverridevirtual |
Implements dqmTnP::AbstractFitter.
Definition at line 294 of file GenericTnPFitter.h.
References python.cmstools::all(), dqmTnP::AbstractFitter::category, dqmTnP::AbstractFitter::chi2, dqmTnP::AbstractFitter::data, dqmTnP::AbstractFitter::efficiency, dqmTnP::AbstractFitter::expectedMean, dqmTnP::AbstractFitter::expectedSigma, dqmTnP::AbstractFitter::mass, dqmTnP::AbstractFitter::mean, dqmTnP::AbstractFitter::nBackgroundFail, dqmTnP::AbstractFitter::nBackgroundPass, dqmTnP::AbstractFitter::nSignalAll, dqmTnP::AbstractFitter::sigma, dqmTnP::AbstractFitter::simPdf, EcalTangentSkim_cfg::Verbose, and dqmTnP::AbstractFitter::verbose.
Referenced by trackingPlots.Iteration::modules().
300 data =
new RooDataHist(
"data",
"data",
mass, Index(
category), Import(
"fail", *fail), Import(
"pass", *pass));
301 if (pass->Integral() + fail->Integral() < 5) {
309 efficiency.setVal(pass->Integral() / (pass->Integral() + fail->Integral()));
310 nSignalAll.setVal(0.5 * (fail->Integral() + pass->Integral()));
318 simPdf.fitTo(*
data,
Verbose(kFALSE), PrintLevel(-1), Warnings(kFALSE), PrintEvalErrors(-1));
320 RooDataHist dataFail(
"fail",
"fail",
mass, fail);
321 RooDataHist dataPass(
"pass",
"pass",
mass, pass);
322 using AbsRealPtr = std::unique_ptr<RooAbsReal>;
323 const double chi2Fail = AbsRealPtr(
pdfFail.createChi2(dataFail, DataError(RooAbsData::Poisson)))->getVal();
324 const double chi2Pass = AbsRealPtr(
pdfPass.createChi2(dataPass, DataError(RooAbsData::Poisson)))->getVal();
325 chi2 = (chi2Fail + chi2Pass) / (2 * pass->GetNbinsX() - 8);
RooRealVar nBackgroundFail
RooRealVar nBackgroundPass
◆ gaussian
RooGaussian dqmTnP::GaussianPlusLinearFitter::gaussian |
|
protected |
◆ linearFail
RooChebychev dqmTnP::GaussianPlusLinearFitter::linearFail |
|
protected |
◆ linearPass
RooChebychev dqmTnP::GaussianPlusLinearFitter::linearPass |
|
protected |
◆ pdfFail
RooAddPdf dqmTnP::GaussianPlusLinearFitter::pdfFail |
|
protected |
◆ pdfPass
RooAddPdf dqmTnP::GaussianPlusLinearFitter::pdfPass |
|
protected |
◆ slopeFail
RooRealVar dqmTnP::GaussianPlusLinearFitter::slopeFail |
|
protected |
◆ slopePass
RooRealVar dqmTnP::GaussianPlusLinearFitter::slopePass |
|
protected |