CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
BPHBuToJPsiKBuilder Class Reference

#include <BPHBuToJPsiKBuilder.h>

Public Member Functions

 BPHBuToJPsiKBuilder (const edm::EventSetup &es, const std::vector< BPHPlusMinusConstCandPtr > &jpsiCollection, const BPHRecoBuilder::BPHGenericCollection *kaonCollection)
 
std::vector< BPHRecoConstCandPtrbuild ()
 build Bu candidates More...
 
bool getConstr () const
 
double getJPsiMassMax () const
 
double getJPsiMassMin () const
 get current cuts More...
 
double getKEtaMax () const
 
double getKPtMin () const
 get current cuts More...
 
double getMassFitMax () const
 
double getMassFitMin () const
 
double getMassMax () const
 
double getMassMin () const
 
double getProbMin () const
 
void setConstr (bool flag)
 
void setJPsiMassMax (double m)
 
void setJPsiMassMin (double m)
 set cuts More...
 
void setKEtaMax (double eta)
 
void setKPtMin (double pt)
 set cuts More...
 
void setMassFitMax (double m)
 
void setMassFitMin (double m)
 
void setMassMax (double m)
 
void setMassMin (double m)
 
void setProbMin (double p)
 
virtual ~BPHBuToJPsiKBuilder ()
 

Private Member Functions

 BPHBuToJPsiKBuilder (const BPHBuToJPsiKBuilder &x)
 
BPHBuToJPsiKBuilderoperator= (const BPHBuToJPsiKBuilder &x)
 

Private Attributes

std::vector< BPHRecoConstCandPtrbuList
 
BPHChi2Selectchi2Sel
 
BPHParticleEtaSelectetaSel
 
const edm::EventSetupevSetup
 
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
 
std::string jPsiName
 
BPHMassSelectjpsiSel
 
std::string kaonName
 
const BPHRecoBuilder::BPHGenericCollectionkCollection
 
BPHParticleNeutralVetoknVeto
 
bool massConstr
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
float minPDiff
 
BPHParticlePtSelectptSel
 
bool updated
 

Detailed Description

Description: Class to build B+- to JPsi K+- candidates

Author
Paolo Ronchese INFN Padova

Definition at line 43 of file BPHBuToJPsiKBuilder.h.

Constructor & Destructor Documentation

BPHBuToJPsiKBuilder::BPHBuToJPsiKBuilder ( const edm::EventSetup es,
const std::vector< BPHPlusMinusConstCandPtr > &  jpsiCollection,
const BPHRecoBuilder::BPHGenericCollection kaonCollection 
)

Constructor

Definition at line 40 of file BPHBuToJPsiKBuilder.cc.

References chi2Sel, etaSel, BPHParticleMasses::jPsiMass, BPHParticleMasses::jPsiMWidth, jPsiName, jpsiSel, knVeto, massConstr, massSel, mFitSel, minPDiff, ptSel, and updated.

42  :
43  jPsiName( "JPsi" ),
44  kaonName( "Kaon" ),
45  evSetup( &es ),
46  jCollection( &jpsiCollection ),
47  kCollection( kaonCollection ) {
48  jpsiSel = new BPHMassSelect ( 2.80, 3.40 );
50  ptSel = new BPHParticlePtSelect ( 0.7 );
51  etaSel = new BPHParticleEtaSelect( 10.0 );
52  massSel = new BPHMassSelect ( 3.50, 8.00 );
53  chi2Sel = new BPHChi2Select ( 0.02 );
57  5.00, 6.00 );
58  massConstr = true;
59  minPDiff = 1.0e-4;
60  updated = false;
61 }
BPHParticlePtSelect * ptSel
BPHParticleNeutralVeto * knVeto
static const double jPsiMWidth
BPHMassFitSelect * mFitSel
static const double jPsiMass
BPHParticleEtaSelect * etaSel
const BPHRecoBuilder::BPHGenericCollection * kCollection
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
const edm::EventSetup * evSetup
BPHMassSelect * jpsiSel
BPHBuToJPsiKBuilder::~BPHBuToJPsiKBuilder ( )
virtual

