CMS 3D CMS Logo

BPHDecayConstrainedBuilderBase.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author Paolo Ronchese INFN Padova
5  *
6  */
7 
8 //-----------------------
9 // This Class' Header --
10 //-----------------------
12 
13 //-------------------------------
14 // Collaborating Class Headers --
15 //-------------------------------
20 
21 //---------------
22 // C++ Headers --
23 //---------------
24 #include <iostream>
25 using namespace std;
26 
27 //-------------------
28 // Initializations --
29 //-------------------
30 
31 //----------------
32 // Constructors --
33 //----------------
35  const string& resName,
36  double resMass,
37  double resWidth)
38  : BPHDecayConstrainedBuilderBase(resName, resMass, resWidth) {
39  if (evSetup == nullptr)
40  evSetup = new BPHEventSetupWrapper(es);
41 }
42 
44  double resMass,
45  double resWidth,
46  bool createFitSelObject)
47  : rName(resName),
48  rMass(resMass),
49  rWidth(resWidth),
50  resoSel(new BPHMassSelect(-2.0e+06, -1.0e+06)),
51  massConstr(true),
52  mfSelForce(false) {
53  mFitSel = (createFitSelObject ? massFitSelector(-2.0e+06, -1.0e+06) : nullptr);
54 }
55 
57 
58 //--------------
59 // Destructor --
60 //--------------
62 
63 //--------------
64 // Operations --
65 //--------------
68  outdated = true;
70  return;
71 }
72 
74  outdated = true;
76  return;
77 }
78 
79 void BPHDecayConstrainedBuilderBase::setResMassRange(double mMin, double mMax) {
80  outdated = true;
81  resoSel->setMassMin(mMin);
82  resoSel->setMassMax(mMax);
83  return;
84 }
85 
87  if ((flag == massConstr) && !mfSelForce)
88  return;
89  outdated = true;
90  massConstr = flag;
92  delete mFitSel;
93  mFitSel = mfs;
94  mfSelForce = false;
95  return;
96 }
97 
99  if (mFitSel == mfs)
100  return;
101  outdated = true;
102  mfSelForce = true;
103  mFitSel = mfs;
104  return;
105 }
106 
108  if (massConstr)
109  return new BPHMassFitSelect(rName, rMass, rWidth, mMin, mMax);
110  else
111  return new BPHMassFitSelect(mMin, mMax);
112 }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
void setMassMax(double m)
Definition: BPHMassCuts.h:52
virtual BPHMassFitSelect * massFitSelector(double mMin, double mMax)
void setMassFitSelect(BPHMassFitSelect *mfs)
double getMassMax() const
Definition: BPHMassCuts.h:59
void setResMassRange(double mMin, double mMax)
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48