CMS 3D CMS Logo

BPHDecayToResResBuilderBase.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 BPHEventSetupWrapper& es, const string& res1Name, double res1Mass, double res1Width, const string& res2Name)
36  : BPHDecayGenericBuilderBase(es, nullptr),
37  BPHDecayConstrainedBuilderBase(res1Name, res1Mass, res1Width),
38  sName(res2Name),
39  res2Sel(new BPHMassSelect(-2.0e+06, -1.0e+06)),
40  dzFilter(&rName) {}
41 
43  : sName(res2Name), res2Sel(new BPHMassSelect(-2.0e+06, -1.0e+06)), dzFilter(&rName) {}
44 
45 //--------------
46 // Destructor --
47 //--------------
49 
50 //--------------
51 // Operations --
52 //--------------
53 
56  outdated = true;
58  return;
59 }
60 
62  outdated = true;
64  return;
65 }
66 
67 void BPHDecayToResResBuilderBase::setRes2MassRange(double mMin, double mMax) {
68  outdated = true;
69  res2Sel->setMassMin(mMin);
70  res2Sel->setMassMax(mMax);
71  return;
72 }
73 
77  addRes1Collection(brb);
78  addRes2Collection(brb);
79 
80  if (massSel->getMassMax() >= 0.0)
81  brb.filter(*massSel);
82  if (chi2Sel->getProbMin() >= 0.0)
83  brb.filter(*chi2Sel);
84  if (mFitSel->getMassMax() >= 0.0)
85  brb.filter(*mFitSel);
86 
88 
89  return;
90 }
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
void setMinPDiffererence(double pMin)
void setMassMax(double m)
Definition: BPHMassCuts.h:52
virtual void addRes2Collection(BPHRecoBuilder &brb)=0
virtual void addRes1Collection(BPHRecoBuilder &brb)
void setRes2MassRange(double mMin, double mMax)
void filter(const std::string &name, const BPHRecoSelect &sel) const
double getMassMax() const
Definition: BPHMassCuts.h:59
BPHDecayToResResBuilderBase(const BPHEventSetupWrapper &es, const std::string &res1Name, double res1Mass, double res1Width, const std::string &res2Name)
void fill(BPHRecoBuilder &brb, void *parameters) override
build candidates
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
virtual void setup(void *parameters)=0