Destructor

Definition at line 66 of file BPHBuToJPsiKBuilder.cc.

References chi2Sel, etaSel, jpsiSel, knVeto, massSel, mFitSel, and ptSel.

66  {
67  delete jpsiSel;
68  delete knVeto;
69  delete ptSel;
70  delete etaSel;
71  delete massSel;
72  delete chi2Sel;
73  delete mFitSel;
74 }
BPHParticlePtSelect * ptSel
BPHParticleNeutralVeto * knVeto
BPHMassFitSelect * mFitSel
BPHParticleEtaSelect * etaSel
BPHMassSelect * jpsiSel
BPHBuToJPsiKBuilder::BPHBuToJPsiKBuilder ( const BPHBuToJPsiKBuilder x)
private

Member Function Documentation

vector< BPHRecoConstCandPtr > BPHBuToJPsiKBuilder::build ( )

build Bu candidates

Operations

Definition at line 79 of file BPHBuToJPsiKBuilder.cc.

References BPHRecoBuilder::add(), BPHRecoCandidate::build(), buList, chi2Sel, etaSel, evSetup, BPHRecoBuilder::filter(), jCollection, jPsiName, jpsiSel, BPHParticleMasses::kaonMass, BPHParticleMasses::kaonMSigma, kaonName, kCollection, knVeto, massConstr, massSel, mFitSel, minPDiff, ptSel, BPHRecoBuilder::setMinPDiffererence(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

79  {
80 
81  if ( updated ) return buList;
82 
83  BPHRecoBuilder bBu( *evSetup );
84  bBu.setMinPDiffererence( minPDiff );
85  bBu.add( jPsiName, *jCollection );
88  bBu.filter( jPsiName, *jpsiSel );
89  bBu.filter( kaonName, * knVeto );
90  bBu.filter( kaonName, * ptSel );
91  bBu.filter( kaonName, * etaSel );
92 
93  bBu.filter( *massSel );
94  bBu.filter( *chi2Sel );
95  if ( massConstr ) bBu.filter( *mFitSel );
96 
98 //
99 // Apply kinematic constraint on the JPsi mass.
100 // The operation is already performed when apply the mass selection,
101 // so it's not repeated. The following code is left as example
102 // for similar operations
103 //
104 // int iBu;
105 // int nBu = ( massConstr ? buList.size() : 0 );
106 // for ( iBu = 0; iBu < nBu; ++iBu ) {
107 // BPHRecoCandidate* cptr( const_cast<BPHRecoCandidate*>(
108 // buList[iBu].get() ) );
109 // BPHRecoConstCandPtr jpsi = cptr->getComp( jPsiName );
110 // double jMass = jpsi->constrMass();
111 // if ( jMass < 0 ) continue;
112 // double sigma = jpsi->constrSigma();
113 // cptr->kinematicTree( jPsiName, jMass, sigma );
114 // }
115  updated = true;
116  return buList;
117 
118 }
BPHParticlePtSelect * ptSel
static const double kaonMass
BPHParticleNeutralVeto * knVeto
BPHMassFitSelect * mFitSel
BPHParticleEtaSelect * etaSel
const BPHRecoBuilder::BPHGenericCollection * kCollection
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
static const double kaonMSigma
const edm::EventSetup * evSetup
BPHMassSelect * jpsiSel
std::vector< BPHRecoConstCandPtr > buList
bool BPHBuToJPsiKBuilder::getConstr ( ) const

Definition at line 236 of file BPHBuToJPsiKBuilder.cc.

References massConstr.

236  {
237  return massConstr;
238 }
double BPHBuToJPsiKBuilder::getJPsiMassMax ( ) const

Definition at line 196 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMax(), and jpsiSel.

196  {
197  return jpsiSel->getMassMax();
198 }
double getMassMax() const
Definition: BPHMassCuts.h:55
BPHMassSelect * jpsiSel
double BPHBuToJPsiKBuilder::getJPsiMassMin ( ) const

get current cuts

Definition at line 191 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMin(), and jpsiSel.

191  {
192  return jpsiSel->getMassMin();
193 }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
BPHMassSelect * jpsiSel
double BPHBuToJPsiKBuilder::getKEtaMax ( ) const

Definition at line 206 of file BPHBuToJPsiKBuilder.cc.

References etaSel, and BPHParticleEtaSelect::getEtaMax().

206  {
207  return etaSel->getEtaMax();
208 }
BPHParticleEtaSelect * etaSel
double getEtaMax() const
get current eta max
double BPHBuToJPsiKBuilder::getKPtMin ( ) const

get current cuts

Definition at line 201 of file BPHBuToJPsiKBuilder.cc.

References BPHParticlePtSelect::getPtMin(), and ptSel.

201  {
202  return ptSel->getPtMin();
203 }
BPHParticlePtSelect * ptSel
double getPtMin() const
get current pt min
double BPHBuToJPsiKBuilder::getMassFitMax ( ) const

Definition at line 231 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMax(), and mFitSel.

231  {
232  return mFitSel->getMassMax();
233 }
BPHMassFitSelect * mFitSel
double getMassMax() const
Definition: BPHMassCuts.h:55
double BPHBuToJPsiKBuilder::getMassFitMin ( ) const

Definition at line 226 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMin(), and mFitSel.

226  {
227  return mFitSel->getMassMin();
228 }
BPHMassFitSelect * mFitSel
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
double BPHBuToJPsiKBuilder::getMassMax ( ) const

Definition at line 216 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMax(), and massSel.

216  {
217  return massSel->getMassMax();
218 }
double getMassMax() const
Definition: BPHMassCuts.h:55
double BPHBuToJPsiKBuilder::getMassMin ( ) const

Definition at line 211 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMin(), and massSel.

211  {
212  return massSel->getMassMin();
213 }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
double BPHBuToJPsiKBuilder::getProbMin ( ) const

Definition at line 221 of file BPHBuToJPsiKBuilder.cc.

References chi2Sel, and BPHChi2Select::getProbMin().

221  {
222  return chi2Sel->getProbMin();
223 }
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:58
BPHBuToJPsiKBuilder& BPHBuToJPsiKBuilder::operator= ( const BPHBuToJPsiKBuilder x)
private
void BPHBuToJPsiKBuilder::setConstr ( bool  flag)

Definition at line 184 of file BPHBuToJPsiKBuilder.cc.

References RemoveAddSevLevel::flag, massConstr, and updated.

Referenced by BPHWriteSpecificDecay::fill().

184  {
185  updated = false;
186  massConstr = flag;
187  return;
188 }
void BPHBuToJPsiKBuilder::setJPsiMassMax ( double  m)

Definition at line 128 of file BPHBuToJPsiKBuilder.cc.

References jpsiSel, BPHMassCuts::setMassMax(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

128  {
129  updated = false;
130  jpsiSel->setMassMax( m );
131  return;
132 }
void setMassMax(double m)
Definition: BPHMassCuts.h:51
BPHMassSelect * jpsiSel
void BPHBuToJPsiKBuilder::setJPsiMassMin ( double  m)

set cuts

Definition at line 121 of file BPHBuToJPsiKBuilder.cc.

References jpsiSel, BPHMassCuts::setMassMin(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

121  {
122  updated = false;
123  jpsiSel->setMassMin( m );
124  return;
125 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:50
BPHMassSelect * jpsiSel
void BPHBuToJPsiKBuilder::setKEtaMax ( double  eta)

Definition at line 142 of file BPHBuToJPsiKBuilder.cc.

References etaSel, BPHParticleEtaSelect::setEtaMax(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

142  {
143  updated = false;
144  etaSel->setEtaMax( eta );
145  return;
146 }
BPHParticleEtaSelect * etaSel
void setEtaMax(double eta)
set eta max
void BPHBuToJPsiKBuilder::setKPtMin ( double  pt)

set cuts

Definition at line 135 of file BPHBuToJPsiKBuilder.cc.

References ptSel, BPHParticlePtSelect::setPtMin(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

135  {
136  updated = false;
137  ptSel->setPtMin( pt );
138  return;
139 }
BPHParticlePtSelect * ptSel
void setPtMin(double pt)
set pt min
void BPHBuToJPsiKBuilder::setMassFitMax ( double  m)

Definition at line 177 of file BPHBuToJPsiKBuilder.cc.

References mFitSel, BPHMassCuts::setMassMax(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

177  {
178  updated = false;
179  mFitSel->setMassMax( m );
180  return;
181 }
void setMassMax(double m)
Definition: BPHMassCuts.h:51
BPHMassFitSelect * mFitSel
void BPHBuToJPsiKBuilder::setMassFitMin ( double  m)

Definition at line 170 of file BPHBuToJPsiKBuilder.cc.

References mFitSel, BPHMassCuts::setMassMin(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

170  {
171  updated = false;
172  mFitSel->setMassMin( m );
173  return;
174 }
BPHMassFitSelect * mFitSel
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:50
void BPHBuToJPsiKBuilder::setMassMax ( double  m)

Definition at line 156 of file BPHBuToJPsiKBuilder.cc.

References massSel, BPHMassCuts::setMassMax(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

156  {
157  updated = false;
158  massSel->setMassMax( m );
159  return;
160 }
void setMassMax(double m)
Definition: BPHMassCuts.h:51
void BPHBuToJPsiKBuilder::setMassMin ( double  m)

Definition at line 149 of file BPHBuToJPsiKBuilder.cc.

References massSel, BPHMassCuts::setMassMin(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

149  {
150  updated = false;
151  massSel->setMassMin( m );
152  return;
153 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:50
void BPHBuToJPsiKBuilder::setProbMin ( double  p)

Definition at line 163 of file BPHBuToJPsiKBuilder.cc.

References chi2Sel, BPHChi2Select::setProbMin(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

163  {
164  updated = false;
165  chi2Sel->setProbMin( p );
166  return;
167 }
void setProbMin(double p)
set prob min
Definition: BPHChi2Select.h:55

Member Data Documentation

std::vector<BPHRecoConstCandPtr> BPHBuToJPsiKBuilder::buList
private

Definition at line 112 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

BPHChi2Select* BPHBuToJPsiKBuilder::chi2Sel
private
BPHParticleEtaSelect* BPHBuToJPsiKBuilder::etaSel
private
const edm::EventSetup* BPHBuToJPsiKBuilder::evSetup
private

Definition at line 95 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

const std::vector<BPHPlusMinusConstCandPtr>* BPHBuToJPsiKBuilder::jCollection
private

Definition at line 96 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

std::string BPHBuToJPsiKBuilder::jPsiName
private

Definition at line 92 of file BPHBuToJPsiKBuilder.h.

Referenced by BPHBuToJPsiKBuilder(), and build().

BPHMassSelect* BPHBuToJPsiKBuilder::jpsiSel
private
std::string BPHBuToJPsiKBuilder::kaonName
private

Definition at line 93 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

const BPHRecoBuilder::BPHGenericCollection* BPHBuToJPsiKBuilder::kCollection
private

Definition at line 97 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

BPHParticleNeutralVeto* BPHBuToJPsiKBuilder::knVeto
private

Definition at line 100 of file BPHBuToJPsiKBuilder.h.

Referenced by BPHBuToJPsiKBuilder(), build(), and ~BPHBuToJPsiKBuilder().

bool BPHBuToJPsiKBuilder::massConstr
private

Definition at line 108 of file BPHBuToJPsiKBuilder.h.

Referenced by BPHBuToJPsiKBuilder(), build(), getConstr(), and setConstr().

BPHMassSelect* BPHBuToJPsiKBuilder::massSel
private
BPHMassFitSelect* BPHBuToJPsiKBuilder::mFitSel
private
float BPHBuToJPsiKBuilder::minPDiff
private

Definition at line 109 of file BPHBuToJPsiKBuilder.h.

Referenced by BPHBuToJPsiKBuilder(), and build().

BPHParticlePtSelect* BPHBuToJPsiKBuilder::ptSel
private
bool BPHBuToJPsiKBuilder::updated
private