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)=delete
 
BPHBuToJPsiKBuilderoperator= (const BPHBuToJPsiKBuilder &x)=delete
 

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 42 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 39 of file BPHBuToJPsiKBuilder.cc.

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

42  : jPsiName("JPsi"), kaonName("Kaon"), evSetup(&es), jCollection(&jpsiCollection), kCollection(kaonCollection) {
43  jpsiSel = new BPHMassSelect(2.80, 3.40);
45  ptSel = new BPHParticlePtSelect(0.7);
46  etaSel = new BPHParticleEtaSelect(10.0);
47  massSel = new BPHMassSelect(3.50, 8.00);
48  chi2Sel = new BPHChi2Select(0.02);
50  massConstr = true;
51  minPDiff = 1.0e-4;
52  updated = false;
53 }
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 58 of file BPHBuToJPsiKBuilder.cc.

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

58  {
59  delete jpsiSel;
60  delete knVeto;
61  delete ptSel;
62  delete etaSel;
63  delete massSel;
64  delete chi2Sel;
65  delete mFitSel;
66 }
BPHParticlePtSelect * ptSel
BPHParticleNeutralVeto * knVeto
BPHMassFitSelect * mFitSel
BPHParticleEtaSelect * etaSel
BPHMassSelect * jpsiSel
BPHBuToJPsiKBuilder::BPHBuToJPsiKBuilder ( const BPHBuToJPsiKBuilder x)
privatedelete

Member Function Documentation

vector< BPHRecoConstCandPtr > BPHBuToJPsiKBuilder::build ( )

build Bu candidates

Operations

Definition at line 71 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().

71  {
72  if (updated)
73  return buList;
74 
75  BPHRecoBuilder bBu(*evSetup);
76  bBu.setMinPDiffererence(minPDiff);
77  bBu.add(jPsiName, *jCollection);
79  bBu.filter(jPsiName, *jpsiSel);
80  bBu.filter(kaonName, *knVeto);
81  bBu.filter(kaonName, *ptSel);
82  bBu.filter(kaonName, *etaSel);
83 
84  bBu.filter(*massSel);
85  bBu.filter(*chi2Sel);
86  if (massConstr)
87  bBu.filter(*mFitSel);
88 
90  //
91  // Apply kinematic constraint on the JPsi mass.
92  // The operation is already performed when apply the mass selection,
93  // so it's not repeated. The following code is left as example
94  // for similar operations
95  //
96  // int iBu;
97  // int nBu = ( massConstr ? buList.size() : 0 );
98  // for ( iBu = 0; iBu < nBu; ++iBu ) {
99  // BPHRecoCandidate* cptr( const_cast<BPHRecoCandidate*>(
100  // buList[iBu].get() ) );
101  // BPHRecoConstCandPtr jpsi = cptr->getComp( jPsiName );
102  // double jMass = jpsi->constrMass();
103  // if ( jMass < 0 ) continue;
104  // double sigma = jpsi->constrSigma();
105  // cptr->kinematicTree( jPsiName, jMass, sigma );
106  // }
107  updated = true;
108  return buList;
109 }
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 191 of file BPHBuToJPsiKBuilder.cc.

References massConstr.

191 { return massConstr; }
double BPHBuToJPsiKBuilder::getJPsiMassMax ( ) const

Definition at line 175 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMax(), and jpsiSel.

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

get current cuts

Definition at line 173 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMin(), and jpsiSel.

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

Definition at line 179 of file BPHBuToJPsiKBuilder.cc.

References etaSel, and BPHParticleEtaSelect::getEtaMax().

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

get current cuts

Definition at line 177 of file BPHBuToJPsiKBuilder.cc.

References BPHParticlePtSelect::getPtMin(), and ptSel.

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

Definition at line 189 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMax(), and mFitSel.

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

Definition at line 187 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMin(), and mFitSel.

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

Definition at line 183 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMax(), and massSel.

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

Definition at line 181 of file BPHBuToJPsiKBuilder.cc.

References BPHMassCuts::getMassMin(), and massSel.

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

Definition at line 185 of file BPHBuToJPsiKBuilder.cc.

