CMS 3D CMS Logo

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

#include <BPHBdToKxMuMuBuilder.h>

Public Member Functions

 BPHBdToKxMuMuBuilder (const BPHBdToKxMuMuBuilder &x)=delete
 
 BPHBdToKxMuMuBuilder (const edm::EventSetup &es, const std::vector< BPHPlusMinusConstCandPtr > &oniaCollection, const std::vector< BPHPlusMinusConstCandPtr > &kx0Collection)
 
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.

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 }

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

◆ BPHBdToKxMuMuBuilder() [2/2]

BPHBdToKxMuMuBuilder::BPHBdToKxMuMuBuilder ( const BPHBdToKxMuMuBuilder x)
delete

◆ ~BPHBdToKxMuMuBuilder()

BPHBdToKxMuMuBuilder::~BPHBdToKxMuMuBuilder ( )
virtual

Destructor

Definition at line 53 of file BPHBdToKxMuMuBuilder.cc.

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

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

Member Function Documentation

◆ build()

vector< BPHRecoConstCandPtr > BPHBdToKxMuMuBuilder::build ( )

build Bs candidates

Operations

Definition at line 64 of file BPHBdToKxMuMuBuilder.cc.

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 }

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

◆ getConstr()

bool BPHBdToKxMuMuBuilder::getConstr ( ) const

Definition at line 186 of file BPHBdToKxMuMuBuilder.cc.

186 { return massConstr; }

References massConstr.

◆ getKxMassMax()

double BPHBdToKxMuMuBuilder::getKxMassMax ( ) const

Definition at line 174 of file BPHBdToKxMuMuBuilder.cc.

174 { return mkx0Sel->getMassMax(); }

References BPHMassCuts::getMassMax(), and mkx0Sel.

◆ getKxMassMin()

double BPHBdToKxMuMuBuilder::getKxMassMin ( ) const

Definition at line 172 of file BPHBdToKxMuMuBuilder.cc.

172 { return mkx0Sel->getMassMin(); }

References BPHMassCuts::getMassMin(), and mkx0Sel.

◆ getMassFitMax()

double BPHBdToKxMuMuBuilder::getMassFitMax ( ) const

Definition at line 184 of file BPHBdToKxMuMuBuilder.cc.

184 { return mFitSel->getMassMax(); }

References BPHMassCuts::getMassMax(), and mFitSel.

◆ getMassFitMin()

double BPHBdToKxMuMuBuilder::getMassFitMin ( ) const

Definition at line 182 of file BPHBdToKxMuMuBuilder.cc.

182 { return mFitSel->getMassMin(); }

References BPHMassCuts::getMassMin(), and mFitSel.

◆ getMassMax()

double BPHBdToKxMuMuBuilder::getMassMax ( ) const

Definition at line 178 of file BPHBdToKxMuMuBuilder.cc.

178 { return massSel->getMassMax(); }

References BPHMassCuts::getMassMax(), and massSel.

◆ getMassMin()

double BPHBdToKxMuMuBuilder::getMassMin ( ) const

Definition at line 176 of file BPHBdToKxMuMuBuilder.cc.

176 { return massSel->getMassMin(); }

References BPHMassCuts::getMassMin(), and massSel.

◆ getOniaMassMax()

double BPHBdToKxMuMuBuilder::getOniaMassMax ( ) const

Definition at line 170 of file BPHBdToKxMuMuBuilder.cc.

170 { return oniaSel->getMassMax(); }

References BPHMassCuts::getMassMax(), and oniaSel.

◆ getOniaMassMin()

double BPHBdToKxMuMuBuilder::getOniaMassMin ( ) const

get current cuts

Definition at line 168 of file BPHBdToKxMuMuBuilder.cc.

168 { return oniaSel->getMassMin(); }

References BPHMassCuts::getMassMin(), and oniaSel.

◆ getProbMin()

double BPHBdToKxMuMuBuilder::getProbMin ( ) const

Definition at line 180 of file BPHBdToKxMuMuBuilder.cc.

180 { return (chi2Sel == nullptr ? -1.0 : chi2Sel->getProbMin()); }

References chi2Sel, and BPHChi2Select::getProbMin().

◆ operator=()

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

◆ setConstr()

void BPHBdToKxMuMuBuilder::setConstr ( bool  flag)

Definition at line 161 of file BPHBdToKxMuMuBuilder.cc.

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

References RemoveAddSevLevel::flag, massConstr, and updated.

◆ setKxMassMax()

void BPHBdToKxMuMuBuilder::setKxMassMax ( double  m)

Definition at line 124 of file BPHBdToKxMuMuBuilder.cc.

124  {
125  updated = false;
126  mkx0Sel->setMassMax(m);
127  return;
128 }

References visualization-live-secondInstance_cfg::m, mkx0Sel, BPHMassCuts::setMassMax(), and updated.

◆ setKxMassMin()

void BPHBdToKxMuMuBuilder::setKxMassMin ( double  m)

Definition at line 118 of file BPHBdToKxMuMuBuilder.cc.

