CMS 3D CMS Logo

VolumeMaterialEffectsUpdator.cc
Go to the documentation of this file.
2 
6 
10 
13  const PropagationDirection propDir,
14  const Estimate& estimate) const
15 {
16  return updateState(tsos,propDir,EstimateContainer(1,&estimate));
17 }
18 
21  const PropagationDirection propDir,
22  const EstimateContainer& estimates) const
23 {
24  // Sanity check on propagation direction
25  if ( propDir==anyDirection ) return TrajectoryStateOnSurface();
26  //
27  // Update momentum. In case of failure: return invalid state
28  //
29  double dpSum(0.);
30  for ( EstimateContainer::const_iterator i=estimates.begin();
31  i!=estimates.end(); ++i ) {
32  double dp = (**i).deltaP();
33  if ( propDir==alongMomentum ) dpSum += dp;
34  else dpSum -= dp;
35  }
37  if ( !lp.updateP(dpSum) ) return TrajectoryStateOnSurface();
38  //
39  // Update covariance matrix?
40  //
41  if ( tsos.hasError() ) {
42 // AlgebraicSymMatrix55 eloc(tsos.localError().matrix());
43  AlgebraicSymMatrix55 matCov;
44  for ( EstimateContainer::const_iterator i=estimates.begin();
45  i!=estimates.end(); ++i ) {
46  matCov += (**i).deltaLocalError();
47  }
48  //
49  // transform to local system of trackfor the time being: brute force
50  // could / should try to construct the matrix in curvilinear
51  //
52  // Plane consistent with material effects estimate (perp. to track at ref. pos.)
55  tsos.globalMomentum()));
56  // Parameters need to construct Jacobian (ref. point and ref. direction)
57  LocalTrajectoryParameters perpPars(LocalPoint(0.,0.,0.),
58  LocalVector(0.,0.,1.),
59  tsos.charge());
60  // Jacobian to go from perpendicular plane to curvilinear
61  JacobianLocalToCurvilinear jacLocToCurv(*perpPlane,perpPars,*tsos.magneticField());
62  // Jacobian to go from curvilinear to local frame of the reference tsos
63  JacobianCurvilinearToLocal jacCurvToLoc(tsos.surface(),tsos.localParameters(),
64  *tsos.magneticField());
65  // Combined Jacobian
66  AlgebraicMatrix55 jac(jacLocToCurv.jacobian()*jacCurvToLoc.jacobian());
67  // Add transformed material effects error matrix to the one from the TSOS
68  AlgebraicSymMatrix55 eloc(tsos.localError().matrix());
69  eloc += ROOT::Math::Similarity(jac,matCov);
71  &(tsos.globalParameters().magneticField()),
72  tsos.surfaceSide());
73  }
74  else {
75  return TrajectoryStateOnSurface(lp,tsos.surface(),
76  &(tsos.globalParameters().magneticField()),
77  tsos.surfaceSide());
78  }
79 }
Local3DVector LocalVector
Definition: LocalVector.h:12
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:32
const LocalTrajectoryParameters & localParameters() const
GlobalPoint globalPosition() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
PropagationDirection
const MagneticField * magneticField() const
const SurfaceType & surface() const
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
TrajectoryStateOnSurface updateState(const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, const Estimate &estimate) const
const GlobalTrajectoryParameters & globalParameters() const
auto dp
Definition: deltaR.h:22
GlobalVector globalMomentum() const
const MagneticField & magneticField() const
std::vector< const VolumeMaterialEffectsEstimate * > EstimateContainer
bool updateP(float dP)
Update of momentum by a scalar dP.
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55