References chi2Sel, and BPHChi2Select::getProbMin().

185 { return chi2Sel->getProbMin(); }
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:60
BPHBuToJPsiKBuilder& BPHBuToJPsiKBuilder::operator= ( const BPHBuToJPsiKBuilder x)
privatedelete
void BPHBuToJPsiKBuilder::setConstr ( bool  flag)

Definition at line 166 of file BPHBuToJPsiKBuilder.cc.

References RemoveAddSevLevel::flag, massConstr, and updated.

Referenced by BPHWriteSpecificDecay::fill().

166  {
167  updated = false;
168  massConstr = flag;
169  return;
170 }
void BPHBuToJPsiKBuilder::setJPsiMassMax ( double  m)

Definition at line 118 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

118  {
119  updated = false;
120  jpsiSel->setMassMax(m);
121  return;
122 }
void setMassMax(double m)
Definition: BPHMassCuts.h:48
BPHMassSelect * jpsiSel
void BPHBuToJPsiKBuilder::setJPsiMassMin ( double  m)

set cuts

Definition at line 112 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

112  {
113  updated = false;
114  jpsiSel->setMassMin(m);
115  return;
116 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:44
BPHMassSelect * jpsiSel
void BPHBuToJPsiKBuilder::setKEtaMax ( double  eta)

Definition at line 130 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

130  {
131  updated = false;
132  etaSel->setEtaMax(eta);
133  return;
134 }
BPHParticleEtaSelect * etaSel
void setEtaMax(double eta)
set eta max
void BPHBuToJPsiKBuilder::setKPtMin ( double  pt)

set cuts

Definition at line 124 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

124  {
125  updated = false;
126  ptSel->setPtMin(pt);
127  return;
128 }
BPHParticlePtSelect * ptSel
void setPtMin(double pt)
set pt min
void BPHBuToJPsiKBuilder::setMassFitMax ( double  m)

Definition at line 160 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

160  {
161  updated = false;
162  mFitSel->setMassMax(m);
163  return;
164 }
void setMassMax(double m)
Definition: BPHMassCuts.h:48
BPHMassFitSelect * mFitSel
void BPHBuToJPsiKBuilder::setMassFitMin ( double  m)

Definition at line 154 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

154  {
155  updated = false;
156  mFitSel->setMassMin(m);
157  return;
158 }
BPHMassFitSelect * mFitSel
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:44
void BPHBuToJPsiKBuilder::setMassMax ( double  m)

Definition at line 142 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

142  {
143  updated = false;
144  massSel->setMassMax(m);
145  return;
146 }
void setMassMax(double m)
Definition: BPHMassCuts.h:48
void BPHBuToJPsiKBuilder::setMassMin ( double  m)

Definition at line 136 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

136  {
137  updated = false;
138  massSel->setMassMin(m);
139  return;
140 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:44
void BPHBuToJPsiKBuilder::setProbMin ( double  p)

Definition at line 148 of file BPHBuToJPsiKBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

148  {
149  updated = false;
150  chi2Sel->setProbMin(p);
151  return;
152 }
void setProbMin(double p)
set prob min
Definition: BPHChi2Select.h:54

Member Data Documentation

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

Definition at line 108 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

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

Definition at line 91 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

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

Definition at line 92 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

std::string BPHBuToJPsiKBuilder::jPsiName
private

Definition at line 88 of file BPHBuToJPsiKBuilder.h.

Referenced by BPHBuToJPsiKBuilder(), and build().

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

Definition at line 89 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

const BPHRecoBuilder::BPHGenericCollection* BPHBuToJPsiKBuilder::kCollection
private

Definition at line 93 of file BPHBuToJPsiKBuilder.h.

Referenced by build().

BPHParticleNeutralVeto* BPHBuToJPsiKBuilder::knVeto
private

Definition at line 96 of file BPHBuToJPsiKBuilder.h.

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

bool BPHBuToJPsiKBuilder::massConstr
private

Definition at line 104 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 105 of file BPHBuToJPsiKBuilder.h.

Referenced by BPHBuToJPsiKBuilder(), and build().

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