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

Constructor & Destructor Documentation

◆ Resolution()

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

Definition at line 121 of file PrimaryVertexResolution.cc.

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

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

151 { return avgx_; }

References avgx_.

◆ avgy()

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

Definition at line 152 of file PrimaryVertexResolution.cc.

152 { return avgy_; }

References avgy_.

◆ avgz()

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

Definition at line 153 of file PrimaryVertexResolution.cc.

153 { return avgz_; }

References avgz_.

◆ pullx()

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

Definition at line 147 of file PrimaryVertexResolution.cc.

147 { return pullx_; }

References pullx_.

◆ pully()

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

Definition at line 148 of file PrimaryVertexResolution.cc.

148 { return pully_; }

References pully_.

◆ pullz()

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

Definition at line 149 of file PrimaryVertexResolution.cc.

149 { return pullz_; }

References pullz_.

◆ resx()

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

Definition at line 143 of file PrimaryVertexResolution.cc.

143 { return resx_; }

References resx_.

◆ resy()

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

Definition at line 144 of file PrimaryVertexResolution.cc.

144 { return resy_; }

References resy_.

◆ resz()

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

Definition at line 145 of file PrimaryVertexResolution.cc.

145 { return resz_; }

References resz_.

Member Data Documentation

◆ avgx_

double PrimaryVertexResolution::Resolution::avgx_
private

Definition at line 162 of file PrimaryVertexResolution.cc.

Referenced by avgx(), and Resolution().

◆ avgy_

double PrimaryVertexResolution::Resolution::avgy_
private

Definition at line 163 of file PrimaryVertexResolution.cc.

Referenced by avgy(), and Resolution().

◆ avgz_

double PrimaryVertexResolution::Resolution::avgz_
private

Definition at line 164 of file PrimaryVertexResolution.cc.

Referenced by avgz(), and Resolution().

◆ pullx_

double PrimaryVertexResolution::Resolution::pullx_
private

Definition at line 159 of file PrimaryVertexResolution.cc.

Referenced by pullx(), and Resolution().

◆ pully_

double PrimaryVertexResolution::Resolution::pully_
private

Definition at line 160 of file PrimaryVertexResolution.cc.

Referenced by pully(), and Resolution().

◆ pullz_

double PrimaryVertexResolution::Resolution::pullz_
private

Definition at line 161 of file PrimaryVertexResolution.cc.

Referenced by pullz(), and Resolution().

◆ resx_

double PrimaryVertexResolution::Resolution::resx_
private

Definition at line 156 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resx().

◆ resy_

double PrimaryVertexResolution::Resolution::resy_
private

Definition at line 157 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resy().

◆ resz_

double PrimaryVertexResolution::Resolution::resz_
private

Definition at line 158 of file PrimaryVertexResolution.cc.

Referenced by Resolution(), and resz().

PrimaryVertexResolution::Resolution::avgz_
double avgz_
Definition: PrimaryVertexResolution.cc:164
reco::Vertex::z
double z() const
z coordinate
Definition: Vertex.h:120
PrimaryVertexResolution::Resolution::pully_
double pully_
Definition: PrimaryVertexResolution.cc:160
sqr
int sqr(const T &t)
Definition: pfalgo_common_ref.h:9
reco::Vertex::xError
double xError() const
error on x
Definition: Vertex.h:124
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Vertex::zError
double zError() const
error on z
Definition: Vertex.h:128
PrimaryVertexResolution::Resolution::pullz_
double pullz_
Definition: PrimaryVertexResolution.cc:161
reco::Vertex::x
double x() const
x coordinate
Definition: Vertex.h:116
PrimaryVertexResolution::Resolution::resz_
double resz_
Definition: PrimaryVertexResolution.cc:158
PrimaryVertexResolution::Resolution::avgy_
double avgy_
Definition: PrimaryVertexResolution.cc:163
reco::Vertex::y
double y() const
y coordinate
Definition: Vertex.h:118
PrimaryVertexResolution::Resolution::pullx_
double pullx_
Definition: PrimaryVertexResolution.cc:159
PrimaryVertexResolution::Resolution::avgx_
double avgx_
Definition: PrimaryVertexResolution.cc:162
PrimaryVertexResolution::Resolution::resy_
double resy_
Definition: PrimaryVertexResolution.cc:157
reco::Vertex::yError
double yError() const
error on y
Definition: Vertex.h:126
PrimaryVertexResolution::Resolution::resx_
double resx_
Definition: PrimaryVertexResolution.cc:156