CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes
BPHPlusMinusVertex Class Reference

#include <BPHPlusMinusVertex.h>

Inheritance diagram for BPHPlusMinusVertex:
BPHDecayVertex BPHDecayMomentum BPHPlusMinusCandidate

Public Member Functions

 BPHPlusMinusVertex (const BPHPlusMinusVertex &x)=delete
 
virtual const ClosestApproachInRPhicAppInRPhi () const
 compute distance of closest approach More...
 
BPHPlusMinusVertexoperator= (const BPHPlusMinusVertex &x)=delete
 
 ~BPHPlusMinusVertex () 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 ()
 

Protected Member Functions

 BPHPlusMinusVertex (const edm::EventSetup *es)
 
bool chkSize (const std::string &msg) const
 
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
 
virtual void fill (BPHRecoCandidate *ptr, int level) const =0
 

Static Protected Member Functions

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)
 

Private Member Functions

virtual void computeApp () const
 

Private Attributes

ClosestApproachInRPhiinRPhi
 
bool oldA
 

Detailed Description

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

Author
Paolo Ronchese INFN Padova

Definition at line 33 of file BPHPlusMinusVertex.h.

Constructor & Destructor Documentation

◆ BPHPlusMinusVertex() [1/2]

BPHPlusMinusVertex::BPHPlusMinusVertex ( const BPHPlusMinusVertex x)
delete

Constructor is protected this object can exist only as part of a derived class

◆ ~BPHPlusMinusVertex()

BPHPlusMinusVertex::~BPHPlusMinusVertex ( )
override

Destructor

Definition at line 35 of file BPHPlusMinusVertex.cc.

35 { delete inRPhi; }

References inRPhi.

◆ BPHPlusMinusVertex() [2/2]

BPHPlusMinusVertex::BPHPlusMinusVertex ( const edm::EventSetup es)
protected

Definition at line 30 of file BPHPlusMinusVertex.cc.

30 : BPHDecayVertex(es), oldA(true), inRPhi(nullptr) {}

Member Function Documentation

◆ cAppInRPhi()

const ClosestApproachInRPhi & BPHPlusMinusVertex::cAppInRPhi ( ) const
virtual

compute distance of closest approach

Operations

Definition at line 40 of file BPHPlusMinusVertex.cc.

40  {
41  if (oldA)
42  computeApp();
43  if (inRPhi == nullptr) {
44  static const ClosestApproachInRPhi ca;
45  return ca;
46  }
47  return *inRPhi;
48 }

References computeApp(), inRPhi, and oldA.

◆ chkName()

template<class T >
bool BPHPlusMinusVertex::chkName ( const T cont,
const std::string &  name,
const std::string &  msg 
)
staticprotected

Definition at line 75 of file BPHPlusMinusVertex.h.

75  {
76  if (cont.find(name) != cont.end())
77  return true;
78  edm::LogPrint("ParticleNotFound") << msg << ", " << name << " not found";
79  return false;
80 }

References generateEDF::cont, mps_check::msg, and Skims_PA_cff::name.

◆ chkSize() [1/2]

bool BPHPlusMinusVertex::chkSize ( const std::string &  msg) const
protected

◆ chkSize() [2/2]

template<class T >
bool BPHPlusMinusVertex::chkSize ( const T cont,
const std::string &  msg 
)
staticprotected

Definition at line 83 of file BPHPlusMinusVertex.h.

83  {
84  int n = cont.size();
85  if (n == 2)
86  return true;
87  edm::LogPrint("WrongDataSize") << msg << ", size = " << n;
88  return false;
89 }

References generateEDF::cont, mps_check::msg, and dqmiodumpmetadata::n.

Referenced by BPHPlusMinusCandidate::composite(), computeApp(), BPHPlusMinusCandidate::isCowboy(), and BPHPlusMinusCandidate::isSailor().

◆ computeApp()

void BPHPlusMinusVertex::computeApp ( ) const
privatevirtual

Definition at line 58 of file BPHPlusMinusVertex.cc.

58  {
59  static const string msg = "BPHPlusMinusVertex::computeApp: incomplete, no closest approach available";
60  delete inRPhi;
61  if (!chkSize(msg)) {
62  inRPhi = nullptr;
63  return;
64  }
66  const vector<reco::TransientTrack>& ttk = transientTracks();
67  const reco::TransientTrack& ttp = ttk[0];
68  const reco::TransientTrack& ttn = ttk[1];
70  oldA = false;
71  return;
72 }

References ClosestApproachInRPhi::calculate(), chkSize(), reco::TransientTrack::impactPointTSCP(), inRPhi, mps_check::msg, oldA, TrajectoryStateClosestToPoint::theState(), and BPHDecayVertex::transientTracks().

Referenced by cAppInRPhi().

◆ operator=()

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

◆ setNotUpdated()

void BPHPlusMinusVertex::setNotUpdated ( ) const
overrideprotectedvirtual

Reimplemented from BPHDecayVertex.

Definition at line 52 of file BPHPlusMinusVertex.cc.

52  {
54  oldA = true;
55  return;
56 }

References oldA, and BPHDecayVertex::setNotUpdated().

Referenced by BPHPlusMinusCandidate::setNotUpdated().

Member Data Documentation

◆ inRPhi

ClosestApproachInRPhi* BPHPlusMinusVertex::inRPhi
mutableprivate

Definition at line 68 of file BPHPlusMinusVertex.h.

Referenced by cAppInRPhi(), computeApp(), and ~BPHPlusMinusVertex().

◆ oldA

bool BPHPlusMinusVertex::oldA
mutableprivate

Definition at line 67 of file BPHPlusMinusVertex.h.

Referenced by cAppInRPhi(), computeApp(), and setNotUpdated().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
generateEDF.cont
cont
load Luminosity info ##
Definition: generateEDF.py:629
mps_check.msg
tuple msg
Definition: mps_check.py:285
BPHDecayVertex::BPHDecayVertex
BPHDecayVertex(const BPHDecayVertex &x)=delete
ClosestApproachInRPhi::calculate
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
Definition: ClosestApproachInRPhi.cc:8
ClosestApproachInRPhi
Definition: ClosestApproachInRPhi.h:26
BPHPlusMinusVertex::inRPhi
ClosestApproachInRPhi * inRPhi
Definition: BPHPlusMinusVertex.h:68
BPHDecayVertex::transientTracks
const std::vector< reco::TransientTrack > & transientTracks() const
get list of TransientTracks
Definition: BPHDecayVertex.cc:137
BPHDecayVertex::setNotUpdated
void setNotUpdated() const override
Definition: BPHDecayVertex.cc:175
reco::TransientTrack::impactPointTSCP
TrajectoryStateClosestToPoint impactPointTSCP() const
Definition: TransientTrack.h:96
edm::LogPrint
Definition: MessageLogger.h:342
BPHPlusMinusVertex::computeApp
virtual void computeApp() const
Definition: BPHPlusMinusVertex.cc:58
reco::TransientTrack
Definition: TransientTrack.h:19
BPHPlusMinusVertex::oldA
bool oldA
Definition: BPHPlusMinusVertex.h:67
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TrajectoryStateClosestToPoint::theState
const FreeTrajectoryState & theState() const
Definition: TrajectoryStateClosestToPoint.h:96
BPHPlusMinusVertex::chkSize
static bool chkSize(const T &cont, const std::string &msg)
Definition: BPHPlusMinusVertex.h:83