CMS 3D CMS Logo

List of all members | Classes | Public Types | 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

Classes

struct  BuilderParameters
 

Public Types

typedef BPHPlusMinusConstCandPtr const_pointer
 
typedef BPHPlusMinusCandidatePtr pointer
 
- Public Types inherited from BPHRecoCandidate
typedef BPHRecoConstCandPtr const_pointer
 
enum  esType { transientTrackBuilder }
 
typedef BPHRecoCandidatePtr pointer
 

Public Member Functions

void add (const std::string &name, const reco::Candidate *daug, double mass=-1.0, double sigma=-1.0) override
 
void add (const std::string &name, const reco::Candidate *daug, const std::string &searchList, double mass=-1.0, double sigma=-1.0) override
 
 BPHPlusMinusCandidate (const BPHEventSetupWrapper *es)
 
 BPHPlusMinusCandidate (const BPHPlusMinusCandidate &x)=delete
 
BPHRecoCandidateclone (int level=-1) const override
 
const pat::CompositeCandidatecomposite () const override
 get a composite by the simple sum of simple particles More...
 
bool isCowboy () const
 get cowboy/sailor classification More...
 
bool isSailor () const
 
BPHPlusMinusCandidateoperator= (const BPHPlusMinusCandidate &x)=delete
 
 ~BPHPlusMinusCandidate () override=default
 
- Public Member Functions inherited from BPHRecoCandidate
virtual void add (const std::string &name, const BPHRecoConstCandPtr &comp)
 
 BPHRecoCandidate (const BPHEventSetupWrapper *es, int daugNum=2, int compNum=2)
 
 BPHRecoCandidate (const BPHEventSetupWrapper *es, const BPHRecoBuilder::ComponentSet &compSet)
 create an object with daughters as specified in the ComponentSet More...
 
 BPHRecoCandidate (const BPHRecoCandidate &x)=delete
 
BPHRecoCandidateoperator= (const BPHRecoCandidate &x)=delete
 
 ~BPHRecoCandidate () override=default
 
- 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, double &mass, double &sigma) 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, double mass, double sigma) const
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name, double mass) const
 
virtual const RefCountedKinematicTreekinematicTree (const std::string &name) 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=default
 
- Public Member Functions inherited from BPHDecayVertex
 BPHDecayVertex (const BPHDecayVertex &x)=delete
 
const BPHEventSetupWrappergetEventSetup () const
 retrieve EventSetup More...
 
char getTMode (const reco::Candidate *cand) const
 get Track mode for a daughter 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
 
const std::map< std::string, BPHRecoConstCandPtr > & compMap () const
 
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
 
const std::map< std::string, const reco::Candidate * > & daugMap () 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 ()
 
- Public Member Functions inherited from BPHPlusMinusVertex
 BPHPlusMinusVertex (const BPHPlusMinusVertex &x)=delete
 
virtual const ClosestApproachInRPhicAppInRPhi () const
 compute distance of closest approach More...
 
BPHPlusMinusVertexoperator= (const BPHPlusMinusVertex &x)=delete
 
 ~BPHPlusMinusVertex () override
 

Static Public Member Functions

static std::vector< BPHPlusMinusConstCandPtrbuild (const BPHRecoBuilder &builder, const BuilderParameters &par)
 
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, const BuilderParameters &par)
 
static std::vector< BPHRecoConstCandPtrbuild (const BPHRecoBuilder &builder, double mass=-1, double msig=-1)
 

Protected Member Functions

void setNotUpdated () const override
 
- Protected Member Functions inherited from BPHRecoCandidate
void fill (BPHRecoCandidate *ptr, int level) const override
 
- 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)
 
 BPHKinematicFit (int daugNum=2, int compNum=2)
 
 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)
 
 BPHDecayVertex (const BPHEventSetupWrapper *es, int daugNum=2, int compNum=2)
 
 BPHDecayVertex (const BPHDecayVertex *ptr, const BPHEventSetupWrapper *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)
 
 BPHDecayMomentum (int daugNum=2, int compNum=2)
 
 BPHDecayMomentum (const std::map< std::string, Component > &daugMap, int compNum=2)
 
 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 BPHEventSetupWrapper *es)
 
bool chkSize (const std::string &msg) const
 
void setNotUpdated () const override
 

