CMS 3D CMS Logo

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

GsfPropagatorWithMaterial Class Reference

#include <GsfPropagatorWithMaterial.h>

Inheritance diagram for GsfPropagatorWithMaterial:
Propagator

List of all members.

Public Types

enum  MaterialLocation { atSource, atDestination, fromDirection }

Public Member Functions

virtual GsfPropagatorWithMaterialclone () const
const FullConvolutionWithMaterialconvolutionWithMaterial () const
 Access to the convolutor and thus to the material effects.
const PropagatorgeometricalPropagator () const
 Access to the geometrical propagator.
 GsfPropagatorWithMaterial (const GsfPropagatorAdapter &Propagator, const FullConvolutionWithMaterial &Convolutor)
 GsfPropagatorWithMaterial (const Propagator &Propagator, const GsfMaterialEffectsUpdator &MEUpdator)
const MagneticFieldmagneticField () const
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Surface &surface) const
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Plane &plane) const
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Surface &surface) const
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Plane &) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Plane &) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &surface) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Surface &surface) const
void setMaterialLocation (const MaterialLocation location)
virtual bool setMaxDirectionChange (float phiMax)
virtual void setPropagationDirection (PropagationDirection dir) const
 ~GsfPropagatorWithMaterial ()

Private Types

typedef std::vector
< TrajectoryStateOnSurface
MultiTSOS
typedef std::pair
< TrajectoryStateOnSurface,
double > 
TsosWP

Private Member Functions

TrajectoryStateOnSurface convoluteStateWithMaterial (const TrajectoryStateOnSurface, const PropagationDirection) const
 Convolution of state with material effects.
std::pair
< TrajectoryStateOnSurface,
double > 
convoluteWithMaterial (const std::pair< TrajectoryStateOnSurface, double > &) const
 Convolution of state+path with material effects.
bool materialAtSource () const
 Inclusion of material at the source?

Private Attributes

DeepCopyPointerByClone
< FullConvolutionWithMaterial
theConvolutor
DeepCopyPointerByClone
< GsfPropagatorAdapter
theGeometricalPropagator
MaterialLocation theMaterialLocation

Detailed Description

Propagation including material effects on destination surface for multiple trajectory states. Propagates components independently using a specific propagator for the geometrical part and a GsfMaterialEffectsUpdator to include multiple scattering and energy loss at the destination. The number of components will increase according to the result of the GsfMaterialEffectsUpdator.

Definition at line 23 of file GsfPropagatorWithMaterial.h.


Member Typedef Documentation

Definition at line 185 of file GsfPropagatorWithMaterial.h.

typedef std::pair<TrajectoryStateOnSurface,double> GsfPropagatorWithMaterial::TsosWP [private]

Definition at line 184 of file GsfPropagatorWithMaterial.h.


Member Enumeration Documentation

Enumerator:
atSource 
atDestination 
fromDirection 

Definition at line 136 of file GsfPropagatorWithMaterial.h.


Constructor & Destructor Documentation

GsfPropagatorWithMaterial::GsfPropagatorWithMaterial ( const Propagator Propagator,
const GsfMaterialEffectsUpdator MEUpdator 
)

Constructor with explicit single state propagator and material effects objects.

Definition at line 9 of file GsfPropagatorWithMaterial.cc.

Referenced by clone().

                                                                                                   :
  Propagator(aPropagator.propagationDirection()),
  theGeometricalPropagator(new GsfPropagatorAdapter(aPropagator)),
  theConvolutor(new FullConvolutionWithMaterial(aMEUpdator)),
  theMaterialLocation(atDestination)
{  
  //   if ( propWithPathTimer1==0 )  defineTimer();
}
GsfPropagatorWithMaterial::GsfPropagatorWithMaterial ( const GsfPropagatorAdapter Propagator,
const FullConvolutionWithMaterial Convolutor 
)

Constructor with explicit multi state propagator and convolutor.

Definition at line 19 of file GsfPropagatorWithMaterial.cc.

                                                                                                      :
  Propagator(aGsfPropagator.propagationDirection()),
  theGeometricalPropagator(aGsfPropagator.clone()),
  theConvolutor(aConvolutor.clone()),
  theMaterialLocation(atDestination) 
{  
  //   if ( propWithPathTimer1==0 )  defineTimer();
}
GsfPropagatorWithMaterial::~GsfPropagatorWithMaterial ( ) [inline]

