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
reco::GhostTrackPrediction::GhostTrackPrediction
GhostTrackPrediction(const Vector &prediction, const Error &error)
Definition: GhostTrackPrediction.h:30
reco::GhostTrackPrediction::positionError
GlobalError positionError(double lambda=0.) const
Definition: GhostTrackPrediction.cc:131
reco::GhostTrackPrediction::CartesianError
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > CartesianError
Definition: GhostTrackPrediction.h:27
reco::GhostTrackPrediction::rho
double rho() const
Definition: GhostTrackPrediction.h:54
reco::GhostTrackPrediction::covariance_
Error covariance_
Definition: GhostTrackPrediction.h:86
reco::GhostTrackPrediction::theta
double theta() const
Definition: GhostTrackPrediction.h:56
reco::GhostTrackPrediction::phi
double phi() const
Definition: GhostTrackPrediction.h:51
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
reco::GhostTrackPrediction::track
Track track(double ndof=0., double chi2=0.) const
Definition: GhostTrackPrediction.cc:189
relativeConstraints.error
error
Definition: relativeConstraints.py:53
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
ndof
Definition: HIMultiTrackSelector.h:49
reco::GhostTrackPrediction::GhostTrackPrediction
GhostTrackPrediction()
Definition: GhostTrackPrediction.h:29
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
reco::GhostTrackPrediction::prediction
const Vector & prediction() const
Definition: GhostTrackPrediction.h:59
TrackFwd.h
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Track
Definition: Track.h:27
reco::GhostTrackPrediction::ip
double ip() const
Definition: GhostTrackPrediction.h:49
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
reco::GhostTrackPrediction::z
double z() const
Definition: GhostTrackPrediction.h:48
reco::GhostTrackPrediction::Vector
ROOT::Math::SVector< double, 4 > Vector
Definition: GhostTrackPrediction.h:25
reco::GhostTrackPrediction::cotTheta
double cotTheta() const
Definition: GhostTrackPrediction.h:50
reco::GhostTrackPrediction::direction
const GlobalVector direction() const
Definition: GhostTrackPrediction.h:63
reco::GhostTrackPrediction::fts
FreeTrajectoryState fts(const MagneticField *fieldProvider) const
Definition: GhostTrackPrediction.cc:185
reco::GhostTrackPrediction::position
GlobalPoint position(double lambda=0.) const
Definition: GhostTrackPrediction.h:67
reco::GhostTrackPrediction::rho2
double rho2() const
Definition: GhostTrackPrediction.h:53
math::GlobalVector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:28
reco::GhostTrackPrediction::covariance
const Error & covariance() const
Definition: GhostTrackPrediction.h:60
GlobalError.h
GlobalErrorBase< double, ErrorMatrixTag >
reco::GhostTrackPrediction::sz
double sz() const
Definition: GhostTrackPrediction.h:55
reco::GhostTrackPrediction::eta
double eta() const
Definition: GhostTrackPrediction.h:57
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
GlobalVector.h
reco::GhostTrackPrediction::origin
const GlobalPoint origin() const
Definition: GhostTrackPrediction.h:62
reco::GhostTrackPrediction::prediction_
Vector prediction_
Definition: GhostTrackPrediction.h:85
reco::GhostTrackPrediction::cartesianError
CartesianError cartesianError(double lambda=0.) const
Definition: GhostTrackPrediction.cc:146
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
math::GlobalPoint
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
reco::GhostTrackPrediction
Definition: GhostTrackPrediction.h:21
M_PI_2
#define M_PI_2
Definition: CSCGattiFunction.cc:6
point
*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
MagneticField
Definition: MagneticField.h:19
reco::GhostTrackPrediction::globalTrajectory
GlobalTrajectoryParameters globalTrajectory(const MagneticField *fieldProvider) const
Definition: GhostTrackPrediction.cc:164
GlobalPoint.h
reco::GhostTrackPrediction::Error
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > Error
Definition: GhostTrackPrediction.h:26
reco::GhostTrackPrediction::init
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
Definition: GhostTrackPrediction.cc:58
reco::GhostTrackPrediction::curvilinearError
CurvilinearTrajectoryError curvilinearError() const
Definition: GhostTrackPrediction.cc:168
reco::GhostTrackPrediction::GhostTrackPrediction
GhostTrackPrediction(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
Definition: GhostTrackPrediction.h:37
reco::GhostTrackPrediction::lambda
double lambda(const GlobalPoint &point) const
Definition: GhostTrackPrediction.h:65