CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Protected Attributes
FitWithRooFit Class Reference

#include <FitWithRooFit.h>

Public Member Functions

RooRealVar * a0 ()
 
RooRealVar * a1 ()
 
RooRealVar * a2 ()
 
RooRealVar * a3 ()
 
RooRealVar * a4 ()
 
RooRealVar * a5 ()
 
RooRealVar * a6 ()
 
RooRealVar * alpha ()
 
RooAbsPdf * buildBackgroundModel (RooRealVar *x, const TString &backgroundType)
 Build the model for the specified background type. More...
 
RooAbsPdf * buildModel (RooRealVar *x, const TString &signalType, const TString &backgroundType)
 Build the model to fit. More...
 
RooAbsPdf * buildSignalModel (RooRealVar *x, const TString &signalType)
 Build the model for the specified signal type. More...
 
RooRealVar * expCoeffa0 ()
 
RooRealVar * expCoeffa1 ()
 
RooRealVar * expCoeffa2 ()
 
RooRealVar * fGCB ()
 
void fit (TH1 *histo, const TString signalType, const TString backgroundType, const double &xMin=0., const double &xMax=0., bool sumW2Error=false)
 
 FitWithRooFit ()
 
RooRealVar * fsig ()
 
RooRealVar * gamma ()
 
RooRealVar * gaussFrac ()
 
RooRealVar * gaussFrac2 ()
 
rooPair importTH1 (TH1 *histo, const double &inputXmin, const double &inputXmax)
 
void initA0 (const double &value, const double &min, const double &max, const TString &name="a0", const TString &title="a0")
 
void initA1 (const double &value, const double &min, const double &max, const TString &name="a1", const TString &title="a1")
 
void initA2 (const double &value, const double &min, const double &max, const TString &name="a2", const TString &title="a2")
 
void initA3 (const double &value, const double &min, const double &max, const TString &name="a3", const TString &title="a3")
 
void initA4 (const double &value, const double &min, const double &max, const TString &name="a4", const TString &title="a4")
 
void initA5 (const double &value, const double &min, const double &max, const TString &name="a5", const TString &title="a5")
 
void initA6 (const double &value, const double &min, const double &max, const TString &name="a6", const TString &title="a6")
 
void initAlpha (const double &value, const double &min, const double &max, const TString &name="alpha", const TString &title="alpha")
 
void initExpCoeffA0 (const double &value, const double &min, const double &max, const TString &name="expCoeffa0", const TString &title="expCoeffa0")
 
void initExpCoeffA1 (const double &value, const double &min, const double &max, const TString &name="expCoeffa1", const TString &title="expCoeffa1")
 
void initExpCoeffA2 (const double &value, const double &min, const double &max, const TString &name="expCoeffa2", const TString &title="expCoeffa2")
 
void initFGCB (const double &value, const double &min, const double &max, const TString &name="fGCB", const TString &title="fGCB")
 
void initFsig (const double &value, const double &min, const double &max, const TString &name="fsig", const TString &title="signal fraction")
 
void initGamma (const double &value, const double &min, const double &max, const TString &name="gamma", const TString &title="gamma")
 
void initGaussFrac (const double &value, const double &min, const double &max, const TString &name="GaussFrac", const TString &title="GaussFrac")
 
void initGaussFrac2 (const double &value, const double &min, const double &max, const TString &name="GaussFrac2", const TString &title="GaussFrac2")
 
void initMean (const double &value, const double &min, const double &max, const TString &name="mean", const TString &title="mean")
 
void initMean2 (const double &value, const double &min, const double &max, const TString &name="mean2", const TString &title="mean2")
 
void initMean3 (const double &value, const double &min, const double &max, const TString &name="mean3", const TString &title="mean3")
 
void initN (const double &value, const double &min, const double &max, const TString &name="n", const TString &title="n")
 
void initSigma (const double &value, const double &min, const double &max, const TString &name="sigma", const TString &title="sigma")
 
void initSigma2 (const double &value, const double &min, const double &max, const TString &name="sigma2", const TString &title="sigma2")
 
void initSigma3 (const double &value, const double &min, const double &max, const TString &name="sigma3", const TString &title="sigma3")
 
RooRealVar * mean ()
 
RooRealVar * mean2 ()
 
RooRealVar * mean3 ()
 
RooRealVar * n ()
 
void reinitializeParameters ()
 
RooRealVar * sigma ()
 
RooRealVar * sigma2 ()
 
RooRealVar * sigma3 ()
 

Public Attributes

bool useChi2_
 

Protected Attributes

RooRealVar * a0_
 
RooRealVar * a1_
 
RooRealVar * a2_
 
RooRealVar * a3_
 
RooRealVar * a4_
 
RooRealVar * a5_
 
RooRealVar * a6_
 
RooRealVar * alpha_
 
RooRealVar * expCoeffa0_
 
RooRealVar * expCoeffa1_
 
RooRealVar * expCoeffa2_
 
RooRealVar * fGCB_
 
RooRealVar * fsig_
 
RooRealVar * gamma_
 
RooRealVar * gaussFrac2_
 
RooRealVar * gaussFrac_
 
double initVal_a0
 
double initVal_a1
 
double initVal_a2
 
double initVal_a3
 
double initVal_a4
 
double initVal_a5
 
double initVal_a6
 
double initVal_alpha
 
double initVal_expCoeffa0
 
double initVal_expCoeffa1
 
double initVal_expCoeffa2
 
double initVal_fGCB
 
double initVal_fsig
 
double initVal_gamma
 
double initVal_gaussFrac
 
double initVal_gaussFrac2
 
double initVal_mean
 
double initVal_mean2
 
double initVal_mean3
 
double initVal_n
 
double initVal_sigma
 
double initVal_sigma2
 
double initVal_sigma3
 
RooRealVar * mean2_
 
RooRealVar * mean3_
 
RooRealVar * mean_
 
RooRealVar * n_
 
RooRealVar * sigma2_
 
RooRealVar * sigma3_
 
RooRealVar * sigma_
 

Detailed Description

Definition at line 51 of file FitWithRooFit.h.

Constructor & Destructor Documentation

◆ FitWithRooFit()

FitWithRooFit::FitWithRooFit ( )
inline

Definition at line 53 of file FitWithRooFit.h.

