CMS 3D CMS Logo

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

#include <BPHBdToJPsiKxBuilder.h>

Public Member Functions

 BPHBdToJPsiKxBuilder (const edm::EventSetup &es, const std::vector< BPHPlusMinusConstCandPtr > &jpsiCollection, const std::vector< BPHPlusMinusConstCandPtr > &kx0Collection)
 
std::vector< BPHRecoConstCandPtrbuild ()
 build Bs candidates More...
 
bool getConstr () const
 
double getJPsiMassMax () const
 
double getJPsiMassMin () const
 get current cuts More...
 
double getKxMassMax () const
 
double getKxMassMin () const
 
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 setKxMassMax (double m)
 
void setKxMassMin (double m)
 
void setMassFitMax (double m)
 
void setMassFitMin (double m)
 
void setMassMax (double m)
 
void setMassMin (double m)
 
void setProbMin (double p)
 
virtual ~BPHBdToJPsiKxBuilder ()
 

Private Member Functions

 BPHBdToJPsiKxBuilder (const BPHBdToJPsiKxBuilder &x)=delete
 
BPHBdToJPsiKxBuilderoperator= (const BPHBdToJPsiKxBuilder &x)=delete
 

Private Attributes

std::vector< BPHRecoConstCandPtrbdList
 
BPHChi2Selectchi2Sel
 
const edm::EventSetupevSetup
 
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
 
std::string jPsiName
 
BPHMassSelectjpsiSel
 
const std::vector< BPHPlusMinusConstCandPtr > * kCollection
 
std::string kx0Name
 
bool massConstr
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
float minPDiff
 
BPHMassSelectmkx0Sel
 
bool updated
 

Detailed Description

Description: Class to build B0 to JPsi K*0 candidates

Author
Paolo Ronchese INFN Padova

Definition at line 40 of file BPHBdToJPsiKxBuilder.h.

Constructor & Destructor Documentation

BPHBdToJPsiKxBuilder::BPHBdToJPsiKxBuilder ( const edm::EventSetup es,
const std::vector< BPHPlusMinusConstCandPtr > &  jpsiCollection,
const std::vector< BPHPlusMinusConstCandPtr > &  kx0Collection 
)

Constructor

Definition at line 37 of file BPHBdToJPsiKxBuilder.cc.

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

39  :
40  jPsiName( "JPsi" ),
41  kx0Name( "Kx0" ),
42  evSetup( &es ),
43  jCollection( &jpsiCollection ),
44  kCollection( & kx0Collection ) {
45  jpsiSel = new BPHMassSelect ( 2.80, 3.40 );
46  mkx0Sel = new BPHMassSelect ( 0.80, 1.00 );
47  massSel = new BPHMassSelect ( 3.50, 8.00 );
48  chi2Sel = new BPHChi2Select ( 0.02 );
52  5.00, 6.00 );
53  massConstr = true;
54  minPDiff = 1.0e-4;
55  updated = false;
56 }
static const double jPsiMWidth
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
static const double jPsiMass
const edm::EventSetup * evSetup
BPHMassFitSelect * mFitSel
const std::vector< BPHPlusMinusConstCandPtr > * kCollection
BPHBdToJPsiKxBuilder::~BPHBdToJPsiKxBuilder ( )
virtual

Destructor

Definition at line 61 of file BPHBdToJPsiKxBuilder.cc.

References chi2Sel, jpsiSel, massSel, mFitSel, and mkx0Sel.

61  {
62  delete jpsiSel;
63  delete mkx0Sel;
64  delete massSel;
65  delete chi2Sel;
66  delete mFitSel;
67 }
BPHMassFitSelect * mFitSel
BPHBdToJPsiKxBuilder::BPHBdToJPsiKxBuilder ( const BPHBdToJPsiKxBuilder x)
privatedelete

Member Function Documentation

vector< BPHRecoConstCandPtr > BPHBdToJPsiKxBuilder::build ( )

build Bs candidates

Operations

Definition at line 72 of file BPHBdToJPsiKxBuilder.cc.

