CMS 3D CMS Logo

VertexCompatibleWithBeam Class Reference

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

#include <RecoVertex/VertexTools/interface/VertexCompatibleWithBeam.h>

List of all members.

Public Member Functions

float distanceToBeam (const reco::Vertex &, const VertexState &) const
float distanceToBeam (const reco::Vertex &) const
virtual bool operator() (const reco::Vertex &, const VertexState &) const
virtual bool operator() (const reco::Vertex &) const
VertexCompatibleWithBeamoperator= (const VertexCompatibleWithBeam &other)
void setBeamSpot (const reco::BeamSpot &beamSpot)
 VertexCompatibleWithBeam (const VertexCompatibleWithBeam &other)
 VertexCompatibleWithBeam (const VertexDistance &dist, float cut, const reco::BeamSpot &beamSpot)
 VertexCompatibleWithBeam (const VertexDistance &dist, float cut)
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 
)

Definition at line 9 of file VertexCompatibleWithBeam.cc.

References theBeam.

00011   : theDistance(d.clone()), theCut(cut) 
00012 {
00013   BeamSpot beamSpot;
00014   theBeam = VertexState(beamSpot);
00015 }

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

Definition at line 17 of file VertexCompatibleWithBeam.cc.

00019     : theDistance(d.clone()), theCut(cut), theBeam(beamSpot){}

VertexCompatibleWithBeam::VertexCompatibleWithBeam ( const VertexCompatibleWithBeam other  ) 

Definition at line 22 of file VertexCompatibleWithBeam.cc.

00023                                           : 
00024   theDistance((*other.theDistance).clone()), 
00025   theCut(other.theCut), theBeam(other.theBeam) {}

VertexCompatibleWithBeam::~VertexCompatibleWithBeam (  )  [virtual]

Definition at line 28 of file VertexCompatibleWithBeam.cc.

References theDistance.

00028                                                     {
00029   delete theDistance;
00030 }


Member Function Documentation

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

Definition at line 64 of file VertexCompatibleWithBeam.cc.

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

00065 {
00066   GlobalPoint p(Basic3DVector<float> (v.position()));
00067   VertexState vs(p, RecoVertex::convertError(v.covariance()));
00068   return theDistance->distance(vs, bs).value();
00069 }

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

Definition at line 56 of file VertexCompatibleWithBeam.cc.

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

00057 {
00058   GlobalPoint p(Basic3DVector<float> (v.position()));
00059   VertexState vs(p, RecoVertex::convertError(v.covariance()));
00060   return theDistance->distance(vs, theBeam).value();
00061 }

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

Definition at line 72 of file VertexCompatibleWithBeam.cc.

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

00073 {
00074   GlobalPoint p(Basic3DVector<float> (v.position()));
00075   VertexState vs(p, RecoVertex::convertError(v.covariance()));
00076   return (theDistance->distance(vs, bs).value() < theCut);
00077 }

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

Definition at line 48 of file VertexCompatibleWithBeam.cc.

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

00049 {
00050   GlobalPoint p(Basic3DVector<float> (v.position()));
00051   VertexState vs(p, RecoVertex::convertError(v.covariance()));
00052   return (theDistance->distance(vs, theBeam).value() < theCut);
00053 }

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

Definition at line 34 of file VertexCompatibleWithBeam.cc.

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

00035 {
00036   if (this == &other) return *this;
00037 
00038   theDistance = (*other.theDistance).clone();
00039   theCut = other.theCut;
00040   theBeam = other.theBeam;
00041   return *this;
00042 }

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

Definition at line 44 of file VertexCompatibleWithBeam.cc.

References theBeam.

00044                                                                    {
00045   theBeam = VertexState(beamSpot);
00046 }


Member Data Documentation

VertexState VertexCompatibleWithBeam::theBeam [private]

Definition at line 39 of file VertexCompatibleWithBeam.h.

Referenced by distanceToBeam(), operator()(), operator=(), setBeamSpot(), and VertexCompatibleWithBeam().

float VertexCompatibleWithBeam::theCut [private]

Definition at line 38 of file VertexCompatibleWithBeam.h.

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

VertexDistance* VertexCompatibleWithBeam::theDistance [private]

Definition at line 37 of file VertexCompatibleWithBeam.h.

Referenced by distanceToBeam(), operator()(), operator=(), and ~VertexCompatibleWithBeam().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:58 2009 for CMSSW by  doxygen 1.5.4