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 Member Functions | Private Attributes | Friends
PerigeeLinearizedTrackState Class Reference

#include <PerigeeLinearizedTrackState.h>

Inheritance diagram for PerigeeLinearizedTrackState:
LinearizedTrackState< 5 > ReferenceCounted

Public Types

typedef
ReferenceCountingPointer
< LinearizedTrackState< 5 > > 
RefCountedLinearizedTrackState
 
- Public Types inherited from LinearizedTrackState< 5 >
typedef ROOT::Math::SMatrix
< double, N-2,
3, ROOT::Math::MatRepStd
< double, N-2, 3 > > 
AlgebraicMatrixM3
 
typedef ROOT::Math::SMatrix
< double, N,
3, ROOT::Math::MatRepStd
< double, N, 3 > > 
AlgebraicMatrixN3
 
typedef ROOT::Math::SMatrix
< double, N, N-2,
ROOT::Math::MatRepStd< double,
N, N-2 > > 
AlgebraicMatrixNM
 
typedef ROOT::Math::SMatrix
< double, N-2, N-2,
ROOT::Math::MatRepSym< double,
N-2 > > 
AlgebraicSymMatrixMM
 
typedef ROOT::Math::SMatrix
< double, N, N,
ROOT::Math::MatRepSym< double,
N > > 
AlgebraicSymMatrixNN
 
typedef ROOT::Math::SMatrix
< double, N+1, N+1,
ROOT::Math::MatRepSym< double,
N+1 > > 
AlgebraicSymMatrixOO
 
typedef ROOT::Math::SVector
< double, N-2 > 
AlgebraicVectorM
 
typedef ROOT::Math::SVector
< double, N
AlgebraicVectorN
 
typedef
ReferenceCountingPointer
< RefittedTrackState< N > > 
RefCountedRefittedTrackState
 

Public Member Functions

TrackCharge charge () const
 
virtual void checkParameters (AlgebraicVector5 &parameters) const
 
virtual std::vector
< ReferenceCountingPointer
< LinearizedTrackState< 5 > > > 
components () const
 
const AlgebraicVector5constantTerm () const
 
virtual
RefCountedRefittedTrackState 
createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVector3 &vectorParameters, const AlgebraicSymMatrix66 &covarianceMatrix) const
 
bool hasError () const
 
virtual bool isValid () const
 
const GlobalPointlinearizationPoint () const
 
const AlgebraicMatrix53momentumJacobian () const
 
bool operator== (LinearizedTrackState< 5 > &other) const
 
bool operator== (ReferenceCountingPointer< LinearizedTrackState< 5 > > &other) const
 
const AlgebraicVector5parametersFromExpansion () const
 
const AlgebraicMatrix53positionJacobian () const
 
const
TrajectoryStateClosestToPoint
predictedState () const
 
AlgebraicSymMatrix55 predictedStateError () const
 
AlgebraicSymMatrix33 predictedStateMomentumError () const
 
virtual AlgebraicVector3 predictedStateMomentumParameters () const
 
AlgebraicVector5 predictedStateParameters () const
 
AlgebraicSymMatrix55 predictedStateWeight (int &error) const
 
virtual AlgebraicVector5 refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const
 
const TrajectoryStateOnSurface state () const
 
virtual
RefCountedLinearizedTrackState 
stateWithNewLinearizationPoint (const GlobalPoint &newLP) const
 
virtual reco::TransientTrack track () const
 
virtual double weightInMixture () const
 
- Public Member Functions inherited from LinearizedTrackState< 5 >
virtual void checkParameters (AlgebraicVectorN &parameters) const
 
virtual
RefCountedRefittedTrackState 
createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const =0
 
virtual bool operator== (LinearizedTrackState< N > &other) const =0
 
virtual ~LinearizedTrackState ()
 

Private Member Functions

void compute3DImpactPoint () const
 
void computeChargedJacobians () const
 
void computeJacobians () const
 
