CMS 3D CMS Logo

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;
81  return;
82 }
83 
85  updated = false;
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 }
BPHMassCuts::setMassMax
void setMassMax(double m)
Definition: BPHMassCuts.h:52
BPHRecoBuilder::filter
void filter(const std::string &name, const BPHRecoSelect &sel) const
BPHDecayToResResBuilder::build
std::vector< BPHRecoConstCandPtr > build()
build candidates
Definition: BPHDecayToResResBuilder.cc:52
BPHDecayToResResBuilder::~BPHDecayToResResBuilder
~BPHDecayToResResBuilder() override
Definition: BPHDecayToResResBuilder.cc:47
BPHChi2Select::getProbMin
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
BPHDecayToResResBuilder::setRes2MassMin
void setRes2MassMin(double m)
set cuts
Definition: BPHDecayToResResBuilder.cc:78
BPHDecayConstrainedBuilder
Definition: BPHDecayConstrainedBuilder.h:37
BPHDecayToResResBuilder::res2Sel
BPHMassSelect * res2Sel
Definition: BPHDecayToResResBuilder.h:81
BPHDecayGenericBuilder::massSel
BPHMassSelect * massSel
Definition: BPHDecayGenericBuilder.h:75
BPHDecayConstrainedBuilder::resoSel
BPHMassSelect * resoSel
Definition: BPHDecayConstrainedBuilder.h:75
BPHDecayConstrainedBuilder::rCollection
const std::vector< BPHPlusMinusConstCandPtr > * rCollection
Definition: BPHDecayConstrainedBuilder.h:73
BPHDecayToResResBuilder.h
BPHDecayToResResBuilder::sName
std::string sName
Definition: BPHDecayToResResBuilder.h:77
BPHDecayGenericBuilder::updated
bool updated
Definition: BPHDecayGenericBuilder.h:80
BPHDecayToResResBuilder::BPHDecayToResResBuilder
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)
Definition: BPHDecayToResResBuilder.cc:32
BPHRecoBuilder
Definition: BPHRecoBuilder.h:50
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
BPHMassSelect
Definition: BPHMassSelect.h:31
BPHRecoBuilder::setMinPDiffererence
void setMinPDiffererence(double pMin)
Definition: BPHRecoBuilder.cc:172
BPHMassCuts::setMassMin
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BPHDecayGenericBuilder::evSetup
const edm::EventSetup * evSetup
Definition: BPHDecayGenericBuilder.h:73
BPHDecayGenericBuilder::chi2Sel
BPHChi2Select * chi2Sel
Definition: BPHDecayGenericBuilder.h:76
BPHDecayToResResBuilder::setRes2MassMax
void setRes2MassMax(double m)
Definition: BPHDecayToResResBuilder.cc:84
BPHDecayGenericBuilder::minPDiff
double minPDiff
Definition: BPHDecayGenericBuilder.h:79
BPHDecayGenericBuilder::mFitSel
BPHMassFitSelect * mFitSel
Definition: BPHDecayGenericBuilder.h:77
BPHDecayToResResBuilder::sCollection
const std::vector< BPHPlusMinusConstCandPtr > * sCollection
Definition: BPHDecayToResResBuilder.h:79
BPHMassCuts::getMassMax
double getMassMax() const
Definition: BPHMassCuts.h:59
edm::EventSetup
Definition: EventSetup.h:57
BPHRecoBuilder.h
std
Definition: JetResolutionObject.h:76
BPHPlusMinusCandidate.h
BPHDecayConstrainedBuilder::rName
std::string rName
Definition: BPHDecayConstrainedBuilder.h:69
BPHRecoCandidate::build
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
Definition: BPHRecoCandidate.cc:43
BPHRecoCandidate.h
BPHRecoBuilder::add
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
BPHDecayToResResBuilder::setRes2MassRange
void setRes2MassRange(double mMin, double mMax)
Definition: BPHDecayToResResBuilder.cc:90
BPHDecayToResResBuilder::recList
std::vector< BPHRecoConstCandPtr > recList
Definition: BPHDecayToResResBuilder.h:83
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37