54  : useChi2_(false),
55  mean_(nullptr),
56  mean2_(nullptr),
57  mean3_(nullptr),
58  sigma_(nullptr),
59  sigma2_(nullptr),
60  sigma3_(nullptr),
61  gamma_(nullptr),
62  gaussFrac_(nullptr),
63  gaussFrac2_(nullptr),
64  expCoeffa0_(nullptr),
65  expCoeffa1_(nullptr),
66  expCoeffa2_(nullptr),
67  fsig_(nullptr),
68  a0_(nullptr),
69  a1_(nullptr),
70  a2_(nullptr),
71  a3_(nullptr),
72  a4_(nullptr),
73  a5_(nullptr),
74  a6_(nullptr),
75  alpha_(nullptr),
76  n_(nullptr),
77  fGCB_(nullptr) {}
RooRealVar * n_
RooRealVar * mean_
RooRealVar * gaussFrac2_
RooRealVar * a0_
RooRealVar * sigma2_
RooRealVar * a4_
RooRealVar * sigma_
RooRealVar * fGCB_
RooRealVar * mean2_
RooRealVar * sigma3_
RooRealVar * a6_
RooRealVar * expCoeffa2_
RooRealVar * mean3_
RooRealVar * a1_
RooRealVar * alpha_
RooRealVar * fsig_
RooRealVar * a2_
RooRealVar * expCoeffa1_
RooRealVar * a3_
RooRealVar * a5_
RooRealVar * gamma_
RooRealVar * expCoeffa0_
RooRealVar * gaussFrac_

Member Function Documentation

◆ a0()

RooRealVar* FitWithRooFit::a0 ( )
inline

Definition at line 236 of file FitWithRooFit.h.

References a0_.

236 { return a0_; }
RooRealVar * a0_

◆ a1()

RooRealVar* FitWithRooFit::a1 ( )
inline

Definition at line 237 of file FitWithRooFit.h.

References a1_.

237 { return a1_; }
RooRealVar * a1_

◆ a2()

RooRealVar* FitWithRooFit::a2 ( )
inline

Definition at line 238 of file FitWithRooFit.h.

References a2_.

238 { return a2_; }
RooRealVar * a2_

◆ a3()

RooRealVar* FitWithRooFit::a3 ( )
inline

Definition at line 239 of file FitWithRooFit.h.

References a3_.

239 { return a3_; }
RooRealVar * a3_

◆ a4()

RooRealVar* FitWithRooFit::a4 ( )
inline

Definition at line 240 of file FitWithRooFit.h.

References a4_.

240 { return a4_; }
RooRealVar * a4_

◆ a5()

RooRealVar* FitWithRooFit::a5 ( )
inline

Definition at line 241 of file FitWithRooFit.h.

References a5_.

241 { return a5_; }
RooRealVar * a5_

◆ a6()

RooRealVar* FitWithRooFit::a6 ( )
inline

Definition at line 242 of file FitWithRooFit.h.

References a6_.

242 { return a6_; }
RooRealVar * a6_

◆ alpha()

RooRealVar* FitWithRooFit::alpha ( )
inline

Definition at line 243 of file FitWithRooFit.h.

References alpha_.

243 { return alpha_; }
RooRealVar * alpha_

◆ buildBackgroundModel()

RooAbsPdf * FitWithRooFit::buildBackgroundModel ( RooRealVar *  x,
const TString &  backgroundType 
)

Build the model for the specified background type.

Definition at line 489 of file FitWithRooFit.cc.

References a0_, a1_, a2_, a3_, a4_, a5_, a6_, beamvalidation::exit(), expCoeffa0_, expCoeffa1_, expCoeffa2_, fsig_, and x.

Referenced by buildModel().

489  {
490  RooAbsPdf* background = nullptr;
491  if (backgroundType == "exponential") {
492  // Add an exponential for the background
493  if ((expCoeffa1_ == nullptr) || (fsig_ == nullptr)) {
494  edm::LogError("FitWithRooFit")
495  << "Error: one or more parameters are not initialized. Please be sure to initialize expCoeffa1 and fsig";
496  exit(1);
497  }
498  background = new RooExponential("exponential", "exponential", *x, *expCoeffa1_);
499  }
500 
501  if (backgroundType == "exponentialpol") {
502  // Add an exponential for the background
503  if ((expCoeffa0_ == nullptr) || (expCoeffa1_ == nullptr) || (expCoeffa2_ == nullptr) || (fsig_ == nullptr)) {
504  edm::LogError("FitWithRooFit")
505  << "Error: one or more parameters are not initialized. Please be sure to initialize expCoeff and fsig";
506  exit(1);
507  }
508  background = new RooGenericPdf("exponential",
509  "exponential",
510  "TMath::Exp(@1+@2*@0+@3*@0*@0)",
511  RooArgList(*x, *expCoeffa0_, *expCoeffa1_, *expCoeffa2_));
512  }
513 
514  else if (backgroundType == "chebychev0") {
515  // Add a linear background
516  if (a0_ == nullptr) {
517  edm::LogError("FitWithRooFit")
518  << "Error: one or more parameters are not initialized. Please be sure to initialize a0";
519  exit(1);
520  }
521  background = new RooChebychev("chebychev0", "chebychev0", *x, *a0_);
522  } else if (backgroundType == "chebychev1") {
523  // Add a 2nd order chebychev polynomial background
524  if ((a0_ == nullptr) || (a1_ == nullptr)) {
525  edm::LogError("FitWithRooFit")
526  << "Error: one or more parameters are not initialized. Please be sure to initialize a0 and a1";
527  exit(1);
528  }
529  background = new RooChebychev("chebychev1", "chebychev1", *x, RooArgList(*a0_, *a1_));
530  } else if (backgroundType == "chebychev3") {
531  // Add a 3rd order chebychev polynomial background
532  if ((a0_ == nullptr) || (a1_ == nullptr) || (a2_ == nullptr) || (a3_ == nullptr)) {
533  edm::LogError("FitWithRooFit")
534  << "Error: one or more parameters are not initialized. Please be sure to initialize a0, a1, a2 and a3";
535  exit(1);
536  }
537  background = new RooChebychev("3rdOrderPol", "3rdOrderPol", *x, RooArgList(*a0_, *a1_, *a2_, *a3_));
538  }
539 
540  else if (backgroundType == "chebychev6") {
541  // Add a 6th order chebychev polynomial background
542  if ((a0_ == nullptr) || (a1_ == nullptr) || (a2_ == nullptr) || (a3_ == nullptr) || (a4_ == nullptr) ||
543  (a5_ == nullptr) || (a6_ == nullptr)) {
544  edm::LogError("FitWithRooFit")
545  << "Error: one or more parameters are not initialized. Please be sure to initialize a0, a1, a2, a3, "
546  "a4, a5 and a6";
547  exit(1);
548  }
549  background =
550  new RooChebychev("6thOrderPol", "6thOrderPol", *x, RooArgList(*a0_, *a1_, *a2_, *a3_, *a4_, *a5_, *a6_));
551  }
552 
553  return background;
554 }
RooRealVar * a0_
RooRealVar * a4_
Log< level::Error, false > LogError
RooRealVar * a6_
RooRealVar * expCoeffa2_
RooRealVar * a1_
RooRealVar * fsig_
RooRealVar * a2_
RooRealVar * expCoeffa1_
RooRealVar * a3_
RooRealVar * a5_
RooRealVar * expCoeffa0_
def exit(msg="")

