CMS 3D CMS Logo

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

Public Member Functions

double avgx () const
 
double avgy () const
 
double avgz () const
 
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 avgx_
 
double avgy_
 
double avgz_
 
double pullx_
 
double pully_
 
double pullz_
 
double resx_
 
double resy_
 
double resz_
 

Detailed Description

Definition at line 116 of file PrimaryVertexResolution.cc.

Constructor & Destructor Documentation

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

Definition at line 118 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().

118  {
119  const double diffx = vertex1.x() - vertex2.x();
120  const double diffy = vertex1.y() - vertex2.y();
121  const double diffz = vertex1.z() - vertex2.z();
122 
123  // Take into account the need to divide by sqrt(2) already in
124  // the filling so that we can use DQMGenericClient for the
125  // gaussian fits
126  const double invSqrt2 = 1. / std::sqrt(2.);
127  resx_ = diffx * invSqrt2;
128  resy_ = diffy * invSqrt2;
129  resz_ = diffz * invSqrt2;
130 
131  pullx_ = diffx / std::sqrt(sqr(vertex1.xError()) + sqr(vertex2.xError()));
132  pully_ = diffy / std::sqrt(sqr(vertex1.yError()) + sqr(vertex2.yError()));
133  pullz_ = diffz / std::sqrt(sqr(vertex1.zError()) + sqr(vertex2.zError()));
134 
135  avgx_ = (vertex1.x() + vertex2.x()) / 2.;
136  avgy_ = (vertex1.y() + vertex2.y()) / 2.;
137  avgz_ = (vertex1.z() + vertex2.z()) / 2.;
138  }
double zError() const
error on z
Definition: Vertex.h:127
double y() const
y coordinate
Definition: Vertex.h:117
T sqrt(T t)
Definition: SSEVec.h:19
double z() const
z coordinate
Definition: Vertex.h:119
double x() const
x coordinate
Definition: Vertex.h:115
double xError() const
error on x
Definition: Vertex.h:123
Square< F >::type sqr(const F &f)
Definition: Square.h:14
double yError() const
error on y
Definition: Vertex.h:125

Member Function Documentation

double PrimaryVertexResolution::Resolution::avgx ( ) const
inline
double PrimaryVertexResolution::Resolution::avgy ( ) const
inline
double PrimaryVertexResolution::Resolution::avgz ( ) const
inline
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::avgx_
private

Definition at line 159 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::avgy_
private

Definition at line 160 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::avgz_
private

Definition at line 161 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::pullx_
private

Definition at line 156 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::pully_
private

Definition at line 157 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::pullz_
private

Definition at line 158 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::resx_
private

Definition at line 153 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::resy_
private

Definition at line 154 of file PrimaryVertexResolution.cc.

double PrimaryVertexResolution::Resolution::resz_
private

Definition at line 155 of file PrimaryVertexResolution.cc.