CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 118 of file PrimaryVertexResolution.cc.

Constructor & Destructor Documentation

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

Definition at line 120 of file PrimaryVertexResolution.cc.

References avgx_, avgy_, avgz_, pullx_, pully_, pullz_, resx_, resy_, resz_, sqr(), mathSSE::sqrt(), reco::Vertex::x(), reco::Vertex::xError(), reco::Vertex::y(), reco::Vertex::yError(), reco::Vertex::z(), and reco::Vertex::zError().

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

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 161 of file PrimaryVertexResolution.cc.

Referenced by avgx(), and Resolution().

double PrimaryVertexResolution::Resolution::avgy_
private

Definition at line 162 of file PrimaryVertexResolution.cc.

Referenced by avgy(), and Resolution().

double PrimaryVertexResolution::Resolution::avgz_
private

Definition at line 163 of file PrimaryVertexResolution.cc.

Referenced by avgz(), and Resolution().

double PrimaryVertexResolution::Resolution::pullx_
private

Definition at line 158 of file PrimaryVertexResolution.cc.

Referenced by pullx(), and Resolution().

double PrimaryVertexResolution::Resolution::pully_
private

Definition at line 159 of file PrimaryVertexResolution.cc.

Referenced by pully(), and Resolution().

double PrimaryVertexResolution::Resolution::pullz_
private

Definition at line 160 of file PrimaryVertexResolution.cc.

Referenced by pullz(), and Resolution().

double PrimaryVertexResolution::Resolution::resx_
private

Definition at line 155 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resx().

double PrimaryVertexResolution::Resolution::resy_
private

Definition at line 156 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resy().

double PrimaryVertexResolution::Resolution::resz_
private

Definition at line 157 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resz().