References BPHRecoBuilder::add(), bdList, BPHRecoCandidate::build(), chi2Sel, evSetup, BPHRecoBuilder::filter(), jCollection, jPsiName, jpsiSel, kCollection, kx0Name, massConstr, massSel, mFitSel, minPDiff, mkx0Sel, BPHRecoBuilder::setMinPDiffererence(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

72  {
73 
74  if ( updated ) return bdList;
75 
76  BPHRecoBuilder bBd( *evSetup );
77  bBd.setMinPDiffererence( minPDiff );
78  bBd.add( jPsiName, *jCollection );
79  bBd.add( kx0Name, *kCollection );
80  bBd.filter( jPsiName, *jpsiSel );
81  bBd.filter( kx0Name, *mkx0Sel );
82 
83  bBd.filter( *massSel );
84  bBd.filter( *chi2Sel );
85  if ( massConstr ) bBd.filter( *mFitSel );
86 
88 //
89 // Apply kinematic constraint on the JPsi mass.
90 // The operation is already performed when apply the mass selection,
91 // so it's not repeated. The following code is left as example
92 // for similar operations
93 //
94 // int iBd;
95 // int nBd = ( massConstr ? bdList.size() : 0 );
96 // for ( iBd = 0; iBd < nBd; ++iBd ) {
97 // BPHRecoCandidate* cptr( const_cast<BPHRecoCandidate*>(
98 // bdList[iBd].get() ) );
99 // BPHRecoConstCandPtr jpsi = cptr->getComp( jPsiName );
100 // double jMass = jpsi->constrMass();
101 // if ( jMass < 0 ) continue;
102 // double sigma = jpsi->constrSigma();
103 // cptr->kinematicTree( jPsiName, jMass, sigma );
104 // }
105  updated = true;
106 
107  return bdList;
108 
109 }
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
const edm::EventSetup * evSetup
std::vector< BPHRecoConstCandPtr > bdList
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
BPHMassFitSelect * mFitSel
const std::vector< BPHPlusMinusConstCandPtr > * kCollection
bool BPHBdToJPsiKxBuilder::getConstr ( ) const

Definition at line 227 of file BPHBdToJPsiKxBuilder.cc.

References massConstr.

227  {
228  return massConstr;
229 }
double BPHBdToJPsiKxBuilder::getJPsiMassMax ( ) const

Definition at line 187 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMax(), and jpsiSel.

187  {
188  return jpsiSel->getMassMax();
189 }
double getMassMax() const
Definition: BPHMassCuts.h:55
double BPHBdToJPsiKxBuilder::getJPsiMassMin ( ) const

get current cuts

Definition at line 182 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMin(), and jpsiSel.

182  {
183  return jpsiSel->getMassMin();
184 }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
double BPHBdToJPsiKxBuilder::getKxMassMax ( ) const

Definition at line 197 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMax(), and mkx0Sel.

197  {
198  return mkx0Sel->getMassMax();
199 }
double getMassMax() const
Definition: BPHMassCuts.h:55
double BPHBdToJPsiKxBuilder::getKxMassMin ( ) const

Definition at line 192 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMin(), and mkx0Sel.

192  {
193  return mkx0Sel->getMassMin();
194 }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
double BPHBdToJPsiKxBuilder::getMassFitMax ( ) const

Definition at line 222 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMax(), and mFitSel.

222  {
223  return mFitSel->getMassMax();
224 }
double getMassMax() const
Definition: BPHMassCuts.h:55
BPHMassFitSelect * mFitSel
double BPHBdToJPsiKxBuilder::getMassFitMin ( ) const

Definition at line 217 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMin(), and mFitSel.

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

Definition at line 207 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMax(), and massSel.

207  {
208  return massSel->getMassMax();
209 }
double getMassMax() const
Definition: BPHMassCuts.h:55
double BPHBdToJPsiKxBuilder::getMassMin ( ) const

Definition at line 202 of file BPHBdToJPsiKxBuilder.cc.

References BPHMassCuts::getMassMin(), and massSel.

202  {
203  return massSel->getMassMin();
204 }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
double BPHBdToJPsiKxBuilder::getProbMin ( ) const

Definition at line 212 of file BPHBdToJPsiKxBuilder.cc.

References chi2Sel, and BPHChi2Select::getProbMin().

212  {
213  return chi2Sel->getProbMin();
214 }
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:58
BPHBdToJPsiKxBuilder& BPHBdToJPsiKxBuilder::operator= ( const BPHBdToJPsiKxBuilder x)
privatedelete
void BPHBdToJPsiKxBuilder::setConstr ( bool  flag)

Definition at line 175 of file BPHBdToJPsiKxBuilder.cc.

References RemoveAddSevLevel::flag, massConstr, and updated.

Referenced by BPHWriteSpecificDecay::fill().

175  {
176  updated = false;
177  massConstr = flag;
178  return;
179 }
void BPHBdToJPsiKxBuilder::setJPsiMassMax ( double  m)

Definition at line 119 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

119  {
120  updated = false;
121  jpsiSel->setMassMax( m );
122  return;
123 }
void setMassMax(double m)
Definition: BPHMassCuts.h:51
void BPHBdToJPsiKxBuilder::setJPsiMassMin ( double  m)

set cuts

Definition at line 112 of file BPHBdToJPsiKxBuilder.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:50
void BPHBdToJPsiKxBuilder::setKxMassMax ( double  m)

Definition at line 133 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

133  {
134  updated = false;
135  mkx0Sel->setMassMax( m );
136  return;
137 }
void setMassMax(double m)
Definition: BPHMassCuts.h:51
void BPHBdToJPsiKxBuilder::setKxMassMin ( double  m)

Definition at line 126 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

126  {
127  updated = false;
128  mkx0Sel->setMassMin( m );
129  return;
130 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:50
void BPHBdToJPsiKxBuilder::setMassFitMax ( double  m)

Definition at line 168 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

168  {
169  updated = false;
170  mFitSel->setMassMax( m );
171  return;
172 }
void setMassMax(double m)
Definition: BPHMassCuts.h:51
BPHMassFitSelect * mFitSel
void BPHBdToJPsiKxBuilder::setMassFitMin ( double  m)

Definition at line 161 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

161  {
162  updated = false;
163  mFitSel->setMassMin( m );
164  return;
165 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:50
BPHMassFitSelect * mFitSel
void BPHBdToJPsiKxBuilder::setMassMax ( double  m)

Definition at line 147 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

147  {
148  updated = false;
149  massSel->setMassMax( m );
150  return;
151 }
void setMassMax(double m)
Definition: BPHMassCuts.h:51
void BPHBdToJPsiKxBuilder::setMassMin ( double  m)

Definition at line 140 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

140  {
141  updated = false;
142  massSel->setMassMin( m );
143  return;
144 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:50
void BPHBdToJPsiKxBuilder::setProbMin ( double  p)

Definition at line 154 of file BPHBdToJPsiKxBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

154  {
155  updated = false;
156  chi2Sel->setProbMin( p );
157  return;
158 }
void setProbMin(double p)
set prob min
Definition: BPHChi2Select.h:55

Member Data Documentation

std::vector<BPHRecoConstCandPtr> BPHBdToJPsiKxBuilder::bdList
private

Definition at line 107 of file BPHBdToJPsiKxBuilder.h.

Referenced by build().

BPHChi2Select* BPHBdToJPsiKxBuilder::chi2Sel
private
const edm::EventSetup* BPHBdToJPsiKxBuilder::evSetup
private

Definition at line 92 of file BPHBdToJPsiKxBuilder.h.

Referenced by build().

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

Definition at line 93 of file BPHBdToJPsiKxBuilder.h.

Referenced by build().

std::string BPHBdToJPsiKxBuilder::jPsiName
private

Definition at line 89 of file BPHBdToJPsiKxBuilder.h.

Referenced by BPHBdToJPsiKxBuilder(), and build().

BPHMassSelect* BPHBdToJPsiKxBuilder::jpsiSel
private
const std::vector<BPHPlusMinusConstCandPtr>* BPHBdToJPsiKxBuilder::kCollection
private

Definition at line 94 of file BPHBdToJPsiKxBuilder.h.

Referenced by build().

std::string BPHBdToJPsiKxBuilder::kx0Name
private

Definition at line 90 of file BPHBdToJPsiKxBuilder.h.

Referenced by build().

bool BPHBdToJPsiKxBuilder::massConstr
private

Definition at line 103 of file BPHBdToJPsiKxBuilder.h.

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

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

Definition at line 104 of file BPHBdToJPsiKxBuilder.h.

Referenced by BPHBdToJPsiKxBuilder(), and build().

BPHMassSelect* BPHBdToJPsiKxBuilder::mkx0Sel
private
bool BPHBdToJPsiKxBuilder::updated
private