CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GhostTrackPrediction.h
Go to the documentation of this file.
1 #ifndef RecoBTag_GhostTrackPrediction_h
2 #define RecoBTag_GhostTrackPrediction_h
3 
4 #include <cmath>
5 
6 #include <Math/SVector.h>
7 #include <Math/SMatrix.h>
8 
13 
14 class MagneticField;
18 
19 namespace reco {
20 
22  public:
23  // z0, tIP, dz/dr, phi
24 
25  typedef ROOT::Math::SVector<double, 4> Vector;
26  typedef ROOT::Math::SMatrix<double, 4, 4,
27  ROOT::Math::MatRepSym<double, 4> > Error;
28  typedef ROOT::Math::SMatrix<double, 6, 6,
29  ROOT::Math::MatRepSym<double, 6> > CartesianError;
30 
33  prediction_(prediction), covariance_(error)
34  {}
35 
36  GhostTrackPrediction(const GlobalPoint &priorPosition,
37  const GlobalError &priorError,
38  const GlobalVector &direction,
39  double coneRadius);
40 
41  GhostTrackPrediction(const GlobalPoint &priorPosition,
42  const GlobalError &priorError,
43  const GlobalVector &direction,
44  const GlobalError &directionError)
45  { init(priorPosition, priorError, direction, directionError); }
46 
49 
51 
52  double z() const { return prediction_[0]; }
53  double ip() const { return prediction_[1]; }
54  double cotTheta() const { return prediction_[2]; }
55  double phi() const { return prediction_[3]; }
56 
57  double rho2() const { return cotTheta() * cotTheta() + 1.; }
58  double rho() const { return std::sqrt(rho2()); }
59  double sz() const { return z() / rho(); }
60  double theta() const { return M_PI_2 - std::atan(cotTheta()); }
61  double eta() const { return -std::log(rho() - cotTheta()); }
62 
63  const Vector &prediction() const { return prediction_; }
64  const Error &covariance() const { return covariance_; }
65 
66  const GlobalPoint origin() const
67  { return GlobalPoint(-std::sin(phi()) * ip(), std::cos(phi()) * ip(), z()); }
68  const GlobalVector direction() const
69  { return GlobalVector(std::cos(phi()), std::sin(phi()), cotTheta()); }
70 
71  double lambda(const GlobalPoint &point) const
72  { return (point - origin()) * direction() / rho2(); }
73 
74  GlobalPoint position(double lambda = 0.) const
75  { return origin() + lambda * direction(); }
76  GlobalError positionError(double lambda = 0.) const;
77 
78  CartesianError cartesianError(double lambda = 0.) const;
79 
81  const MagneticField *fieldProvider) const;
83 
84  FreeTrajectoryState fts(const MagneticField *fieldProvider) const;
85 
86  Track track(double ndof = 0., double chi2 = 0.) const;
87 
88  private:
89  void init(const GlobalPoint &priorPosition,
90  const GlobalError &priorError,
91  const GlobalVector &direction,
92  const GlobalError &directionError);
93 
96 };
97 
98 }
99 #endif // RecoBTag_GhostTrackPrediction_h
const GlobalPoint origin() const
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > Error
double lambda(const GlobalPoint &point) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
#define M_PI_2
FreeTrajectoryState fts(const MagneticField *fieldProvider) const
GlobalTrajectoryParameters globalTrajectory(const MagneticField *fieldProvider) const
T sqrt(T t)
Definition: SSEVec.h:18
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
CurvilinearTrajectoryError curvilinearError() const
CartesianError cartesianError(double lambda=0.) const
GhostTrackPrediction(const Vector &prediction, const Error &error)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:27
Track track(double ndof=0., double chi2=0.) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
const Vector & prediction() const
const Error & covariance() const
GlobalPoint position(double lambda=0.) const
GhostTrackPrediction(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > CartesianError
ROOT::Math::SVector< double, 4 > Vector
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalError positionError(double lambda=0.) const
const GlobalVector direction() const