test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::TrackGhostTrackState Class Reference

#include <TrackGhostTrackState.h>

Inheritance diagram for reco::TrackGhostTrackState:
reco::BasicGhostTrackState BasicReferenceCounted

Public Member Functions

CovarianceMatrix cartesianCovariance () const
 
GlobalError cartesianError () const
 
GlobalPoint globalPosition () const
 
bool isValid () const
 
bool linearize (const GhostTrackPrediction &pred, bool initial, double lambda)
 
bool linearize (const GhostTrackPrediction &pred, double lambda)
 
void reset ()
 
const TransientTracktrack () const
 
 TrackGhostTrackState (const TransientTrack &track)
 
const TrajectoryStateOnSurfacetsos () const
 
Vertex vertexStateOnGhostTrack (const GhostTrackPrediction &pred, bool withMeasurementError) const
 
Vertex vertexStateOnMeasurement (const GhostTrackPrediction &pred, bool withGhostTrackError) const
 
- Public Member Functions inherited from reco::BasicGhostTrackState
 BasicGhostTrackState ()
 
double lambda () const
 
void setWeight (double weight)
 
double weight () const
 
virtual ~BasicGhostTrackState ()
 
- Public Member Functions inherited from BasicReferenceCounted
void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &)
 
const BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 

Private Member Functions

BasicGhostTrackStateclone () const
 

Private Attributes

TransientTrack track_
 
TrajectoryStateOnSurface tsos_
 

Additional Inherited Members

- Public Types inherited from reco::BasicGhostTrackState
typedef BasicGhostTrackState BGTS
 
typedef math::Error< 3 >::type CovarianceMatrix
 
typedef ProxyBase< BGTS,
CopyUsingClone< BGTS > > 
Proxy
 
typedef std::pair< GlobalPoint,
GlobalError
Vertex
 
- Protected Attributes inherited from reco::BasicGhostTrackState
double lambda_
 
double weight_
 

Detailed Description

Definition at line 19 of file TrackGhostTrackState.h.

Constructor & Destructor Documentation

reco::TrackGhostTrackState::TrackGhostTrackState ( const TransientTrack track)
inline

Definition at line 21 of file TrackGhostTrackState.h.

Referenced by clone().

21 : track_(track) {}
const TransientTrack & track() const

Member Function Documentation

CovarianceMatrix reco::TrackGhostTrackState::cartesianCovariance ( ) const
inlinevirtual

Implements reco::BasicGhostTrackState.

Definition at line 32 of file TrackGhostTrackState.h.

References TrajectoryStateOnSurface::cartesianError(), CartesianTrajectoryError::matrix(), and tsos_.

33  { return tsos_.cartesianError().matrix().Sub<CovarianceMatrix>(0, 0); }
TrajectoryStateOnSurface tsos_
const CartesianTrajectoryError cartesianError() const
const AlgebraicSymMatrix66 & matrix() const
GlobalError reco::TrackGhostTrackState::cartesianError ( ) const
inlinevirtual

Implements reco::BasicGhostTrackState.

Definition at line 30 of file TrackGhostTrackState.h.

References TrajectoryStateOnSurface::cartesianError(), CartesianTrajectoryError::position(), and tsos_.

31  { return tsos_.cartesianError().position(); }
TrajectoryStateOnSurface tsos_
const CartesianTrajectoryError cartesianError() const
const GlobalError position() const
Position error submatrix.
BasicGhostTrackState* reco::TrackGhostTrackState::clone ( void  ) const
inlineprivatevirtual

Implements reco::BasicGhostTrackState.

Definition at line 46 of file TrackGhostTrackState.h.

References TrackGhostTrackState().

47  { return new TrackGhostTrackState(*this); }
TrackGhostTrackState(const TransientTrack &track)
GlobalPoint reco::TrackGhostTrackState::globalPosition ( ) const
inlinevirtual

Implements reco::BasicGhostTrackState.

Definition at line 28 of file TrackGhostTrackState.h.

References TrajectoryStateOnSurface::globalPosition(), and tsos_.

29  { return tsos_.globalPosition(); }
TrajectoryStateOnSurface tsos_
GlobalPoint globalPosition() const
bool reco::TrackGhostTrackState::isValid ( void  ) const
inlinevirtual
bool TrackGhostTrackState::linearize ( const GhostTrackPrediction pred,
bool  initial,
double  lambda 
)
virtual

Reimplemented from reco::BasicGhostTrackState.

Definition at line 44 of file TrackGhostTrackState.cc.

