CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Public Attributes | Protected Attributes
FitWithRooFit Class Reference

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.cc.

Constructor & Destructor Documentation

◆ FitWithRooFit()

FitWithRooFit::FitWithRooFit ( )
inline

Definition at line 53 of file FitWithRooFit.cc.

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 467 of file FitWithRooFit.cc.

References a0_.

467 { return a0_; }
RooRealVar * a0_

◆ a1()

RooRealVar* FitWithRooFit::a1 ( )
inline

Definition at line 468 of file FitWithRooFit.cc.

References a1_.

468 { return a1_; }
RooRealVar * a1_

◆ a2()

RooRealVar* FitWithRooFit::a2 ( )
inline

Definition at line 469 of file FitWithRooFit.cc.

References a2_.

469 { return a2_; }
RooRealVar * a2_

◆ a3()

RooRealVar* FitWithRooFit::a3 ( )
inline

Definition at line 470 of file FitWithRooFit.cc.

References a3_.

470 { return a3_; }
RooRealVar * a3_

◆ a4()

RooRealVar* FitWithRooFit::a4 ( )
inline

Definition at line 471 of file FitWithRooFit.cc.

References a4_.

471 { return a4_; }
RooRealVar * a4_

◆ a5()

RooRealVar* FitWithRooFit::a5 ( )
inline

Definition at line 472 of file FitWithRooFit.cc.

References a5_.

472 { return a5_; }
RooRealVar * a5_

◆ a6()

RooRealVar* FitWithRooFit::a6 ( )
inline

Definition at line 473 of file FitWithRooFit.cc.

References a6_.

473 { return a6_; }
RooRealVar * a6_

◆ alpha()

RooRealVar* FitWithRooFit::alpha ( )
inline

Definition at line 474 of file FitWithRooFit.cc.

References alpha_.

474 { return alpha_; }
RooRealVar * alpha_

◆ buildBackgroundModel()

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

Build the model for the specified background type.

Definition at line 631 of file FitWithRooFit.cc.

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

Referenced by buildModel().

631  {
632  RooAbsPdf* background = nullptr;
633  if (backgroundType == "exponential") {
634  // Add an exponential for the background
635  if ((expCoeffa1_ == nullptr) || (fsig_ == nullptr)) {
636  std::cout
637  << "Error: one or more parameters are not initialized. Please be sure to initialize expCoeffa1 and fsig"
638  << std::endl;
639  exit(1);
640  }
641  background = new RooExponential("exponential", "exponential", *x, *expCoeffa1_);
642  }
643 
644  if (backgroundType == "exponentialpol") {
645  // Add an exponential for the background
646  if ((expCoeffa0_ == nullptr) || (expCoeffa1_ == nullptr) || (expCoeffa2_ == nullptr) || (fsig_ == nullptr)) {
647  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize expCoeff and fsig"
648  << std::endl;
649  exit(1);
650  }
651  background = new RooGenericPdf("exponential",
652  "exponential",
653  "TMath::Exp(@1+@2*@0+@3*@0*@0)",
654  RooArgList(*x, *expCoeffa0_, *expCoeffa1_, *expCoeffa2_));
655  }
656 
657  else if (backgroundType == "chebychev0") {
658  // Add a linear background
659  if (a0_ == nullptr) {
660  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize a0" << std::endl;
661  exit(1);
662  }
663  background = new RooChebychev("chebychev0", "chebychev0", *x, *a0_);
664  } else if (backgroundType == "chebychev1") {
665  // Add a 2nd order chebychev polynomial background
666  if ((a0_ == nullptr) || (a1_ == nullptr)) {
667  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize a0 and a1"
668  << std::endl;
669  exit(1);
670  }
671  background = new RooChebychev("chebychev1", "chebychev1", *x, RooArgList(*a0_, *a1_));
672  } else if (backgroundType == "chebychev3") {
673  // Add a 3rd order chebychev polynomial background
674  if ((a0_ == nullptr) || (a1_ == nullptr) || (a2_ == nullptr) || (a3_ == nullptr)) {
675  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize a0, a1, a2 and a3"
676  << std::endl;
677  exit(1);
678  }
679  background = new RooChebychev("3rdOrderPol", "3rdOrderPol", *x, RooArgList(*a0_, *a1_, *a2_, *a3_));
680  }
681 
682  else if (backgroundType == "chebychev6") {
683  // Add a 6th order chebychev polynomial background
684  if ((a0_ == nullptr) || (a1_ == nullptr) || (a2_ == nullptr) || (a3_ == nullptr) || (a4_ == nullptr) ||
685  (a5_ == nullptr) || (a6_ == nullptr)) {
686  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize a0, a1, a2, a3, "
687  "a4, a5 and a6"
688  << std::endl;
689  exit(1);
690  }
691  background =
692  new RooChebychev("6thOrderPol", "6thOrderPol", *x, RooArgList(*a0_, *a1_, *a2_, *a3_, *a4_, *a5_, *a6_));
693  }
694 
695  return background;
696  }
RooRealVar * a0_
RooRealVar * a4_
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 
)
inline

