CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 theCurvature
 
double theErrorXY1
 
double theErrorXY2
 
double theErrorZ1
 
double theErrorZ2
 
double theNSigma
 
GlobalPoint thePoint1
 
GlobalPoint thePoint2
 

Detailed Description

Definition at line 8 of file ThirdHitZPrediction.h.

Member Typedef Documentation

Definition at line 10 of file ThirdHitZPrediction.h.

Constructor & Destructor Documentation

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

Definition at line 4 of file ThirdHitZPrediction.cc.

8  :
9  thePoint1(p1), thePoint2(p2),
10  theErrorXY1(erroRPhi1), theErrorZ1(errorZ1),
11  theErrorXY2(erroRPhi2), theErrorZ2(errorZ2),
13 {}
T curvature(T InversePt, const edm::EventSetup &iSetup)

Member Function Documentation

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

Definition at line 15 of file ThirdHitZPrediction.cc.

References alignCSCRings::e, error, perp(), slope, funct::sqr(), mathSSE::sqrt(), theCurvature, theErrorXY1, theErrorXY2, theErrorZ1, theErrorZ2, theNSigma, thePoint1, thePoint2, and PV3DBase< T, PVType, FrameType >::z().

17 {
18  double dR12 = (thePoint2-thePoint1).perp();
19  if (dR12 < 1.e-5) dR12 = 1.e-5;
20  double dR23 = (thePoint3-thePoint2).perp();
21  double dZ12 = thePoint2.z()-thePoint1.z();
22 
23  double slope = dR23/dR12;
24  if ( (theCurvature > 1.e-4)
25  && (fabs(dR23/2.*theCurvature) < 1.)
26  && (fabs(dR12/2.*theCurvature) <1.)
27  ) slope = asin(dR23/2.*theCurvature)/asin(dR12/2.*theCurvature);
28 
29  double z3 = thePoint2.z() + dZ12*slope;
30 
31  double sqr_errorXY12 = sqr(theErrorXY1)+sqr(theErrorXY2);
32  double sqr_errorXY23 = sqr(theErrorXY2)+sqr(erroRPhi3);
33  double error = sqrt( sqr( (1+dR23/dR12)*theErrorZ2 )
34  + sqr( dR23/dR12 * theErrorZ1 )
35  + sqr(dZ12/dR12 )*sqr_errorXY23
36  + sqr(dZ12*dR23/dR12/dR12)*sqr_errorXY12
37  );
38  error *= theNSigma;
39  return Range(z3-error,z3+error);
40 }
PixelRecoRange< float > Range
static const double slope[3]
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
T perp() const
Magnitude of transverse component.
Square< F >::type sqr(const F &f)
Definition: Square.h:13

Member Data Documentation

double ThirdHitZPrediction::theCurvature
private

Definition at line 18 of file ThirdHitZPrediction.h.

Referenced by operator()().

double ThirdHitZPrediction::theErrorXY1
private

Definition at line 17 of file ThirdHitZPrediction.h.

Referenced by operator()().

double ThirdHitZPrediction::theErrorXY2
private

Definition at line 17 of file ThirdHitZPrediction.h.

Referenced by operator()().

double ThirdHitZPrediction::theErrorZ1
private

Definition at line 17 of file ThirdHitZPrediction.h.

Referenced by operator()().

double ThirdHitZPrediction::theErrorZ2
private

Definition at line 17 of file ThirdHitZPrediction.h.

Referenced by operator()().

double ThirdHitZPrediction::theNSigma
private

Definition at line 19 of file ThirdHitZPrediction.h.

Referenced by operator()().

GlobalPoint ThirdHitZPrediction::thePoint1
private

Definition at line 16 of file ThirdHitZPrediction.h.

Referenced by operator()().

GlobalPoint ThirdHitZPrediction::thePoint2
private

Definition at line 16 of file ThirdHitZPrediction.h.

Referenced by operator()().