CMS 3D CMS Logo

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

#include <BPHBdToKxMuMuBuilder.h>

Public Member Functions

 BPHBdToKxMuMuBuilder (const edm::EventSetup &es, const std::vector< BPHPlusMinusConstCandPtr > &oniaCollection, const std::vector< BPHPlusMinusConstCandPtr > &kx0Collection)
 
 BPHBdToKxMuMuBuilder (const BPHBdToKxMuMuBuilder &x)=delete
 
std::vector< BPHRecoConstCandPtrbuild ()
 build Bs candidates More...
 
bool getConstr () const
 
double getKxMassMax () const
 
double getKxMassMin () const
 
double getMassFitMax () const
 
double getMassFitMin () const
 
double getMassMax () const
 
double getMassMin () const
 
double getOniaMassMax () const
 
double getOniaMassMin () const
 get current cuts More...
 
double getProbMin () const
 
BPHBdToKxMuMuBuilderoperator= (const BPHBdToKxMuMuBuilder &x)=delete
 
void setConstr (bool flag)
 
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 setOniaMassMax (double m)
 
void setOniaMassMin (double m)
 set cuts More...
 
void setProbMin (double p)
 
virtual ~BPHBdToKxMuMuBuilder ()
 

Private Attributes

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

Detailed Description

Description: Class to build B0 to K*0 mu+ mu- candidates

Author
Paolo Ronchese INFN Padova

Definition at line 39 of file BPHBdToKxMuMuBuilder.h.

Constructor & Destructor Documentation

◆ BPHBdToKxMuMuBuilder() [1/2]

BPHBdToKxMuMuBuilder::BPHBdToKxMuMuBuilder ( const edm::EventSetup es,
const std::vector< BPHPlusMinusConstCandPtr > &  oniaCollection,
const std::vector< BPHPlusMinusConstCandPtr > &  kx0Collection 
)

Constructor

Definition at line 36 of file BPHBdToKxMuMuBuilder.cc.

References chi2Sel, massConstr, massSel, mFitSel, minPDiff, mkx0Sel, oniaSel, and updated.

39  : oniaName("Onia"), kx0Name("Kx0"), evSetup(&es), jCollection(&oniaCollection), kCollection(&kx0Collection) {
40  oniaSel = new BPHMassSelect(1.00, 12.00);
41  mkx0Sel = new BPHMassSelect(0.80, 1.00);
42  massSel = new BPHMassSelect(3.50, 8.00);
43  chi2Sel = new BPHChi2Select(0.02);
44  mFitSel = new BPHMassFitSelect(4.00, 7.00);
45  massConstr = true;
46  minPDiff = 1.0e-4;
47  updated = false;
48 }
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
const std::vector< BPHPlusMinusConstCandPtr > * kCollection
const edm::EventSetup * evSetup
BPHMassFitSelect * mFitSel

◆ BPHBdToKxMuMuBuilder() [2/2]

BPHBdToKxMuMuBuilder::BPHBdToKxMuMuBuilder ( const BPHBdToKxMuMuBuilder x)
delete

◆ ~BPHBdToKxMuMuBuilder()

BPHBdToKxMuMuBuilder::~BPHBdToKxMuMuBuilder ( )
virtual

Destructor

Definition at line 53 of file BPHBdToKxMuMuBuilder.cc.

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

53  {
54  delete oniaSel;
55  delete mkx0Sel;
56  delete massSel;
57  delete chi2Sel;
58  delete mFitSel;
59 }
BPHMassFitSelect * mFitSel

Member Function Documentation

◆ build()

vector< BPHRecoConstCandPtr > BPHBdToKxMuMuBuilder::build ( )

build Bs candidates

Operations

Definition at line 64 of file BPHBdToKxMuMuBuilder.cc.

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

