CMS 3D CMS Logo

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

#include <BPHDecayToResFlyingBuilder.h>

Inheritance diagram for BPHDecayToResFlyingBuilder:
BPHDecayConstrainedBuilder BPHDecayGenericBuilder BPHBdToJPsiKsBuilder BPHLbToJPsiL0Builder

Public Member Functions

 BPHDecayToResFlyingBuilder (const BPHDecayToResFlyingBuilder &x)=delete
 
 BPHDecayToResFlyingBuilder (const edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection, const std::string &flyName, double flyMass, double flyMSigma, const std::vector< BPHPlusMinusConstCandPtr > &flyCollection)
 
std::vector< BPHRecoConstCandPtrbuild ()
 build candidates More...
 
const std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > & daughMap () const
 get original daughters map More...
 
double getFlyingMassMax () const
 
double getFlyingMassMin () const
 get current cuts More...
 
double getKinFitProbMin () const
 
BPHDecayToResFlyingBuilderoperator= (const BPHDecayToResFlyingBuilder &x)=delete
 
void setFlyingMassMax (double m)
 
void setFlyingMassMin (double m)
 set cuts More...
 
void setFlyingMassRange (double mMin, double mMax)
 
void setKinFitProbMin (double p)
 
 ~BPHDecayToResFlyingBuilder () override
 
- Public Member Functions inherited from BPHDecayConstrainedBuilder
 BPHDecayConstrainedBuilder (const BPHDecayConstrainedBuilder &x)=delete
 
 BPHDecayConstrainedBuilder (const edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection)
 
bool getConstr () const
 
double getResMassMax () const
 
double getResMassMin () const
 get current cuts More...
 
BPHDecayConstrainedBuilderoperator= (const BPHDecayConstrainedBuilder &x)=delete
 
void setConstr (bool flag)
 
void setResMassMax (double m)
 
void setResMassMin (double m)
 set cuts More...
 
void setResMassRange (double mMin, double mMax)
 
 ~BPHDecayConstrainedBuilder () override
 
- Public Member Functions inherited from BPHDecayGenericBuilder
 BPHDecayGenericBuilder (const BPHDecayGenericBuilder &x)=delete
 
 BPHDecayGenericBuilder (const edm::EventSetup &es, BPHMassFitSelect *mfs=nullptr)
 
double getMassFitMax () const
 
double getMassFitMin () const
 
double getMassMax () const
 
double getMassMin () const
 get current cuts More...
 
double getMinPDiff ()
 
double getProbMin () const
 
BPHDecayGenericBuilderoperator= (const BPHDecayGenericBuilder &x)=delete
 
void setMassFitMax (double m)
 
void setMassFitMin (double m)
 
void setMassFitRange (double mMin, double mMax)
 
void setMassMax (double m)
 
void setMassMin (double m)
 set cuts More...
 
void setMassRange (double mMin, double mMax)
 
void setMinPDiff (double mpd)
 track min p difference More...
 
void setProbMin (double p)
 
virtual ~BPHDecayGenericBuilder ()
 

Private Attributes

std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > dMap
 
const std::vector< BPHPlusMinusConstCandPtr > * fCollection
 
BPHMassFitSelectflySel
 
double fMass
 
double fMSigma
 
std::string fName
 
BPHKinFitChi2SelectkfChi2Sel
 
std::vector< BPHRecoConstCandPtrrecList
 

Additional Inherited Members

- Protected Attributes inherited from BPHDecayConstrainedBuilder
bool massConstr
 
const std::vector< BPHPlusMinusConstCandPtr > * rCollection
 
BPHMassSelectresoSel
 
double rMass
 
std::string rName
 
double rWidth
 
- Protected Attributes inherited from BPHDecayGenericBuilder
BPHChi2Selectchi2Sel
 
const edm::EventSetupevSetup
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
double minPDiff
 
bool updated
 

Detailed Description

Description: Class to build a particle decaying to a resonances and a flying particle, both decaying to an opposite charged particles pair

Author
Paolo Ronchese INFN Padova

Definition at line 39 of file BPHDecayToResFlyingBuilder.h.

Constructor & Destructor Documentation

◆ BPHDecayToResFlyingBuilder() [1/2]

BPHDecayToResFlyingBuilder::BPHDecayToResFlyingBuilder ( const edm::EventSetup es,
const std::string &  resName,
double  resMass,
double  resWidth,
const std::vector< BPHPlusMinusConstCandPtr > &  resCollection,
const std::string &  flyName,
double  flyMass,
double  flyMSigma,
const std::vector< BPHPlusMinusConstCandPtr > &  flyCollection 
)

Constructor

Definition at line 32 of file BPHDecayToResFlyingBuilder.cc.

41  : BPHDecayConstrainedBuilder(es, resName, resMass, resWidth, resCollection),
42  fName(flyName),
43  fMass(flyMass),
44  fMSigma(flyMSigma),
45  fCollection(&flyCollection),
46  flySel(new BPHMassFitSelect(-2.0e+06, -1.0e+06)),
47  kfChi2Sel(new BPHKinFitChi2Select(-1.0)) {}

◆ BPHDecayToResFlyingBuilder() [2/2]

BPHDecayToResFlyingBuilder::BPHDecayToResFlyingBuilder ( const BPHDecayToResFlyingBuilder x)
delete

◆ ~BPHDecayToResFlyingBuilder()

BPHDecayToResFlyingBuilder::~BPHDecayToResFlyingBuilder ( )
override

Destructor

Definition at line 52 of file BPHDecayToResFlyingBuilder.cc.

52  {
53  delete flySel;
54  delete kfChi2Sel;
55 }

References flySel, and kfChi2Sel.

Member Function Documentation

◆ build()

vector< BPHRecoConstCandPtr > BPHDecayToResFlyingBuilder::build ( )

build candidates

Operations

Definition at line 60 of file BPHDecayToResFlyingBuilder.cc.

60  {
61  if (updated)
62  return recList;
63 
64  recList.clear();
65 
66  BPHRecoBuilder brb(*evSetup);
67  brb.setMinPDiffererence(minPDiff);
68  brb.add(rName, *rCollection);
69  brb.add(fName, *fCollection);
70 
71  if (resoSel->getMassMax() >= 0.0)
72  brb.filter(rName, *resoSel);
73  if (flySel->getMassMax() >= 0.0)
74  brb.filter(fName, *flySel);
75 
76  if (massSel->getMassMax() >= 0.0)
77  brb.filter(*massSel);
78 
79  vector<BPHRecoConstCandPtr> tmpList = BPHRecoCandidate::build(brb);
80  //
81  // Apply kinematic constraint on the resonance mass.
82  //
83  int iRec;
84  int nRec = tmpList.size();
85  recList.reserve(nRec);
86  for (iRec = 0; iRec < nRec; ++iRec) {
87  BPHRecoConstCandPtr ctmp = tmpList[iRec];
88  BPHRecoCandidate* cptr = ctmp->clone();
90  // fit for flying reconstruction
91  // indipendent from other particles
92  cptr->setIndependentFit(fName, true, fMass, fMSigma);
93  cptr->resetKinematicFit();
94  if ((mFitSel->getMassMax() >= 0) && (!mFitSel->accept(*cptr)))
95  continue;
96  const RefCountedKinematicVertex tdv = cptr->topDecayVertex();
97  if ((kfChi2Sel->getProbMin() >= 0) && !kfChi2Sel->accept(*cptr))
98  continue;
99  dMap[cand->getComp(rName).get()] = ctmp->getComp(rName).get();
100  dMap[cand->getComp(fName).get()] = ctmp->getComp(fName).get();
101  recList.push_back(cand);
102  }
103  updated = true;
104  return recList;
105 }

References BPHKinFitChi2Select::accept(), BPHMassFitSelect::accept(), BPHRecoBuilder::add(), BPHRecoCandidate::build(), BPHRecoCandidate::clone(), dMap, BPHDecayGenericBuilder::evSetup, fCollection, BPHRecoBuilder::filter(), flySel, fMass, fMSigma, fName, BPHMassCuts::getMassMax(), BPHKinFitChi2Select::getProbMin(), kfChi2Sel, BPHDecayGenericBuilder::massSel, BPHDecayGenericBuilder::mFitSel, BPHDecayGenericBuilder::minPDiff, BPHDecayConstrainedBuilder::rCollection, recList, BPHKinematicFit::resetKinematicFit(), BPHDecayConstrainedBuilder::resoSel, BPHDecayConstrainedBuilder::rName, BPHKinematicFit::setIndependentFit(), BPHRecoBuilder::setMinPDiffererence(), BPHKinematicFit::topDecayVertex(), and BPHDecayGenericBuilder::updated.

Referenced by BPHWriteSpecificDecay::fill().

◆ daughMap()

const std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>& BPHDecayToResFlyingBuilder::daughMap ( ) const
inline

get original daughters map

Definition at line 67 of file BPHDecayToResFlyingBuilder.h.

67 { return dMap; }

References dMap.

Referenced by BPHWriteSpecificDecay::fill().

◆ getFlyingMassMax()

double BPHDecayToResFlyingBuilder::getFlyingMassMax ( ) const
inline

◆ getFlyingMassMin()

double BPHDecayToResFlyingBuilder::getFlyingMassMin ( ) const
inline

get current cuts

Definition at line 76 of file BPHDecayToResFlyingBuilder.h.

76 { return flySel->getMassMin(); }

References flySel, and BPHMassCuts::getMassMin().

Referenced by BPHBdToJPsiKsBuilder::getK0MassMin(), and BPHLbToJPsiL0Builder::getLambda0MassMin().

◆ getKinFitProbMin()

double BPHDecayToResFlyingBuilder::getKinFitProbMin ( ) const
inline

Definition at line 78 of file BPHDecayToResFlyingBuilder.h.

78 { return kfChi2Sel->getProbMin(); }

References BPHKinFitChi2Select::getProbMin(), and kfChi2Sel.

◆ operator=()

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

◆ setFlyingMassMax()

void BPHDecayToResFlyingBuilder::setFlyingMassMax ( double  m)

◆ setFlyingMassMin()

void BPHDecayToResFlyingBuilder::setFlyingMassMin ( double  m)

◆ setFlyingMassRange()

void BPHDecayToResFlyingBuilder::setFlyingMassRange ( double  mMin,
double  mMax 
)

◆ setKinFitProbMin()

void BPHDecayToResFlyingBuilder::setKinFitProbMin ( double  p)

Member Data Documentation

◆ dMap

std::map<const BPHRecoCandidate*, const BPHRecoCandidate*> BPHDecayToResFlyingBuilder::dMap
private

Definition at line 90 of file BPHDecayToResFlyingBuilder.h.

Referenced by build(), and daughMap().

◆ fCollection

const std::vector<BPHPlusMinusConstCandPtr>* BPHDecayToResFlyingBuilder::fCollection
private

Definition at line 85 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

◆ flySel

BPHMassFitSelect* BPHDecayToResFlyingBuilder::flySel
private

◆ fMass

double BPHDecayToResFlyingBuilder::fMass
private

Definition at line 82 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

◆ fMSigma

double BPHDecayToResFlyingBuilder::fMSigma
private

Definition at line 83 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

◆ fName

std::string BPHDecayToResFlyingBuilder::fName
private

Definition at line 81 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

◆ kfChi2Sel

BPHKinFitChi2Select* BPHDecayToResFlyingBuilder::kfChi2Sel
private

◆ recList

std::vector<BPHRecoConstCandPtr> BPHDecayToResFlyingBuilder::recList
private

Definition at line 91 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

