CMS 3D CMS Logo

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

#include <BPHBsToJPsiPhiBuilder.h>

Public Member Functions

 BPHBsToJPsiPhiBuilder (const edm::EventSetup &es, const std::vector< BPHPlusMinusConstCandPtr > &jpsiCollection, const std::vector< BPHPlusMinusConstCandPtr > &phiCollection)
 
std::vector< BPHRecoConstCandPtrbuild ()
 build Bs candidates More...
 
bool getConstr () const
 
double getJPsiMassMax () const
 
double getJPsiMassMin () const
 get current cuts More...
 
double getMassFitMax () const
 
double getMassFitMin () const
 
double getMassMax () const
 
double getMassMin () const
 
double getPhiMassMax () const
 
double getPhiMassMin () const
 
double getProbMin () const
 
void setConstr (bool flag)
 
void setJPsiMassMax (double m)
 
void setJPsiMassMin (double m)
 set cuts More...
 
void setMassFitMax (double m)
 
void setMassFitMin (double m)
 
void setMassMax (double m)
 
void setMassMin (double m)
 
void setPhiMassMax (double m)
 
void setPhiMassMin (double m)
 
void setProbMin (double p)
 
virtual ~BPHBsToJPsiPhiBuilder ()
 

Private Member Functions

 BPHBsToJPsiPhiBuilder (const BPHBsToJPsiPhiBuilder &x)=delete
 
BPHBsToJPsiPhiBuilderoperator= (const BPHBsToJPsiPhiBuilder &x)=delete
 

Private Attributes

std::vector< BPHRecoConstCandPtrbsList
 
BPHChi2Selectchi2Sel
 
const edm::EventSetupevSetup
 
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
 
std::string jPsiName
 
BPHMassSelectjpsiSel
 
bool massConstr
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
float minPDiff
 
BPHMassSelectmphiSel
 
const std::vector< BPHPlusMinusConstCandPtr > * pCollection
 
std::string phiName
 
bool updated
 

Detailed Description

Description: Class to build Bs to JPsi Phi candidates

Author
Paolo Ronchese INFN Padova

Definition at line 40 of file BPHBsToJPsiPhiBuilder.h.

Constructor & Destructor Documentation

BPHBsToJPsiPhiBuilder::BPHBsToJPsiPhiBuilder ( const edm::EventSetup es,
const std::vector< BPHPlusMinusConstCandPtr > &  jpsiCollection,
const std::vector< BPHPlusMinusConstCandPtr > &  phiCollection 
)

Constructor

Definition at line 37 of file BPHBsToJPsiPhiBuilder.cc.

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