Definition at line 37 of file GsfPropagatorWithMaterial.h.

{}

Member Function Documentation

virtual GsfPropagatorWithMaterial* GsfPropagatorWithMaterial::clone ( void  ) const [inline, virtual]
TrajectoryStateOnSurface GsfPropagatorWithMaterial::convoluteStateWithMaterial ( const TrajectoryStateOnSurface  tsos,
const PropagationDirection  propDir 
) const [private]

Convolution of state with material effects.

Definition at line 146 of file GsfPropagatorWithMaterial.cc.

References theConvolutor.

Referenced by propagateWithPath().

{
  //
  // convolute with material
  //
  return (*theConvolutor)(tsos,propDir);
}
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::convoluteWithMaterial ( const std::pair< TrajectoryStateOnSurface, double > &  aStateWithPath) const [private]

Convolution of state+path with material effects.

Definition at line 134 of file GsfPropagatorWithMaterial.cc.

References Propagator::propagationDirection(), and theConvolutor.

Referenced by propagateWithPath().

{
  //
  // convolute with material
  //
  PropagationDirection propDir = PropagationDirectionFromPath()(aStateWithPath.second,
                                                                propagationDirection());
  return TsosWP((*theConvolutor)(aStateWithPath.first,propDir),
                aStateWithPath.second);
}
const FullConvolutionWithMaterial& GsfPropagatorWithMaterial::convolutionWithMaterial ( ) const [inline]

Access to the convolutor and thus to the material effects.

Definition at line 153 of file GsfPropagatorWithMaterial.h.

References theConvolutor.

                                                                     {
    return *theConvolutor;
  }
const Propagator& GsfPropagatorWithMaterial::geometricalPropagator ( ) const [inline]

Access to the geometrical propagator.

Definition at line 149 of file GsfPropagatorWithMaterial.h.

References theGeometricalPropagator.

const MagneticField* GsfPropagatorWithMaterial::magneticField ( ) const [inline, virtual]

Implements Propagator.

Definition at line 162 of file GsfPropagatorWithMaterial.h.

References theGeometricalPropagator.

{return theGeometricalPropagator->magneticField();}
bool GsfPropagatorWithMaterial::materialAtSource ( ) const [private]

Inclusion of material at the source?

Definition at line 156 of file GsfPropagatorWithMaterial.cc.

References alongMomentum, anyDirection, atDestination, atSource, Exception, fromDirection, Propagator::propagationDirection(), and theMaterialLocation.

Referenced by propagateWithPath().

                                                  {
  if ( propagationDirection()==anyDirection ) {
    if ( theMaterialLocation!=atDestination ) { 
      throw cms::Exception("LogicError")
        << "PropagatorWithMaterial: propagation direction = anyDirection is "
        << "incompatible with adding of material at source";
    }
  }
  return theMaterialLocation==atSource || (theMaterialLocation==fromDirection&&
                                           propagationDirection()==alongMomentum);
}
virtual TrajectoryStateOnSurface GsfPropagatorWithMaterial::propagate ( const FreeTrajectoryState fts,
const Plane plane 
) const [inline, virtual]

Propagation to plane: use propagationWithPath (adequate for use with AnalyticalPropagator, should be implemented to be more general). Use from FTS implies single state (better use PropagatorWithMaterial)!

Implements Propagator.

Definition at line 95 of file GsfPropagatorWithMaterial.h.

References propagateWithPath().

  {
    return propagateWithPath(fts,plane).first;
  }
virtual TrajectoryStateOnSurface GsfPropagatorWithMaterial::propagate ( const TrajectoryStateOnSurface tsos,
const Surface surface 
) const [inline, virtual]

Propagation to generic surface: specialisation done in base class.

Reimplemented from Propagator.

Definition at line 41 of file GsfPropagatorWithMaterial.h.

Referenced by propagate().

  {
    return Propagator::propagate(tsos,surface);
  }
virtual TrajectoryStateOnSurface GsfPropagatorWithMaterial::propagate ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const [inline, virtual]