Build the model to fit.

Definition at line 699 of file FitWithRooFit.cc.

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

Referenced by fit().

699  {
700  RooAbsPdf* model = nullptr;
701 
702  RooAbsPdf* signal = buildSignalModel(x, signalType);
703  RooAbsPdf* background = buildBackgroundModel(x, backgroundType);
704 
705  if ((signal != nullptr) && (background != nullptr)) {
706  // Combine signal and background pdfs
707  std::cout << "Building model with signal and backgound" << std::endl;
708  model = new RooAddPdf("model", "model", RooArgList(*signal, *background), *fsig_);
709  } else if (signal != nullptr) {
710  std::cout << "Building model with signal" << std::endl;
711  model = signal;
712  } else if (background != nullptr) {
713  std::cout << "Building model with backgound" << std::endl;
714  model = background;
715  } else {
716  std::cout << "Nothing to fit" << std::endl;
717  exit(0);
718  }
719  return model;
720  }
RooAbsPdf * buildSignalModel(RooRealVar *x, const TString &signalType)
Build the model for the specified signal type.
RooRealVar * fsig_
RooAbsPdf * buildBackgroundModel(RooRealVar *x, const TString &backgroundType)
Build the model for the specified background type.
def exit(msg="")

◆ buildSignalModel()

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

Build the model for the specified signal type.

Definition at line 479 of file FitWithRooFit.cc.

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

Referenced by buildModel().