39  :
40  jPsiName( "JPsi" ),
41  phiName( "Phi" ),
42  evSetup( &es ),
43  jCollection( &jpsiCollection ),
44  pCollection( & phiCollection ) {
45  jpsiSel = new BPHMassSelect ( 2.80, 3.40 );
46  mphiSel = new BPHMassSelect ( 1.005, 1.035 );
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
static const double jPsiMass
const edm::EventSetup * evSetup
BPHMassFitSelect * mFitSel
const std::vector< BPHPlusMinusConstCandPtr > * pCollection
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
BPHBsToJPsiPhiBuilder::~BPHBsToJPsiPhiBuilder ( )
virtual

Destructor

Definition at line 61 of file BPHBsToJPsiPhiBuilder.cc.

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

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

Member Function Documentation

vector< BPHRecoConstCandPtr > BPHBsToJPsiPhiBuilder::build ( )

build Bs candidates

Operations

Definition at line 72 of file BPHBsToJPsiPhiBuilder.cc.

References BPHRecoBuilder::add(), bsList, BPHRecoCandidate::build(), chi2Sel, evSetup, BPHRecoBuilder::filter(), jCollection, jPsiName, jpsiSel, massConstr, massSel, mFitSel, minPDiff, mphiSel, pCollection, phiName, BPHRecoBuilder::setMinPDiffererence(), and updated.

Referenced by BPHWriteSpecificDecay::fill().

72  {
73 
74  if ( updated ) return bsList;
75 
76  BPHRecoBuilder bBs( *evSetup );
77  bBs.setMinPDiffererence( minPDiff );
78  bBs.add( jPsiName, *jCollection );
79  bBs.add( phiName, *pCollection );
80  bBs.filter( jPsiName, *jpsiSel );
81  bBs.filter( phiName, *mphiSel );
82 
83  bBs.filter( *massSel );
84  bBs.filter( *chi2Sel );
85  if ( massConstr ) bBs.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 iBs;
95 // int nBs = ( massConstr ? bsList.size() : 0 );
96 // for ( iBs = 0; iBs < nBs; ++iBs ) {
97 // BPHRecoCandidate* cptr( const_cast<BPHRecoCandidate*>(
98 // bsList[iBs].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 bsList;
108 
109 }
const edm::EventSetup * evSetup
BPHMassFitSelect * mFitSel
std::vector< BPHRecoConstCandPtr > bsList
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
const std::vector< BPHPlusMinusConstCandPtr > * pCollection
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
bool BPHBsToJPsiPhiBuilder::getConstr ( ) const

Definition at line 227 of file BPHBsToJPsiPhiBuilder.cc.

References massConstr.

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

Definition at line 187 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMax(), and jpsiSel.

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

get current cuts

Definition at line 182 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMin(), and jpsiSel.

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

Definition at line 222 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMax(), and mFitSel.

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

Definition at line 217 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMin(), and mFitSel.

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

Definition at line 207 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMax(), and massSel.

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

Definition at line 202 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMin(), and massSel.

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

Definition at line 197 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMax(), and mphiSel.

197  {
198  return mphiSel->getMassMax();
199 }
double getMassMax() const
Definition: BPHMassCuts.h:55
double BPHBsToJPsiPhiBuilder::getPhiMassMin ( ) const

Definition at line 192 of file BPHBsToJPsiPhiBuilder.cc.

References BPHMassCuts::getMassMin(), and mphiSel.

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

Definition at line 212 of file BPHBsToJPsiPhiBuilder.cc.

References chi2Sel, and BPHChi2Select::getProbMin().

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

Definition at line 175 of file BPHBsToJPsiPhiBuilder.cc.

References RemoveAddSevLevel::flag, massConstr, and updated.

Referenced by BPHWriteSpecificDecay::fill().

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

Definition at line 119 of file BPHBsToJPsiPhiBuilder.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 BPHBsToJPsiPhiBuilder::setJPsiMassMin ( double  m)

set cuts

Definition at line 112 of file BPHBsToJPsiPhiBuilder.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 BPHBsToJPsiPhiBuilder::setMassFitMax ( double  m)

Definition at line 168 of file BPHBsToJPsiPhiBuilder.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 BPHBsToJPsiPhiBuilder::setMassFitMin ( double  m)

Definition at line 161 of file BPHBsToJPsiPhiBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

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

Definition at line 147 of file BPHBsToJPsiPhiBuilder.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 BPHBsToJPsiPhiBuilder::setMassMin ( double  m)

Definition at line 140 of file BPHBsToJPsiPhiBuilder.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 BPHBsToJPsiPhiBuilder::setPhiMassMax ( double  m)

Definition at line 133 of file BPHBsToJPsiPhiBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

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

Definition at line 126 of file BPHBsToJPsiPhiBuilder.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

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

Definition at line 154 of file BPHBsToJPsiPhiBuilder.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> BPHBsToJPsiPhiBuilder::bsList
private

Definition at line 107 of file BPHBsToJPsiPhiBuilder.h.

Referenced by build().

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

Definition at line 92 of file BPHBsToJPsiPhiBuilder.h.

Referenced by build().

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

Definition at line 93 of file BPHBsToJPsiPhiBuilder.h.

Referenced by build().

std::string BPHBsToJPsiPhiBuilder::jPsiName
private

Definition at line 89 of file BPHBsToJPsiPhiBuilder.h.

Referenced by BPHBsToJPsiPhiBuilder(), and build().

BPHMassSelect* BPHBsToJPsiPhiBuilder::jpsiSel
private
bool BPHBsToJPsiPhiBuilder::massConstr
private

Definition at line 103 of file BPHBsToJPsiPhiBuilder.h.

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

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

Definition at line 104 of file BPHBsToJPsiPhiBuilder.h.

Referenced by BPHBsToJPsiPhiBuilder(), and build().

BPHMassSelect* BPHBsToJPsiPhiBuilder::mphiSel
private
const std::vector<BPHPlusMinusConstCandPtr>* BPHBsToJPsiPhiBuilder::pCollection
private

Definition at line 94 of file BPHBsToJPsiPhiBuilder.h.

Referenced by build().

std::string BPHBsToJPsiPhiBuilder::phiName
private

Definition at line 90 of file BPHBsToJPsiPhiBuilder.h.

Referenced by build().

bool BPHBsToJPsiPhiBuilder::updated
private