CMS 3D CMS Logo

BPHPhiToKKBuilder.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 //-------------------------------
23 
24 //---------------
25 // C++ Headers --
26 //---------------
27 using namespace std;
28 
29 //-------------------
30 // Initializations --
31 //-------------------
32 
33 //----------------
34 // Constructors --
35 //----------------
37  const BPHRecoBuilder::BPHGenericCollection* kPosCollection,
38  const BPHRecoBuilder::BPHGenericCollection* kNegCollection)
39  : kPosName("KPos"), kNegName("KNeg"), evSetup(&es), posCollection(kPosCollection), negCollection(kNegCollection) {
40  ptSel = new BPHParticlePtSelect(0.7);
41  etaSel = new BPHParticleEtaSelect(10.0);
42  massSel = new BPHMassSelect(1.0, 1.04);
43  chi2Sel = new BPHChi2Select(0.0);
44  updated = false;
45 }
46 
47 //--------------
48 // Destructor --
49 //--------------
51  delete ptSel;
52  delete etaSel;
53  delete massSel;
54  delete chi2Sel;
55 }
56 
57 //--------------
58 // Operations --
59 //--------------
60 vector<BPHPlusMinusConstCandPtr> BPHPhiToKKBuilder::build() {
61  if (updated)
62  return phiList;
63 
67  bPhi.filter(kPosName, *ptSel);
68  bPhi.filter(kNegName, *ptSel);
69  bPhi.filter(kPosName, *etaSel);
70  bPhi.filter(kNegName, *etaSel);
71 
72  bPhi.filter(*massSel);
73  bPhi.filter(*chi2Sel);
74 
76  updated = true;
77  return phiList;
78 }
79 
82  updated = false;
83  ptSel->setPtMin(pt);
84  return;
85 }
86 
88  updated = false;
89  etaSel->setEtaMax(eta);
90  return;
91 }
92 
94  updated = false;
95  massSel->setMassMin(m);
96  return;
97 }
98 
100  updated = false;
101  massSel->setMassMax(m);
102  return;
103 }
104 
106  updated = false;
107  chi2Sel->setProbMin(p);
108  return;
109 }
110 
111 void BPHPhiToKKBuilder::setConstr(double mass, double sigma) {
112  updated = false;
113  cMass = mass;
114  cSigma = sigma;
115  return;
116 }
117 
119 double BPHPhiToKKBuilder::getPtMin() const { return ptSel->getPtMin(); }
120 
121 double BPHPhiToKKBuilder::getEtaMax() const { return etaSel->getEtaMax(); }
122 
123 double BPHPhiToKKBuilder::getMassMin() const { return massSel->getMassMin(); }
124 
125 double BPHPhiToKKBuilder::getMassMax() const { return massSel->getMassMax(); }
126 
127 double BPHPhiToKKBuilder::getProbMin() const { return chi2Sel->getProbMin(); }
128 
129 double BPHPhiToKKBuilder::getConstrMass() const { return cMass; }
130 
131 double BPHPhiToKKBuilder::getConstrSigma() const { return cSigma; }
static std::vector< BPHPlusMinusConstCandPtr > build(const BPHRecoBuilder &builder, const std::string &nPos, const std::string &nNeg, double mass=-1, double msig=-1)
void setEtaMax(double eta)
void setMassMax(double m)
Definition: BPHMassCuts.h:48
static const double kaonMass
BPHParticlePtSelect * ptSel
const BPHRecoBuilder::BPHGenericCollection * negCollection
double getEtaMax() const
void setPtMin(double pt)
set cuts
const edm::EventSetup * evSetup
std::vector< BPHPlusMinusConstCandPtr > phiList
double getConstrMass() const
BPHChi2Select * chi2Sel
void setPtMin(double pt)
set pt min
BPHParticleEtaSelect * etaSel
std::vector< BPHPlusMinusConstCandPtr > build()
build Phi candidates
double getPtMin() const
get current pt min
void setProbMin(double p)
set prob min
Definition: BPHChi2Select.h:54
const BPHRecoBuilder::BPHGenericCollection * posCollection
virtual ~BPHPhiToKKBuilder()
void setProbMin(double p)
void setEtaMax(double eta)
set eta max
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:60
BPHPhiToKKBuilder(const edm::EventSetup &es, const BPHRecoBuilder::BPHGenericCollection *kPosCollection, const BPHRecoBuilder::BPHGenericCollection *kNegCollection)
double getMassMin() const
void setMassMin(double m)
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:44
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
double getMassMax() const
Definition: BPHMassCuts.h:55
void setMassMax(double m)
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
double getConstrSigma() const
BPHMassSelect * massSel
static const double kaonMSigma
void filter(const std::string &name, const BPHRecoSelect &sel) const
void setConstr(double mass, double sigma)
double getEtaMax() const
get current eta max
double getMassMax() const
double getProbMin() const
double getPtMin() const
get current cuts