References reco::GhostTrackPrediction::direction(), reco::TransientTrack::field(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), isValid(), reco::BasicGhostTrackState::lambda_, geometryCSVtoXML::line, reco::GhostTrackPrediction::origin(), reco::GhostTrackPrediction::rho2(), track_, and tsos_.

46 {
48 
49  GlobalPoint origin = pred.origin();
50  GlobalVector direction = pred.direction();
51 
52  if (isValid() && !initial) {
53  GlobalPoint pca = origin + lambda_ * direction;
54  Line line(pca, direction);
55  tsos_ = extrap.extrapolate(tsos_, line);
56  } else {
57  GlobalPoint pca = origin + lambda * direction;
58  Line line(pca, direction);
59  tsos_ = extrap.extrapolate(track_.impactPointState(), line);
60  }
61 
62  if (!isValid())
63  return false;
64 
65  lambda_ = (tsos_.globalPosition() - origin) * direction / pred.rho2();
66 
67  return true;
68 }
TrajectoryStateOnSurface tsos_
const GlobalPoint origin() const
Definition: Line.h:10
GlobalPoint globalPosition() const
const MagneticField * field() const
TrajectoryStateOnSurface impactPointState() const
const GlobalVector direction() const
bool TrackGhostTrackState::linearize ( const GhostTrackPrediction pred,
double  lambda 
)
virtual

Reimplemented from reco::BasicGhostTrackState.

Definition at line 70 of file TrackGhostTrackState.cc.

References reco::TransientTrack::field(), reco::TransientTrack::impactPointState(), isValid(), reco::BasicGhostTrackState::lambda(), reco::BasicGhostTrackState::lambda_, point, reco::GhostTrackPrediction::position(), track_, and tsos_.

72 {
74 
76 
77  tsos_ = extrap.extrapolate(track_.impactPointState(), point);
78  if (!isValid())
79  return false;
80 
81  lambda_ = lambda;
82 
83  return true;
84 }
TrajectoryStateOnSurface tsos_
const MagneticField * field() const
GlobalPoint position(double lambda=0.) const
TrajectoryStateOnSurface impactPointState() const
*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
void reco::TrackGhostTrackState::reset ( void  )
inlinevirtual

Reimplemented from reco::BasicGhostTrackState.

Definition at line 35 of file TrackGhostTrackState.h.

References tsos_.

const TransientTrack& reco::TrackGhostTrackState::track ( ) const
inline

Definition at line 23 of file TrackGhostTrackState.h.

References track_.

Referenced by reco::GhostTrackState::track().

23 { return track_; }
const TrajectoryStateOnSurface& reco::TrackGhostTrackState::tsos ( ) const
inline

Definition at line 24 of file TrackGhostTrackState.h.

References tsos_.

Referenced by reco::GhostTrackState::tsos().

24 { return tsos_; }
TrajectoryStateOnSurface tsos_
BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnGhostTrack ( const GhostTrackPrediction pred,
bool  withMeasurementError 
) const
virtual

Implements reco::BasicGhostTrackState.

Definition at line 86 of file TrackGhostTrackState.cc.

References b, reco::GhostTrackPrediction::cartesianError(), TrajectoryStateOnSurface::cartesianError(), conv, ztail::d, reco::GhostTrackPrediction::direction(), relativeConstraints::error, g, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), isValid(), prof2calltree::l, reco::BasicGhostTrackState::lambda(), PV3DBase< T, PVType, FrameType >::mag(), CartesianTrajectoryError::matrix(), reco::GhostTrackPrediction::origin(), rho, reco::GhostTrackPrediction::rho2(), funct::sqr(), mathSSE::sqrt(), and tsos_.

