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 | Protected Member Functions | Private Attributes
GsfMaterialEffectsUpdator Class Referenceabstract

#include <GsfMaterialEffectsUpdator.h>

Inheritance diagram for GsfMaterialEffectsUpdator:
GCC11_FINAL< T, TOPO > 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 GsfMaterialEffectsUpdatorclone () const =0
 
virtual void compute (const TrajectoryStateOnSurface &, const PropagationDirection, Effect effects[]) const =0
 
 GsfMaterialEffectsUpdator (float mass, uint32_t is)
 
float mass () const
 
size_t size () const
 
virtual TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual ~GsfMaterialEffectsUpdator ()
 

Protected Member Functions

void resize (size_t is)
 

Private Attributes

uint32_t m_size
 
float theMass
 

Detailed Description

Interface for adding material effects during propagation as a Gaussian mixture. Similar to MaterialEffectsUpdator, but returns MultiTrajectoryState.

Definition at line 17 of file GsfMaterialEffectsUpdator.h.

Member Typedef Documentation

Definition at line 19 of file GsfMaterialEffectsUpdator.h.

Definition at line 21 of file GsfMaterialEffectsUpdator.h.

Definition at line 20 of file GsfMaterialEffectsUpdator.h.

Constructor & Destructor Documentation

GsfMaterialEffectsUpdator::GsfMaterialEffectsUpdator ( float  mass,
uint32_t  is 
)
inline

Constructor with explicit mass hypothesis

Definition at line 26 of file GsfMaterialEffectsUpdator.h.

virtual GsfMaterialEffectsUpdator::~GsfMaterialEffectsUpdator ( )
inlinevirtual

Definition at line 29 of file GsfMaterialEffectsUpdator.h.

29 {}

Member Function Documentation

virtual GsfMaterialEffectsUpdator* GsfMaterialEffectsUpdator::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 >, and GCC11_FINAL< T, TOPO >.

virtual void GsfMaterialEffectsUpdator::compute ( const TrajectoryStateOnSurface ,
const PropagationDirection  ,
Effect  effects[] 
) const
pure virtual
float GsfMaterialEffectsUpdator::mass ( ) const
inline

Particle mass assigned at construction.

Definition at line 39 of file GsfMaterialEffectsUpdator.h.

References theMass.

39  {
40  return theMass;
41  }
void GsfMaterialEffectsUpdator::resize ( size_t  is)
inlineprotected
size_t GsfMaterialEffectsUpdator::size ( void  ) const
inline

Definition at line 48 of file GsfMaterialEffectsUpdator.h.

References m_size.

TrajectoryStateOnSurface GsfMaterialEffectsUpdator::updateState ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir 
) const
virtual

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

Definition at line 15 of file GsfMaterialEffectsUpdator.cc.

References MultiTrajectoryStateAssembler::addState(), SurfaceSideDefinition::afterSurface, alongMomentum, SurfaceSideDefinition::beforeSurface, MultiTrajectoryStateAssembler::combinedState(), TrajectoryStateOnSurface::components(), bookConverter::compute(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::hasError(), MediumProperties::isValid(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), query::result, findQualityFiles::size, TrajectoryStateOnSurface::surface(), LocalTrajectoryParameters::updateP(), histoStyle::weight, and TrajectoryStateOnSurface::weight().

Referenced by FullConvolutionWithMaterial::operator()().

16  {
17  //
18  // get components of input state and check if material is associated to surface
19  //
20  const Surface& surface = TSoS.surface();
21  if ( !surface.mediumProperties().isValid() ) return TSoS;
23  // single input state?
24  if ( TSoS.components().size()>1 )
25  throw cms::Exception("LogicError") << "GsfMaterialEffectsUpdator::updateState used with MultiTSOS";
26  double weight = TSoS.weight();
27  //
28  // Get components (will force recalculation, if necessary)
29  //
30  Effect effects[size()];
31  compute(TSoS,propDir,effects);
32 
33  //
34  // prepare output vector
35  //
37  //
38  // loop over components
39  //
40  // edm::LogDebug("GsfMaterialEffectsUpdator") << "found " << Ws.size() << " components\n"
41  // << " input state has weight " << TSoS.weight();
42  for ( auto const & effect : effects ) {
43  // edm::LogDebug("GsfMaterialEffectsUpdator") << "w, dp, sigp = "
44  // << Ws[ic] << ", "
45  // << dPs[ic] << ", "
46  // << sqrt((deltaErrors[ic])[0][0]);
47  //
48  // Update momentum. In case of failure: return invalid state.
49  // Use deltaP method to ensure update of cache, if necessary!
50  //
52  if ( !lp.updateP(effect.deltaP) )
53  return TrajectoryStateOnSurface();
54  //
55  // Update covariance matrix?
56  //
57  if ( TSoS.hasError() ) {
58  AlgebraicSymMatrix55 eloc = TSoS.localError().matrix();
59  effect.deltaCov.add(eloc);
60  result.addState(TrajectoryStateOnSurface(weight*effect.weight,
61  lp,
63  surface,
64  &(TSoS.globalParameters().magneticField()),
65  side));
66 
67  // edm::LogDebug("GsfMaterialEffectsUpdator")
68  // << "adding state with weight " << weight*Ws[ic];
69  }
70  else {
71  result.addState(TrajectoryStateOnSurface(lp,surface,
72  &(TSoS.globalParameters().magneticField()),
73  side));
74  }
75  }
76  // edm::LogDebug("GsfMaterialEffectsUpdator")
77  // << " output state has weight " << result.combinedState().weight();
78  return result.combinedState();
79 }
const LocalTrajectoryParameters & localParameters() const
void addState(const TrajectoryStateOnSurface)
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
tuple result
Definition: query.py:137
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
const GlobalTrajectoryParameters & globalParameters() const
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect effects[]) const =0
const MagneticField & magneticField() const
int weight
Definition: histoStyle.py:50
bool isValid() const
std::vector< TrajectoryStateOnSurface > components() const
const MediumProperties & mediumProperties() const
Definition: Surface.h:120

Member Data Documentation

uint32_t GsfMaterialEffectsUpdator::m_size
private

Definition at line 54 of file GsfMaterialEffectsUpdator.h.

Referenced by resize(), and size().

float GsfMaterialEffectsUpdator::theMass
private

Definition at line 53 of file GsfMaterialEffectsUpdator.h.

Referenced by mass().