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 //----------------
35 // Constructors --
36 //----------------
38  const edm::EventSetup& es,
39  const BPHRecoBuilder::BPHGenericCollection* kPosCollection,
40  const BPHRecoBuilder::BPHGenericCollection* kNegCollection ):
41  kPosName( "KPos" ),
42  kNegName( "KNeg" ),
43  evSetup( &es ),
44  posCollection( kPosCollection ),
45  negCollection( kNegCollection ) {
46  ptSel = new BPHParticlePtSelect ( 0.7 );
47  etaSel = new BPHParticleEtaSelect( 10.0 );
48  massSel = new BPHMassSelect( 1.0, 1.04 );
49  chi2Sel = new BPHChi2Select( 0.0 );
50  updated = false;
51 }
52 
53 //--------------
54 // Destructor --
55 //--------------
57  delete ptSel;
58  delete etaSel;
59  delete massSel;
60  delete chi2Sel;
61 }
62 
63 //--------------
64 // Operations --
65 //--------------
66 vector<BPHPlusMinusConstCandPtr> BPHPhiToKKBuilder::build() {
67 
68  if ( updated ) return phiList;
69 
70  BPHRecoBuilder bPhi( *evSetup );
75  bPhi.filter( kPosName, *ptSel );
76  bPhi.filter( kNegName, *ptSel );
77  bPhi.filter( kPosName, *etaSel );
78  bPhi.filter( kNegName, *etaSel );
79 
80  bPhi.filter( *massSel );
81  bPhi.filter( *chi2Sel );
82 
84  updated = true;
85  return phiList;
86 
87 }
88 
91  updated = false;
92  ptSel->setPtMin( pt );
93  return;
94 }
95 
96 
98  updated = false;
99  etaSel->setEtaMax( eta );
100  return;
101 }
102 
103 
105  updated = false;
106  massSel->setMassMin( m );
107  return;
108 }
109 
110 
112  updated = false;
113  massSel->setMassMax( m );
114  return;
115 }
116 
117 
119  updated = false;
120  chi2Sel->setProbMin( p );
121  return;
122 }
123 
124 
125 void BPHPhiToKKBuilder::setConstr( double mass, double sigma ) {
126  updated = false;
127  cMass = mass;
128  cSigma = sigma;
129  return;
130 }
131 
134  return ptSel->getPtMin();
135 }
136 
137 
139  return etaSel->getEtaMax();
140 }
141 
142 
144  return massSel->getMassMin();
145 }
146 
147 
149  return massSel->getMassMax();
150 }
151 
152 
154  return chi2Sel->getProbMin();
155 }
156 
157 
159  return cMass;
160 }
161 
162 
164  return cSigma;
165 }
166 
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:51
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:55
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:58
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:50
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