88 {
89  using namespace ROOT::Math;
90 
91  if (!isValid())
92  return Vertex();
93 
94  GlobalPoint origin = pred.origin();
95  GlobalVector direction = pred.direction();
96 
97  double rho2 = pred.rho2();
98  double rho = std::sqrt(rho2);
99  double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
100  GlobalPoint pos = origin + lambda * direction;
101 
102  GlobalVector momentum = tsos_.globalMomentum();
103  double mom = momentum.mag();
104 
105  Vector3 b = conv(direction) / rho;
106  Vector3 d = conv(momentum) / mom;
107  double l = Dot(b, d);
108  double g = 1. / (1. - sqr(l));
109 
110  Vector3 ca = conv(pos - tsos_.globalPosition());
111  Vector3 bd = b - l * d;
112  b *= g;
113 
114  Matrix33 pA = TensorProd(b, bd);
115  Matrix33 pB = TensorProd(b, ca);
116 
117  Matrix36 jacobian;
118  jacobian.Place_at(-pA + Matrix33(SMatrixIdentity()), 0, 0);
119  jacobian.Place_at(pB / rho, 0, 3);
120  Matrix3S error = Similarity(jacobian, pred.cartesianError(lambda));
121 
122  if (withMeasurementError) {
123  jacobian.Place_at(pA, 0, 0);
124  jacobian.Place_at(-pB / mom, 0, 3);
125  error += Similarity(jacobian, tsos_.cartesianError().matrix());
126  }
127 
128  return Vertex(pos, error);
129 }
std::pair< GlobalPoint, GlobalError > Vertex
TrajectoryStateOnSurface tsos_
const GlobalPoint origin() const
static HepMC::IO_HEPEVT conv
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
tuple d
Definition: ztail.py:151
T mag() const
Definition: PV3DBase.h:67
T sqrt(T t)
Definition: SSEVec.h:48
CartesianError cartesianError(double lambda=0.) const
const AlgebraicSymMatrix66 & matrix() const
double b
Definition: hdecay.h:120
GlobalVector globalMomentum() const
Square< F >::type sqr(const F &f)
Definition: Square.h:13
const GlobalVector direction() const
BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnMeasurement ( const GhostTrackPrediction pred,
bool  withGhostTrackError 
) const
virtual

Implements reco::BasicGhostTrackState.

Definition at line 131 of file TrackGhostTrackState.cc.

References b, reco::GhostTrackPrediction::cartesianError(), TrajectoryStateOnSurface::cartesianError(), conv, ztail::d, reco::GhostTrackPrediction::direction(), relativeConstraints::error, g, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), isValid(), prof2calltree::l, reco::BasicGhostTrackState::lambda(), PV3DBase< T, PVType, FrameType >::mag(), CartesianTrajectoryError::matrix(), reco::GhostTrackPrediction::origin(), rho, reco::GhostTrackPrediction::rho2(), funct::sqr(), mathSSE::sqrt(), and tsos_.

133 {
134  using namespace ROOT::Math;
135 
136  if (!isValid())
137  return Vertex();
138 
139  GlobalPoint origin = pred.origin();
140  GlobalVector direction = pred.direction();
141 
142  double rho2 = pred.rho2();
143  double rho = std::sqrt(rho2);
144  double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
145  GlobalPoint pos = origin + lambda * direction;
146 
147  GlobalVector momentum = tsos_.globalMomentum();
148  double mom = momentum.mag();
149 
150  Vector3 b = conv(direction) / rho;
151  Vector3 d = conv(momentum) / mom;
152  double l = Dot(b, d);
153  double g = 1. / (1. - sqr(l));
154 
155  Vector3 ca = conv(tsos_.globalPosition() - pos);
156  Vector3 bd = l * b - d;
157  d *= g;
158 
159  Matrix33 pC = TensorProd(d, bd);
160  Matrix33 pD = TensorProd(d, ca);
161 
162  Matrix36 jacobian;
163  jacobian.Place_at(pC + Matrix33(SMatrixIdentity()), 0, 0);
164  jacobian.Place_at(pD / mom, 0, 3);
165  Matrix3S error = Similarity(jacobian, tsos_.cartesianError().matrix());
166 
167  if (withGhostTrackError) {
168  jacobian.Place_at(-pC, 0, 0);
169  jacobian.Place_at(-pD / rho, 0, 3);
170  error += Similarity(jacobian, pred.cartesianError(lambda));
171  }
172 
173  return Vertex(tsos_.globalPosition(), error);
174 }
std::pair< GlobalPoint, GlobalError > Vertex
TrajectoryStateOnSurface tsos_
const GlobalPoint origin() const
static HepMC::IO_HEPEVT conv
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
tuple d
Definition: ztail.py:151
T mag() const
Definition: PV3DBase.h:67
T sqrt(T t)
Definition: SSEVec.h:48
CartesianError cartesianError(double lambda=0.) const
const AlgebraicSymMatrix66 & matrix() const
double b
Definition: hdecay.h:120
GlobalVector globalMomentum() const
Square< F >::type sqr(const F &f)
Definition: Square.h:13
const GlobalVector direction() const

Member Data Documentation

TransientTrack reco::TrackGhostTrackState::track_
private

Definition at line 50 of file TrackGhostTrackState.h.

Referenced by linearize(), and track().

TrajectoryStateOnSurface reco::TrackGhostTrackState::tsos_
private