64  {
65  if (updated)
66  return bdList;
67 
68  bdList.clear();
69 
70  BPHRecoBuilder bBd(*evSetup);
71  bBd.setMinPDiffererence(minPDiff);
72  bBd.add(oniaName, *jCollection);
73  bBd.add(kx0Name, *kCollection);
74  bBd.filter(oniaName, *oniaSel);
75  bBd.filter(kx0Name, *mkx0Sel);
76 
77  bBd.filter(*massSel);
78  if (chi2Sel != nullptr)
79  bBd.filter(*chi2Sel);
80  if (massConstr)
81  bBd.filter(*mFitSel);
82 
84  //
85  // Apply kinematic constraint on the onia mass.
86  // The operation is already performed when apply the mass selection,
87  // so it's not repeated. The following code is left as example
88  // for similar operations
89  //
90  // int iBd;
91  // int nBd = ( massConstr ? bdList.size() : 0 );
92  // for ( iBd = 0; iBd < nBd; ++iBd ) {
93  // BPHRecoCandidate* cptr = bdList[iBd].get();
94  // BPHRecoConstCandPtr onia = cptr->getComp( oniaName );
95  // double oMass = onia->constrMass();
96  // if ( oMass < 0 ) continue;
97  // double sigma = onia->constrSigma();
98  // cptr->kinematicTree( oniaName, oMass, sigma );
99  // }
100  updated = true;
101 
102  return bdList;
103 }
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
std::vector< BPHRecoConstCandPtr > bdList
const std::vector< BPHPlusMinusConstCandPtr > * kCollection
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
const edm::EventSetup * evSetup
BPHMassFitSelect * mFitSel

◆ getConstr()

bool BPHBdToKxMuMuBuilder::getConstr ( ) const

Definition at line 186 of file BPHBdToKxMuMuBuilder.cc.

References massConstr.

186 { return massConstr; }

◆ getKxMassMax()

double BPHBdToKxMuMuBuilder::getKxMassMax ( ) const

Definition at line 174 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMax(), and mkx0Sel.

174 { return mkx0Sel->getMassMax(); }
double getMassMax() const
Definition: BPHMassCuts.h:59

◆ getKxMassMin()

double BPHBdToKxMuMuBuilder::getKxMassMin ( ) const

Definition at line 172 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMin(), and mkx0Sel.

172 { return mkx0Sel->getMassMin(); }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58

◆ getMassFitMax()

double BPHBdToKxMuMuBuilder::getMassFitMax ( ) const

Definition at line 184 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMax(), and mFitSel.

184 { return mFitSel->getMassMax(); }
double getMassMax() const
Definition: BPHMassCuts.h:59
BPHMassFitSelect * mFitSel

◆ getMassFitMin()

double BPHBdToKxMuMuBuilder::getMassFitMin ( ) const

Definition at line 182 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMin(), and mFitSel.

182 { return mFitSel->getMassMin(); }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
BPHMassFitSelect * mFitSel

◆ getMassMax()

double BPHBdToKxMuMuBuilder::getMassMax ( ) const

Definition at line 178 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMax(), and massSel.

178 { return massSel->getMassMax(); }
double getMassMax() const
Definition: BPHMassCuts.h:59

◆ getMassMin()

double BPHBdToKxMuMuBuilder::getMassMin ( ) const

Definition at line 176 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMin(), and massSel.

176 { return massSel->getMassMin(); }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58

◆ getOniaMassMax()

double BPHBdToKxMuMuBuilder::getOniaMassMax ( ) const

Definition at line 170 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMax(), and oniaSel.

170 { return oniaSel->getMassMax(); }
double getMassMax() const
Definition: BPHMassCuts.h:59

◆ getOniaMassMin()

double BPHBdToKxMuMuBuilder::getOniaMassMin ( ) const

get current cuts

Definition at line 168 of file BPHBdToKxMuMuBuilder.cc.

References BPHMassCuts::getMassMin(), and oniaSel.

168 { return oniaSel->getMassMin(); }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58

◆ getProbMin()

double BPHBdToKxMuMuBuilder::getProbMin ( ) const

Definition at line 180 of file BPHBdToKxMuMuBuilder.cc.

References chi2Sel, and BPHChi2Select::getProbMin().

180 { return (chi2Sel == nullptr ? -1.0 : chi2Sel->getProbMin()); }
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66

◆ operator=()

BPHBdToKxMuMuBuilder& BPHBdToKxMuMuBuilder::operator= ( const BPHBdToKxMuMuBuilder x)
delete

◆ setConstr()

void BPHBdToKxMuMuBuilder::setConstr ( bool  flag)

Definition at line 161 of file BPHBdToKxMuMuBuilder.cc.