Private Member Functions

 BPHPlusMinusCandidate (const BPHEventSetupWrapper *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.

Member Typedef Documentation

◆ const_pointer

Definition at line 39 of file BPHPlusMinusCandidate.h.

◆ pointer

Definition at line 38 of file BPHPlusMinusCandidate.h.

Constructor & Destructor Documentation

◆ BPHPlusMinusCandidate() [1/3]

BPHPlusMinusCandidate::BPHPlusMinusCandidate ( const BPHEventSetupWrapper es)

Constructor

Definition at line 37 of file BPHPlusMinusCandidate.cc.

Referenced by clone().

BPHDecayVertex(const BPHDecayVertex &x)=delete
BPHPlusMinusVertex(const BPHPlusMinusVertex &x)=delete

◆ BPHPlusMinusCandidate() [2/3]

BPHPlusMinusCandidate::BPHPlusMinusCandidate ( const BPHPlusMinusCandidate x)
delete

◆ ~BPHPlusMinusCandidate()

BPHPlusMinusCandidate::~BPHPlusMinusCandidate ( )
overridedefault

Destructor

◆ BPHPlusMinusCandidate() [3/3]

BPHPlusMinusCandidate::BPHPlusMinusCandidate ( const BPHEventSetupWrapper es,
const BPHRecoBuilder::ComponentSet compList 
)
private

Definition at line 40 of file BPHPlusMinusCandidate.cc.

42  : BPHDecayMomentum(compList.daugMap, compList.compMap),
43  BPHDecayVertex(this, es),
44  BPHKinematicFit(this),
BPHKinematicFit(const BPHKinematicFit &x)=delete
std::vector< Component > compList
BPHDecayMomentum(const BPHDecayMomentum &x)=delete
BPHDecayVertex(const BPHDecayVertex &x)=delete
BPHPlusMinusVertex(const BPHPlusMinusVertex &x)=delete

Member Function Documentation

◆ add() [1/2]

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

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 BPHDecayToV0DiffMassBuilder::buildCandidate(), and counter.Counter::register().

◆ add() [2/2]

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

Reimplemented from BPHRecoCandidate.

Referenced by counter.Counter::register().

◆ build() [1/2]

static std::vector<BPHPlusMinusConstCandPtr> BPHPlusMinusCandidate::build ( const BPHRecoBuilder builder,
const BuilderParameters par 
)
inlinestatic

Definition at line 75 of file BPHPlusMinusCandidate.h.

References BPHPlusMinusCandidate::BuilderParameters::constrMass, BPHPlusMinusCandidate::BuilderParameters::constrSigma, BPHPlusMinusCandidate::BuilderParameters::negName, and BPHPlusMinusCandidate::BuilderParameters::posName.

Referenced by BPHDecaySpecificBuilder< BPHRecoCandidate >::fillRecList(), and BPHOniaToMuMuBuilder::fillRecList().

75  {
76  return build(builder, *par.posName, *par.negName, par.constrMass, par.constrSigma);
77  }
static std::vector< BPHPlusMinusConstCandPtr > build(const BPHRecoBuilder &builder, const BuilderParameters &par)

◆ build() [2/2]

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

◆ clone()

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

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

Reimplemented from BPHRecoCandidate.

Definition at line 104 of file BPHPlusMinusCandidate.cc.

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

104  {
106  fill(ptr, level);
107  return ptr;
108 }
const BPHEventSetupWrapper * getEventSetup() const
retrieve EventSetup
void fill(BPHRecoCandidate *ptr, int level) const override
BPHPlusMinusCandidate(const BPHEventSetupWrapper *es)

◆ composite()

const pat::CompositeCandidate & BPHPlusMinusCandidate::composite ( ) const
overridevirtual

get a composite by the simple sum of simple particles

Reimplemented from BPHDecayMomentum.

Definition at line 110 of file BPHPlusMinusCandidate.cc.

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

Referenced by BPHWriteSpecificDecay::fill().

110  {
111  static const pat::CompositeCandidate compCand;
112  static const string msg = "BPHPlusMinusCandidate incomplete, no composite available";
113  if (!chkSize(msg))
114  return compCand;
116 }
Analysis-level particle class.
static bool chkSize(const T &cont, const std::string &msg)
tuple msg
Definition: mps_check.py:285
pat::CompositeCandidate compCand
virtual const pat::CompositeCandidate & composite() const
get a composite by the simple sum of simple particles

◆ isCowboy()

bool BPHPlusMinusCandidate::isCowboy ( ) const

get cowboy/sailor classification

Definition at line 118 of file BPHPlusMinusCandidate.cc.

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

Referenced by BPHWriteSpecificDecay::write().

118  {
119  static const string msg = "BPHPlusMinusCandidate incomplete, no cowboy/sailor classification";
120  return (chkSize(msg) && phiDiff());
121 }
static bool chkSize(const T &cont, const std::string &msg)
tuple msg
Definition: mps_check.py:285

◆ isSailor()

bool BPHPlusMinusCandidate::isSailor ( ) const

Definition at line 123 of file BPHPlusMinusCandidate.cc.

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

123  {
124  static const string msg = "BPHPlusMinusCandidate incomplete, no cowboy/sailor classification";
125  return (chkSize(msg) && !phiDiff());
126 }
static bool chkSize(const T &cont, const std::string &msg)
tuple msg
Definition: mps_check.py:285

◆ operator=()

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

◆ phiDiff()

bool BPHPlusMinusCandidate::phiDiff ( ) const
private

Definition at line 128 of file BPHPlusMinusCandidate.cc.

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

Referenced by isCowboy(), and isSailor().

128  {
129  const vector<const reco::Candidate*>& dL = daughters();
130  int idPos = (dL.front()->charge() > 0 ? 0 : 1);
131  return reco::deltaPhi(dL[idPos]->phi(), dL[1 - idPos]->phi()) > 0;
132 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
virtual const std::vector< const reco::Candidate * > & daughters() const

◆ setNotUpdated()

void BPHPlusMinusCandidate::setNotUpdated ( ) const
inlineoverrideprotectedvirtual

Reimplemented from BPHDecayVertex.

Definition at line 97 of file BPHPlusMinusCandidate.h.

References BPHPlusMinusVertex::setNotUpdated(), and BPHKinematicFit::setNotUpdated().

97  {
100  }
void setNotUpdated() const override
void setNotUpdated() const override

Friends And Related Function Documentation

◆ BPHRecoCandidate

friend class BPHRecoCandidate
friend

Definition at line 35 of file BPHPlusMinusCandidate.h.