void computeNeutralJacobians () const
 
 PerigeeLinearizedTrackState (const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
 

Private Attributes

TSCPBuilderNoMaterial builder
 
bool jacobiansAvailable
 
TrackCharge theCharge
 
AlgebraicVector5 theConstantTerm
 
AlgebraicVector5 theExpandedParams
 
GlobalPoint theLinPoint
 
AlgebraicMatrix53 theMomentumJacobian
 
AlgebraicMatrix53 thePositionJacobian
 
TrajectoryStateClosestToPoint thePredState
 
reco::TransientTrack theTrack
 
const TrajectoryStateOnSurface theTSOS
 

Friends

class LinearizedTrackStateFactory
 

Detailed Description

Calculates and stores the ImpactPointMeasurement of the impact point (point of closest approach in 3D) to the given linearization point. (see V.Karimaki, HIP-1997-77 / EXP)

Computes the parameters of the trajectory state at the transverse point of closest approach (in the global transverse plane) to the linearization point, and the jacobiam matrices. (see R.Fruehwirth et al. Data Analysis Techniques in HEP Experiments Second Edition, Cambridge University Press 2000, or R.Fruehwirth et al. Vertex reconstruction and track bundling at the LEP collider using robust algorithms. Computer Physics Communications 96 (1996) 189-208).

Both are done `on-demand' to improve CPU performance.

This particular implementation works with "perigee" helix parametrization: see Billoir et al. NIM in PR A311(1992) 139-150

Definition at line 32 of file PerigeeLinearizedTrackState.h.

Member Typedef Documentation

Definition at line 41 of file PerigeeLinearizedTrackState.h.

Constructor & Destructor Documentation

PerigeeLinearizedTrackState::PerigeeLinearizedTrackState ( const GlobalPoint linP,
const reco::TransientTrack track,
const TrajectoryStateOnSurface tsos 
)
inlineprivate

Constructor with the linearization point and the track. Private, can only be used by LinearizedTrackFactory.

Definition at line 149 of file PerigeeLinearizedTrackState.h.

151  : theLinPoint(linP), theTrack(track), jacobiansAvailable(false),
152  // impactPointAvailable(false),
153  theCharge(theTrack.charge()), theTSOS(tsos) {}
TrackCharge charge() const
const TrajectoryStateOnSurface theTSOS

Member Function Documentation

TrackCharge PerigeeLinearizedTrackState::charge ( void  ) const
inlinevirtual

Method returning the impact point measurement

Implements LinearizedTrackState< 5 >.

Definition at line 115 of file PerigeeLinearizedTrackState.h.

References theCharge.

Referenced by createRefittedTrackState().

void PerigeeLinearizedTrackState::checkParameters ( AlgebraicVector5 parameters) const
inlinevirtual

Definition at line 223 of file PerigeeLinearizedTrackState.cc.

References M_PI, and Parameters::parameters.

224 {
225  if (parameters(2) > M_PI) parameters(2)-= 2*M_PI;
226  if (parameters(2) < -M_PI) parameters(2)+= 2*M_PI;
227 }
dictionary parameters
Definition: Parameters.py:2
#define M_PI
Definition: BFit3D.cc:3
std::vector< PerigeeLinearizedTrackState::RefCountedLinearizedTrackState > PerigeeLinearizedTrackState::components ( ) const
virtual

Implements LinearizedTrackState< 5 >.

Definition at line 192 of file PerigeeLinearizedTrackState.cc.

References query::result.

193 {
194  std::vector<RefCountedLinearizedTrackState> result; result.reserve(1);
195  result.push_back(RefCountedLinearizedTrackState(
196  const_cast<PerigeeLinearizedTrackState*>(this)));
197  return result;
198 }
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
tuple result
Definition: query.py:137
void PerigeeLinearizedTrackState::compute3DImpactPoint ( ) const
private

Method calculating the 3D impact point measurement

void PerigeeLinearizedTrackState::computeChargedJacobians ( ) const
private

Method calculating the track parameters and the Jacobians for charged particles.

Definition at line 229 of file PerigeeLinearizedTrackState.cc.

References abs, funct::cos(), reco::TransientTrack::field(), MagneticField::inInverseGeV(), M_PI, FreeTrajectoryState::momentum(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), funct::sin(), mathSSE::sqrt(), funct::tan(), theCharge, theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, TrajectoryStateClosestToPoint::theState(), PV3DBase< T, PVType, FrameType >::theta(), theTrack, X, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeJacobians().

230 {
231  GlobalPoint paramPt(theLinPoint);
232  //tarjectory parameters
233  double field = theTrack.field()->inInverseGeV(thePredState.theState().position()).z();
234  double signTC = -theCharge;
235 
236  double thetaAtEP = thePredState.theState().momentum().theta();
237  double phiAtEP = thePredState.theState().momentum().phi();
238  double ptAtEP = thePredState.theState().momentum().perp();
239  double transverseCurvatureAtEP = field / ptAtEP*signTC;
240 
241  double x_v = thePredState.theState().position().x();
242  double y_v = thePredState.theState().position().y();
243  double z_v = thePredState.theState().position().z();
244  double X = x_v - paramPt.x() - sin(phiAtEP) / transverseCurvatureAtEP;
245  double Y = y_v - paramPt.y() + cos(phiAtEP) / transverseCurvatureAtEP;
246  double SS = X*X + Y*Y;
247  double S = sqrt(SS);
248 
249  // The track parameters at the expansion point
250 
251  theExpandedParams[0] = transverseCurvatureAtEP;
252  theExpandedParams[1] = thetaAtEP;
253  theExpandedParams[3] = 1/transverseCurvatureAtEP - signTC * S;
254  double phiFEP;
255  if (std::abs(X)>std::abs(Y)) {
256  double signX = (X>0.0? +1.0:-1.0);
257  phiFEP = -signTC * signX*acos(signTC*Y/S);
258  } else {
259  phiFEP = asin(-signTC*X/S);
260  if ((signTC*Y)<0.0)
261  phiFEP = M_PI - phiFEP;
262  }
263  if (phiFEP>M_PI) phiFEP-= 2*M_PI;
264  theExpandedParams[2] = phiFEP;
265  theExpandedParams[4] = z_v - paramPt.z() -
266  (phiAtEP - theExpandedParams[2]) / tan(thetaAtEP)/transverseCurvatureAtEP;
267 
268  // The Jacobian: (all at the expansion point)
269  // [i,j]
270  // i = 0: rho , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
271  // j = 0: x_v, 1: y_v, 2: z_v
272 
273  thePositionJacobian(2,0) = - Y / (SS);
274  thePositionJacobian(2,1) = X / (SS);
275  thePositionJacobian(3,0) = - signTC * X / S;
276  thePositionJacobian(3,1) = - signTC * Y / S;
277  thePositionJacobian(4,0) = thePositionJacobian(2,0)/tan(thetaAtEP)/transverseCurvatureAtEP;
278  thePositionJacobian(4,1) = thePositionJacobian(2,1)/tan(thetaAtEP)/transverseCurvatureAtEP;
279  thePositionJacobian(4,2) = 1;
280 
281  // [i,j]
282  // i = 0: rho , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
283  // j = 0: rho, 1: theta, 2: phi_v
284  theMomentumJacobian(0,0) = 1;
285  theMomentumJacobian(1,1) = 1;
286 
287  theMomentumJacobian(2,0) = -
288  (X*cos(phiAtEP) + Y*sin(phiAtEP))/
289  (SS*transverseCurvatureAtEP*transverseCurvatureAtEP);
290 
291  theMomentumJacobian(2,2) = (Y*cos(phiAtEP) - X*sin(phiAtEP)) /
292  (SS*transverseCurvatureAtEP);
293 
294  theMomentumJacobian(3,0) =
295  (signTC * (Y*cos(phiAtEP) - X*sin(phiAtEP)) / S - 1)/
296  (transverseCurvatureAtEP*transverseCurvatureAtEP);
297 
298  theMomentumJacobian(3,2) = signTC *(X*cos(phiAtEP) + Y*sin(phiAtEP))/
299  (S*transverseCurvatureAtEP);
300 
301  theMomentumJacobian(4,0) = (phiAtEP - theExpandedParams[2]) /
302  tan(thetaAtEP)/(transverseCurvatureAtEP*transverseCurvatureAtEP)+
303  theMomentumJacobian(2,0) / tan(thetaAtEP)/transverseCurvatureAtEP;
304 
305  theMomentumJacobian(4,1) = (phiAtEP - theExpandedParams[2]) *
306  (1 + 1/(tan(thetaAtEP)*tan(thetaAtEP)))/transverseCurvatureAtEP;
307 
308  theMomentumJacobian(4,2) = (theMomentumJacobian(2,2) - 1) /
309  tan(thetaAtEP)/transverseCurvatureAtEP;
310 
311  // And finally the residuals:
312 
313  AlgebraicVector3 expansionPoint;
314  expansionPoint(0) = thePredState.theState().position().x();
315  expansionPoint(1) = thePredState.theState().position().y();
316  expansionPoint(2) = thePredState.theState().position().z();
317  AlgebraicVector3 momentumAtExpansionPoint;
318  momentumAtExpansionPoint(0) = transverseCurvatureAtEP; // Transverse Curv
319  momentumAtExpansionPoint(1) = thetaAtEP;
320  momentumAtExpansionPoint(2) = phiAtEP;
321 
323  thePositionJacobian * expansionPoint -
324  theMomentumJacobian * momentumAtExpansionPoint );
325 
326 }
T perp() const
Definition: PV3DBase.h:71
const FreeTrajectoryState & theState() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
T y() const
Definition: PV3DBase.h:62
#define X(str)
Definition: MuonsGrabber.cc:49
#define abs(x)
Definition: mlp_lapack.h:159
const MagneticField * field() const
double double double z
Geom::Theta< T > theta() const
Definition: PV3DBase.h:74
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
TrajectoryStateClosestToPoint thePredState
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
GlobalVector momentum() const
GlobalPoint position() const
#define M_PI
Definition: BFit3D.cc:3
ROOT::Math::SVector< double, 5 > AlgebraicVector5
T x() const
Definition: PV3DBase.h:61
void PerigeeLinearizedTrackState::computeJacobians ( ) const
private

Method calculating the track parameters and the Jacobians.

Method returning the impact point measurement

Definition at line 64 of file PerigeeLinearizedTrackState.cc.

References abs, builder, computeChargedJacobians(), computeNeutralJacobians(), alignCSCRings::e, reco::TransientTrack::field(), MagneticField::inInverseGeV(), TrajectoryStateClosestToPoint::isValid(), jacobiansAvailable, FreeTrajectoryState::position(), theCharge, theLinPoint, thePredState, TrajectoryStateClosestToPoint::theState(), theTrack, theTSOS, and detailsBasic3DVector::z.

Referenced by constantTerm(), hasError(), isValid(), momentumJacobian(), parametersFromExpansion(), positionJacobian(), predictedState(), predictedStateError(), predictedStateMomentumError(), predictedStateMomentumParameters(), predictedStateParameters(), and predictedStateWeight().

65 {
66  GlobalPoint paramPt(theLinPoint);
67 
68 // std::cout << "Track "
69 // << "\n Param " << theTSOS.globalParameters ()
70 // << "\n Dir " << theTSOS.globalDirection ()
71 // << "\n";
72  thePredState = builder(theTSOS, paramPt);
73  if (!thePredState.isValid())
74  return;
75 // std::cout << "thePredState " << thePredState.theState().position()<<std::endl;
76 // edm::LogInfo("RecoVertex/PerigeeLTS")
77 // << "predstate built" << "\n";
78  double field = theTrack.field()->inInverseGeV(thePredState.theState().position()).z();
79 
80  if ((std::abs(theCharge)<1e-5)||(fabs(field)<1.e-10)){
81  //neutral track
83  } else {
84  //charged track
85 // edm::LogInfo("RecoVertex/PerigeeLTS")
86 // << "about to compute charged jac" << "\n";
88 // edm::LogInfo("RecoVertex/PerigeeLTS")
89 // << "charged jac computed" << "\n";
90  }
91 
92 
93 
94 
95  jacobiansAvailable = true;
96 }
const FreeTrajectoryState & theState() const
#define abs(x)
Definition: mlp_lapack.h:159
const MagneticField * field() const
double double double z
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:40
TrajectoryStateClosestToPoint thePredState
const TrajectoryStateOnSurface theTSOS
GlobalPoint position() const
void PerigeeLinearizedTrackState::computeNeutralJacobians ( ) const
private

Method calculating the track parameters and the Jacobians for neutral particles.

Definition at line 332 of file PerigeeLinearizedTrackState.cc.

References funct::cos(), FreeTrajectoryState::momentum(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), funct::sin(), funct::tan(), theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, TrajectoryStateClosestToPoint::theState(), PV3DBase< T, PVType, FrameType >::theta(), X, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeJacobians().

333 {
334  GlobalPoint paramPt(theLinPoint);
335 
336  //tarjectory parameters
337  double thetaAtEP = thePredState.theState().momentum().theta();
338  double phiAtEP = thePredState.theState().momentum().phi();
339  double ptAtEP = thePredState.theState().momentum().perp();
340 
341  double x_v = thePredState.theState().position().x();
342  double y_v = thePredState.theState().position().y();
343  double z_v = thePredState.theState().position().z();
344  double X = x_v - paramPt.x();
345  double Y = y_v - paramPt.y();
346 
347  // The track parameters at the expansion point
348 
349  theExpandedParams(0) = 1 / ptAtEP;
350  theExpandedParams(1) = thetaAtEP;
351  theExpandedParams(2) = phiAtEP;
352  theExpandedParams(3) = X*sin(phiAtEP) - Y*cos(phiAtEP);
353  theExpandedParams(4) = z_v - paramPt.z() -
354  (X*cos(phiAtEP) + Y*sin(phiAtEP)) / tan(thetaAtEP);
355 
356  // The Jacobian: (all at the expansion point)
357  // [i,j]
358  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
359  // j = 0: x_v, 1: y_v, 2: z_v
360 
361  thePositionJacobian(3,0) = sin(phiAtEP);
362  thePositionJacobian(3,1) = - cos(phiAtEP);
363  thePositionJacobian(4,0) = - cos(phiAtEP)/tan(thetaAtEP);
364  thePositionJacobian(4,1) = - sin(phiAtEP)/tan(thetaAtEP);
365  thePositionJacobian(4,2) = 1;
366 
367  // [i,j]
368  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
369  // j = 0: rho = 1/pt , 1: theta, 2: phi_v
370 
371  theMomentumJacobian(0,0) = 1;
372  theMomentumJacobian(1,1) = 1;
373  theMomentumJacobian(2,2) = 1;
374 
375  theMomentumJacobian(3,2) = X*cos(phiAtEP) + Y*sin(phiAtEP);
376 
378  (1 + 1/(tan(thetaAtEP)*tan(thetaAtEP)));
379 
380  theMomentumJacobian(4,2) = (X*sin(phiAtEP) - Y*cos(phiAtEP))/tan(thetaAtEP);
381 
382  // And finally the residuals:
383 
384  AlgebraicVector3 expansionPoint;
385  expansionPoint(0) = thePredState.theState().position().x();
386  expansionPoint(1) = thePredState.theState().position().y();
387  expansionPoint(2) = thePredState.theState().position().z();
388  AlgebraicVector3 momentumAtExpansionPoint;
389  momentumAtExpansionPoint(0) = 1 / ptAtEP; //
390  momentumAtExpansionPoint(1) = thetaAtEP;
391  momentumAtExpansionPoint(2) = phiAtEP;
392 
394  thePositionJacobian * expansionPoint -
395  theMomentumJacobian * momentumAtExpansionPoint );
396 
397 }
T perp() const
Definition: PV3DBase.h:71
const FreeTrajectoryState & theState() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
T y() const
Definition: PV3DBase.h:62
#define X(str)
Definition: MuonsGrabber.cc:49
Geom::Theta< T > theta() const
Definition: PV3DBase.h:74
TrajectoryStateClosestToPoint thePredState
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
GlobalVector momentum() const
GlobalPoint position() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
T x() const
Definition: PV3DBase.h:61
const AlgebraicVector5 & PerigeeLinearizedTrackState::constantTerm ( ) const
virtual

Method returning the constant term of the Taylor expansion of the measurement equation

Implements LinearizedTrackState< 5 >.

Definition at line 14 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, and theConstantTerm.

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

PerigeeLinearizedTrackState::RefCountedRefittedTrackState PerigeeLinearizedTrackState::createRefittedTrackState ( const GlobalPoint vertexPosition,
const AlgebraicVector3 vectorParameters,
const AlgebraicSymMatrix66 covarianceMatrix 
) const
virtual

Creates the correct refitted state according to the results of the track refit.

Definition at line 179 of file PerigeeLinearizedTrackState.cc.

References charge(), reco::TransientTrack::field(), theTrack, and PerigeeConversions::trajectoryStateClosestToPoint().

183 {
184  PerigeeConversions perigeeConversions;
185  TrajectoryStateClosestToPoint refittedTSCP =
186  perigeeConversions.trajectoryStateClosestToPoint(
187  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
188  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
189 }
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field) const
const MagneticField * field() const
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
bool PerigeeLinearizedTrackState::hasError ( void  ) const
virtual
bool PerigeeLinearizedTrackState::isValid ( void  ) const
virtual

Reimplemented from LinearizedTrackState< 5 >.

Definition at line 399 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), TrajectoryStateOnSurface::isValid(), jacobiansAvailable, and theTSOS.

400 {
401  if (!theTSOS.isValid())
402  return false;
403 
404  if (!jacobiansAvailable)
406 
407  return jacobiansAvailable;
408 }
const TrajectoryStateOnSurface theTSOS
const GlobalPoint& PerigeeLinearizedTrackState::linearizationPoint ( ) const
inlinevirtual

The point at which the track state has been linearized

Implements LinearizedTrackState< 5 >.

Definition at line 54 of file PerigeeLinearizedTrackState.h.

References theLinPoint.

Referenced by TwoBodyDecayEstimator::constructMatrices().

const AlgebraicMatrix53 & PerigeeLinearizedTrackState::momentumJacobian ( ) const
virtual

Method returning the Momentum Jacobian from the Taylor expansion (Matrix B)

Method returning the Momentum Jacobian (Matrix B)

Implements LinearizedTrackState< 5 >.

Definition at line 32 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, and theMomentumJacobian.

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

bool PerigeeLinearizedTrackState::operator== ( LinearizedTrackState< 5 > &  other) const

Definition at line 148 of file PerigeeLinearizedTrackState.cc.

References theTrack, and track().

149 {
150  const PerigeeLinearizedTrackState* otherP =
151  dynamic_cast<const PerigeeLinearizedTrackState*>(&other);
152  if (otherP == 0) {
153  throw VertexException("PerigeeLinearizedTrackState: don't know how to compare myself to non-perigee track state");
154  }
155  return (otherP->track() == theTrack);
156 }
Common base class.
virtual reco::TransientTrack track() const
bool PerigeeLinearizedTrackState::operator== ( ReferenceCountingPointer< LinearizedTrackState< 5 > > &  other) const

Definition at line 159 of file PerigeeLinearizedTrackState.cc.

References theTrack, and track().

160 {
161  const PerigeeLinearizedTrackState* otherP =
162  dynamic_cast<const PerigeeLinearizedTrackState*>(other.get());
163  if (otherP == 0) {
164  throw VertexException("PerigeeLinearizedTrackState: don't know how to compare myself to non-perigee track state");
165  }
166  return (otherP->track() == theTrack);
167 }
Common base class.
virtual reco::TransientTrack track() const
const AlgebraicVector5 & PerigeeLinearizedTrackState::parametersFromExpansion ( ) const
virtual

Method returning the parameters of the Taylor expansion

Implements LinearizedTrackState< 5 >.

Definition at line 40 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, and theExpandedParams.

const AlgebraicMatrix53 & PerigeeLinearizedTrackState::positionJacobian ( ) const
virtual

Method returning the Position Jacobian from the Taylor expansion (Matrix A)

Method returning the Position Jacobian (Matrix A)

Implements LinearizedTrackState< 5 >.

Definition at line 23 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, and thePositionJacobian.

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

const TrajectoryStateClosestToPoint & PerigeeLinearizedTrackState::predictedState ( ) const

Method returning the track state at the point of closest approach to the linearization point, in the transverse plane (a.k.a. transverse impact point).

Method returning the TrajectoryStateClosestToPoint at the point of closest approch to the z-axis (a.k.a. transverse impact point)

Definition at line 50 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, and thePredState.

Referenced by TwoBodyDecayLinearizationPointFinder::getLinearizationPoint(), and PerigeeMultiLTS::predictedState().

AlgebraicSymMatrix55 PerigeeLinearizedTrackState::predictedStateError ( ) const
virtual

Method returning the covariance matrix of the track state at the transverse impact point.

Implements LinearizedTrackState< 5 >.

Definition at line 136 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), PerigeeTrajectoryError::covarianceMatrix(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeError(), and thePredState.

Referenced by TwoBodyDecayEstimator::constructMatrices().

137 {
140 }
const PerigeeTrajectoryError & perigeeError() const
TrajectoryStateClosestToPoint thePredState
const AlgebraicSymMatrix55 & covarianceMatrix() const
AlgebraicSymMatrix33 PerigeeLinearizedTrackState::predictedStateMomentumError ( ) const
virtual

Method returning the momentum covariance matrix of the track state at the transverse impact point.

Implements LinearizedTrackState< 5 >.

Definition at line 142 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), PerigeeTrajectoryError::covarianceMatrix(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeError(), and thePredState.

143 {
146 }
const PerigeeTrajectoryError & perigeeError() const
TrajectoryStateClosestToPoint thePredState
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
const AlgebraicSymMatrix55 & covarianceMatrix() const
AlgebraicVector3 PerigeeLinearizedTrackState::predictedStateMomentumParameters ( ) const
virtual

Method returning the momentum part of the parameters of the track state at the linearization point.

Implements LinearizedTrackState< 5 >.

Definition at line 116 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeParameters(), PerigeeTrajectoryParameters::phi(), thePredState, PerigeeTrajectoryParameters::theta(), and PerigeeTrajectoryParameters::vector().

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

117 {
119  AlgebraicVector3 momentum;
120  momentum[0] = thePredState.perigeeParameters().vector()(0);
121  momentum[1] = thePredState.perigeeParameters().theta();
122  momentum[2] = thePredState.perigeeParameters().phi();
123  return momentum;
124 }
const AlgebraicVector5 & vector() const
TrajectoryStateClosestToPoint thePredState
const PerigeeTrajectoryParameters & perigeeParameters() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
AlgebraicVector5 PerigeeLinearizedTrackState::predictedStateParameters ( ) const
virtual

Method returning the parameters of the track state at the transverse impact point.

Implements LinearizedTrackState< 5 >.

Definition at line 110 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeParameters(), thePredState, and PerigeeTrajectoryParameters::vector().

Referenced by TwoBodyDecayEstimator::constructMatrices().

111 {
114 }
const AlgebraicVector5 & vector() const
TrajectoryStateClosestToPoint thePredState
const PerigeeTrajectoryParameters & perigeeParameters() const
AlgebraicSymMatrix55 PerigeeLinearizedTrackState::predictedStateWeight ( int &  error) const
virtual

Method returning the weight matrix of the track state at the transverse impact point. The error variable is 0 in case of success.

Implements LinearizedTrackState< 5 >.

Definition at line 126 of file PerigeeLinearizedTrackState.cc.

References computeJacobians(), TrajectoryStateClosestToPoint::isValid(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeError(), thePredState, and PerigeeTrajectoryError::weightMatrix().

127 {
129  if (!thePredState.isValid()) {
130  error = 1;
131  return AlgebraicSymMatrix55();
132  }
134 }
const PerigeeTrajectoryError & perigeeError() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrajectoryStateClosestToPoint thePredState
const AlgebraicSymMatrix55 & weightMatrix(int &error) const
AlgebraicVector5 PerigeeLinearizedTrackState::refittedParamFromEquation ( const RefCountedRefittedTrackState theRefittedState) const
virtual

Method returning the parameters of the Taylor expansion evaluated with the refitted state.

Implements LinearizedTrackState< 5 >.

Definition at line 201 of file PerigeeLinearizedTrackState.cc.

References constantTerm(), M_PI, momentumJacobian(), positionJacobian(), and predictedStateMomentumParameters().

203 {
204  AlgebraicVector3 vertexPosition;
205  vertexPosition(0) = theRefittedState->position().x();
206  vertexPosition(1) = theRefittedState->position().y();
207  vertexPosition(2) = theRefittedState->position().z();
208  AlgebraicVector3 momentum = theRefittedState->momentumVector();
209  if ((momentum(2)*predictedStateMomentumParameters()(2) < 0)&&(fabs(momentum(2))>M_PI/2) ) {
210  if (predictedStateMomentumParameters()(2) < 0.) momentum(2)-= 2*M_PI;
211  if (predictedStateMomentumParameters()(2) > 0.) momentum(2)+= 2*M_PI;
212  }
213  AlgebraicVectorN param = constantTerm() +
214  positionJacobian() * vertexPosition +
215  momentumJacobian() * momentum;
216  if (param(2) > M_PI) param(2)-= 2*M_PI;
217  if (param(2) < -M_PI) param(2)+= 2*M_PI;
218 
219  return param;
220 }
virtual AlgebraicVector3 predictedStateMomentumParameters() const
const AlgebraicMatrix53 & momentumJacobian() const
ROOT::Math::SVector< double, N > AlgebraicVectorN
const AlgebraicMatrix53 & positionJacobian() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
#define M_PI
Definition: BFit3D.cc:3
const AlgebraicVector5 & constantTerm() const
const TrajectoryStateOnSurface PerigeeLinearizedTrackState::state ( ) const
inline

Definition at line 58 of file PerigeeLinearizedTrackState.h.

References theTSOS.

58 { return theTSOS; }
const TrajectoryStateOnSurface theTSOS
PerigeeLinearizedTrackState::RefCountedLinearizedTrackState PerigeeLinearizedTrackState::stateWithNewLinearizationPoint ( const GlobalPoint newLP) const
virtual

Returns a new linearized state with respect to a new linearization point. A new object of the same type is returned, without change to the existing one.

Implements LinearizedTrackState< 5 >.

Definition at line 172 of file PerigeeLinearizedTrackState.cc.

173 {
175  new PerigeeLinearizedTrackState(newLP, track(), theTSOS));
176 }
virtual reco::TransientTrack track() const
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
const TrajectoryStateOnSurface theTSOS
PerigeeLinearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
virtual reco::TransientTrack PerigeeLinearizedTrackState::track ( void  ) const
inlinevirtual
virtual double PerigeeLinearizedTrackState::weightInMixture ( ) const
inlinevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 135 of file PerigeeLinearizedTrackState.h.

References theTSOS, and TrajectoryStateOnSurface::weight().

135 {return theTSOS.weight();}
const TrajectoryStateOnSurface theTSOS

Friends And Related Function Documentation

friend class LinearizedTrackStateFactory
friend

Friend class properly dealing with creation of reference-counted pointers to LinearizedTrack objects

Definition at line 40 of file PerigeeLinearizedTrackState.h.

Member Data Documentation

TSCPBuilderNoMaterial PerigeeLinearizedTrackState::builder
private

Definition at line 178 of file PerigeeLinearizedTrackState.h.

Referenced by computeJacobians().

bool PerigeeLinearizedTrackState::jacobiansAvailable
mutableprivate
TrackCharge PerigeeLinearizedTrackState::theCharge
private
AlgebraicVector5 PerigeeLinearizedTrackState::theConstantTerm
mutableprivate
AlgebraicVector5 PerigeeLinearizedTrackState::theExpandedParams
mutableprivate
GlobalPoint PerigeeLinearizedTrackState::theLinPoint
private
AlgebraicMatrix53 PerigeeLinearizedTrackState::theMomentumJacobian
mutableprivate
AlgebraicMatrix53 PerigeeLinearizedTrackState::thePositionJacobian
mutableprivate
TrajectoryStateClosestToPoint PerigeeLinearizedTrackState::thePredState
mutableprivate
reco::TransientTrack PerigeeLinearizedTrackState::theTrack
private
const TrajectoryStateOnSurface PerigeeLinearizedTrackState::theTSOS
private

Definition at line 182 of file PerigeeLinearizedTrackState.h.

Referenced by computeJacobians(), isValid(), state(), and weightInMixture().