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.

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  }

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().

Member Function Documentation

◆ avgx()

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

Definition at line 150 of file PrimaryVertexResolution.cc.

150 { return avgx_; }

References avgx_.

◆ avgy()

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

Definition at line 151 of file PrimaryVertexResolution.cc.

151 { return avgy_; }

References avgy_.

◆ avgz()

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

Definition at line 152 of file PrimaryVertexResolution.cc.

152 { return avgz_; }

References avgz_.

◆ pullx()

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

Definition at line 146 of file PrimaryVertexResolution.cc.

146 { return pullx_; }

References pullx_.

◆ pully()

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

Definition at line 147 of file PrimaryVertexResolution.cc.

147 { return pully_; }

References pully_.

◆ pullz()

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

Definition at line 148 of file PrimaryVertexResolution.cc.

148 { return pullz_; }

References pullz_.

◆ resx()

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

Definition at line 142 of file PrimaryVertexResolution.cc.

142 { return resx_; }

References resx_.

◆ resy()

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

Definition at line 143 of file PrimaryVertexResolution.cc.

143 { return resy_; }

References resy_.

◆ resz()

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

Definition at line 144 of file PrimaryVertexResolution.cc.

144 { return resz_; }

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().

PrimaryVertexResolution::Resolution::avgz_
double avgz_
Definition: PrimaryVertexResolution.cc:163
reco::Vertex::z
double z() const
z coordinate
Definition: Vertex.h:133
PrimaryVertexResolution::Resolution::pully_
double pully_
Definition: PrimaryVertexResolution.cc:159
sqr
int sqr(const T &t)
Definition: pfalgo_common_ref.h:9
reco::Vertex::xError
double xError() const
error on x
Definition: Vertex.h:137
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Vertex::zError
double zError() const
error on z
Definition: Vertex.h:141
PrimaryVertexResolution::Resolution::pullz_
double pullz_
Definition: PrimaryVertexResolution.cc:160
reco::Vertex::x
double x() const
x coordinate
Definition: Vertex.h:129
PrimaryVertexResolution::Resolution::resz_
double resz_
Definition: PrimaryVertexResolution.cc:157
PrimaryVertexResolution::Resolution::avgy_
double avgy_
Definition: PrimaryVertexResolution.cc:162
reco::Vertex::y
double y() const
y coordinate
Definition: Vertex.h:131
PrimaryVertexResolution::Resolution::pullx_
double pullx_
Definition: PrimaryVertexResolution.cc:158
PrimaryVertexResolution::Resolution::avgx_
double avgx_
Definition: PrimaryVertexResolution.cc:161
PrimaryVertexResolution::Resolution::resy_
double resy_
Definition: PrimaryVertexResolution.cc:156
reco::Vertex::yError
double yError() const
error on y
Definition: Vertex.h:139
PrimaryVertexResolution::Resolution::resx_
double resx_
Definition: PrimaryVertexResolution.cc:155