CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::VertexCompatibleWithBeam ( const VertexDistance dist,
float  cut 
)
VertexCompatibleWithBeam::VertexCompatibleWithBeam ( const VertexDistance dist,
float  cut,
const reco::BeamSpot beamSpot 
)

Definition at line 16 of file VertexCompatibleWithBeam.cc.

VertexCompatibleWithBeam::VertexCompatibleWithBeam ( const VertexCompatibleWithBeam other)

Definition at line 21 of file VertexCompatibleWithBeam.cc.

22  :
23  theDistance((*other.theDistance).clone()),
24  theCut(other.theCut), theBeam(other.theBeam) {}
VertexCompatibleWithBeam::~VertexCompatibleWithBeam ( )
virtual

Definition at line 27 of file VertexCompatibleWithBeam.cc.

References theDistance.

27  {
28  delete theDistance;
29 }

Member Function Documentation

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

Definition at line 55 of file VertexCompatibleWithBeam.cc.

References reco::Vertex::covariance(), VertexDistance::distance(), L1TEmulatorMonitor_cff::p, reco::Vertex::position(), theBeam, theDistance, and Measurement1D::value().

56 {
59  return theDistance->distance(vs, theBeam).value();
60 }
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:110
const Point & position() const
position
Definition: Vertex.h:93
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:28
float VertexCompatibleWithBeam::distanceToBeam ( const reco::Vertex v,
const VertexState bs 
) const

Definition at line 63 of file VertexCompatibleWithBeam.cc.

References reco::Vertex::covariance(), VertexDistance::distance(), L1TEmulatorMonitor_cff::p, reco::Vertex::position(), theDistance, and Measurement1D::value().

64 {
67  return theDistance->distance(vs, bs).value();
68 }
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:110
const Point & position() const
position
Definition: Vertex.h:93
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:28
bool VertexCompatibleWithBeam::operator() ( const reco::Vertex v) const
virtual

Definition at line 47 of file VertexCompatibleWithBeam.cc.

References reco::Vertex::covariance(), VertexDistance::distance(), L1TEmulatorMonitor_cff::p, reco::Vertex::position(), theBeam, theCut, theDistance, and Measurement1D::value().

48 {
51  return (theDistance->distance(vs, theBeam).value() < theCut);
52 }
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:110
const Point & position() const
position
Definition: Vertex.h:93
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:28
bool VertexCompatibleWithBeam::operator() ( const reco::Vertex v,
const VertexState bs 
) const
virtual

Definition at line 71 of file VertexCompatibleWithBeam.cc.

References reco::Vertex::covariance(), VertexDistance::distance(), L1TEmulatorMonitor_cff::p, reco::Vertex::position(), theCut, theDistance, and Measurement1D::value().

72 {
75  return (theDistance->distance(vs, bs).value() < theCut);
76 }
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:110
const Point & position() const
position
Definition: Vertex.h:93
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:11
Measurement1D distance(const reco::Vertex &, const reco::Vertex &) const
double value() const
Definition: Measurement1D.h:28
VertexCompatibleWithBeam & VertexCompatibleWithBeam::operator= ( const VertexCompatibleWithBeam other)

Definition at line 33 of file VertexCompatibleWithBeam.cc.

References clone(), theBeam, theCut, and theDistance.

34 {
35  if (this == &other) return *this;
36 
37  theDistance = (*other.theDistance).clone();
38  theCut = other.theCut;
39  theBeam = other.theBeam;
40  return *this;
41 }
T * clone(const T *tp)
Definition: Ptr.h:42
void VertexCompatibleWithBeam::setBeamSpot ( const reco::BeamSpot beamSpot)

Definition at line 43 of file VertexCompatibleWithBeam.cc.

References theBeam.

43  {
44  theBeam = VertexState(beamSpot);
45 }

Member Data Documentation

VertexState VertexCompatibleWithBeam::theBeam
private
float VertexCompatibleWithBeam::theCut
private

Definition at line 38 of file VertexCompatibleWithBeam.h.

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

VertexDistance* VertexCompatibleWithBeam::theDistance
private