CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Friends
BPHPlusMinusCandidate Class Reference

#include <BPHPlusMinusCandidate.h>

Inheritance diagram for BPHPlusMinusCandidate:
BPHRecoCandidate BPHPlusMinusVertex BPHKinematicFit BPHDecayVertex BPHDecayVertex BPHDecayMomentum BPHDecayMomentum

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)
 
 BPHPlusMinusCandidate (const edm::EventSetup *es)
 
virtual const pat::CompositeCandidatecomposite () const
 get a composite by the simple sum of simple particles More...
 
bool isCowboy () const
 get cowboy/sailor classification More...
 
bool isSailor () const
 
virtual ~BPHPlusMinusCandidate ()
 
- Public Member Functions inherited from BPHRecoCandidate
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 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 ()
 
- Public Member Functions inherited from BPHPlusMinusVertex
virtual const ClosestApproachInRPhicAppInRPhi () const
 compute distance of closest approach More...
 
virtual ~BPHPlusMinusVertex ()
 

Static Public Member Functions

static std::vector< BPHPlusMinusConstCandPtrbuild (const BPHRecoBuilder &builder, const std::string &nPos, const std::string &nNeg, double mass=-1, double msig=-1)
 
- Static Public Member Functions inherited from BPHRecoCandidate
static std::vector< BPHRecoConstCandPtrbuild (const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
 

Protected Member Functions

virtual void setNotUpdated () const
 
- 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)
 
- 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
 
- Protected Member Functions inherited from BPHPlusMinusVertex
 BPHPlusMinusVertex (const edm::EventSetup *es)
 
bool chkSize (const std::string &msg) const
 

Private Member Functions

 BPHPlusMinusCandidate (const edm::EventSetup *es, const BPHRecoBuilder::ComponentSet &compList)
 
bool phiDiff () const
 

Friends

class BPHRecoCandidate
 

Additional Inherited Members