118  {
119  updated = false;
120  mkx0Sel->setMassMin(m);
121  return;
122 }

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

◆ setMassFitMax()

void BPHBdToKxMuMuBuilder::setMassFitMax ( double  m)

Definition at line 155 of file BPHBdToKxMuMuBuilder.cc.

155  {
156  updated = false;
157  mFitSel->setMassMax(m);
158  return;
159 }

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

◆ setMassFitMin()

void BPHBdToKxMuMuBuilder::setMassFitMin ( double  m)

Definition at line 149 of file BPHBdToKxMuMuBuilder.cc.

149  {
150  updated = false;
151  mFitSel->setMassMin(m);
152  return;
153 }

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

◆ setMassMax()

void BPHBdToKxMuMuBuilder::setMassMax ( double  m)

Definition at line 136 of file BPHBdToKxMuMuBuilder.cc.

136  {
137  updated = false;
138  massSel->setMassMax(m);
139  return;
140 }

References visualization-live-secondInstance_cfg::m, massSel, BPHMassCuts::setMassMax(), and updated.

◆ setMassMin()

void BPHBdToKxMuMuBuilder::setMassMin ( double  m)

Definition at line 130 of file BPHBdToKxMuMuBuilder.cc.

130  {
131  updated = false;
132  massSel->setMassMin(m);
133  return;
134 }

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

◆ setOniaMassMax()

void BPHBdToKxMuMuBuilder::setOniaMassMax ( double  m)

Definition at line 112 of file BPHBdToKxMuMuBuilder.cc.

112  {
113  updated = false;
114  oniaSel->setMassMax(m);
115  return;
116 }

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

◆ setOniaMassMin()

void BPHBdToKxMuMuBuilder::setOniaMassMin ( double  m)

set cuts

Definition at line 106 of file BPHBdToKxMuMuBuilder.cc.

106  {
107  updated = false;
108  oniaSel->setMassMin(m);
109  return;
110 }

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

◆ setProbMin()

void BPHBdToKxMuMuBuilder::setProbMin ( double  p)

Definition at line 142 of file BPHBdToKxMuMuBuilder.cc.

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

References chi2Sel, AlCaHLTBitMon_ParallelJobs::p, and updated.

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
BPHMassCuts::setMassMax
void setMassMax(double m)
Definition: BPHMassCuts.h:52
BPHChi2Select::getProbMin
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
BPHBdToKxMuMuBuilder::kCollection
const std::vector< BPHPlusMinusConstCandPtr > * kCollection
Definition: BPHBdToKxMuMuBuilder.h:90
BPHMassCuts::getMassMin
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
BPHBdToKxMuMuBuilder::updated
bool updated
Definition: BPHBdToKxMuMuBuilder.h:101
BPHBdToKxMuMuBuilder::massConstr
bool massConstr
Definition: BPHBdToKxMuMuBuilder.h:99
BPHBdToKxMuMuBuilder::evSetup
const edm::EventSetup * evSetup
Definition: BPHBdToKxMuMuBuilder.h:88
BPHBdToKxMuMuBuilder::mFitSel
BPHMassFitSelect * mFitSel
Definition: BPHBdToKxMuMuBuilder.h:97
BPHRecoBuilder
Definition: BPHRecoBuilder.h:50
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
BPHMassSelect
Definition: BPHMassSelect.h:31
BPHBdToKxMuMuBuilder::minPDiff
float minPDiff
Definition: BPHBdToKxMuMuBuilder.h:100
BPHMassCuts::setMassMin
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
BPHBdToKxMuMuBuilder::kx0Name
std::string kx0Name
Definition: BPHBdToKxMuMuBuilder.h:86
BPHMassCuts::getMassMax
double getMassMax() const
Definition: BPHMassCuts.h:59
BPHChi2Select
Definition: BPHChi2Select.h:31
BPHBdToKxMuMuBuilder::jCollection
const std::vector< BPHPlusMinusConstCandPtr > * jCollection
Definition: BPHBdToKxMuMuBuilder.h:89
BPHBdToKxMuMuBuilder::chi2Sel
BPHChi2Select * chi2Sel
Definition: BPHBdToKxMuMuBuilder.h:96
BPHBdToKxMuMuBuilder::bdList
std::vector< BPHRecoConstCandPtr > bdList
Definition: BPHBdToKxMuMuBuilder.h:103
BPHRecoCandidate::build
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
Definition: BPHRecoCandidate.cc:43
BPHBdToKxMuMuBuilder::mkx0Sel
BPHMassSelect * mkx0Sel
Definition: BPHBdToKxMuMuBuilder.h:93
BPHBdToKxMuMuBuilder::oniaSel
BPHMassSelect * oniaSel
Definition: BPHBdToKxMuMuBuilder.h:92
BPHBdToKxMuMuBuilder::massSel
BPHMassSelect * massSel
Definition: BPHBdToKxMuMuBuilder.h:95
BPHBdToKxMuMuBuilder::oniaName
std::string oniaName
Definition: BPHBdToKxMuMuBuilder.h:85
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
BPHMassFitSelect
Definition: BPHMassFitSelect.h:34