CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BPHDecayConstrainedBuilder.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 //-------------------------------
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 using namespace std;
24 
25 //-------------------
26 // Initializations --
27 //-------------------
28 
29 //----------------
30 // Constructors --
31 //----------------
33  const std::string& resName,
34  double resMass,
35  double resWidth,
36  const std::vector<BPHPlusMinusConstCandPtr>& resCollection)
37  : BPHDecayGenericBuilder(es, new BPHMassFitSelect(resName, resMass, resWidth, -2.0e+06, -1.0e+06)),
38  rName(resName),
39  rMass(resMass),
40  rWidth(resWidth),
41  rCollection(&resCollection),
42  resoSel(new BPHMassSelect(-2.0e+06, -1.0e+06)),
43  massConstr(true) {}
44 
45 //--------------
46 // Destructor --
47 //--------------
49 
50 //--------------
51 // Operations --
52 //--------------
55  updated = false;
56  resoSel->setMassMin(m);
57  return;
58 }
59 
61  updated = false;
62  resoSel->setMassMax(m);
63  return;
64 }
65 
66 void BPHDecayConstrainedBuilder::setResMassRange(double mMin, double mMax) {
67  updated = false;
68  resoSel->setMassMin(mMin);
69  resoSel->setMassMax(mMax);
70  return;
71 }
72 
74  updated = false;
75  if (flag == massConstr)
76  return;
77  double mMin = mFitSel->getMassMin();
78  double mMax = mFitSel->getMassMax();
79  delete mFitSel;
80  massConstr = flag;
81  if (massConstr)
82  mFitSel = new BPHMassFitSelect(rName, rMass, rWidth, mMin, mMax);
83  else
84  mFitSel = new BPHMassFitSelect(mMin, mMax);
85  return;
86 }
void setResMassMin(double m)
set cuts
void setMassMax(double m)
Definition: BPHMassCuts.h:52
void setResMassRange(double mMin, double mMax)
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
double getMassMax() const
Definition: BPHMassCuts.h:59
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
BPHDecayConstrainedBuilder(const edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection)