CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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)
 
 BPHDecayToResFlyingBuilder (const BPHDecayToResFlyingBuilder &x)=delete
 
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 edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection)
 
 BPHDecayConstrainedBuilder (const BPHDecayConstrainedBuilder &x)=delete
 
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 edm::EventSetup &es, BPHMassFitSelect *mfs=nullptr)
 
 BPHDecayGenericBuilder (const BPHDecayGenericBuilder &x)=delete
 
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::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)) {}
BPHDecayConstrainedBuilder(const edm::EventSetup &es, const std::string &resName, double resMass, double resWidth, const std::vector< BPHPlusMinusConstCandPtr > &resCollection)
const std::vector< BPHPlusMinusConstCandPtr > * fCollection
BPHDecayToResFlyingBuilder::BPHDecayToResFlyingBuilder ( const BPHDecayToResFlyingBuilder x)
delete
BPHDecayToResFlyingBuilder::~BPHDecayToResFlyingBuilder ( )
override

Destructor

Definition at line 52 of file BPHDecayToResFlyingBuilder.cc.

References flySel, and kfChi2Sel.

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

Member Function Documentation

vector< BPHRecoConstCandPtr > BPHDecayToResFlyingBuilder::build ( )

build candidates

Operations

Definition at line 60 of file BPHDecayToResFlyingBuilder.cc.

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().

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();
89  BPHRecoConstCandPtr cand(cptr);
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 }
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
bool accept(const BPHKinematicFit &cand) const override
select vertex
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
double getProbMin() const
get current prob min
static std::vector< BPHRecoConstCandPtr > build(const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > dMap
std::vector< BPHRecoConstCandPtr > recList
const std::vector< BPHPlusMinusConstCandPtr > * rCollection
virtual void resetKinematicFit() const
reset the kinematic fit
double getMassMax() const
Definition: BPHMassCuts.h:59
virtual BPHRecoCandidate * clone(int level=-1) const
virtual const RefCountedKinematicVertex topDecayVertex() const
bool accept(const BPHKinematicFit &cand) const override
select particle
const std::vector< BPHPlusMinusConstCandPtr > * fCollection
const edm::EventSetup * evSetup
const std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>& BPHDecayToResFlyingBuilder::daughMap ( ) const
inline

get original daughters map

Definition at line 67 of file BPHDecayToResFlyingBuilder.h.

References dMap.

Referenced by BPHWriteSpecificDecay::fill().

67 { return dMap; }
std::map< const BPHRecoCandidate *, const BPHRecoCandidate * > dMap
double BPHDecayToResFlyingBuilder::getFlyingMassMax ( ) const
inline
double BPHDecayToResFlyingBuilder::getFlyingMassMin ( ) const
inline

get current cuts

Definition at line 76 of file BPHDecayToResFlyingBuilder.h.

References flySel, and BPHMassCuts::getMassMin().

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

76 { return flySel->getMassMin(); }
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
double BPHDecayToResFlyingBuilder::getKinFitProbMin ( ) const
inline

Definition at line 78 of file BPHDecayToResFlyingBuilder.h.

References BPHKinFitChi2Select::getProbMin(), and kfChi2Sel.

78 { return kfChi2Sel->getProbMin(); }
double getProbMin() const
get current prob min
BPHDecayToResFlyingBuilder& BPHDecayToResFlyingBuilder::operator= ( const BPHDecayToResFlyingBuilder x)
delete
void BPHDecayToResFlyingBuilder::setFlyingMassMax ( double  m)
void BPHDecayToResFlyingBuilder::setFlyingMassMin ( double  m)
void BPHDecayToResFlyingBuilder::setFlyingMassRange ( double  mMin,
double  mMax 
)

Definition at line 120 of file BPHDecayToResFlyingBuilder.cc.

References flySel, BPHMassCuts::setMassMax(), BPHMassCuts::setMassMin(), and BPHDecayGenericBuilder::updated.

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

120  {
121  updated = false;
122  flySel->setMassMin(mMin);
123  flySel->setMassMax(mMax);
124  return;
125 }
void setMassMax(double m)
Definition: BPHMassCuts.h:52
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
void BPHDecayToResFlyingBuilder::setKinFitProbMin ( double  p)

Member Data Documentation

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

Definition at line 90 of file BPHDecayToResFlyingBuilder.h.

Referenced by build(), and daughMap().

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

Definition at line 85 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

BPHMassFitSelect* BPHDecayToResFlyingBuilder::flySel
private
double BPHDecayToResFlyingBuilder::fMass
private

Definition at line 82 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

double BPHDecayToResFlyingBuilder::fMSigma
private

Definition at line 83 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

std::string BPHDecayToResFlyingBuilder::fName
private

Definition at line 81 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().

BPHKinFitChi2Select* BPHDecayToResFlyingBuilder::kfChi2Sel
private
std::vector<BPHRecoConstCandPtr> BPHDecayToResFlyingBuilder::recList
private

Definition at line 91 of file BPHDecayToResFlyingBuilder.h.

Referenced by build().