CMS 3D CMS Logo

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;
57  return;
58 }
59 
61  updated = false;
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 }
BPHMassCuts::setMassMax
void setMassMax(double m)
Definition: BPHMassCuts.h:52
BPHMassCuts::getMassMin
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
BPHDecayConstrainedBuilder::setConstr
void setConstr(bool flag)
Definition: BPHDecayConstrainedBuilder.cc:73
BPHDecayConstrainedBuilder::BPHDecayConstrainedBuilder
BPHDecayConstrainedBuilder(const edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection)
Definition: BPHDecayConstrainedBuilder.cc:32
BPHDecayConstrainedBuilder::setResMassRange
void setResMassRange(double mMin, double mMax)
Definition: BPHDecayConstrainedBuilder.cc:66
BPHDecayConstrainedBuilder::resoSel
BPHMassSelect * resoSel
Definition: BPHDecayConstrainedBuilder.h:75
BPHDecayGenericBuilder::updated
bool updated
Definition: BPHDecayGenericBuilder.h:80
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
BPHDecayConstrainedBuilder::massConstr
bool massConstr
Definition: BPHDecayConstrainedBuilder.h:77
BPHMassSelect
Definition: BPHMassSelect.h:31
BPHMassCuts::setMassMin
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
funct::true
true
Definition: Factorize.h:173
BPHDecayConstrainedBuilder::setResMassMax
void setResMassMax(double m)
Definition: BPHDecayConstrainedBuilder.cc:60
BPHDecayConstrainedBuilder::setResMassMin
void setResMassMin(double m)
set cuts
Definition: BPHDecayConstrainedBuilder.cc:54
BPHDecayGenericBuilder::mFitSel
BPHMassFitSelect * mFitSel
Definition: BPHDecayGenericBuilder.h:77
BPHMassCuts::getMassMax
double getMassMax() const
Definition: BPHMassCuts.h:59
edm::EventSetup
Definition: EventSetup.h:58
BPHRecoBuilder.h
std
Definition: JetResolutionObject.h:76
BPHPlusMinusCandidate.h
BPHDecayConstrainedBuilder::rMass
double rMass
Definition: BPHDecayConstrainedBuilder.h:70
BPHDecayConstrainedBuilder::rName
std::string rName
Definition: BPHDecayConstrainedBuilder.h:69
BPHDecayGenericBuilder
Definition: BPHDecayGenericBuilder.h:36
BPHRecoCandidate.h
BPHDecayConstrainedBuilder.h
BPHDecayConstrainedBuilder::rWidth
double rWidth
Definition: BPHDecayConstrainedBuilder.h:71
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
BPHDecayConstrainedBuilder::~BPHDecayConstrainedBuilder
~BPHDecayConstrainedBuilder() override
Definition: BPHDecayConstrainedBuilder.cc:48
BPHMassFitSelect
Definition: BPHMassFitSelect.h:34