CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
ThirdHitZPrediction Class Reference

#include <ThirdHitZPrediction.h>

Public Types

typedef PixelRecoRange< float > Range
 

Public Member Functions

Range operator() (const GlobalPoint &p3, float erroRPhi3) const
 
 ThirdHitZPrediction (const GlobalPoint &p1, float erroRPhi1, float errorZ1, const GlobalPoint &p2, float erroRPhi2, float errorZ2, double curvature, double nSigma=3.)
 

Private Attributes

double dR12
 
double dS12
 
double dZ12
 
double sqr_errorXY12
 
double sqr_errorXY2
 
double theCurvature
 
double theErrorZ1
 
double theErrorZ2
 
double theNSigma
 
GlobalPoint thePoint2
 

Detailed Description

Definition at line 8 of file ThirdHitZPrediction.h.

Member Typedef Documentation

◆ Range

Definition at line 10 of file ThirdHitZPrediction.h.

Constructor & Destructor Documentation

◆ ThirdHitZPrediction()

ThirdHitZPrediction::ThirdHitZPrediction ( const GlobalPoint p1,
float  erroRPhi1,
float  errorZ1,
const GlobalPoint p2,
float  erroRPhi2,
float  errorZ2,
double  curvature,
double  nSigma = 3. 
)
inline

Definition at line 11 of file ThirdHitZPrediction.h.

19  : thePoint2(p2),
20  sqr_errorXY12(erroRPhi1 * erroRPhi1 + erroRPhi2 * erroRPhi2),
21  sqr_errorXY2(erroRPhi2 * erroRPhi2),
22  theErrorZ1(errorZ1),
23  theErrorZ2(errorZ2),
25  theNSigma(nSigma) {
26  auto d = p2 - p1;
27  dR12 = d.perp();
28  if (dR12 < 1.e-5)
29  dR12 = 1.e-5;
30  dS12 = std::abs(0.5 * dR12 * theCurvature) < 1 ? std::asin(0.5 * dR12 * theCurvature) : 1.;
31  dZ12 = d.z();
32  }

References funct::abs(), ztail::d, dR12, dS12, dZ12, MillePedeFileConverter_cfg::e, p1, p2, and theCurvature.

Member Function Documentation

◆ operator()()

ThirdHitZPrediction::Range ThirdHitZPrediction::operator() ( const GlobalPoint p3,
float  erroRPhi3 
) const

Definition at line 10 of file ThirdHitZPrediction.cc.

10  {
11  double dR23 = (thePoint3 - thePoint2).perp();
12 
13  double slope = dR23 / dR12;
14  if ((theCurvature > 1.e-4) && (std::abs(0.5 * dR23 * theCurvature) < 1.))
15  slope = std::asin(0.5 * dR23 * theCurvature) / dS12;
16 
17  double z3 = thePoint2.z() + dZ12 * slope;
18 
19  double sqr_errorXY23 = sqr_errorXY2 + sqr(erroRPhi3);
20  double error = sqrt(sqr((1 + dR23 / dR12) * theErrorZ2) + sqr(dR23 / dR12 * theErrorZ1) +
21  sqr(dZ12 / dR12) * sqr_errorXY23 + sqr((dZ12 / dR12) * (dR23 / dR12)) * sqr_errorXY12);
22  error *= theNSigma;
23  return Range(z3 - error, z3 + error);
24 }

References funct::abs(), dR12, dS12, dZ12, MillePedeFileConverter_cfg::e, relativeConstraints::error, perp(), slope, sqr(), sqr_errorXY12, sqr_errorXY2, mathSSE::sqrt(), theCurvature, theErrorZ1, theErrorZ2, theNSigma, thePoint2, and PV3DBase< T, PVType, FrameType >::z().

Member Data Documentation

◆ dR12

double ThirdHitZPrediction::dR12
private

Definition at line 37 of file ThirdHitZPrediction.h.

Referenced by operator()(), and ThirdHitZPrediction().

◆ dS12

double ThirdHitZPrediction::dS12
private

Definition at line 37 of file ThirdHitZPrediction.h.

Referenced by operator()(), and ThirdHitZPrediction().

◆ dZ12

double ThirdHitZPrediction::dZ12
private

Definition at line 37 of file ThirdHitZPrediction.h.

Referenced by operator()(), and ThirdHitZPrediction().

◆ sqr_errorXY12

double ThirdHitZPrediction::sqr_errorXY12
private

Definition at line 38 of file ThirdHitZPrediction.h.

Referenced by operator()().

◆ sqr_errorXY2

double ThirdHitZPrediction::sqr_errorXY2
private

Definition at line 39 of file ThirdHitZPrediction.h.

Referenced by operator()().

◆ theCurvature

double ThirdHitZPrediction::theCurvature
private

Definition at line 41 of file ThirdHitZPrediction.h.

Referenced by operator()(), and ThirdHitZPrediction().

◆ theErrorZ1

double ThirdHitZPrediction::theErrorZ1
private

Definition at line 40 of file ThirdHitZPrediction.h.

Referenced by operator()().

◆ theErrorZ2

double ThirdHitZPrediction::theErrorZ2
private

Definition at line 40 of file ThirdHitZPrediction.h.

Referenced by operator()().

◆ theNSigma

double ThirdHitZPrediction::theNSigma
private

Definition at line 42 of file ThirdHitZPrediction.h.

Referenced by operator()().

◆ thePoint2

GlobalPoint ThirdHitZPrediction::thePoint2
private

Definition at line 36 of file ThirdHitZPrediction.h.

Referenced by operator()().

ThirdHitZPrediction::Range
PixelRecoRange< float > Range
Definition: ThirdHitZPrediction.h:10
ThirdHitZPrediction::theCurvature
double theCurvature
Definition: ThirdHitZPrediction.h:41
ThirdHitZPrediction::sqr_errorXY2
double sqr_errorXY2
Definition: ThirdHitZPrediction.h:39
ThirdHitZPrediction::sqr_errorXY12
double sqr_errorXY12
Definition: ThirdHitZPrediction.h:38
sqr
int sqr(const T &t)
Definition: pfalgo_common_ref.h:9
ThirdHitZPrediction::dR12
double dR12
Definition: ThirdHitZPrediction.h:37
PixelRecoUtilities::curvature
T curvature(T InversePt, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:42
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
relativeConstraints.error
error
Definition: relativeConstraints.py:53
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ThirdHitZPrediction::theNSigma
double theNSigma
Definition: ThirdHitZPrediction.h:42
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
p2
double p2[4]
Definition: TauolaWrapper.h:90
p1
double p1[4]
Definition: TauolaWrapper.h:89
ThirdHitZPrediction::theErrorZ2
double theErrorZ2
Definition: ThirdHitZPrediction.h:40
ThirdHitZPrediction::dS12
double dS12
Definition: ThirdHitZPrediction.h:37
ThirdHitZPrediction::theErrorZ1
double theErrorZ1
Definition: ThirdHitZPrediction.h:40
ztail.d
d
Definition: ztail.py:151
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6
HLTSiStripMonitoring_cff.nSigma
nSigma
Definition: HLTSiStripMonitoring_cff.py:151
ThirdHitZPrediction::thePoint2
GlobalPoint thePoint2
Definition: ThirdHitZPrediction.h:36
ThirdHitZPrediction::dZ12
double dZ12
Definition: ThirdHitZPrediction.h:37
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37