BPHKinFitChi2Select::setProbMin
void setProbMin(double p)
set prob min
Definition: BPHKinFitChi2Select.h:65
BPHMassCuts::setMassMax
void setMassMax(double m)
Definition: BPHMassCuts.h:52
BPHDecayToResFlyingBuilder::flySel
BPHMassFitSelect * flySel
Definition: BPHDecayToResFlyingBuilder.h:87
BPHKinFitChi2Select
Definition: BPHKinFitChi2Select.h:31
BPHDecayToResFlyingBuilder::fCollection
const std::vector< BPHPlusMinusConstCandPtr > * fCollection
Definition: BPHDecayToResFlyingBuilder.h:85
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
BPHMassCuts::getMassMin
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
ReferenceCountingPointer< KinematicVertex >
BPHDecayConstrainedBuilder::BPHDecayConstrainedBuilder
BPHDecayConstrainedBuilder(const edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection)
Definition: BPHDecayConstrainedBuilder.cc:32
BPHDecayGenericBuilder::massSel
BPHMassSelect * massSel
Definition: BPHDecayGenericBuilder.h:75
BPHDecayConstrainedBuilder::resoSel
BPHMassSelect * resoSel
Definition: BPHDecayConstrainedBuilder.h:75
BPHDecayConstrainedBuilder::rCollection
const std::vector< BPHPlusMinusConstCandPtr > * rCollection
Definition: BPHDecayConstrainedBuilder.h:73
BPHDecayGenericBuilder::updated
bool updated
Definition: BPHDecayGenericBuilder.h:80
BPHDecayToResFlyingBuilder::fMass
double fMass
Definition: BPHDecayToResFlyingBuilder.h:82
BPHRecoBuilder
Definition: BPHRecoBuilder.h:50
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
BPHMassCuts::setMassMin
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
BPHDecayGenericBuilder::evSetup
const edm::EventSetup * evSetup
Definition: BPHDecayGenericBuilder.h:73
BPHKinFitChi2Select::accept
bool accept(const BPHKinematicFit &cand) const override
select vertex
Definition: BPHKinFitChi2Select.h:48
BPHDecayToResFlyingBuilder::fName
std::string fName
Definition: BPHDecayToResFlyingBuilder.h:81
BPHKinFitChi2Select::getProbMin
double getProbMin() const
get current prob min
Definition: BPHKinFitChi2Select.h:71
BPHKinematicFit::topDecayVertex
virtual const RefCountedKinematicVertex topDecayVertex() const
Definition: BPHKinematicFit.cc:290
BPHDecayToResFlyingBuilder::kfChi2Sel
BPHKinFitChi2Select * kfChi2Sel
Definition: BPHDecayToResFlyingBuilder.h:88
BPHDecayGenericBuilder::minPDiff
double minPDiff
Definition: BPHDecayGenericBuilder.h:79
BPHDecayGenericBuilder::mFitSel
BPHMassFitSelect * mFitSel
Definition: BPHDecayGenericBuilder.h:77
cand
Definition: decayParser.h:32
BPHMassCuts::getMassMax
double getMassMax() const
Definition: BPHMassCuts.h:59
BPHDecayToResFlyingBuilder::dMap
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > dMap
Definition: BPHDecayToResFlyingBuilder.h:90
BPHDecayConstrainedBuilder::rName
std::string rName
Definition: BPHDecayConstrainedBuilder.h:69
BPHRecoCandidate::build
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
Definition: BPHRecoCandidate.cc:43
BPHDecayToResFlyingBuilder::recList
std::vector< BPHRecoConstCandPtr > recList
Definition: BPHDecayToResFlyingBuilder.h:91
BPHKinematicFit::resetKinematicFit
virtual void resetKinematicFit() const
reset the kinematic fit
Definition: BPHKinematicFit.cc:250
BPHRecoCandidate::clone
virtual BPHRecoCandidate * clone(int level=-1) const
Definition: BPHRecoCandidate.cc:53
BPHRecoCandidate
Definition: BPHRecoCandidate.h:46
BPHDecayToResFlyingBuilder::fMSigma
double fMSigma
Definition: BPHDecayToResFlyingBuilder.h:83
BPHMassFitSelect::accept
bool accept(const BPHKinematicFit &cand) const override
select particle
Definition: BPHMassFitSelect.h:71
BPHKinematicFit::setIndependentFit
void setIndependentFit(const std::string &name, bool flag=true, double mass=-1.0, double sigma=-1.0)
set a decaying daughter as an unique particle fitted independently
Definition: BPHKinematicFit.cc:104
BPHRecoConstCandPtr
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
Definition: BPHRecoCandidatePtr.h:9
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
BPHMassFitSelect
Definition: BPHMassFitSelect.h:34