Propagation to plane: use propagationWithPath (adequate for use with AnalyticalPropagator, should be implemented to be more general).

Reimplemented from Propagator.

Definition at line 49 of file GsfPropagatorWithMaterial.h.

References propagateWithPath().

  {
    return propagateWithPath(tsos,plane).first;
  }
virtual TrajectoryStateOnSurface GsfPropagatorWithMaterial::propagate ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const [inline, virtual]

Propagation to cylinder: use propagationWithPath (adequate for use with AnalyticalPropagator, should be implemented to be more general). Use from FTS implies single state (better use PropagatorWithMaterial)!

Implements Propagator.

Definition at line 104 of file GsfPropagatorWithMaterial.h.

References propagateWithPath().

  {
    return propagateWithPath(fts,cylinder).first;
  }
virtual TrajectoryStateOnSurface GsfPropagatorWithMaterial::propagate ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const [inline, virtual]

Propagation to cylinder: use propagationWithPath (adequate for use with AnalyticalPropagator, should be implemented to be more general).

Reimplemented from Propagator.

Definition at line 57 of file GsfPropagatorWithMaterial.h.

References propagateWithPath().

  {
    return propagateWithPath(tsos,cylinder).first;
  }
virtual TrajectoryStateOnSurface GsfPropagatorWithMaterial::propagate ( const FreeTrajectoryState fts,
const Surface surface 
) const [inline, virtual]

Propagation to generic surface: specialisation done in base class. Use from FTS implies single state (better use PropagatorWithMaterial)!

Reimplemented from Propagator.

Definition at line 86 of file GsfPropagatorWithMaterial.h.

References propagate().

  {
    return Propagator::propagate(fts,surface);
  }
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const [virtual]

Propagation to plane with path length calculation. Use from FTS implies single state (better use PropagatorWithMaterial)!

Implements Propagator.

Definition at line 98 of file GsfPropagatorWithMaterial.cc.

References convoluteWithMaterial(), materialAtSource(), and theGeometricalPropagator.

                                                                        {
  static int nWarn(0);
  if ( nWarn++<5 )
    edm::LogInfo("GsfPropagatorWithMaterial") 
      << "GsfPropagatorWithMaterial used from FTS: input state might have been collapsed!";
  TsosWP propStateWP = theGeometricalPropagator->propagateWithPath(fts,plane);
  if ( !(propStateWP.first).isValid() || materialAtSource() )  return propStateWP;
  //
  // return convoluted state
  //
  return convoluteWithMaterial(propStateWP);
}
virtual std::pair<TrajectoryStateOnSurface,double> GsfPropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Surface surface 
) const [inline, virtual]

Propagation to generic surface with path length calculation: specialisation done in base class.

Reimplemented from Propagator.

Definition at line 67 of file GsfPropagatorWithMaterial.h.

Referenced by propagate(), and propagateWithPath().

  {
    return Propagator::propagateWithPath(tsos,surface);
  }
virtual std::pair<TrajectoryStateOnSurface,double> GsfPropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Surface surface 
) const [inline, virtual]

Propagation to generic surface with path length calculation: specialisation done in base class. Use from FTS implies single state (better use PropagatorWithMaterial)!

Reimplemented from Propagator.

Definition at line 114 of file GsfPropagatorWithMaterial.h.

References propagateWithPath().

  {
    return Propagator::propagateWithPath(fts,surface);
  }
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const [virtual]

Propagation to cylinder with path length calculation. Use from FTS implies single state (better use PropagatorWithMaterial)!

Implements Propagator.

Definition at line 113 of file GsfPropagatorWithMaterial.cc.

References convoluteWithMaterial(), materialAtSource(), and theGeometricalPropagator.

                                                                              {
  static int nWarn(0);
  if ( nWarn++<5 )
    edm::LogInfo("GsfPropagatorWithMaterial") 
      << "GsfPropagatorWithMaterial used from FTS: input state might have been collapsed!";
  TsosWP propStateWP = theGeometricalPropagator->propagateWithPath(fts,cylinder);
  if ( !(propStateWP.first).isValid() || materialAtSource() )  return propStateWP;
  //
  // return convoluted state
  //
  return convoluteWithMaterial(propStateWP);
}
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const [virtual]