◆ buildModel()

RooAbsPdf * FitWithRooFit::buildModel ( RooRealVar *  x,
const TString &  signalType,
const TString &  backgroundType 
)

Build the model to fit.

Definition at line 557 of file FitWithRooFit.cc.

References buildBackgroundModel(), buildSignalModel(), beamvalidation::exit(), fsig_, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and x.

Referenced by fit().

557  {
558  RooAbsPdf* model = nullptr;
559 
560  RooAbsPdf* signal = buildSignalModel(x, signalType);
561  RooAbsPdf* background = buildBackgroundModel(x, backgroundType);
562 
563  if ((signal != nullptr) && (background != nullptr)) {
564  // Combine signal and background pdfs
565  edm::LogPrint("FitWithRooFit") << "Building model with signal and backgound";
566  model = new RooAddPdf("model", "model", RooArgList(*signal, *background), *fsig_);
567  } else if (signal != nullptr) {
568  edm::LogPrint("FitWithRooFit") << "Building model with signal";
569  model = signal;
570  } else if (background != nullptr) {
571  edm::LogPrint("FitWithRooFit") << "Building model with backgound";
572  model = background;
573  } else {
574  edm::LogWarning("FitWithRooFit") << "Nothing to fit";
575  exit(0);
576  }
577  return model;
578 }
RooAbsPdf * buildSignalModel(RooRealVar *x, const TString &signalType)
Build the model for the specified signal type.
Log< level::Warning, true > LogPrint
RooAbsPdf * buildBackgroundModel(RooRealVar *x, const TString &backgroundType)
Build the model for the specified background type.
RooRealVar * fsig_
Log< level::Warning, false > LogWarning
def exit(msg="")

◆ buildSignalModel()

RooAbsPdf * FitWithRooFit::buildSignalModel ( RooRealVar *  x,
const TString &  signalType 
)

Build the model for the specified signal type.

Definition at line 339 of file FitWithRooFit.cc.

References alpha_, beamvalidation::exit(), fGCB_, gamma_, gaussFrac2_, gaussFrac_, mean2_, mean3_, mean_, n_, sigma2_, sigma3_, sigma_, and x.

Referenced by buildModel().