479  {
480  RooAbsPdf* signal = nullptr;
481  if (signalType == "gaussian") {
482  // Fit a Gaussian p.d.f to the data
483  if ((mean_ == nullptr) || (sigma_ == nullptr)) {
484  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean and sigma"
485  << std::endl;
486  exit(1);
487  }
488  signal = new RooGaussian("gauss", "gauss", *x, *mean_, *sigma_);
489  } else if (signalType == "doubleGaussian") {
490  // Fit with double gaussian
491  if ((mean_ == nullptr) || (sigma_ == nullptr) || (sigma2_ == nullptr)) {
492  std::cout
493  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma and sigma2"
494  << std::endl;
495  exit(1);
496  }
497  RooGaussModel* gaussModel = new RooGaussModel("gaussModel", "gaussModel", *x, *mean_, *sigma_);
498  RooGaussModel* gaussModel2 = new RooGaussModel("gaussModel2", "gaussModel2", *x, *mean_, *sigma2_);
499  signal = new RooAddModel("doubleGaussian", "double gaussian", RooArgList(*gaussModel, *gaussModel2), *gaussFrac_);
500  } else if (signalType == "tripleGaussian") {
501  // Fit with triple gaussian
502  if ((mean_ == nullptr) || (mean2_ == nullptr) || (mean3_ == nullptr) || (sigma_ == nullptr) ||
503  (sigma2_ == nullptr) || (sigma3_ == nullptr)) {
504  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean, mean2, "
505  "mean3, sigma, sigma2, sigma3"
506  << std::endl;
507  exit(1);
508  }
509  RooGaussModel* gaussModel = new RooGaussModel("gaussModel", "gaussModel", *x, *mean_, *sigma_);
510  RooGaussModel* gaussModel2 = new RooGaussModel("gaussModel2", "gaussModel2", *x, *mean2_, *sigma2_);
511  RooGaussModel* gaussModel3 = new RooGaussModel("gaussModel3", "gaussModel3", *x, *mean3_, *sigma3_);
512  signal = new RooAddModel("tripleGaussian",
513  "triple gaussian",
514  RooArgList(*gaussModel, *gaussModel2, *gaussModel3),
515  RooArgList(*gaussFrac_, *gaussFrac2_));
516  } else if (signalType == "breitWigner") {
517  // Fit a Breit-Wigner
518  if ((mean_ == nullptr) || (gamma_ == nullptr)) {
519  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean and gamma"
520  << std::endl;
521  exit(1);
522  }
523  signal = new RooBreitWigner("breiWign", "breitWign", *x, *mean_, *gamma_);
524  } else if (signalType == "relBreitWigner") {
525  // Fit a relativistic Breit-Wigner
526  if ((mean_ == nullptr) || (gamma_ == nullptr)) {
527  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean and gamma"
528  << std::endl;
529  exit(1);
530  }
531  signal = new RooGenericPdf("Relativistic Breit-Wigner",
532  "RBW",
533  "@0/(pow(@0*@0 - @1*@1,2) + @2*@2*@0*@0*@0*@0/(@1*@1))",
534  RooArgList(*x, *mean_, *gamma_));
535  } else if (signalType == "voigtian") {
536  // Fit a Voigtian
537  if ((mean_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr)) {
538  std::cout
539  << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma and gamma"
540  << std::endl;
541  exit(1);
542  }
543  signal = new RooVoigtian("voigt", "voigt", *x, *mean_, *gamma_, *sigma_);
544  } else if (signalType == "crystalBall") {
545  // Fit a CrystalBall
546  if ((mean_ == nullptr) || (sigma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr)) {
547  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma, "
548  "alpha and n"
549  << std::endl;
550  exit(1);
551  }
552  signal = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma_, *alpha_, *n_);
553  } else if (signalType == "breitWignerTimesCB") {
554  // Fit a Breit Wigner convoluted with a CrystalBall
555  if ((mean_ == nullptr) || (mean2_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr) ||
556  (alpha_ == nullptr) || (n_ == nullptr)) {
557  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean, mean2, "
558  "sigma, gamma, alpha and n"
559  << std::endl;
560  exit(1);
561  }
562  RooAbsPdf* bw = new RooBreitWigner("breiWigner", "breitWigner", *x, *mean_, *gamma_);
563  RooAbsPdf* cb = new RooCBShape("crystalBall", "crystalBall", *x, *mean2_, *sigma_, *alpha_, *n_);
564  signal = new RooFFTConvPdf("breitWignerTimesCB", "breitWignerTimesCB", *x, *bw, *cb);
565  } else if (signalType == "relBreitWignerTimesCB") {
566  // Fit a relativistic Breit Wigner convoluted with a CrystalBall
567  if ((mean_ == nullptr) || (mean2_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr) ||
568  (alpha_ == nullptr) || (n_ == nullptr)) {
569  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean, mean2, "
570  "sigma, gamma, alpha and n"
571  << std::endl;
572  exit(1);
573  }
574  RooGenericPdf* bw = new RooGenericPdf("Relativistic Breit-Wigner",
575  "RBW",
576  "@0/(pow(@0*@0 - @1*@1,2) + @2*@2*@0*@0*@0*@0/(@1*@1))",
577  RooArgList(*x, *mean_, *gamma_));
578  RooAbsPdf* cb = new RooCBShape("crystalBall", "crystalBall", *x, *mean2_, *sigma_, *alpha_, *n_);
579  signal = new RooFFTConvPdf("relBreitWignerTimesCB", "relBreitWignerTimesCB", *x, *bw, *cb);
580  } else if (signalType == "gaussianPlusCrystalBall") {
581  // Fit a Gaussian + CrystalBall with the same mean
582  if ((mean_ == nullptr) || (sigma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr) || (sigma2_ == nullptr) ||
583  (fGCB_ == nullptr)) {
584  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean, sigma, "
585  "sigma2, alpha, n and fGCB"
586  << std::endl;
587  exit(1);
588  }
589  RooAbsPdf* tempCB = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma_, *alpha_, *n_);
590  RooAbsPdf* tempGaussian = new RooGaussian("gauss", "gauss", *x, *mean_, *sigma2_);
591 
592  signal = new RooAddPdf(
593  "gaussianPlusCrystalBall", "gaussianPlusCrystalBall", RooArgList(*tempCB, *tempGaussian), *fGCB_);
594  } else if (signalType == "voigtianPlusCrystalBall") {
595  // Fit a Voigtian + CrystalBall with the same mean
596  if ((mean_ == nullptr) || (sigma_ == nullptr) || (gamma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr) ||
597  (sigma2_ == nullptr) || (fGCB_ == nullptr)) {
598  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean, gamma, "
599  "sigma, sigma2, alpha, n and fGCB"
600  << std::endl;
601  exit(1);
602  }
603  RooAbsPdf* tempVoigt = new RooVoigtian("voigt", "voigt", *x, *mean_, *gamma_, *sigma_);
604  RooAbsPdf* tempCB = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma2_, *alpha_, *n_);
605 
606  signal =
607  new RooAddPdf("voigtianPlusCrystalBall", "voigtianPlusCrystalBall", RooArgList(*tempCB, *tempVoigt), *fGCB_);
608  } else if (signalType == "breitWignerPlusCrystalBall") {
609  // Fit a Breit-Wigner + CrystalBall with the same mean
610  if ((mean_ == nullptr) || (gamma_ == nullptr) || (alpha_ == nullptr) || (n_ == nullptr) || (sigma2_ == nullptr) ||
611  (fGCB_ == nullptr)) {
612  std::cout << "Error: one or more parameters are not initialized. Please be sure to initialize mean, gamma, "
613  "sigma, alpha, n and fGCB"
614  << std::endl;
615  exit(1);
616  }
617  RooAbsPdf* tempBW = new RooBreitWigner("breitWign", "breitWign", *x, *mean_, *gamma_);
618  RooAbsPdf* tempCB = new RooCBShape("crystalBall", "crystalBall", *x, *mean_, *sigma2_, *alpha_, *n_);
619 
620  signal = new RooAddPdf(
621  "breitWignerPlusCrystalBall", "breitWignerPlusCrystalBall", RooArgList(*tempCB, *tempBW), *fGCB_);
622  }
623 
624  else if (signalType != "") {
625  std::cout << "Unknown signal function: " << signalType << ". Signal will not be in the model" << std::endl;
626  }
627  return signal;
628  }
RooRealVar * n_
RooRealVar * mean_
RooRealVar * gaussFrac2_
RooRealVar * sigma2_
RooRealVar * sigma_
RooRealVar * fGCB_
RooRealVar * mean2_
RooRealVar * sigma3_
RooRealVar * mean3_
RooRealVar * alpha_
RooRealVar * gamma_
RooRealVar * gaussFrac_
def exit(msg="")