References RemoveAddSevLevel::flag, massConstr, and updated.

161  {
162  updated = false;
163  massConstr = flag;
164  return;
165 }

◆ setKxMassMax()

void BPHBdToKxMuMuBuilder::setKxMassMax ( double  m)

◆ setKxMassMin()

void BPHBdToKxMuMuBuilder::setKxMassMin ( double  m)

◆ setMassFitMax()

void BPHBdToKxMuMuBuilder::setMassFitMax ( double  m)

◆ setMassFitMin()

void BPHBdToKxMuMuBuilder::setMassFitMin ( double  m)

Definition at line 149 of file BPHBdToKxMuMuBuilder.cc.

References visualization-live-secondInstance_cfg::m, mFitSel, BPHMassCuts::setMassMin(), and updated.

149  {
150  updated = false;
151  mFitSel->setMassMin(m);
152  return;
153 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
BPHMassFitSelect * mFitSel

◆ setMassMax()

void BPHBdToKxMuMuBuilder::setMassMax ( double  m)

◆ setMassMin()

void BPHBdToKxMuMuBuilder::setMassMin ( double  m)

◆ setOniaMassMax()

void BPHBdToKxMuMuBuilder::setOniaMassMax ( double  m)

◆ setOniaMassMin()

void BPHBdToKxMuMuBuilder::setOniaMassMin ( double  m)

set cuts

Definition at line 106 of file BPHBdToKxMuMuBuilder.cc.

References visualization-live-secondInstance_cfg::m, oniaSel, BPHMassCuts::setMassMin(), and updated.

106  {
107  updated = false;
108  oniaSel->setMassMin(m);
109  return;
110 }
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48

◆ setProbMin()

void BPHBdToKxMuMuBuilder::setProbMin ( double  p)

Definition at line 142 of file BPHBdToKxMuMuBuilder.cc.

References chi2Sel, AlCaHLTBitMon_ParallelJobs::p, and updated.

142  {
143  updated = false;
144  delete chi2Sel;
145  chi2Sel = (p < 0.0 ? nullptr : new BPHChi2Select(p));
146  return;
147 }

Member Data Documentation

◆ bdList

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

Definition at line 103 of file BPHBdToKxMuMuBuilder.h.

Referenced by build().

◆ chi2Sel

BPHChi2Select* BPHBdToKxMuMuBuilder::chi2Sel
private

◆ evSetup

const edm::EventSetup* BPHBdToKxMuMuBuilder::evSetup
private

Definition at line 88 of file BPHBdToKxMuMuBuilder.h.

Referenced by build().

◆ jCollection

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

Definition at line 89 of file BPHBdToKxMuMuBuilder.h.

Referenced by build().

◆ kCollection

const std::vector<BPHPlusMinusConstCandPtr>* BPHBdToKxMuMuBuilder::kCollection
private

Definition at line 90 of file BPHBdToKxMuMuBuilder.h.

Referenced by build().

◆ kx0Name

std::string BPHBdToKxMuMuBuilder::kx0Name
private

Definition at line 86 of file BPHBdToKxMuMuBuilder.h.

Referenced by build().

◆ massConstr

bool BPHBdToKxMuMuBuilder::massConstr
private

Definition at line 99 of file BPHBdToKxMuMuBuilder.h.

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

◆ massSel

BPHMassSelect* BPHBdToKxMuMuBuilder::massSel
private

◆ mFitSel

BPHMassFitSelect* BPHBdToKxMuMuBuilder::mFitSel
private

◆ minPDiff

float BPHBdToKxMuMuBuilder::minPDiff
private

Definition at line 100 of file BPHBdToKxMuMuBuilder.h.

Referenced by BPHBdToKxMuMuBuilder(), and build().

◆ mkx0Sel

BPHMassSelect* BPHBdToKxMuMuBuilder::mkx0Sel
private

◆ oniaName

std::string BPHBdToKxMuMuBuilder::oniaName
private

Definition at line 85 of file BPHBdToKxMuMuBuilder.h.

Referenced by build().

◆ oniaSel

BPHMassSelect* BPHBdToKxMuMuBuilder::oniaSel
private

◆ updated

bool BPHBdToKxMuMuBuilder::updated
private