CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Private Attributes

GsfMaterialEffectsUpdator Class Reference

#include <GsfMaterialEffectsUpdator.h>

Inheritance diagram for GsfMaterialEffectsUpdator:
GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T > GCC11_FINAL< T >

List of all members.

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.

                                                       :
    theMass(mass), m_size(is) {}
virtual GsfMaterialEffectsUpdator::~GsfMaterialEffectsUpdator ( ) [inline, virtual]

Definition at line 29 of file GsfMaterialEffectsUpdator.h.

{}

Member Function Documentation

virtual GsfMaterialEffectsUpdator* GsfMaterialEffectsUpdator::clone ( ) const [pure virtual]
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.

                             {
    return theMass;
  }
void GsfMaterialEffectsUpdator::resize ( size_t  is) [inline, protected]

Definition at line 50 of file GsfMaterialEffectsUpdator.h.

References m_size.

{ m_size=is;}
size_t GsfMaterialEffectsUpdator::size ( void  ) const [inline]

Reimplemented in GCC11_FINAL< T >, and GCC11_FINAL< T >.

Definition at line 48 of file GsfMaterialEffectsUpdator.h.

References m_size.

{ return 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(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), query::result, findQualityFiles::size, TrajectoryStateOnSurface::surface(), LocalTrajectoryParameters::updateP(), CommonMethods::weight(), and TrajectoryStateOnSurface::weight().

                                                                                  {
  //
  // get components of input state and check if material is associated to surface
  //
  const Surface& surface = TSoS.surface();
  if ( !surface.mediumProperties() )  return TSoS;
  SurfaceSide side = propDir==alongMomentum ? afterSurface : beforeSurface;
  // single input state?
  if ( TSoS.components().size()>1 )
    throw cms::Exception("LogicError") << "GsfMaterialEffectsUpdator::updateState used with MultiTSOS";
  double weight = TSoS.weight();
  //
  // Get components (will force recalculation, if necessary)
  //
  Effect effects[size()];
  compute(TSoS,propDir,effects);

  //
  // prepare output vector
  //
  MultiTrajectoryStateAssembler result;
  //
  // loop over components
  //
  //   edm::LogDebug("GsfMaterialEffectsUpdator") << "found " << Ws.size() << " components\n"
  //                                         << "  input state has weight " << TSoS.weight();
  for ( auto const & effect : effects ) {
    //      edm::LogDebug("GsfMaterialEffectsUpdator") << "w, dp, sigp = "
    //           << Ws[ic] << ", "
    //           << dPs[ic] << ", "
    //           << sqrt((deltaErrors[ic])[0][0]);
    //
    // Update momentum. In case of failure: return invalid state.
    // Use deltaP method to ensure update of cache, if necessary!
    //
    LocalTrajectoryParameters lp = TSoS.localParameters();
    if ( !lp.updateP(effect.deltaP) )  
      return TrajectoryStateOnSurface();
    //
    // Update covariance matrix?
    //
    if ( TSoS.hasError() ) {
      AlgebraicSymMatrix55 eloc = TSoS.localError().matrix();
      effect.deltaCov.add(eloc);
      result.addState(TrajectoryStateOnSurface(lp,
                                               LocalTrajectoryError(eloc),
                                               surface,
                                               &(TSoS.globalParameters().magneticField()),
                                               side,
                                               weight*effect.weight));
      //       edm::LogDebug("GsfMaterialEffectsUpdator") 
      //        << "adding state with weight " << weight*Ws[ic];
    }
    else {
      result.addState(TrajectoryStateOnSurface(lp,surface,
                                               &(TSoS.globalParameters().magneticField()),
                                               side));
    }
  }
  //   edm::LogDebug("GsfMaterialEffectsUpdator") 
  //     << "  output state has weight " << result.combinedState().weight();
  return result.combinedState();
}

Member Data Documentation

Definition at line 54 of file GsfMaterialEffectsUpdator.h.

Referenced by resize(), and size().

Definition at line 53 of file GsfMaterialEffectsUpdator.h.

Referenced by mass().