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
VolumeMaterialEffectsUpdator Class Reference

#include <VolumeMaterialEffectsUpdator.h>

Public Types

typedef
VolumeMaterialEffectsEstimate 
Estimate
 
typedef std::vector< const
VolumeMaterialEffectsEstimate * > 
EstimateContainer
 

Public Member Functions

TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, const Estimate &estimate) const
 
TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, const EstimateContainer &estimates) const
 
 VolumeMaterialEffectsUpdator ()
 

Detailed Description

Computes an updated TrajectoryStateOnSurface after applying estimated material effects.

Definition at line 18 of file VolumeMaterialEffectsUpdator.h.

Member Typedef Documentation

Definition at line 21 of file VolumeMaterialEffectsUpdator.h.

Definition at line 22 of file VolumeMaterialEffectsUpdator.h.

Constructor & Destructor Documentation

VolumeMaterialEffectsUpdator::VolumeMaterialEffectsUpdator ( )
inline

Definition at line 25 of file VolumeMaterialEffectsUpdator.h.

25 {}

Member Function Documentation

TrajectoryStateOnSurface VolumeMaterialEffectsUpdator::updateState ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir,
const Estimate estimate 
) const

Updates TrajectoryStateOnSurface with material effects (momentum and covariance matrix are potentially affected.

Definition at line 12 of file VolumeMaterialEffectsUpdator.cc.

15 {
16  return updateState(tsos,propDir,EstimateContainer(1,&estimate));
17 }
TrajectoryStateOnSurface updateState(const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, const Estimate &estimate) const
std::vector< const VolumeMaterialEffectsEstimate * > EstimateContainer
TrajectoryStateOnSurface VolumeMaterialEffectsUpdator::updateState ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir,
const EstimateContainer estimates 
) const

Updates TrajectoryStateOnSurface with several material effects (momentum and covariance matrix are potentially affected.

Definition at line 20 of file VolumeMaterialEffectsUpdator.cc.

References alongMomentum, anyDirection, TrajectoryStateOnSurface::charge(), reco::dp, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), i, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), TrajectoryStateOnSurface::magneticField(), GlobalTrajectoryParameters::magneticField(), LocalTrajectoryError::matrix(), TrajectoryStateOnSurface::surface(), TrajectoryStateOnSurface::surfaceSide(), and LocalTrajectoryParameters::updateP().

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  }
36  LocalTrajectoryParameters lp = tsos.localParameters();
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.)
54  perpPlane(PerpendicularBoundPlaneBuilder()(tsos.globalPosition(),
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);
70  return TrajectoryStateOnSurface(lp,LocalTrajectoryError(eloc),tsos.surface(),
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 }
int i
Definition: DBlmapReader.cc:9
Local3DVector LocalVector
Definition: LocalVector.h:12
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
auto dp
Definition: deltaR.h:22
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
bool updateP(float dP)
Update of momentum by a scalar dP.
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55