339  {
340  RooAbsPdf* signal = nullptr;
341  if (signalType == "gaussian") {
342  // Fit a Gaussian p.d.f to the data
343  if ((mean_ == nullptr) || (sigma_ == nullptr)) {
344  edm::LogError("FitWithRooFit")
345  << "Error: one or more parameters are not initialized. Please be sure to initialize mean and sigma";
346  exit(1);
347  }
348  signal = new RooGaussian("gauss", "gauss", *x, *mean_, *sigma_);
349  } else if (signalType == "doubleGaussian") {
350  // Fit with double gaussian
351  if ((mean_ == nullptr) || (sigma_ == nullptr) || (sigma2_ == nullptr)) {
352  edm::LogError("FitWithRooFit")
353  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma and sigma2";
354  exit(1);
355  }
356  RooGaussModel* gaussModel = new RooGaussModel("gaussModel", "gaussModel", *x, *mean_, *sigma_);
357  RooGaussModel* gaussModel2 = new RooGaussModel("gaussModel2", "gaussModel2", *x, *mean_, *sigma2_);
358  signal = new RooAddModel("doubleGaussian", "double gaussian", RooArgList(*gaussModel, *gaussModel2), *gaussFrac_);
359  } else if (signalType == "tripleGaussian") {
360  // Fit with triple gaussian
361  if ((mean_ == nullptr) || (mean2_ == nullptr) || (mean3_ == nullptr) || (sigma_ == nullptr) ||
362  (sigma2_ == nullptr) || (sigma3_ == nullptr)) {
363  edm::LogError("FitWithRooFit")
364  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, mean2, "
365  "mean3, sigma, sigma2, sigma3";
366  exit(1);
367  }
368  RooGaussModel* gaussModel = new RooGaussModel("gaussModel", "gaussModel", *x, *mean_, *sigma_);
369  RooGaussModel* gaussModel2 = new RooGaussModel("gaussModel2", "gaussModel2", *x, *mean2_, *sigma2_);
370  RooGaussModel* gaussModel3 = new RooGaussModel("gaussModel3", "gaussModel3", *x, *mean3_, *sigma3_);
371  signal = new RooAddModel("tripleGaussian",
372  "triple gaussian",
373  RooArgList(*gaussModel, *gaussModel2, *gaussModel3),
374  RooArgList(*gaussFrac_, *gaussFrac2_));
375  } else if (signalType == "breitWigner") {
376  // Fit a Breit-Wigner
377  if ((mean_ == nullptr) || (gamma_ == nullptr)) {
378  edm::LogError("FitWithRooFit")
379  << "Error: one or more parameters are not initialized. Please be sure to initialize mean and gamma";
380  exit(1);
381  }
382  signal = new RooBreitWigner("breiWign", "breitWign", *x, *mean_, *gamma_);
383  } else if (signalType == "relBreitWigner") {
384  // Fit a relativistic Breit-Wigner
385  if ((mean_ == nullptr) || (gamma_ == nullptr)) {
386  edm::LogError("FitWithRooFit")
387  << "Error: one or more parameters are not initialized. Please be sure to initialize mean and gamma";
388  exit(1);
389  }
390  signal = new RooGenericPdf("Relativistic Breit-Wigner",
391  "RBW",
392  "@0/(pow(@0*@0 - @1*@1,2) + @2*@2*@0*@0*@0*@0/(@1*@1))",
393  RooArgList(*x, *mean_, *gamma_));
394  } else if (signalType == "voigtian") {
395  // Fit a Voigtian
396  if ((mean_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr)) {
397  edm::LogError("FitWithRooFit")
398  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma and gamma";
399  exit(1);
400  }
401  signal = new RooVoigtian("voigt", "voigt", *x, *mean_, *gamma_, *sigma_);
402  } else if (signalType == "crystalBall") {
403  // Fit a CrystalBall
404  if ((mean_ == nullptr) || (sigma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr)) {
405  edm::LogError("FitWithRooFit")
406  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma, "
407  "alpha and n";
408  exit(1);
409  }
410  signal = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma_, *alpha_, *n_);
411  } else if (signalType == "breitWignerTimesCB") {
412  // Fit a Breit Wigner convoluted with a CrystalBall
413  if ((mean_ == nullptr) || (mean2_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr) ||
414  (alpha_ == nullptr) || (n_ == nullptr)) {
415  edm::LogError("FitWithRooFit")
416  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, mean2, "
417  "sigma, gamma, alpha and n";
418  exit(1);
419  }
420  RooAbsPdf* bw = new RooBreitWigner("breiWigner", "breitWigner", *x, *mean_, *gamma_);
421  RooAbsPdf* cb = new RooCBShape("crystalBall", "crystalBall", *x, *mean2_, *sigma_, *alpha_, *n_);
422  signal = new RooFFTConvPdf("breitWignerTimesCB", "breitWignerTimesCB", *x, *bw, *cb);
423  } else if (signalType == "relBreitWignerTimesCB") {
424  // Fit a relativistic Breit Wigner convoluted with a CrystalBall
425  if ((mean_ == nullptr) || (mean2_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr) ||
426  (alpha_ == nullptr) || (n_ == nullptr)) {
427  edm::LogError("FitWithRooFit")
428  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, mean2, "
429  "sigma, gamma, alpha and n";
430  exit(1);
431  }
432  RooGenericPdf* bw = new RooGenericPdf("Relativistic Breit-Wigner",
433  "RBW",
434  "@0/(pow(@0*@0 - @1*@1,2) + @2*@2*@0*@0*@0*@0/(@1*@1))",
435  RooArgList(*x, *mean_, *gamma_));
436  RooAbsPdf* cb = new RooCBShape("crystalBall", "crystalBall", *x, *mean2_, *sigma_, *alpha_, *n_);
437  signal = new RooFFTConvPdf("relBreitWignerTimesCB", "relBreitWignerTimesCB", *x, *bw, *cb);
438  } else if (signalType == "gaussianPlusCrystalBall") {
439  // Fit a Gaussian + CrystalBall with the same mean
440  if ((mean_ == nullptr) || (sigma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr) || (sigma2_ == nullptr) ||
441  (fGCB_ == nullptr)) {
442  edm::LogError("FitWithRooFit")
443  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma, "
444  "sigma2, alpha, n and fGCB";
445  exit(1);
446  }
447  RooAbsPdf* tempCB = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma_, *alpha_, *n_);
448  RooAbsPdf* tempGaussian = new RooGaussian("gauss", "gauss", *x, *mean_, *sigma2_);
449 
450  signal =
451  new RooAddPdf("gaussianPlusCrystalBall", "gaussianPlusCrystalBall", RooArgList(*tempCB, *tempGaussian), *fGCB_);
452  } else if (signalType == "voigtianPlusCrystalBall") {
453  // Fit a Voigtian + CrystalBall with the same mean
454  if ((mean_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr) ||
455  (sigma2_ == nullptr) || (fGCB_ == nullptr)) {
456  edm::LogError("FitWithRooFit")
457  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, gamma, "
458  "sigma, sigma2, alpha, n and fGCB";
459  exit(1);
460  }
461  RooAbsPdf* tempVoigt = new RooVoigtian("voigt", "voigt", *x, *mean_, *gamma_, *sigma_);
462  RooAbsPdf* tempCB = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma2_, *alpha_, *n_);
463 
464  signal =
465  new RooAddPdf("voigtianPlusCrystalBall", "voigtianPlusCrystalBall", RooArgList(*tempCB, *tempVoigt), *fGCB_);
466  } else if (signalType == "breitWignerPlusCrystalBall") {
467  // Fit a Breit-Wigner + CrystalBall with the same mean
468  if ((mean_ == nullptr) || (gamma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr) || (sigma2_ == nullptr) ||
469  (fGCB_ == nullptr)) {
470  edm::LogError("FitWithRooFit")
471  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, gamma, "
472  "sigma, alpha, n and fGCB";
473  exit(1);
474  }
475  RooAbsPdf* tempBW = new RooBreitWigner("breitWign", "breitWign", *x, *mean_, *gamma_);
476  RooAbsPdf* tempCB = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma2_, *alpha_, *n_);
477 
478  signal =
479  new RooAddPdf("breitWignerPlusCrystalBall", "breitWignerPlusCrystalBall", RooArgList(*tempCB, *tempBW), *fGCB_);
480  }
481 
482  else if (signalType != "") {
483  edm::LogError("FitWithRooFit") << "Unknown signal function: " << signalType << ". Signal will not be in the model";
484  }
485  return signal;
486 }
RooRealVar * n_
RooRealVar * mean_
RooRealVar * gaussFrac2_
RooRealVar * sigma2_
RooRealVar * sigma_
RooRealVar * fGCB_
Log< level::Error, false > LogError
RooRealVar * mean2_
RooRealVar * sigma3_
RooRealVar * mean3_
RooRealVar * alpha_
RooRealVar * gamma_
RooRealVar * gaussFrac_
def exit(msg="")

◆ expCoeffa0()

RooRealVar* FitWithRooFit::expCoeffa0 ( )
inline

Definition at line 232 of file FitWithRooFit.h.

References expCoeffa0_.

232 { return expCoeffa0_; }
RooRealVar * expCoeffa0_

◆ expCoeffa1()

RooRealVar* FitWithRooFit::expCoeffa1 ( )
inline

