CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public 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 reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
 
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 BPHRecoConstCandPtr &comp)
 
 BPHRecoCandidate (const edm::EventSetup *es)
 
 BPHRecoCandidate (const edm::EventSetup *es, const BPHRecoBuilder::ComponentSet &compSet)
 
virtual ~BPHRecoCandidate ()
 
- Public Member Functions inherited from BPHKinematicFit
double constrMass () const
 retrieve the constraint More...
 
double constrSigma () const
 
virtual const RefCountedKinematicVertex currentDecayVertex () const
 
virtual const RefCountedKinematicParticle currentParticle () const
 
virtual bool isEmpty () const
 
virtual bool isValidFit () const
 
virtual const RefCountedKinematicTreekinematicTree () const
 perform the kinematic fit and get the result More...
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name, double mass, double sigma) const
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name, double mass) 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
 
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...
 
virtual ~BPHKinematicFit ()
 
- Public Member Functions inherited from BPHDecayVertex
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...
 
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 () const
 get reconstructed vertex More...
 
virtual ~BPHDecayVertex ()
 
- Public Member Functions inherited from BPHDecayMomentum
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
 
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)
 

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)
 

Additional Inherited Members

- Protected Member Functions inherited from BPHKinematicFit
virtual void addK (const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
 
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 BPHRecoConstCandPtr &comp)
 add a previously reconstructed particle giving it a name More...
 
 BPHKinematicFit ()
 
 BPHKinematicFit (const BPHKinematicFit *ptr)
 
virtual void setNotUpdated () const
 
- Protected Member Functions inherited from BPHDecayVertex
virtual void addV (const std::string &name, const reco::Candidate *daug, const std::string &searchList, double mass)
 
virtual void addV (const std::string &name, const BPHRecoConstCandPtr &comp)
 add a previously reconstructed particle giving it a name More...
 
 BPHDecayVertex (const edm::EventSetup *es)
 
 BPHDecayVertex (const BPHDecayVertex *ptr, const edm::EventSetup *es)
 
- Protected Member Functions inherited from BPHDecayMomentum
virtual void addP (const std::string &name, const reco::Candidate *daug, double mass=-1.0)
 
virtual void addP (const std::string &name, const BPHRecoConstCandPtr &comp)
 add a previously reconstructed particle giving it a name More...
 
 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
 

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::BPHRecoCandidate ( const edm::EventSetup es)

Constructors are privatecreate an "empty" object to add daughters later (see BPHDecayMomentum)

Definition at line 33 of file BPHRecoCandidate.cc.

33  :
34  BPHDecayVertex( es ) {
35 }
BPHDecayVertex(const edm::EventSetup *es)
BPHRecoCandidate::BPHRecoCandidate ( const edm::EventSetup es,
const BPHRecoBuilder::ComponentSet compSet 
)

Definition at line 38 of file BPHRecoCandidate.cc.

39  :
40  BPHDecayMomentum( compList.daugMap, compList.compMap ),
41  BPHDecayVertex( this, es ),
42  BPHKinematicFit( this ) {
43 }
std::vector< Component > compList
BPHDecayVertex(const edm::EventSetup *es)
BPHRecoCandidate::~BPHRecoCandidate ( )
virtual

Destructor

Definition at line 48 of file BPHRecoCandidate.cc.

48  {
49 }

Member Function Documentation

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

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

Reimplemented in BPHPlusMinusCandidate.

Definition at line 68 of file BPHRecoCandidate.h.

Referenced by counter.Counter::register().

70  {
71  addK( name, daug, "cfhpmig", mass, sigma ); return; }
virtual void addK(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
virtual ParticleMass mass() const
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 72 of file BPHRecoCandidate.h.

References ResonanceBuilder::mass, and ctppsDiamondLocalTracks_cfi::sigma.

Referenced by counter.Counter::register().

75  {
76  addK( name, daug, searchList, mass, sigma ); return; }
virtual void addK(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
virtual ParticleMass mass() const
virtual void BPHRecoCandidate::add ( const std::string &  name,
const BPHRecoConstCandPtr comp 
)
inlinevirtual

Definition at line 77 of file BPHRecoCandidate.h.

References lumiContext::fill, and ResonanceBuilder::mass.

Referenced by counter.Counter::register().

78  {
79  addK( name, comp ); return; }
virtual void addK(const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0)
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 55 of file BPHRecoCandidate.cc.

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

Referenced by BPHBdToJPsiKxBuilder::build(), BPHBsToJPsiPhiBuilder::build(), and BPHBuToJPsiKBuilder::build().

57  {
58  // create a list of pointers to BPHRecoCandidate and fill it
59  // with particle combinations selected by the BPHRecoBuilder
60  vector<BPHRecoConstCandPtr> cList;
61  fill<BPHRecoCandidate>( cList, builder, mass, msig );
62  return cList;
63 }
virtual ParticleMass mass() const
std::vector< BPHRecoConstCandPtr > cList
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 102 of file BPHRecoCandidate.h.

References BPHRecoBuilder::accept(), BPHRecoBuilder::build(), BPHRecoBuilder::eventSetup(), mps_fire::i, and gen::n.

105  {
106  // create paricle combinations
107  const std::vector<BPHRecoBuilder::ComponentSet> dll = builder.build();
108  // loop over combinations and create reconstructed particles
109  int i;
110  int n = dll.size();
111  cList.reserve( n );
112  T* rc = 0;
113  for ( i = 0; i < n; ++i ) {
114  // create reconstructed particle
115  rc = new T( builder.eventSetup(), dll[i] );
116  // apply mass constraint, if requested
117  if ( mass > 0 ) rc->setConstraint( mass, msig );
118  // apply post selection
119  if ( builder.accept( *rc ) ) cList.push_back( typename
121  ( rc ) );
122  else delete rc;
123  }
124  return;
125 }
std::shared_ptr< T > type
Definition: BPHGenericPtr.h:8
std::vector< ComponentSet > build() const
build a set of combinations of particles fulfilling the selections
virtual ParticleMass mass() const
bool accept(const BPHRecoCandidate &cand) const
const edm::EventSetup * eventSetup() const
get the EventSetup set in the constructor
std::vector< BPHRecoConstCandPtr > cList
long double T