◆ expCoeffa0()

RooRealVar* FitWithRooFit::expCoeffa0 ( )
inline

Definition at line 463 of file FitWithRooFit.cc.

References expCoeffa0_.

463 { return expCoeffa0_; }
RooRealVar * expCoeffa0_

◆ expCoeffa1()

RooRealVar* FitWithRooFit::expCoeffa1 ( )
inline

Definition at line 464 of file FitWithRooFit.cc.

References expCoeffa1_.

464 { return expCoeffa1_; }
RooRealVar * expCoeffa1_

◆ expCoeffa2()

RooRealVar* FitWithRooFit::expCoeffa2 ( )
inline

Definition at line 465 of file FitWithRooFit.cc.

References expCoeffa2_.

465 { return expCoeffa2_; }
RooRealVar * expCoeffa2_

◆ fGCB()

RooRealVar* FitWithRooFit::fGCB ( )
inline

Definition at line 476 of file FitWithRooFit.cc.

References fGCB_.

476 { 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 
)
inline

Definition at line 94 of file FitWithRooFit.cc.

References buildModel(), hltPixelTracks_cff::chi2, gather_cfg::cout, 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().

99  {
101 
102  rooPair imported = importTH1(histo, xMin, xMax);
103  RooRealVar x(imported.first);
104  RooDataHist* dh = imported.second;
105 
106  // Make plot of binned dataset showing Poisson error bars (RooFit default)
107  RooPlot* frame = x.frame(RooFit::Title("Imported TH1 with Poisson error bars"));
108  frame->SetName(TString(histo->GetName()) + "_frame");
109  dh->plotOn(frame);
110 
111  // Build the composite model
112  RooAbsPdf* model = buildModel(&x, signalType, backgroundType);
113 
114  std::unique_ptr<RooAbsReal> chi2{model->createChi2(*dh, RooFit::DataError(RooAbsData::SumW2))};
115 
116  // Fit the composite model
117  // -----------------------
118  // Fit with likelihood
119  if (!useChi2_) {
120  if (sumW2Error)
121  model->fitTo(*dh, RooFit::Save(), RooFit::SumW2Error(kTRUE));
122  else
123  model->fitTo(*dh);
124  }
125  // Fit with chi^2
126  else {
127  std::cout << "FITTING WITH CHI^2" << std::endl;
128  RooMinimizer m(*chi2);
129  m.migrad();
130  m.hesse();
131  // RooFitResult* r_chi2_wgt = m.save();
132  }
133  model->plotOn(frame);
134  model->plotOn(frame, RooFit::Components(backgroundType), RooFit::LineStyle(kDotted), RooFit::LineColor(kRed));
135  model->paramOn(frame, RooFit::Label("fit result"), RooFit::Format("NEU", RooFit::AutoPrecision(2)));
136 
137  // TODO: fix next lines to get the prob(chi2) (ndof should be dynamically set according to the choosen pdf)
138  // double chi2 = xframe.chiSquare("model","data",ndof);
139  // double ndoff = xframeGetNbinsX();
140  // double chi2prob = TMath::Prob(chi2,ndoff);
141 
142  // 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
143  // ---------------------------------------------------------------------------------------------
144 
145  // If histogram has custom error (i.e. its contents is does not originate from a Poisson process
146  // but e.g. is a sum of weighted events) you can data with symmetric 'sum-of-weights' error instead
147  // (same error bars as shown by ROOT)
148  RooPlot* frame2 = x.frame(RooFit::Title("Imported TH1 with internal errors"));
149  dh->plotOn(frame2, RooFit::DataError(RooAbsData::SumW2));
150  model->plotOn(frame2);
151  model->plotOn(frame2, RooFit::Components(backgroundType), RooFit::LineColor(kRed));
152  model->paramOn(frame2, RooFit::Label("fit result"), RooFit::Format("NEU", RooFit::AutoPrecision(2)));
153 
154  // Please note that error bars shown (Poisson or SumW2) are for visualization only, the are NOT used
155  // in a maximum likelihood fit
156  //
157  // A (binned) ML fit will ALWAYS assume the Poisson error interpretation of data (the mathematical definition
158  // of likelihood does not take any external definition of errors). Data with non-unit weights can only be correctly
159  // fitted with a chi^2 fit (see rf602_chi2fit.C)
160 
161  // Draw all frames on a canvas
162  // if( canvas == 0 ) {
163  // canvas = new TCanvas("rf102_dataimport","rf102_dataimport",800,800);
164  // canvas->cd(1);
165  // }
166  // canvas->Divide(2,1);
167  // canvas->cd(1) ; frame->Draw();
168  // canvas->cd(2) ; frame2->Draw();
169 
170  frame2->Draw();
171  }
void reinitializeParameters()
rooPair importTH1(TH1 *histo, const double &inputXmin, const double &inputXmax)
RooAbsPdf * buildModel(RooRealVar *x, const TString &signalType, const TString &backgroundType)
Build the model to fit.
dh
Definition: cuy.py:354

◆ fsig()

RooRealVar* FitWithRooFit::fsig ( )
inline

Definition at line 466 of file FitWithRooFit.cc.

References fsig_.

466 { return fsig_; }
RooRealVar * fsig_

◆ gamma()

RooRealVar* FitWithRooFit::gamma ( )
inline

Definition at line 460 of file FitWithRooFit.cc.

References gamma_.

Referenced by ZMassBinFit_OldTool().

460 { return gamma_; }
RooRealVar * gamma_

◆ gaussFrac()

RooRealVar* FitWithRooFit::gaussFrac ( )
inline

Definition at line 461 of file FitWithRooFit.cc.

References gaussFrac_.

461 { return gaussFrac_; }
RooRealVar * gaussFrac_

◆ gaussFrac2()

RooRealVar* FitWithRooFit::gaussFrac2 ( )
inline

Definition at line 462 of file FitWithRooFit.cc.

References gaussFrac2_.

462 { return gaussFrac2_; }
RooRealVar * gaussFrac2_

◆ importTH1()

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

Definition at line 80 of file FitWithRooFit.cc.

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

Referenced by fit().

80  {
81  double xMin = inputXmin;
82  double xMax = inputXmax;
83  if ((xMin == xMax) && xMin == 0) {
84  xMin = histo->GetXaxis()->GetXmin();
85  xMax = histo->GetXaxis()->GetXmax();
86  }
87  // Declare observable x
88  RooRealVar x("x", "x", xMin, xMax);
89  // Create a binned dataset that imports contents of TH1 and associates its contents to observable 'x'
90  return (std::make_pair(x, new RooDataHist("dh", "dh", x, RooFit::Import(*histo))));
91  }

