CMS 3D CMS Logo

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, ROOT::Math::MatRepSym<double, 4> > Error;
27  typedef ROOT::Math::SMatrix<double, 6, 6, ROOT::Math::MatRepSym<double, 6> > CartesianError;
28 
31 
32  GhostTrackPrediction(const GlobalPoint &priorPosition,
33  const GlobalError &priorError,
34  const GlobalVector &direction,
35  double coneRadius);
36 
37  GhostTrackPrediction(const GlobalPoint &priorPosition,
38  const GlobalError &priorError,
39  const GlobalVector &direction,
40  const GlobalError &directionError) {
41  init(priorPosition, priorError, direction, directionError);
42  }
43 
45 
47 
48  double z() const { return prediction_[0]; }
49  double ip() const { return prediction_[1]; }
50  double cotTheta() const { return prediction_[2]; }
51  double phi() const { return prediction_[3]; }
52 
53  double rho2() const { return cotTheta() * cotTheta() + 1.; }
54  double rho() const { return std::sqrt(rho2()); }
55  double sz() const { return z() / rho(); }
56  double theta() const { return M_PI_2 - std::atan(cotTheta()); }
57  double eta() const { return -std::log(rho() - cotTheta()); }
58 
59  const Vector &prediction() const { return prediction_; }
60  const Error &covariance() const { return covariance_; }
61 
62  const GlobalPoint origin() const { return GlobalPoint(-std::sin(phi()) * ip(), std::cos(phi()) * ip(), z()); }
63  const GlobalVector direction() const { return GlobalVector(std::cos(phi()), std::sin(phi()), cotTheta()); }
64 
65  double lambda(const GlobalPoint &point) const { return (point - origin()) * direction() / rho2(); }
66 
67  GlobalPoint position(double lambda = 0.) const { return origin() + lambda * direction(); }
68  GlobalError positionError(double lambda = 0.) const;
69 
70  CartesianError cartesianError(double lambda = 0.) const;
71 
72  GlobalTrajectoryParameters globalTrajectory(const MagneticField *fieldProvider) const;
74 
75  FreeTrajectoryState fts(const MagneticField *fieldProvider) const;
76 
77  Track track(double ndof = 0., double chi2 = 0.) const;
78 
79  private:
80  void init(const GlobalPoint &priorPosition,
81  const GlobalError &priorError,
82  const GlobalVector &direction,
83  const GlobalError &directionError);
84 
87  };
88 
89 } // namespace reco
90 #endif // RecoBTag_GhostTrackPrediction_h
const Vector & prediction() const
FreeTrajectoryState fts(const MagneticField *fieldProvider) const
Track track(double ndof=0., double chi2=0.) const
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > Error
GlobalPoint position(double lambda=0.) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
#define M_PI_2
GlobalTrajectoryParameters globalTrajectory(const MagneticField *fieldProvider) const
const GlobalVector direction() const
GlobalError positionError(double lambda=0.) const
T sqrt(T t)
Definition: SSEVec.h:23
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)
CartesianError cartesianError(double lambda=0.) const
GhostTrackPrediction(const Vector &prediction, const Error &error)
CurvilinearTrajectoryError curvilinearError() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:28
const GlobalPoint origin() const
double lambda(const GlobalPoint &point) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
fixed size matrix
GhostTrackPrediction(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
const Error & covariance() const
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