CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
BPHRecoCandidate Class Reference

#include <BPHRecoCandidate.h>

Inheritance diagram for BPHRecoCandidate:
BPHKinematicFit BPHDecayVertex BPHDecayMomentum BPHPlusMinusCandidate

Public Member Functions

virtual void add (const std::string &name, const BPHRecoConstCandPtr &comp)
 
virtual void add (const std::string &name, const reco::Candidate *daug, const std::string &searchList, double mass=-1.0, double sigma=-1.0)
 
virtual void add (const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
 
 BPHRecoCandidate (const BPHRecoCandidate &x)=delete
 
 BPHRecoCandidate (const edm::EventSetup *es)
 
 BPHRecoCandidate (const edm::EventSetup *es, const BPHRecoBuilder::ComponentSet &compSet)
 
virtual BPHRecoCandidateclone (int level=-1) const
 
BPHRecoCandidateoperator= (const BPHRecoCandidate &x)=delete
 
 ~BPHRecoCandidate () override
 
- Public Member Functions inherited from BPHKinematicFit
 BPHKinematicFit (const BPHKinematicFit &x)=delete
 
double constrMass () const
 retrieve the constraint More...
 
double constrSigma () const
 
virtual const RefCountedKinematicVertex currentDecayVertex () const
 
virtual const RefCountedKinematicParticle currentParticle () const
 get current particle More...
 
bool getIndependentFit (const std::string &name) const
 retrieve independent fit flag More...
 
double getMassSigma (const reco::Candidate *cand) const
 retrieve particle mass sigma More...
 
virtual bool isEmpty () const
 get fit status More...
 
virtual bool isValidFit () const
 
virtual const RefCountedKinematicTreekinematicTree () const
 perform the kinematic fit and get the result More...
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name) const
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name, double mass) const
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name, double mass, double sigma) const
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name, KinematicConstraint *kc) const
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name, MultiTrackKinematicConstraint *kc) const
 
virtual const std::vector< RefCountedKinematicParticle > & kinParticles () const
 get kinematic particles More...
 
virtual std::vector< RefCountedKinematicParticlekinParticles (const std::vector< std::string > &names) const
 
virtual ParticleMass mass () const
 
BPHKinematicFitoperator= (const BPHKinematicFit &x)=delete
 
virtual const math::XYZTLorentzVectorp4 () const
 compute total momentum after the fit More...
 
virtual void resetKinematicFit () const
 reset the kinematic fit More...
 
void setConstraint (double mass, double sigma)
 apply a mass constraint More...
 
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 More...
 
virtual const RefCountedKinematicVertex topDecayVertex () const
 
virtual const RefCountedKinematicParticle topParticle () const
 get top particle More...
 
 ~BPHKinematicFit () override
 
- Public Member Functions inherited from BPHDecayVertex
 BPHDecayVertex (const BPHDecayVertex &x)=delete
 
const edm::EventSetupgetEventSetup () const
 retrieve EventSetup More...
 
const reco::TrackgetTrack (const reco::Candidate *cand) const
 get Track for a daughter More...
 
const std::string & getTrackSearchList (const reco::Candidate *cand) const
 retrieve track search list More...
 
reco::TransientTrackgetTransientTrack (const reco::Candidate *cand) const
 get TransientTrack for a daughter More...
 
BPHDecayVertexoperator= (const BPHDecayVertex &x)=delete
 
const std::vector< const reco::Track * > & tracks () const
 get list of Tracks More...
 
const std::vector< reco::TransientTrack > & transientTracks () const
 get list of TransientTracks More...
 
virtual bool validTracks () const
 check for valid reconstructed vertex More...
 
virtual bool validVertex () const
 
virtual const reco::Vertexvertex (VertexFitter< 5 > *fitter=nullptr, const reco::BeamSpot *bs=nullptr, const GlobalPoint *priorPos=nullptr, const GlobalError *priorError=nullptr) const
 get reconstructed vertex More...
 
 ~BPHDecayVertex () override
 
- Public Member Functions inherited from BPHDecayMomentum
 BPHDecayMomentum (const BPHDecayMomentum &x)=delete
 
virtual const std::vector< std::string > & compNames () const
 
virtual const pat::CompositeCandidatecomposite () const
 get a composite by the simple sum of simple particles More...
 
virtual const std::vector< BPHRecoConstCandPtr > & daughComp () const
 
virtual const std::vector< const reco::Candidate * > & daughFull () const
 
virtual const std::vector< const reco::Candidate * > & daughters () const
 
virtual const std::vector< std::string > & daugNames () const
 
virtual BPHRecoConstCandPtr getComp (const std::string &name) const
 
virtual const reco::CandidategetDaug (const std::string &name) const
 
BPHDecayMomentumoperator= (const BPHDecayMomentum &x)=delete
 
