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

Constructor & Destructor Documentation

◆ Resolution()

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 z() const
z coordinate
Definition: Vertex.h:133
double zError() const
error on z
Definition: Vertex.h:141
int sqr(const T &t)
double xError() const
error on x
Definition: Vertex.h:137
T sqrt(T t)
Definition: SSEVec.h:19
double x() const
x coordinate
Definition: Vertex.h:129
double y() const
y coordinate
Definition: Vertex.h:131
double yError() const
error on y
Definition: Vertex.h:139

Member Function Documentation

◆ avgx()

double PrimaryVertexResolution::Resolution::avgx ( ) const
inline

Definition at line 150 of file PrimaryVertexResolution.cc.

References avgx_.

◆ avgy()

double PrimaryVertexResolution::Resolution::avgy ( ) const
inline

Definition at line 151 of file PrimaryVertexResolution.cc.

References avgy_.

◆ avgz()

double PrimaryVertexResolution::Resolution::avgz ( ) const
inline

Definition at line 152 of file PrimaryVertexResolution.cc.

References avgz_.

◆ pullx()

double PrimaryVertexResolution::Resolution::pullx ( ) const
inline

Definition at line 146 of file PrimaryVertexResolution.cc.

References pullx_.

◆ pully()

double PrimaryVertexResolution::Resolution::pully ( ) const
inline

Definition at line 147 of file PrimaryVertexResolution.cc.

References pully_.

◆ pullz()

double PrimaryVertexResolution::Resolution::pullz ( ) const
inline

Definition at line 148 of file PrimaryVertexResolution.cc.

References pullz_.

◆ resx()

double PrimaryVertexResolution::Resolution::resx ( ) const
inline

Definition at line 142 of file PrimaryVertexResolution.cc.

References resx_.

◆ resy()

double PrimaryVertexResolution::Resolution::resy ( ) const
inline

Definition at line 143 of file PrimaryVertexResolution.cc.

References resy_.

◆ resz()

double PrimaryVertexResolution::Resolution::resz ( ) const
inline

Definition at line 144 of file PrimaryVertexResolution.cc.

References resz_.

Member Data Documentation

◆ avgx_

double PrimaryVertexResolution::Resolution::avgx_
private

Definition at line 161 of file PrimaryVertexResolution.cc.

Referenced by avgx(), and Resolution().

◆ avgy_

double PrimaryVertexResolution::Resolution::avgy_
private

Definition at line 162 of file PrimaryVertexResolution.cc.

Referenced by avgy(), and Resolution().

◆ avgz_

double PrimaryVertexResolution::Resolution::avgz_
private

Definition at line 163 of file PrimaryVertexResolution.cc.

Referenced by avgz(), and Resolution().

◆ pullx_

double PrimaryVertexResolution::Resolution::pullx_
private

Definition at line 158 of file PrimaryVertexResolution.cc.

Referenced by pullx(), and Resolution().

◆ pully_

double PrimaryVertexResolution::Resolution::pully_
private

Definition at line 159 of file PrimaryVertexResolution.cc.

Referenced by pully(), and Resolution().

◆ pullz_

double PrimaryVertexResolution::Resolution::pullz_
private

Definition at line 160 of file PrimaryVertexResolution.cc.

Referenced by pullz(), and Resolution().

◆ resx_

double PrimaryVertexResolution::Resolution::resx_
private

Definition at line 155 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resx().

◆ resy_

double PrimaryVertexResolution::Resolution::resy_
private

Definition at line 156 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resy().

◆ resz_

double PrimaryVertexResolution::Resolution::resz_
private

Definition at line 157 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resz().