Definition at line 233 of file FitWithRooFit.h.

References expCoeffa1_.

233 { return expCoeffa1_; }
RooRealVar * expCoeffa1_

◆ expCoeffa2()

RooRealVar* FitWithRooFit::expCoeffa2 ( )
inline

Definition at line 234 of file FitWithRooFit.h.

References expCoeffa2_.

234 { return expCoeffa2_; }
RooRealVar * expCoeffa2_

◆ fGCB()

RooRealVar* FitWithRooFit::fGCB ( )
inline

Definition at line 245 of file FitWithRooFit.h.

References fGCB_.

245 { return fGCB_; }
RooRealVar * fGCB_

◆ fit()

void FitWithRooFit::fit ( TH1 *  histo,
const TString  signalType,
const TString  backgroundType,
const double &  xMin = 0.,
const double &  xMax = 0.,
bool  sumW2Error = false 
)

Definition at line 19 of file FitWithRooFit.cc.

References buildModel(), nano_mu_local_reco_cff::chi2, cuy::dh, timingPdfMaker::histo, importTH1(), DataMixerDataOnData_cff::Label, visualization-live-secondInstance_cfg::m, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, reinitializeParameters(), useChi2_, x, multiplicitycorr_cfi::xMax, and photonAnalyzer_cfi::xMin.

Referenced by trackingPlots.Iteration::modules(), and ZMassBinFit_OldTool().

24  {
26 
27  rooPair imported = importTH1(histo, xMin, xMax);
28  RooRealVar x(imported.first);
29  RooDataHist* dh = imported.second;
30 
31  // Make plot of binned dataset showing Poisson error bars (RooFit default)
32  RooPlot* frame = x.frame(RooFit::Title("di-muon mass M(#mu^{+}#mu^{-}) [GeV]"));
33  frame->SetName(TString(histo->GetName()) + "_frame");
34  dh->plotOn(frame);
35 
36  // Build the composite model
37  RooAbsPdf* model = buildModel(&x, signalType, backgroundType);
38 
39  std::unique_ptr<RooAbsReal> chi2{model->createChi2(*dh, RooFit::DataError(RooAbsData::SumW2))};
40 
41  // Fit the composite model
42  // -----------------------
43  // Fit with likelihood
44  if (!useChi2_) {
45  if (sumW2Error)
46  model->fitTo(*dh, RooFit::Save(), RooFit::SumW2Error(kTRUE));
47  else
48  model->fitTo(*dh);
49  }
50  // Fit with chi^2
51  else {
52  edm::LogWarning("FitWithRooFit") << "FITTING WITH CHI^2";
53  RooMinimizer m(*chi2);
54  m.migrad();
55  m.hesse();
56  // RooFitResult* r_chi2_wgt = m.save();
57  }
58  model->plotOn(frame, RooFit::LineColor(kRed));
59  model->plotOn(frame, RooFit::Components(backgroundType), RooFit::LineStyle(kDashed));
60  model->paramOn(frame,
61  RooFit::Label("fit result"),
62  RooFit::Layout(0.65, 0.90, 0.90),
63  RooFit::Format("NEU", RooFit::AutoPrecision(2)));
64 
65  // TODO: fix next lines to get the prob(chi2) (ndof should be dynamically set according to the choosen pdf)
66  // double chi2 = xframe.chiSquare("model","data",ndof);
67  // double ndoff = xframeGetNbinsX();
68  // double chi2prob = TMath::Prob(chi2,ndoff);
69 
70  // P l o t a n d f i t a R o o D a t a H i s t w i t h i n t e r n a l e r r o r s
71  // ---------------------------------------------------------------------------------------------
72 
73  // If histogram has custom error (i.e. its contents is does not originate from a Poisson process
74  // but e.g. is a sum of weighted events) you can data with symmetric 'sum-of-weights' error instead
75  // (same error bars as shown by ROOT)
76  RooPlot* frame2 = x.frame(RooFit::Title("di-muon mass M(#mu^{+}#mu^{-}) [GeV]"));
77  dh->plotOn(frame2, RooFit::DataError(RooAbsData::SumW2));
78  model->plotOn(frame2, RooFit::LineColor(kRed));
79  model->plotOn(frame2, RooFit::Components(backgroundType), RooFit::LineStyle(kDashed));
80  model->paramOn(frame2,
81  RooFit::Label("fit result"),
82  RooFit::Layout(0.65, 0.90, 0.90),
83  RooFit::Format("NEU", RooFit::AutoPrecision(2)));
84 
85  // Please note that error bars shown (Poisson or SumW2) are for visualization only, the are NOT used
86  // in a maximum likelihood fit
87  //
88  // A (binned) ML fit will ALWAYS assume the Poisson error interpretation of data (the mathematical definition
89  // of likelihood does not take any external definition of errors). Data with non-unit weights can only be correctly
90  // fitted with a chi^2 fit (see rf602_chi2fit.C)
91 
92  // Draw all frames on a canvas
93  // if( canvas == 0 ) {
94  // canvas = new TCanvas("rf102_dataimport","rf102_dataimport",800,800);
95  // canvas->cd(1);
96  // }
97  // canvas->Divide(2,1);
98  // canvas->cd(1) ; frame->Draw();
99  // canvas->cd(2) ; frame2->Draw();
100 
101  frame2->Draw();
102 }
RooAbsPdf * buildModel(RooRealVar *x, const TString &signalType, const TString &backgroundType)
Build the model to fit.
void reinitializeParameters()
rooPair importTH1(TH1 *histo, const double &inputXmin, const double &inputXmax)
Definition: FitWithRooFit.cc:5
Log< level::Warning, false > LogWarning
dh
Definition: cuy.py:354

◆ fsig()

RooRealVar* FitWithRooFit::fsig ( )
inline

Definition at line 235 of file FitWithRooFit.h.

References fsig_.

235 { return fsig_; }
RooRealVar * fsig_

◆ gamma()

RooRealVar* FitWithRooFit::gamma ( )
inline

Definition at line 229 of file FitWithRooFit.h.

References gamma_.

Referenced by ZMassBinFit_OldTool().

229 { return gamma_; }
RooRealVar * gamma_

◆ gaussFrac()

RooRealVar* FitWithRooFit::gaussFrac ( )
inline

Definition at line 230 of file FitWithRooFit.h.

