CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
VertexCompatibleWithBeam Class Reference

#include <VertexCompatibleWithBeam.h>

Public Member Functions

float distanceToBeam (const reco::Vertex &) const
 
float distanceToBeam (const reco::Vertex &, const VertexState &) const
 
virtual bool operator() (const reco::Vertex &) const
 
virtual bool operator() (const reco::Vertex &, const VertexState &) const
 
VertexCompatibleWithBeamoperator= (const VertexCompatibleWithBeam &other)
 
void setBeamSpot (const reco::BeamSpot &beamSpot)
 
 VertexCompatibleWithBeam (const VertexDistance &dist, float cut)
 
 VertexCompatibleWithBeam (const VertexDistance &dist, float cut, const reco::BeamSpot &beamSpot)
 
 VertexCompatibleWithBeam (const VertexCompatibleWithBeam &other)
 
virtual ~VertexCompatibleWithBeam ()
 

Private Attributes

VertexState theBeam
 
float theCut
 
VertexDistancetheDistance
 

Detailed Description

True if the distance between the beam spot and the vertex, computed by the dist algorithm, is smaller than cut.

Definition at line 15 of file VertexCompatibleWithBeam.h.

Constructor & Destructor Documentation

◆ VertexCompatibleWithBeam() [1/3]

VertexCompatibleWithBeam::VertexCompatibleWithBeam ( const VertexDistance dist,
float  cut 
)

◆ VertexCompatibleWithBeam() [2/3]

VertexCompatibleWithBeam::VertexCompatibleWithBeam ( const VertexDistance dist,
float  cut,
const reco::BeamSpot beamSpot 
)

◆ VertexCompatibleWithBeam() [3/3]

VertexCompatibleWithBeam::VertexCompatibleWithBeam ( const VertexCompatibleWithBeam other)

Definition at line 17 of file VertexCompatibleWithBeam.cc.

◆ ~VertexCompatibleWithBeam()

VertexCompatibleWithBeam::~VertexCompatibleWithBeam ( )
virtual

Definition at line 20 of file VertexCompatibleWithBeam.cc.

References theDistance.

20 { delete theDistance; }

Member Function Documentation

◆ distanceToBeam() [1/2]

float VertexCompatibleWithBeam::distanceToBeam ( const reco::Vertex v) const

Definition at line 40 of file VertexCompatibleWithBeam.cc.

References VertexDistance::distance(), AlCaHLTBitMon_ParallelJobs::p, theBeam, theDistance, findQualityFiles::v, and Measurement1D::value().

40  {
41  GlobalPoint p(Basic3DVector<float>(v.position()));
42  VertexState vs(p, GlobalError(v.covariance()));
43  return theDistance->distance(vs, theBeam).value();
44 }
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:25

◆ distanceToBeam() [2/2]

float VertexCompatibleWithBeam::distanceToBeam ( const reco::Vertex v,
const VertexState bs 
) const

Definition at line 46 of file VertexCompatibleWithBeam.cc.

References cms::cuda::bs, VertexDistance::distance(), AlCaHLTBitMon_ParallelJobs::p, theDistance, findQualityFiles::v, and Measurement1D::value().

46  {
47  GlobalPoint p(Basic3DVector<float>(v.position()));
48  VertexState vs(p, GlobalError(v.covariance()));
49  return theDistance->distance(vs, bs).value();
50 }
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:25

◆ operator()() [1/2]

bool VertexCompatibleWithBeam::operator() ( const reco::Vertex v) const
virtual

Definition at line 34 of file VertexCompatibleWithBeam.cc.

References VertexDistance::distance(), AlCaHLTBitMon_ParallelJobs::p, theBeam, theCut, theDistance, findQualityFiles::v, and Measurement1D::value().

34  {
35  GlobalPoint p(Basic3DVector<float>(v.position()));
36  VertexState vs(p, GlobalError(v.covariance()));
37  return (theDistance->distance(vs, theBeam).value() < theCut);
38 }
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:25

◆ operator()() [2/2]

bool VertexCompatibleWithBeam::operator() ( const reco::Vertex v,
const VertexState bs 
) const
virtual

Definition at line 52 of file VertexCompatibleWithBeam.cc.

References cms::cuda::bs, VertexDistance::distance(), AlCaHLTBitMon_ParallelJobs::p, theCut, theDistance, findQualityFiles::v, and Measurement1D::value().

52  {
53  GlobalPoint p(Basic3DVector<float>(v.position()));
54  VertexState vs(p, GlobalError(v.covariance()));
55  return (theDistance->distance(vs, bs).value() < theCut);
56 }
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:25

◆ operator=()

VertexCompatibleWithBeam & VertexCompatibleWithBeam::operator= ( const VertexCompatibleWithBeam other)

Definition at line 22 of file VertexCompatibleWithBeam.cc.

References clone(), trackingPlots::other, theBeam, theCut, and theDistance.

22  {
23  if (this == &other)
24  return *this;
25 
26  theDistance = (*other.theDistance).clone();
27  theCut = other.theCut;
28  theBeam = other.theBeam;
29  return *this;
30 }
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135

◆ setBeamSpot()

void VertexCompatibleWithBeam::setBeamSpot ( const reco::BeamSpot beamSpot)

Member Data Documentation

◆ theBeam

VertexState VertexCompatibleWithBeam::theBeam
private

◆ theCut

float VertexCompatibleWithBeam::theCut
private

Definition at line 34 of file VertexCompatibleWithBeam.h.

Referenced by operator()(), and operator=().

◆ theDistance

VertexDistance* VertexCompatibleWithBeam::theDistance
private