◆ initA0()

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

◆ initA1()

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

◆ initA2()

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

◆ initA3()

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

◆ initA4()

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

◆ initA5()

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

◆ initA6()

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

◆ initAlpha()

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

◆ initExpCoeffA0()

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

◆ initExpCoeffA1()

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

◆ initExpCoeffA2()

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

◆ initFGCB()

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

◆ initFsig()

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

◆ initGamma()

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

◆ initGaussFrac()

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

◆ initGaussFrac2()

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

◆ initMean()

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

◆ initMean2()

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

◆ initMean3()

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

◆ initN()

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

◆ initSigma()

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

◆ initSigma2()

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

◆ initSigma3()

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

◆ mean()

RooRealVar* FitWithRooFit::mean ( )
inline

Definition at line 454 of file FitWithRooFit.cc.

References mean_.

Referenced by ZMassBinFit_OldTool().

454 { return mean_; }
RooRealVar * mean_

◆ mean2()

RooRealVar* FitWithRooFit::mean2 ( )
inline

Definition at line 455 of file FitWithRooFit.cc.

References mean2_.

Referenced by ZMassBinFit_OldTool().

455 { return mean2_; }
RooRealVar * mean2_

◆ mean3()

RooRealVar* FitWithRooFit::mean3 ( )
inline

Definition at line 456 of file FitWithRooFit.cc.

References mean3_.

456 { return mean3_; }
RooRealVar * mean3_

◆ n()

RooRealVar* FitWithRooFit::n ( )
inline

Definition at line 475 of file FitWithRooFit.cc.

References n_.

475 { return n_; }
RooRealVar * n_

◆ reinitializeParameters()

void FitWithRooFit::reinitializeParameters ( )
inline

Definition at line 405 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().

405  {
406  if (mean_ != nullptr)
407  mean_->setVal(initVal_mean);
408  if (mean2_ != nullptr)
409  mean2_->setVal(initVal_mean2);
410  if (mean3_ != nullptr)
411  mean3_->setVal(initVal_mean3);
412  if (sigma_ != nullptr)
413  sigma_->setVal(initVal_sigma);
414  if (sigma2_ != nullptr)
415  sigma2_->setVal(initVal_sigma2);
416  if (sigma3_ != nullptr)
417  sigma3_->setVal(initVal_sigma3);
418  if (gamma_ != nullptr)
419  gamma_->setVal(initVal_gamma);
420  if (gaussFrac_ != nullptr)
421  gaussFrac_->setVal(initVal_gaussFrac);
422  if (gaussFrac2_ != nullptr)
424  if (expCoeffa0_ != nullptr)
426  if (expCoeffa1_ != nullptr)
428  if (expCoeffa2_ != nullptr)
430  if (fsig_ != nullptr)
431  fsig_->setVal(initVal_fsig);
432  if (a0_ != nullptr)
433  a0_->setVal(initVal_a0);
434  if (a1_ != nullptr)
435  a1_->setVal(initVal_a1);
436  if (a2_ != nullptr)
437  a2_->setVal(initVal_a2);
438  if (a3_ != nullptr)
439  a3_->setVal(initVal_a3);
440  if (a4_ != nullptr)
441  a4_->setVal(initVal_a4);
442  if (a5_ != nullptr)
443  a5_->setVal(initVal_a5);
444  if (a6_ != nullptr)
445  a6_->setVal(initVal_a6);
446  if (alpha_ != nullptr)
447  alpha_->setVal(initVal_alpha);
448  if (n_ != nullptr)
449  n_->setVal(initVal_n);
450  if (fGCB_ != nullptr)
451  fGCB_->setVal(initVal_fGCB);
452  }
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_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_
RooRealVar * expCoeffa1_
RooRealVar * a3_
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 457 of file FitWithRooFit.cc.

