CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BPHDecayToResResBuilder.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& res1Name,
34  double res1Mass,
35  double res1Width,
36  const std::vector<BPHPlusMinusConstCandPtr>& res1Collection,
37  const std::string& res2Name,
38  const std::vector<BPHPlusMinusConstCandPtr>& res2Collection)
39  : BPHDecayConstrainedBuilder(es, res1Name, res1Mass, res1Width, res1Collection),
40  sName(res2Name),
41  sCollection(&res2Collection),
42  res2Sel(new BPHMassSelect(-2.0e+06, -1.0e+06)) {}
43 
44 //--------------
45 // Destructor --
46 //--------------
48 
49 //--------------
50 // Operations --
51 //--------------
52 vector<BPHRecoConstCandPtr> BPHDecayToResResBuilder::build() {
53  if (updated)
54  return recList;
55 
56  recList.clear();
57 
58  BPHRecoBuilder brb(*evSetup);
60  brb.add(rName, *rCollection);
61  brb.add(sName, *sCollection);
62  brb.filter(rName, *resoSel);
63  brb.filter(sName, *res2Sel);
64 
65  if (massSel->getMassMax() >= 0.0)
66  brb.filter(*massSel);
67  if (chi2Sel->getProbMin() >= 0.0)
68  brb.filter(*chi2Sel);
69  if (mFitSel->getMassMax() >= 0.0)
70  brb.filter(*mFitSel);
71 
73  updated = true;
74  return recList;
75 }
76 
79  updated = false;
80  res2Sel->setMassMin(m);
81  return;
82 }
83 
85  updated = false;
86  res2Sel->setMassMax(m);
87  return;
88 }
89 
90 void BPHDecayToResResBuilder::setRes2MassRange(double mMin, double mMax) {
91  updated = false;
92  res2Sel->setMassMin(mMin);
93  res2Sel->setMassMax(mMax);
94  return;
95 }
void setMinPDiffererence(double pMin)
void setMassMax(double m)
Definition: BPHMassCuts.h:52
BPHDecayToResResBuilder(const edm::EventSetup &es, const std::string &res1Name, double res1Mass, double res1Width, const std::vector< BPHPlusMinusConstCandPtr > &res1Collection, const std::string &res2Name, const std::vector< BPHPlusMinusConstCandPtr > &res2Collection)
std::vector< BPHRecoConstCandPtr > recList
void setRes2MassMin(double m)
set cuts
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
const std::vector< BPHPlusMinusConstCandPtr > * rCollection
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
double getMassMax() const
Definition: BPHMassCuts.h:59
const std::vector< BPHPlusMinusConstCandPtr > * sCollection
void filter(const std::string &name, const BPHRecoSelect &sel) const
std::vector< BPHRecoConstCandPtr > build()
build candidates
void setRes2MassRange(double mMin, double mMax)
const edm::EventSetup * evSetup