References gaussFrac_.

230 { return gaussFrac_; }
RooRealVar * gaussFrac_

◆ gaussFrac2()

RooRealVar* FitWithRooFit::gaussFrac2 ( )
inline

Definition at line 231 of file FitWithRooFit.h.

References gaussFrac2_.

231 { return gaussFrac2_; }
RooRealVar * gaussFrac2_

◆ importTH1()

rooPair FitWithRooFit::importTH1 ( TH1 *  histo,
const double &  inputXmin,
const double &  inputXmax 
)

Definition at line 5 of file FitWithRooFit.cc.

References timingPdfMaker::histo, x, multiplicitycorr_cfi::xMax, and photonAnalyzer_cfi::xMin.

Referenced by fit().

5  {
6  double xMin = inputXmin;
7  double xMax = inputXmax;
8  if ((xMin == xMax) && xMin == 0) {
9  xMin = histo->GetXaxis()->GetXmin();
10  xMax = histo->GetXaxis()->GetXmax();
11  }
12  // Declare observable x
13  RooRealVar x("InvMass", "di-muon mass M(#mu^{+}#mu^{-}) [GeV]", xMin, xMax);
14  // Create a binned dataset that imports contents of TH1 and associates its contents to observable 'x'
15  return (std::make_pair(x, new RooDataHist("dh", "dh", x, RooFit::Import(*histo))));
16 }

◆ initA0()

void FitWithRooFit::initA0 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "a0",
const TString &  title = "a0" 
)

◆ initA1()

void FitWithRooFit::initA1 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "a1",
const TString &  title = "a1" 
)

◆ initA2()

void FitWithRooFit::initA2 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "a2",
const TString &  title = "a2" 
)

◆ initA3()

void FitWithRooFit::initA3 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "a3",
const TString &  title = "a3" 
)

◆ initA4()

void FitWithRooFit::initA4 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "a4",
const TString &  title = "a4" 
)

◆ initA5()

void FitWithRooFit::initA5 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "a5",
const TString &  title = "a5" 
)

◆ initA6()

void FitWithRooFit::initA6 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "a6",
const TString &  title = "a6" 
)

◆ initAlpha()

void FitWithRooFit::initAlpha ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "alpha",
const TString &  title = "alpha" 
)

◆ initExpCoeffA0()

void FitWithRooFit::initExpCoeffA0 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "expCoeffa0",
const TString &  title = "expCoeffa0" 
)

◆ initExpCoeffA1()

void FitWithRooFit::initExpCoeffA1 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "expCoeffa1",
const TString &  title = "expCoeffa1" 
)

◆ initExpCoeffA2()

void FitWithRooFit::initExpCoeffA2 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "expCoeffa2",
const TString &  title = "expCoeffa2" 
)

◆ initFGCB()

void FitWithRooFit::initFGCB ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "fGCB",
const TString &  title = "fGCB" 
)

◆ initFsig()

void FitWithRooFit::initFsig ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "fsig",
const TString &  title = "signal fraction" 
)

◆ initGamma()

void FitWithRooFit::initGamma ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "gamma",
const TString &  title = "gamma" 
)

◆ initGaussFrac()

void FitWithRooFit::initGaussFrac ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "GaussFrac",
const TString &  title = "GaussFrac" 
)

◆ initGaussFrac2()

void FitWithRooFit::initGaussFrac2 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "GaussFrac2",
const TString &  title = "GaussFrac2" 
)

◆ initMean()

void FitWithRooFit::initMean ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "mean",
const TString &  title = "mean" 
)

◆ initMean2()

void FitWithRooFit::initMean2 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "mean2",
const TString &  title = "mean2" 
)

◆ initMean3()

void FitWithRooFit::initMean3 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "mean3",
const TString &  title = "mean3" 
)

◆ initN()

void FitWithRooFit::initN ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "n",
const TString &  title = "n" 
)

◆ initSigma()

void FitWithRooFit::initSigma ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "sigma",
const TString &  title = "sigma" 
)

◆ initSigma2()

void FitWithRooFit::initSigma2 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "sigma2",
const TString &  title = "sigma2" 
)

◆ initSigma3()

void FitWithRooFit::initSigma3 ( const double &  value,
const double &  min,
const double &  max,
const TString &  name = "sigma3",
const TString &  title = "sigma3" 
)

◆ mean()

RooRealVar* FitWithRooFit::mean ( )
inline

Definition at line 223 of file FitWithRooFit.h.

References mean_.

Referenced by ZMassBinFit_OldTool().

223 { return mean_; }
RooRealVar * mean_

◆ mean2()

RooRealVar* FitWithRooFit::mean2 ( )
inline

Definition at line 224 of file FitWithRooFit.h.

References mean2_.

Referenced by ZMassBinFit_OldTool().

224 { return mean2_; }
RooRealVar * mean2_

◆ mean3()

RooRealVar* FitWithRooFit::mean3 ( )
inline

Definition at line 225 of file FitWithRooFit.h.

References mean3_.

225 { return mean3_; }
RooRealVar * mean3_

◆ n()

RooRealVar* FitWithRooFit::n ( )
inline

Definition at line 244 of file FitWithRooFit.h.

References n_.

244 { return n_; }
RooRealVar * n_

◆ reinitializeParameters()

void FitWithRooFit::reinitializeParameters ( )

Definition at line 289 of file FitWithRooFit.cc.

References a0_, a1_, a2_, a3_, a4_, a5_, a6_, alpha_, expCoeffa0_, expCoeffa1_, expCoeffa2_, fGCB_, fsig_, gamma_, gaussFrac2_, gaussFrac_, initVal_a0, initVal_a1, initVal_a2, initVal_a3, initVal_a4, initVal_a5, initVal_a6, initVal_alpha, initVal_expCoeffa0, initVal_expCoeffa1, initVal_expCoeffa2, initVal_fGCB, initVal_fsig, initVal_gamma, initVal_gaussFrac, initVal_gaussFrac2, initVal_mean, initVal_mean2, initVal_mean3, initVal_n, initVal_sigma, initVal_sigma2, initVal_sigma3, mean2_, mean3_, mean_, n_, sigma2_, sigma3_, and sigma_.

Referenced by fit().

289  {
290  if (mean_ != nullptr)
291  mean_->setVal(initVal_mean);
292  if (mean2_ != nullptr)
293  mean2_->setVal(initVal_mean2);
294  if (mean3_ != nullptr)
295  mean3_->setVal(initVal_mean3);
296  if (sigma_ != nullptr)
297  sigma_->setVal(initVal_sigma);
298  if (sigma2_ != nullptr)
299  sigma2_->setVal(initVal_sigma2);
300  if (sigma3_ != nullptr)
301  sigma3_->setVal(initVal_sigma3);
302  if (gamma_ != nullptr)
303  gamma_->setVal(initVal_gamma);
304  if (gaussFrac_ != nullptr)
305  gaussFrac_->setVal(initVal_gaussFrac);
306  if (gaussFrac2_ != nullptr)
308  if (expCoeffa0_ != nullptr)
310  if (expCoeffa1_ != nullptr)
312  if (expCoeffa2_ != nullptr)
314  if (fsig_ != nullptr)
315  fsig_->setVal(initVal_fsig);
316  if (a0_ != nullptr)
317  a0_->setVal(initVal_a0);
318  if (a1_ != nullptr)
319  a1_->setVal(initVal_a1);
320  if (a2_ != nullptr)
321  a2_->setVal(initVal_a2);
322  if (a3_ != nullptr)
323  a3_->setVal(initVal_a3);
324  if (a4_ != nullptr)
325  a4_->setVal(initVal_a4);
326  if (a5_ != nullptr)
327  a5_->setVal(initVal_a5);
328  if (a6_ != nullptr)
329  a6_->setVal(initVal_a6);
330  if (alpha_ != nullptr)
331  alpha_->setVal(initVal_alpha);
332  if (n_ != nullptr)
333  n_->setVal(initVal_n);
334  if (fGCB_ != nullptr)
335  fGCB_->setVal(initVal_fGCB);
336 }
RooRealVar * n_
RooRealVar * mean_
double initVal_expCoeffa0
RooRealVar * gaussFrac2_
RooRealVar * a0_
RooRealVar * sigma2_
double initVal_mean2
RooRealVar * a4_
RooRealVar * sigma_
RooRealVar * fGCB_
RooRealVar * mean2_
RooRealVar * sigma3_
RooRealVar * a6_
RooRealVar * expCoeffa2_
double initVal_expCoeffa1
double initVal_mean
double initVal_gamma
double initVal_alpha
double initVal_gaussFrac2
RooRealVar * mean3_
double initVal_sigma3
double initVal_sigma2
double initVal_expCoeffa2
RooRealVar * a1_
RooRealVar * alpha_
RooRealVar * fsig_
RooRealVar * a2_
double initVal_fGCB
RooRealVar * expCoeffa1_
RooRealVar * a3_
double initVal_fsig
RooRealVar * a5_
double initVal_gaussFrac
double initVal_mean3
RooRealVar * gamma_
RooRealVar * expCoeffa0_
RooRealVar * gaussFrac_
double initVal_sigma

◆ sigma()

RooRealVar* FitWithRooFit::sigma ( )
inline

Definition at line 226 of file FitWithRooFit.h.

References sigma_.

Referenced by ZMassBinFit_OldTool().

226 { return sigma_; }
RooRealVar * sigma_

◆ sigma2()

RooRealVar* FitWithRooFit::sigma2 ( )
inline

Definition at line 227 of file FitWithRooFit.h.

References sigma2_.

227 { return sigma2_; }
RooRealVar * sigma2_

◆ sigma3()

RooRealVar* FitWithRooFit::sigma3 ( )
inline

Definition at line 228 of file FitWithRooFit.h.

References sigma3_.

228 { return sigma3_; }
RooRealVar * sigma3_

Member Data Documentation

◆ a0_

RooRealVar* FitWithRooFit::a0_
protected

Definition at line 270 of file FitWithRooFit.h.

Referenced by a0(), buildBackgroundModel(), initA0(), and reinitializeParameters().

◆ a1_

RooRealVar* FitWithRooFit::a1_
protected

Definition at line 271 of file FitWithRooFit.h.

Referenced by a1(), buildBackgroundModel(), initA1(), and reinitializeParameters().

◆ a2_

RooRealVar* FitWithRooFit::a2_
protected

Definition at line 272 of file FitWithRooFit.h.

Referenced by a2(), buildBackgroundModel(), initA2(), and reinitializeParameters().

◆ a3_

RooRealVar* FitWithRooFit::a3_
protected

Definition at line 273 of file FitWithRooFit.h.

Referenced by a3(), buildBackgroundModel(), initA3(), and reinitializeParameters().

◆ a4_

RooRealVar* FitWithRooFit::a4_
protected

Definition at line 274 of file FitWithRooFit.h.

Referenced by a4(), buildBackgroundModel(), initA4(), and reinitializeParameters().

◆ a5_

RooRealVar* FitWithRooFit::a5_
protected

Definition at line 275 of file FitWithRooFit.h.

Referenced by a5(), buildBackgroundModel(), initA5(), and reinitializeParameters().

◆ a6_

RooRealVar* FitWithRooFit::a6_
protected

Definition at line 276 of file FitWithRooFit.h.

Referenced by a6(), buildBackgroundModel(), initA6(), and reinitializeParameters().

◆ alpha_

RooRealVar* FitWithRooFit::alpha_
protected

Definition at line 277 of file FitWithRooFit.h.

Referenced by alpha(), buildSignalModel(), initAlpha(), and reinitializeParameters().

◆ expCoeffa0_

RooRealVar* FitWithRooFit::expCoeffa0_
protected

◆ expCoeffa1_

RooRealVar* FitWithRooFit::expCoeffa1_
protected

◆ expCoeffa2_

RooRealVar* FitWithRooFit::expCoeffa2_
protected

◆ fGCB_

RooRealVar* FitWithRooFit::fGCB_
protected

Definition at line 279 of file FitWithRooFit.h.

Referenced by buildSignalModel(), fGCB(), initFGCB(), and reinitializeParameters().

◆ fsig_

RooRealVar* FitWithRooFit::fsig_
protected

◆ gamma_

RooRealVar* FitWithRooFit::gamma_
protected

Definition at line 263 of file FitWithRooFit.h.

Referenced by buildSignalModel(), gamma(), initGamma(), and reinitializeParameters().

◆ gaussFrac2_

RooRealVar* FitWithRooFit::gaussFrac2_
protected

