#include <GenericTnPFitter.h>
|
void | fit (TH1 *pass, TH1 *all) override |
|
void | setup (double expectedMean_, double massLow, double massHigh, double expectedSigma_, double width_) |
|
| VoigtianPlusExponentialFitter (bool verbose=false) |
|
| ~VoigtianPlusExponentialFitter () override=default |
|
| AbstractFitter (bool verbose_=false) |
|
TString | calculateEfficiency (TH2 *pass, TH2 *all, int massDimension, TProfile *&eff, TProfile *&effChi2, const TString &plotName="") |
|
TString | calculateEfficiency (TH3 *pass, TH3 *all, int massDimension, TProfile2D *&eff, TProfile2D *&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 334 of file GenericTnPFitter.h.
◆ VoigtianPlusExponentialFitter()
dqmTnP::VoigtianPlusExponentialFitter::VoigtianPlusExponentialFitter |
( |
bool |
verbose = false | ) |
|
|
inline |
Definition at line 346 of file GenericTnPFitter.h.
348 width(
"width",
"width", 2.5,
"GeV"),
350 slopeFail(
"slopeFail",
"slopeFail", 0., -1., 0.),
352 slopePass(
"slopePass",
"slopePass", 0., -1., 0.),
358 width.setConstant(kTRUE);
References dqmTnP::AbstractFitter::simPdf, and ApeEstimator_cff::width.
◆ ~VoigtianPlusExponentialFitter()
dqmTnP::VoigtianPlusExponentialFitter::~VoigtianPlusExponentialFitter |
( |
| ) |
|
|
overridedefault |
◆ fit()
void dqmTnP::VoigtianPlusExponentialFitter::fit |
( |
TH1 * |
pass, |
|
|
TH1 * |
all |
|
) |
| |
|
inlineoverridevirtual |
Implements dqmTnP::AbstractFitter.
Definition at line 371 of file GenericTnPFitter.h.
372 using namespace RooFit;
377 data =
new RooDataHist(
"data",
"data",
mass, Index(
category), Import(
"fail", *fail), Import(
"pass", *pass));
378 if (pass->Integral() + fail->Integral() < 5) {
386 efficiency.setVal(pass->Integral() / (pass->Integral() + fail->Integral()));
387 nSignalAll.setVal(0.5 * (fail->Integral() + pass->Integral()));
395 simPdf.fitTo(*
data,
Verbose(kFALSE), PrintLevel(-1), Warnings(kFALSE), PrintEvalErrors(-1));
397 RooDataHist dataFail(
"fail",
"fail",
mass, fail);
398 RooDataHist dataPass(
"pass",
"pass",
mass, pass);
399 chi2 = (RooChi2Var(
"chi2Fail",
"chi2Fail",
pdfFail, dataFail, DataError(RooAbsData::Poisson)).getVal() +
400 RooChi2Var(
"chi2Pass",
"chi2Pass",
pdfPass, dataPass, DataError(RooAbsData::Poisson)).getVal()) /
401 (2 *
all->GetNbinsX() - 8);
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().
◆ setup()
void dqmTnP::VoigtianPlusExponentialFitter::setup |
( |
double |
expectedMean_, |
|
|
double |
massLow, |
|
|
double |
massHigh, |
|
|
double |
expectedSigma_, |
|
|
double |
width_ |
|
) |
| |
|
inline |
◆ exponentialFail
RooExponential dqmTnP::VoigtianPlusExponentialFitter::exponentialFail |
|
protected |
◆ exponentialPass
RooExponential dqmTnP::VoigtianPlusExponentialFitter::exponentialPass |
|
protected |
◆ pdfFail
RooAddPdf dqmTnP::VoigtianPlusExponentialFitter::pdfFail |
|
protected |
◆ pdfPass
RooAddPdf dqmTnP::VoigtianPlusExponentialFitter::pdfPass |
|
protected |
◆ slopeFail
RooRealVar dqmTnP::VoigtianPlusExponentialFitter::slopeFail |
|
protected |
◆ slopePass
RooRealVar dqmTnP::VoigtianPlusExponentialFitter::slopePass |
|
protected |
◆ voigtian
RooVoigtian dqmTnP::VoigtianPlusExponentialFitter::voigtian |
|
protected |
◆ width
RooRealVar dqmTnP::VoigtianPlusExponentialFitter::width |
|
protected |