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 Attributes
MaterialEffectsUpdator Class Referenceabstract

#include <MaterialEffectsUpdator.h>

Inheritance diagram for MaterialEffectsUpdator:
GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO >

Public Types

typedef materialEffect::Covariance Covariance
 
typedef materialEffect::CovIndex CovIndex
 
typedef materialEffect::Effect Effect
 

Public Member Functions

virtual MaterialEffectsUpdatorclone () const =0
 
virtual void compute (const TrajectoryStateOnSurface &, const PropagationDirection, Effect &effect) const =0
 
double mass () const
 
 MaterialEffectsUpdator (double mass)
 
virtual TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual bool updateStateInPlace (TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual ~MaterialEffectsUpdator ()
 

Private Attributes

double theMass
 

Detailed Description

Interface for adding material effects during propagation. Updates to TrajectoryStateOnSurface are implemented in this class. Ported from ORCA.

Moved "state" into an independent struct "Effect"

Definition at line 56 of file MaterialEffectsUpdator.h.

Member Typedef Documentation

Definition at line 58 of file MaterialEffectsUpdator.h.

Definition at line 60 of file MaterialEffectsUpdator.h.

Definition at line 59 of file MaterialEffectsUpdator.h.

Constructor & Destructor Documentation

MaterialEffectsUpdator::MaterialEffectsUpdator ( double  mass)

Constructor with explicit mass hypothesis

Definition at line 9 of file MaterialEffectsUpdator.cc.

MaterialEffectsUpdator::~MaterialEffectsUpdator ( )
virtual

Definition at line 12 of file MaterialEffectsUpdator.cc.

12 {}

Member Function Documentation

virtual MaterialEffectsUpdator* MaterialEffectsUpdator::clone ( ) const
pure virtual

Implemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

virtual void MaterialEffectsUpdator::compute ( const TrajectoryStateOnSurface ,
const PropagationDirection  ,
Effect effect 
) const
pure virtual
double MaterialEffectsUpdator::mass ( ) const
inline

Particle mass assigned at construction.

Definition at line 86 of file MaterialEffectsUpdator.h.

References theMass.

86  {
87  return theMass;
88  }
TrajectoryStateOnSurface MaterialEffectsUpdator::updateState ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir 
) const
virtual

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

Definition at line 17 of file MaterialEffectsUpdator.cc.

References updateStateInPlace().

18  {
19  TrajectoryStateOnSurface shallowCopy = TSoS;
20  // A TSOS is a proxy. Its contents will be really copied only if/when the updateStateInPlace attempts to change them
21  return updateStateInPlace(shallowCopy, propDir) ? shallowCopy : TrajectoryStateOnSurface();
22 }
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
bool MaterialEffectsUpdator::updateStateInPlace ( TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir 
) const
virtual

Updates in place TrajectoryStateOnSurface with material effects (momentum and covariance matrix are potentially affected) Will return 'false' if the 'updateState' would have returned an invalid TSOS Note that the TSoS might be very well unchanged from this method (just like 'updateState' can return the same TSOS)

Definition at line 30 of file MaterialEffectsUpdator.cc.

References materialEffect::Covariance::add(), SurfaceSideDefinition::afterSurface, alongMomentum, anyDirection, SurfaceSideDefinition::atCenterOfSurface, SurfaceSideDefinition::beforeSurface, compute(), materialEffect::Effect::deltaCov, materialEffect::Effect::deltaP, TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::hasError(), MediumProperties::isValid(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), oppositeToMomentum, TrajectoryStateOnSurface::surface(), TrajectoryStateOnSurface::surfaceSide(), TrajectoryStateOnSurface::update(), and LocalTrajectoryParameters::updateP().

Referenced by updateState().

31  {
32  //
33  // Check if
34  // - material is associated to surface
35  // - propagation direction is not anyDirection
36  // - side of surface is not atCenterOfSurface (could be handled with 50% material?)
37  //
38  const Surface& surface = TSoS.surface();
39  if ( !surface.mediumProperties().isValid() || propDir==anyDirection ||
40  TSoS.surfaceSide()==atCenterOfSurface ) return true;
41  //
42  // Check, if already on right side of surface
43  //
44  if ( (propDir==alongMomentum && TSoS.surfaceSide()==afterSurface ) ||
45  (propDir==oppositeToMomentum && TSoS.surfaceSide()==beforeSurface ) ) return true;
46  //
47  // Update momentum. In case of failure: return invalid state
48  //
50  Effect effect;
51  compute (TSoS,propDir,effect);
52  if ( !lp.updateP(effect.deltaP) )
53  return false;
54  //
55  // Update covariance matrix?
56  //
58  if ( TSoS.hasError() ) {
59  AlgebraicSymMatrix55 eloc = TSoS.localError().matrix();
60  effect.deltaCov.add(eloc);
61  //TSoS = TrajectoryStateOnSurface(lp,LocalTrajectoryError(eloc),surface, &(TSoS.globalParameters().magneticField()),side);
62  TSoS.update(lp,LocalTrajectoryError(eloc),surface,
63  &(TSoS.globalParameters().magneticField()),side);
64  }
65  else {
66  TSoS.update(lp,surface,&(TSoS.globalParameters().magneticField()),side);
67  //TSoS = TrajectoryStateOnSurface(lp,surface,&(TSoS.globalParameters().magneticField()),side);
68  }
69  return true;
70 }
materialEffect::Effect Effect
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect &effect) const =0
const LocalTrajectoryParameters & localParameters() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
bool updateP(double dP)
Update of momentum by a scalar dP.
const SurfaceType & surface() const
void update(const LocalTrajectoryParameters &p, const SurfaceType &aSurface, const MagneticField *field, const SurfaceSide side=SurfaceSideDefinition::atCenterOfSurface)
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
const GlobalTrajectoryParameters & globalParameters() const
const MagneticField & magneticField() const
bool isValid() const
const MediumProperties & mediumProperties() const
Definition: Surface.h:120

Member Data Documentation

double MaterialEffectsUpdator::theMass
private

Definition at line 96 of file MaterialEffectsUpdator.h.

Referenced by mass().