References sigma_.

Referenced by ZMassBinFit_OldTool().

457 { return sigma_; }
RooRealVar * sigma_

◆ sigma2()

RooRealVar* FitWithRooFit::sigma2 ( )
inline

Definition at line 458 of file FitWithRooFit.cc.

References sigma2_.

458 { return sigma2_; }
RooRealVar * sigma2_

◆ sigma3()

RooRealVar* FitWithRooFit::sigma3 ( )
inline

Definition at line 459 of file FitWithRooFit.cc.

References sigma3_.

459 { return sigma3_; }
RooRealVar * sigma3_

Member Data Documentation

◆ a0_

RooRealVar* FitWithRooFit::a0_
protected

Definition at line 739 of file FitWithRooFit.cc.

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

◆ a1_

RooRealVar* FitWithRooFit::a1_
protected

Definition at line 740 of file FitWithRooFit.cc.

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

◆ a2_

RooRealVar* FitWithRooFit::a2_
protected

Definition at line 741 of file FitWithRooFit.cc.

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

◆ a3_

RooRealVar* FitWithRooFit::a3_
protected

Definition at line 742 of file FitWithRooFit.cc.

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

◆ a4_

RooRealVar* FitWithRooFit::a4_
protected

Definition at line 743 of file FitWithRooFit.cc.

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

◆ a5_

RooRealVar* FitWithRooFit::a5_
protected

Definition at line 744 of file FitWithRooFit.cc.

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

◆ a6_

RooRealVar* FitWithRooFit::a6_
protected

Definition at line 745 of file FitWithRooFit.cc.

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

◆ alpha_

RooRealVar* FitWithRooFit::alpha_
protected

Definition at line 746 of file FitWithRooFit.cc.

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 748 of file FitWithRooFit.cc.

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

◆ fsig_

RooRealVar* FitWithRooFit::fsig_
protected

◆ gamma_

RooRealVar* FitWithRooFit::gamma_
protected

Definition at line 732 of file FitWithRooFit.cc.

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 764 of file FitWithRooFit.cc.

Referenced by initA0(), and reinitializeParameters().

◆ initVal_a1

double FitWithRooFit::initVal_a1
protected

Definition at line 765 of file FitWithRooFit.cc.

Referenced by initA1(), and reinitializeParameters().

◆ initVal_a2

double FitWithRooFit::initVal_a2
protected

Definition at line 766 of file FitWithRooFit.cc.

Referenced by initA2(), and reinitializeParameters().

◆ initVal_a3

double FitWithRooFit::initVal_a3
protected

Definition at line 767 of file FitWithRooFit.cc.

Referenced by initA3(), and reinitializeParameters().

◆ initVal_a4

double FitWithRooFit::initVal_a4
protected

Definition at line 768 of file FitWithRooFit.cc.

Referenced by initA4(), and reinitializeParameters().

◆ initVal_a5

double FitWithRooFit::initVal_a5
protected

Definition at line 769 of file FitWithRooFit.cc.

Referenced by initA5(), and reinitializeParameters().

◆ initVal_a6

double FitWithRooFit::initVal_a6
protected

Definition at line 770 of file FitWithRooFit.cc.

Referenced by initA6(), and reinitializeParameters().

◆ initVal_alpha

double FitWithRooFit::initVal_alpha
protected

Definition at line 771 of file FitWithRooFit.cc.

Referenced by initAlpha(), and reinitializeParameters().

◆ initVal_expCoeffa0

