CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PrimaryVertexResolution::Resolution Class Reference

Public Member Functions

double pullx () const
 
double pully () const
 
double pullz () const
 
 Resolution (const reco::Vertex &vertex1, const reco::Vertex &vertex2)
 
double resx () const
 
double resy () const
 
double resz () const
 

Private Attributes

double pullx_
 
double pully_
 
double pullz_
 
double resx_
 
double resy_
 
double resz_
 

Detailed Description

Definition at line 110 of file PrimaryVertexResolution.cc.

Constructor & Destructor Documentation

PrimaryVertexResolution::Resolution::Resolution ( const reco::Vertex vertex1,
const reco::Vertex vertex2 
)
inline

Definition at line 112 of file PrimaryVertexResolution.cc.

References funct::sqr(), mathSSE::sqrt(), reco::Vertex::x(), reco::Vertex::xError(), reco::Vertex::y(), reco::Vertex::yError(), reco::Vertex::z(), and reco::Vertex::zError().

112  {
113  const double diffx = vertex1.x() - vertex2.x();
114  const double diffy = vertex1.y() - vertex2.y();
115  const double diffz = vertex1.z() - vertex2.z();
116 
117  // Take into account the need to divide by sqrt(2) already in
118  // the filling so that we can use DQMGenericClient for the
119  // gaussian fits
120  const double invSqrt2 = 1./std::sqrt(2.);
121  resx_ = diffx * invSqrt2;
122  resy_ = diffy * invSqrt2;
123  resz_ = diffz * invSqrt2;
124 
125  pullx_ = diffx / std::sqrt(sqr(vertex1.xError()) + sqr(vertex2.xError()));
126  pully_ = diffy / std::sqrt(sqr(vertex1.yError()) + sqr(vertex2.yError()));
127  pullz_ = diffz / std::sqrt(sqr(vertex1.zError()) + sqr(vertex2.zError()));
128  }
double zError() const
error on z
Definition: Vertex.h:123
double y() const
y coordinate
Definition: Vertex.h:113
T sqrt(T t)
Definition: SSEVec.h:18
double z() const
z coordinate
Definition: Vertex.h:115
double x() const
x coordinate
Definition: Vertex.h:111
double xError() const
error on x
Definition: Vertex.h:119
Square< F >::type sqr(const F &f)
Definition: Square.h:13
double yError() const
error on y
Definition: Vertex.h:121

Member Function Documentation

double PrimaryVertexResolution::Resolution::pullx ( ) const
inline
double PrimaryVertexResolution::Resolution::pully ( ) const
inline
double PrimaryVertexResolution::Resolution::pullz ( ) const
inline
double PrimaryVertexResolution::Resolution::resx ( ) const
inline
double PrimaryVertexResolution::Resolution::resy ( ) const
inline
double PrimaryVertexResolution::Resolution::resz ( ) const
inline

Member Data Documentation

double PrimaryVertexResolution::Resolution::pullx_
private

Definition at line 142 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::pully_
private

Definition at line 143 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::pullz_
private

Definition at line 144 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::resx_
private

Definition at line 139 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::resy_
private

Definition at line 140 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::resz_
private

Definition at line 141 of file PrimaryVertexResolution.cc.