- Static Protected Member Functions inherited from BPHRecoCandidate
template<class T >
static void fill (std::vector< typename BPHGenericPtr< const T >::type > &cList, const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
 
- Static Protected Member Functions inherited from BPHPlusMinusVertex
template<class T >
static bool chkName (const T &cont, const std::string &name, const std::string &msg)
 
template<class T >
static bool chkSize (const T &cont, const std::string &msg)
 

Detailed Description

Description: class for reconstructed decay candidates to opposite charge particle pairs

Author
Paolo Ronchese INFN Padova

Definition at line 34 of file BPHPlusMinusCandidate.h.

Constructor & Destructor Documentation

BPHPlusMinusCandidate::BPHPlusMinusCandidate ( const edm::EventSetup es)

Constructor

Definition at line 40 of file BPHPlusMinusCandidate.cc.

Referenced by setNotUpdated().

40  :
41  BPHDecayVertex( es ),
42  BPHPlusMinusVertex( es ),
43  BPHRecoCandidate( es ) {
44 }
BPHDecayVertex(const edm::EventSetup *es)
BPHPlusMinusVertex(const edm::EventSetup *es)
BPHPlusMinusCandidate::~BPHPlusMinusCandidate ( )
virtual
BPHPlusMinusCandidate::BPHPlusMinusCandidate ( const edm::EventSetup es,
const BPHRecoBuilder::ComponentSet compList 
)
private

Definition at line 47 of file BPHPlusMinusCandidate.cc.

48  :
49  BPHDecayMomentum( compList.daugMap, compList.compMap ),
50  BPHDecayVertex( this, es ),
51  BPHKinematicFit( this ),
52  BPHPlusMinusVertex( es ),
53  BPHRecoCandidate( es, compList ) {
54 }
BPHDecayVertex(const edm::EventSetup *es)
std::map< std::string, BPHDecayMomentum::Component > daugMap
BPHPlusMinusVertex(const edm::EventSetup *es)
std::map< std::string, BPHRecoConstCandPtr > compMap

Member Function Documentation

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

Operationsadd a simple particle giving it a name particles are cloned, eventually specifying a different mass particles can be added only up to two particles with opposite charge

Reimplemented from BPHRecoCandidate.

Referenced by BPHKx0ToKPiBuilder::build(), BPHOniaToMuMuBuilder::extractList(), counter.Counter::register(), and ~BPHPlusMinusCandidate().

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

Reimplemented from BPHRecoCandidate.

Referenced by counter.Counter::register().

vector< BPHPlusMinusConstCandPtr > BPHPlusMinusCandidate::build ( const BPHRecoBuilder builder,
const std::string &  nPos,
const std::string &  nNeg,
double  mass = -1,
double  msig = -1 
)
static

look for candidates starting from particle collections as specified in the BPHRecoBuilder, with given names for positive and negative particle charge selection is applied inside

Definition at line 98 of file BPHPlusMinusCandidate.cc.

References accept(), EnergyCorrector::c, ALCARECOTkAlJpsiMuMu_cff::charge, reco::Candidate::charge(), BPHDecayMomentum::cList, BPHRecoBuilder::filter(), and BPHKinematicFit::mass().

Referenced by BPHKx0ToKPiBuilder::build(), BPHPhiToKKBuilder::build(), and BPHOniaToMuMuBuilder::build().

102  {
103  vector<BPHPlusMinusConstCandPtr> cList;
104  class ChargeSelect: public BPHRecoSelect {
105  public:
106  ChargeSelect( int c ): charge ( c ) {}
107  ~ChargeSelect() {}
108  virtual bool accept( const reco::Candidate& cand ) const {
109  return ( ( charge * cand.charge() ) > 0 );
110  }
111  private:
112  int charge;
113  };
114  ChargeSelect tkPos( +1 );
115  ChargeSelect tkNeg( -1 );
116  builder.filter( nPos, tkPos );
117  builder.filter( nNeg, tkNeg );
118  fill<BPHPlusMinusCandidate>( cList, builder, mass, msig );
119  return cList;
120 }
virtual ParticleMass mass() const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
std::vector< BPHRecoConstCandPtr > cList
virtual int charge() const =0
electric charge
void filter(const std::string &name, const BPHRecoSelect &sel) const
const pat::CompositeCandidate & BPHPlusMinusCandidate::composite ( ) const
virtual

get a composite by the simple sum of simple particles

Reimplemented from BPHDecayMomentum.

Definition at line 123 of file BPHPlusMinusCandidate.cc.

References BPHPlusMinusVertex::chkSize(), BPHDecayMomentum::compCand, BPHDecayMomentum::composite(), and mps_check::msg.

Referenced by BPHKx0ToKPiBuilder::build(), and BPHWriteSpecificDecay::fill().

123  {
124  static const pat::CompositeCandidate compCand;
125  static const string msg =
126  "BPHPlusMinusCandidate incomplete, no composite available";
127  if ( !chkSize( msg ) ) return compCand;
129 }
Analysis-level particle class.
static bool chkSize(const T &cont, const std::string &msg)
virtual const pat::CompositeCandidate & composite() const
get a composite by the simple sum of simple particles
tuple msg
Definition: mps_check.py:277
pat::CompositeCandidate compCand
bool BPHPlusMinusCandidate::isCowboy ( ) const

get cowboy/sailor classification

Definition at line 132 of file BPHPlusMinusCandidate.cc.

References BPHPlusMinusVertex::chkSize(), mps_check::msg, and phiDiff().

Referenced by BPHWriteSpecificDecay::write().

132  {
133  static const string msg =
134  "BPHPlusMinusCandidate incomplete, no cowboy/sailor classification";
135  return ( chkSize( msg ) && phiDiff() );
136 }
static bool chkSize(const T &cont, const std::string &msg)
tuple msg
Definition: mps_check.py:277
bool BPHPlusMinusCandidate::isSailor ( ) const

Definition at line 139 of file BPHPlusMinusCandidate.cc.

References BPHPlusMinusVertex::chkSize(), mps_check::msg, and phiDiff().

139  {
140  static const string msg =
141  "BPHPlusMinusCandidate incomplete, no cowboy/sailor classification";
142  return ( chkSize( msg ) && !phiDiff() );
143 }
static bool chkSize(const T &cont, const std::string &msg)
tuple msg
Definition: mps_check.py:277
bool BPHPlusMinusCandidate::phiDiff ( ) const
private

Definition at line 146 of file BPHPlusMinusCandidate.cc.

References BPHDecayMomentum::daughters(), reco::deltaPhi(), and phi.

Referenced by isCowboy(), isSailor(), and setNotUpdated().

146  {
147  const vector<const reco::Candidate*>& dL = daughters();
148  int idPos = ( dL.front()->charge() > 0 ? 0 : 1 );
149  return reco::deltaPhi( dL[ idPos]->phi(),
150  dL[1 - idPos]->phi() ) > 0;
151 }
virtual const std::vector< const reco::Candidate * > & daughters() const
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
virtual void BPHPlusMinusCandidate::setNotUpdated ( ) const
inlineprotectedvirtual

Friends And Related Function Documentation

friend class BPHRecoCandidate
friend

Definition at line 37 of file BPHPlusMinusCandidate.h.