◆ gaussFrac_

RooRealVar* FitWithRooFit::gaussFrac_
protected

◆ initVal_a0

double FitWithRooFit::initVal_a0
protected

Definition at line 295 of file FitWithRooFit.h.

Referenced by initA0(), and reinitializeParameters().

◆ initVal_a1

double FitWithRooFit::initVal_a1
protected

Definition at line 296 of file FitWithRooFit.h.

Referenced by initA1(), and reinitializeParameters().

◆ initVal_a2

double FitWithRooFit::initVal_a2
protected

Definition at line 297 of file FitWithRooFit.h.

Referenced by initA2(), and reinitializeParameters().

◆ initVal_a3

double FitWithRooFit::initVal_a3
protected

Definition at line 298 of file FitWithRooFit.h.

Referenced by initA3(), and reinitializeParameters().

◆ initVal_a4

double FitWithRooFit::initVal_a4
protected

Definition at line 299 of file FitWithRooFit.h.

Referenced by initA4(), and reinitializeParameters().

◆ initVal_a5

double FitWithRooFit::initVal_a5
protected

Definition at line 300 of file FitWithRooFit.h.

Referenced by initA5(), and reinitializeParameters().

◆ initVal_a6

double FitWithRooFit::initVal_a6
protected

Definition at line 301 of file FitWithRooFit.h.

Referenced by initA6(), and reinitializeParameters().

◆ initVal_alpha

double FitWithRooFit::initVal_alpha
protected

Definition at line 302 of file FitWithRooFit.h.

Referenced by initAlpha(), and reinitializeParameters().

◆ initVal_expCoeffa0

double FitWithRooFit::initVal_expCoeffa0
protected

Definition at line 291 of file FitWithRooFit.h.

Referenced by initExpCoeffA0(), and reinitializeParameters().

◆ initVal_expCoeffa1

double FitWithRooFit::initVal_expCoeffa1
protected

Definition at line 292 of file FitWithRooFit.h.

Referenced by initExpCoeffA1(), and reinitializeParameters().

◆ initVal_expCoeffa2

double FitWithRooFit::initVal_expCoeffa2
protected

Definition at line 293 of file FitWithRooFit.h.

Referenced by initExpCoeffA2(), and reinitializeParameters().

◆ initVal_fGCB

double FitWithRooFit::initVal_fGCB
protected

Definition at line 304 of file FitWithRooFit.h.

Referenced by initFGCB(), and reinitializeParameters().

◆ initVal_fsig

double FitWithRooFit::initVal_fsig
protected

Definition at line 294 of file FitWithRooFit.h.

Referenced by initFsig(), and reinitializeParameters().

◆ initVal_gamma

double FitWithRooFit::initVal_gamma
protected

Definition at line 288 of file FitWithRooFit.h.

Referenced by initGamma(), and reinitializeParameters().

◆ initVal_gaussFrac

double FitWithRooFit::initVal_gaussFrac
protected

Definition at line 289 of file FitWithRooFit.h.

Referenced by initGaussFrac(), and reinitializeParameters().

◆ initVal_gaussFrac2

double FitWithRooFit::initVal_gaussFrac2
protected

Definition at line 290 of file FitWithRooFit.h.

Referenced by initGaussFrac2(), and reinitializeParameters().

◆ initVal_mean

double FitWithRooFit::initVal_mean
protected

Definition at line 282 of file FitWithRooFit.h.

Referenced by initMean(), and reinitializeParameters().

◆ initVal_mean2

double FitWithRooFit::initVal_mean2
protected

Definition at line 283 of file FitWithRooFit.h.

Referenced by initMean2(), and reinitializeParameters().

◆ initVal_mean3

double FitWithRooFit::initVal_mean3
protected

Definition at line 284 of file FitWithRooFit.h.

Referenced by initMean3(), and reinitializeParameters().

◆ initVal_n

double FitWithRooFit::initVal_n
protected

Definition at line 303 of file FitWithRooFit.h.

Referenced by initN(), and reinitializeParameters().

◆ initVal_sigma

double FitWithRooFit::initVal_sigma
protected

Definition at line 285 of file FitWithRooFit.h.

Referenced by initSigma(), and reinitializeParameters().

◆ initVal_sigma2

double FitWithRooFit::initVal_sigma2
protected

Definition at line 286 of file FitWithRooFit.h.

Referenced by initSigma2(), and reinitializeParameters().

◆ initVal_sigma3

double FitWithRooFit::initVal_sigma3
protected

Definition at line 287 of file FitWithRooFit.h.

Referenced by initSigma3(), and reinitializeParameters().

◆ mean2_

RooRealVar* FitWithRooFit::mean2_
protected

Definition at line 258 of file FitWithRooFit.h.

Referenced by buildSignalModel(), initMean2(), mean2(), and reinitializeParameters().

◆ mean3_

RooRealVar* FitWithRooFit::mean3_
protected

Definition at line 259 of file FitWithRooFit.h.

Referenced by buildSignalModel(), initMean3(), mean3(), and reinitializeParameters().

◆ mean_

RooRealVar* FitWithRooFit::mean_
protected

Definition at line 257 of file FitWithRooFit.h.

Referenced by buildSignalModel(), initMean(), mean(), and reinitializeParameters().

◆ n_

RooRealVar* FitWithRooFit::n_
protected

Definition at line 278 of file FitWithRooFit.h.

Referenced by buildSignalModel(), initN(), n(), and reinitializeParameters().

◆ sigma2_

RooRealVar* FitWithRooFit::sigma2_
protected

Definition at line 261 of file FitWithRooFit.h.

Referenced by buildSignalModel(), initSigma2(), reinitializeParameters(), and sigma2().

◆ sigma3_

RooRealVar* FitWithRooFit::sigma3_
protected

Definition at line 262 of file FitWithRooFit.h.

Referenced by buildSignalModel(), initSigma3(), reinitializeParameters(), and sigma3().

◆ sigma_

RooRealVar* FitWithRooFit::sigma_
protected

Definition at line 260 of file FitWithRooFit.h.

Referenced by buildSignalModel(), initSigma(), reinitializeParameters(), and sigma().

◆ useChi2_

bool FitWithRooFit::useChi2_

Definition at line 253 of file FitWithRooFit.h.

Referenced by fit(), and ZMassBinFit_OldTool().