virtual const reco::CandidateoriginalReco (const reco::Candidate *daug) const
 get the original particle from the clone More...
 
virtual ~BPHDecayMomentum ()
 

Static Public Member Functions

static std::vector< BPHRecoConstCandPtrbuild (const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
 

Protected Member Functions

void fill (BPHRecoCandidate *ptr, int level) const override
 
- Protected Member Functions inherited from BPHKinematicFit
virtual void addK (const std::string &name, const BPHRecoConstCandPtr &comp)
 add a previously reconstructed particle giving it a name More...
 
virtual void addK (const std::string &name, const reco::Candidate *daug, const std::string &searchList, double mass=-1.0, double sigma=-1.0)
 
virtual void addK (const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
 
 BPHKinematicFit ()
 
 BPHKinematicFit (const BPHKinematicFit *ptr)
 
void setNotUpdated () const override
 
- Protected Member Functions inherited from BPHDecayVertex
virtual void addV (const std::string &name, const BPHRecoConstCandPtr &comp)
 add a previously reconstructed particle giving it a name More...
 
virtual void addV (const std::string &name, const reco::Candidate *daug, const std::string &searchList, double mass)
 
 BPHDecayVertex (const BPHDecayVertex *ptr, const edm::EventSetup *es)
 
 BPHDecayVertex (const edm::EventSetup *es)
 
- Protected Member Functions inherited from BPHDecayMomentum
virtual void addP (const std::string &name, const BPHRecoConstCandPtr &comp)
 add a previously reconstructed particle giving it a name More...
 
virtual void addP (const std::string &name, const reco::Candidate *daug, double mass=-1.0)
 
 BPHDecayMomentum ()
 
 BPHDecayMomentum (const std::map< std::string, Component > &daugMap)
 
 BPHDecayMomentum (const std::map< std::string, Component > &daugMap, const std::map< std::string, BPHRecoConstCandPtr > compMap)
 
const std::vector< Component > & componentList () const
 

Static Protected Member Functions

template<class T >
static void fill (std::vector< typename BPHGenericPtr< const T >::type > &cList, const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
 

Detailed Description

Description: High level class for reconstructed decay candidates:

Author
Paolo Ronchese INFN Padova

Definition at line 46 of file BPHRecoCandidate.h.

Constructor & Destructor Documentation

◆ BPHRecoCandidate() [1/3]

BPHRecoCandidate::BPHRecoCandidate ( const edm::EventSetup es)

Constructor create an "empty" object to add daughters later (see BPHDecayMomentum)

Definition at line 30 of file BPHRecoCandidate.cc.

30 : BPHDecayVertex(es) {}

Referenced by clone().

◆ BPHRecoCandidate() [2/3]

BPHRecoCandidate::BPHRecoCandidate ( const edm::EventSetup es,
const BPHRecoBuilder::ComponentSet compSet 
)

Definition at line 32 of file BPHRecoCandidate.cc.

33  : BPHDecayMomentum(compList.daugMap, compList.compMap), BPHDecayVertex(this, es), BPHKinematicFit(this) {}

◆ BPHRecoCandidate() [3/3]

BPHRecoCandidate::BPHRecoCandidate ( const BPHRecoCandidate x)
delete

◆ ~BPHRecoCandidate()

BPHRecoCandidate::~BPHRecoCandidate ( )
override

Destructor

Definition at line 38 of file BPHRecoCandidate.cc.

38 {}

Member Function Documentation

◆ add() [1/3]

virtual void BPHRecoCandidate::add ( const std::string &  name,
const BPHRecoConstCandPtr comp 
)
inlinevirtual

Definition at line 81 of file BPHRecoCandidate.h.

81  {
82  addK(name, comp);
83  return;
84  }

References BPHKinematicFit::addK(), AlCaHLTBitMon_QueryRunRegistry::comp, and Skims_PA_cff::name.

Referenced by counter.Counter::register().

◆ add() [2/3]

virtual void BPHRecoCandidate::add ( const std::string &  name,
const reco::Candidate daug,
const std::string &  searchList,
double  mass = -1.0,
double  sigma = -1.0 
)
inlinevirtual

Reimplemented in BPHPlusMinusCandidate.

Definition at line 73 of file BPHRecoCandidate.h.

77  {
78  addK(name, daug, searchList, mass, sigma);
79  return;
80  }

References BPHKinematicFit::addK(), BPHKinematicFit::mass(), Skims_PA_cff::name, and newFWLiteAna::searchList.

Referenced by counter.Counter::register().

◆ add() [3/3]

virtual void BPHRecoCandidate::add ( const std::string &  name,
const reco::Candidate daug,
double  mass = -1.0,
double  sigma = -1.0 
)
inlinevirtual

Operations add a simple particle giving it a name particles are cloned, eventually specifying a different mass and a sigma

Reimplemented in BPHPlusMinusCandidate.

Definition at line 69 of file BPHRecoCandidate.h.

69  {
70  addK(name, daug, "cfhpmig", mass, sigma);
71  return;
72  }

Referenced by BPHX3872ToJPsiPiPiBuilder::build(), fill(), and counter.Counter::register().

◆ build()

vector< BPHRecoConstCandPtr > BPHRecoCandidate::build ( const BPHRecoBuilder builder,
double  mass = -1,
double  msig = -1 
)
static

look for candidates starting from particle collections as specified in the BPHRecoBuilder

Definition at line 43 of file BPHRecoCandidate.cc.

43  {
44  // create a list of pointers to BPHRecoCandidate and fill it
45  // with particle combinations selected by the BPHRecoBuilder
46  vector<BPHRecoConstCandPtr> cList;
47  fill<BPHRecoCandidate>(cList, builder, mass, msig);
48  return cList;
49 }

References BPHDecayMomentum::cList, and BPHKinematicFit::mass().

Referenced by BPHBdToKxMuMuBuilder::build(), BPHDecayToResResBuilder::build(), BPHDecayToResFlyingBuilder::build(), and BPHDecayToResTrkBuilder::build().

◆ clone()

BPHRecoCandidate * BPHRecoCandidate::clone ( int  level = -1) const
virtual

clone object, cloning daughters as well up to required depth level = -1 to clone all levels

Reimplemented in BPHPlusMinusCandidate.

Definition at line 53 of file BPHRecoCandidate.cc.

53  {
55  fill(ptr, level);
56  return ptr;
57 }

References BPHRecoCandidate(), fill(), BPHDecayVertex::getEventSetup(), and personalPlayback::level.

Referenced by BPHKinematicFit::addParticles(), and BPHDecayToResFlyingBuilder::build().

◆ fill() [1/2]

void BPHRecoCandidate::fill ( BPHRecoCandidate ptr,
int  level 
) const
overrideprotectedvirtual

Implements BPHDecayMomentum.

Definition at line 61 of file BPHRecoCandidate.cc.

61  {
63  const std::vector<std::string>& nDaug = daugNames();
64  int id;
65  int nd = nDaug.size();
66  for (id = 0; id < nd; ++id) {
67  const string& n = nDaug[id];
68  const reco::Candidate* d = getDaug(n);
69  ptr->add(n, originalReco(d), getTrackSearchList(d), d->mass(), getMassSigma(d));
70  }
71  const std::vector<std::string>& nComp = compNames();
72  int ic;
73  int nc = nComp.size();
74  for (ic = 0; ic < nc; ++ic) {
75  const string& n = nComp[ic];
77  if (level)
78  ptr->add(n, BPHRecoConstCandPtr(c->clone(level - 1)));
79  else
80  ptr->add(n, c);
81  if (getIndependentFit(n))
82  ptr->setIndependentFit(n);
83  }
84  return;
85 }

References add(), HltBtagPostValidation_cff::c, BPHDecayMomentum::compNames(), BPHKinematicFit::constrMass(), BPHKinematicFit::constrSigma(), ztail::d, BPHDecayMomentum::daugNames(), BPHDecayMomentum::getComp(), BPHDecayMomentum::getDaug(), BPHKinematicFit::getIndependentFit(), BPHKinematicFit::getMassSigma(), BPHDecayVertex::getTrackSearchList(), triggerObjects_cff::id, personalPlayback::level, dqmiodumpmetadata::n, BPHDecayMomentum::nComp, BPHDecayMomentum::originalReco(), BPHKinematicFit::setConstraint(), and BPHKinematicFit::setIndependentFit().

Referenced by BPHPlusMinusCandidate::clone(), and clone().

◆ fill() [2/2]

template<class T >
void BPHRecoCandidate::fill ( std::vector< typename BPHGenericPtr< const T >::type > &  cList,
const BPHRecoBuilder builder,
double  mass = -1,
double  msig = -1 
)
staticprotected

Definition at line 109 of file BPHRecoCandidate.h.

112  {
113  // create particle combinations
114  const std::vector<BPHRecoBuilder::ComponentSet> dll = builder.build();
115  // loop over combinations and create reconstructed particles
116  int i;
117  int n = dll.size();
118  cList.reserve(n);
119  T* rc = nullptr;
120  for (i = 0; i < n; ++i) {
121  // create reconstructed particle
122  rc = new T(builder.eventSetup(), dll[i]);
123  // apply mass constraint, if requested
124  if (mass > 0)
125  rc->setConstraint(mass, msig);
126  // apply post selection
127  if (builder.accept(*rc))
128  cList.push_back(typename BPHGenericPtr<const T>::type(rc));
129  else
130  delete rc;
131  }
132  return;
133 }

References BPHRecoBuilder::accept(), BPHRecoBuilder::build(), BPHDecayMomentum::cList, BPHRecoBuilder::eventSetup(), mps_fire::i, BPHKinematicFit::mass(), and dqmiodumpmetadata::n.

◆ operator=()

BPHRecoCandidate& BPHRecoCandidate::operator= ( const BPHRecoCandidate x)
delete
personalPlayback.level
level
Definition: personalPlayback.py:22
BPHDecayVertex::getTrackSearchList
const std::string & getTrackSearchList(const reco::Candidate *cand) const
retrieve track search list
Definition: BPHDecayVertex.cc:154
mps_fire.i
i
Definition: mps_fire.py:355
BPHGenericPtr::type
std::shared_ptr< T > type
Definition: BPHGenericPtr.h:8
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
BPHKinematicFit::getMassSigma
double getMassSigma(const reco::Candidate *cand) const
retrieve particle mass sigma
Definition: BPHKinematicFit.cc:315
BPHRecoCandidate::fill
void fill(BPHRecoCandidate *ptr, int level) const override
Definition: BPHRecoCandidate.cc:61
BPHDecayVertex::getEventSetup
const edm::EventSetup * getEventSetup() const
retrieve EventSetup
Definition: BPHDecayVertex.cc:152
BPHDecayMomentum::getDaug
virtual const reco::Candidate * getDaug(const std::string &name) const
Definition: BPHDecayMomentum.cc:94
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
BPHDecayVertex::BPHDecayVertex
BPHDecayVertex(const BPHDecayVertex &x)=delete
BPHRecoBuilder::build
std::vector< ComponentSet > build() const
build a set of combinations of particles fulfilling the selections
Definition: BPHRecoBuilder.cc:177
BPHDecayMomentum::compList
std::vector< Component > compList
Definition: BPHDecayMomentum.h:134
BPHKinematicFit::constrMass
double constrMass() const
retrieve the constraint
Definition: BPHKinematicFit.cc:99
BPHKinematicFit::BPHKinematicFit
BPHKinematicFit()
Definition: BPHKinematicFit.cc:39
BPHDecayMomentum::BPHDecayMomentum
BPHDecayMomentum()
Definition: BPHDecayMomentum.cc:32
BPHRecoBuilder::eventSetup
const edm::EventSetup * eventSetup() const
get the EventSetup set in the constructor
Definition: BPHRecoBuilder.cc:186
BPHKinematicFit::constrSigma
double constrSigma() const
Definition: BPHKinematicFit.cc:101
newFWLiteAna.searchList
searchList
Definition: newFWLiteAna.py:119
BPHDecayMomentum::getComp
virtual BPHRecoConstCandPtr getComp(const std::string &name) const
Definition: BPHDecayMomentum.cc:106
BPHDecayMomentum::nComp
std::vector< std::string > nComp
Definition: BPHDecayMomentum.h:138
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
BPHKinematicFit::mass
virtual ParticleMass mass() const
Definition: BPHKinematicFit.cc:297
BPHKinematicFit::setConstraint
void setConstraint(double mass, double sigma)
apply a mass constraint
Definition: BPHKinematicFit.cc:91
reco::Candidate
Definition: Candidate.h:27
BPHDecayMomentum::compNames
virtual const std::vector< std::string > & compNames() const
Definition: BPHDecayMomentum.cc:71
BPHRecoCandidate::BPHRecoCandidate
BPHRecoCandidate(const edm::EventSetup *es)
Definition: BPHRecoCandidate.cc:30
BPHDecayMomentum::originalReco
virtual const reco::Candidate * originalReco(const reco::Candidate *daug) const
get the original particle from the clone
Definition: BPHDecayMomentum.cc:82
BPHKinematicFit::addK
virtual void addK(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
T
long double T
Definition: Basic3DVectorLD.h:48
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
BPHRecoCandidate::add
virtual void add(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
Definition: BPHRecoCandidate.h:69
ztail.d
d
Definition: ztail.py:151
BPHDecayMomentum::daugNames
virtual const std::vector< std::string > & daugNames() const
Definition: BPHDecayMomentum.cc:69
BPHRecoBuilder::accept
bool accept(const BPHRecoCandidate &cand) const
Definition: BPHRecoBuilder.cc:151
BPHRecoCandidate
Definition: BPHRecoCandidate.h:46
BPHKinematicFit::getIndependentFit
bool getIndependentFit(const std::string &name) const
retrieve independent fit flag
Definition: BPHKinematicFit.cc:321
BPHDecayMomentum::cList
std::vector< BPHRecoConstCandPtr > cList
Definition: BPHDecayMomentum.h:143
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