double FitWithRooFit::initVal_expCoeffa0
protected

Definition at line 760 of file FitWithRooFit.cc.

Referenced by initExpCoeffA0(), and reinitializeParameters().

◆ initVal_expCoeffa1

double FitWithRooFit::initVal_expCoeffa1
protected

Definition at line 761 of file FitWithRooFit.cc.

Referenced by initExpCoeffA1(), and reinitializeParameters().

◆ initVal_expCoeffa2

double FitWithRooFit::initVal_expCoeffa2
protected

Definition at line 762 of file FitWithRooFit.cc.

Referenced by initExpCoeffA2(), and reinitializeParameters().

◆ initVal_fGCB

double FitWithRooFit::initVal_fGCB
protected

Definition at line 773 of file FitWithRooFit.cc.

Referenced by initFGCB(), and reinitializeParameters().

◆ initVal_fsig

double FitWithRooFit::initVal_fsig
protected

Definition at line 763 of file FitWithRooFit.cc.

Referenced by initFsig(), and reinitializeParameters().

◆ initVal_gamma

double FitWithRooFit::initVal_gamma
protected

Definition at line 757 of file FitWithRooFit.cc.

Referenced by initGamma(), and reinitializeParameters().

◆ initVal_gaussFrac

double FitWithRooFit::initVal_gaussFrac
protected

Definition at line 758 of file FitWithRooFit.cc.

Referenced by initGaussFrac(), and reinitializeParameters().

◆ initVal_gaussFrac2

double FitWithRooFit::initVal_gaussFrac2
protected

Definition at line 759 of file FitWithRooFit.cc.

Referenced by initGaussFrac2(), and reinitializeParameters().

◆ initVal_mean

double FitWithRooFit::initVal_mean
protected

Definition at line 751 of file FitWithRooFit.cc.

Referenced by initMean(), and reinitializeParameters().

◆ initVal_mean2

double FitWithRooFit::initVal_mean2
protected

Definition at line 752 of file FitWithRooFit.cc.

Referenced by initMean2(), and reinitializeParameters().

◆ initVal_mean3

double FitWithRooFit::initVal_mean3
protected

Definition at line 753 of file FitWithRooFit.cc.

Referenced by initMean3(), and reinitializeParameters().

◆ initVal_n

double FitWithRooFit::initVal_n
protected

Definition at line 772 of file FitWithRooFit.cc.

Referenced by initN(), and reinitializeParameters().

◆ initVal_sigma

double FitWithRooFit::initVal_sigma
protected

Definition at line 754 of file FitWithRooFit.cc.

Referenced by initSigma(), and reinitializeParameters().

◆ initVal_sigma2

double FitWithRooFit::initVal_sigma2
protected

Definition at line 755 of file FitWithRooFit.cc.

Referenced by initSigma2(), and reinitializeParameters().

◆ initVal_sigma3

double FitWithRooFit::initVal_sigma3
protected

Definition at line 756 of file FitWithRooFit.cc.

Referenced by initSigma3(), and reinitializeParameters().

◆ mean2_

RooRealVar* FitWithRooFit::mean2_
protected

Definition at line 727 of file FitWithRooFit.cc.

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

◆ mean3_

RooRealVar* FitWithRooFit::mean3_
protected

Definition at line 728 of file FitWithRooFit.cc.

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

◆ mean_

RooRealVar* FitWithRooFit::mean_
protected

Definition at line 726 of file FitWithRooFit.cc.

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

◆ n_

RooRealVar* FitWithRooFit::n_
protected

Definition at line 747 of file FitWithRooFit.cc.

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

◆ sigma2_

RooRealVar* FitWithRooFit::sigma2_
protected

Definition at line 730 of file FitWithRooFit.cc.

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

◆ sigma3_

RooRealVar* FitWithRooFit::sigma3_
protected

Definition at line 731 of file FitWithRooFit.cc.

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

◆ sigma_

RooRealVar* FitWithRooFit::sigma_
protected

Definition at line 729 of file FitWithRooFit.cc.

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

◆ useChi2_

bool FitWithRooFit::useChi2_

Definition at line 722 of file FitWithRooFit.cc.

Referenced by fit(), and ZMassBinFit_OldTool().