Propagation to cylinder with path length calculation.

Reimplemented from Propagator.

Definition at line 74 of file GsfPropagatorWithMaterial.cc.

References convoluteStateWithMaterial(), convoluteWithMaterial(), TrajectoryStateOnSurface::isValid(), materialAtSource(), Propagator::propagationDirection(), and theGeometricalPropagator.

                                                                              {
  //   TimeMe t2(*propWithPathTimer2,false);
  //
  // add material before propagation?
  //
  TrajectoryStateOnSurface stateAtSource;
  if ( materialAtSource() )
    stateAtSource = convoluteStateWithMaterial(tsos,propagationDirection());
  else
    stateAtSource = tsos;
  if ( !stateAtSource.isValid() )  return TsosWP(stateAtSource,0.);
  //
  // geometrical propagation
  //
  TsosWP propStateWP(theGeometricalPropagator->propagateWithPath(stateAtSource,cylinder));
  if ( !(propStateWP.first).isValid() )  return propStateWP;
  //
  // return convoluted state
  //
  return convoluteWithMaterial(propStateWP);
}
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const [virtual]

Propagation to plane with path length calculation.

Reimplemented from Propagator.

Definition at line 50 of file GsfPropagatorWithMaterial.cc.

References convoluteStateWithMaterial(), convoluteWithMaterial(), TrajectoryStateOnSurface::isValid(), materialAtSource(), Propagator::propagationDirection(), and theGeometricalPropagator.

                                                                        {
  //   TimeMe t1(*propWithPathTimer1,false);
  //
  // add material before propagation?
  //
  TrajectoryStateOnSurface stateAtSource;
  if ( materialAtSource() )
    stateAtSource = convoluteStateWithMaterial(tsos,propagationDirection());
  else
    stateAtSource = tsos;
  if ( !stateAtSource.isValid() )  return TsosWP(stateAtSource,0.);
  //
  // geometrical propagation
  //
  TsosWP propStateWP(theGeometricalPropagator->propagateWithPath(stateAtSource,plane));
  if ( !(propStateWP.first).isValid() )  return propStateWP;
  //
  // return convoluted state
  //
  return convoluteWithMaterial(propStateWP);
}
void GsfPropagatorWithMaterial::setMaterialLocation ( const MaterialLocation  location) [inline]

Choice of location for including material effects: fromDirection is equivalent to atSource for propagation alongMomentum and to atDestination for propagation oppositeToMomentum. Inclusion of material effects at the source (either explicitely or implicitely) is not possible if propagating with anyDirection and will effectively disable material effects when propagating from a FreeTrajectoryState.

Definition at line 145 of file GsfPropagatorWithMaterial.h.

References tests::location, and theMaterialLocation.

virtual bool GsfPropagatorWithMaterial::setMaxDirectionChange ( float  phiMax) [inline, virtual]

Set the maximal change of direction (integrated along the path) for any single propagation. If reaching of the destination surface requires change of direction that exceeds this value the Propagator returns an invalid state. For example, a track may reach a forward plane after many spirals, which may be undesirable for a track reconstructor. Setting this value to pi will force the propagation to fail. The default value is "no limit". The method returnd true if the concrete propagator respects the limit, false otherwise.

Reimplemented from Propagator.

Definition at line 130 of file GsfPropagatorWithMaterial.h.

References theGeometricalPropagator.

                                                    { 
    return theGeometricalPropagator->setMaxDirectionChange(phiMax);
  }
void GsfPropagatorWithMaterial::setPropagationDirection ( PropagationDirection  dir) const [virtual]

The propagation direction can now be set for every propagator. There is no more distinction between unidirectional and bidirectional at class level. The value "anyDiriction" for PropagationDirection provides the functionality of the ex-BidirectionalPropagator. The values "alongMomentum" and "oppositeToMomentum" provide the functionality of the ex-UnidirectionalPropagator.

Reimplemented from Propagator.

Definition at line 128 of file GsfPropagatorWithMaterial.cc.

References theGeometricalPropagator.


Member Data Documentation

Definition at line 182 of file GsfPropagatorWithMaterial.h.

Referenced by materialAtSource(), and setMaterialLocation().