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 Types | Private Member Functions | Private Attributes
GsfPropagatorWithMaterial Class Reference

#include <GsfPropagatorWithMaterial.h>

Inheritance diagram for GsfPropagatorWithMaterial:
Propagator

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. More...
 
const PropagatorgeometricalPropagator () const
 Access to the geometrical propagator. More...
 
 GsfPropagatorWithMaterial (const Propagator &Propagator, const GsfMaterialEffectsUpdator &MEUpdator)
 
 GsfPropagatorWithMaterial (const GsfPropagatorAdapter &Propagator, const FullConvolutionWithMaterial &Convolutor)
 
const MagneticFieldmagneticField () const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Plane &) const override
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Cylinder &) const override
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Plane &) const override
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const override
 
void setMaterialLocation (const MaterialLocation location)
 
virtual bool setMaxDirectionChange (float phiMax)
 
virtual void setPropagationDirection (PropagationDirection dir) override
 
 ~GsfPropagatorWithMaterial ()
 
- Public Member Functions inherited from Propagator
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const final
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Surface &) const final
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const
 Propagate to PCA to a line (given by 2 points) given a starting point. More...
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const
 Propagate to PCA to a line (given by beamSpot position and slope) given a starting point. More...
 
virtual PropagationDirection propagationDirection () const
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual ~Propagator ()
 

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. More...
 
std::pair
< TrajectoryStateOnSurface,
double > 
convoluteWithMaterial (const std::pair< TrajectoryStateOnSurface, double > &) const
 Convolution of state+path with material effects. More...
 
bool materialAtSource () const
 Inclusion of material at the source? More...
 

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 125 of file GsfPropagatorWithMaterial.h.

Definition at line 124 of file GsfPropagatorWithMaterial.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Constructor with explicit single state propagator and material effects objects.

Definition at line 11 of file GsfPropagatorWithMaterial.cc.

Referenced by clone().

12  :
13  Propagator(aPropagator.propagationDirection()),
17 {
18  // if ( propWithPathTimer1==0 ) defineTimer();
19 }
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:48
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
DeepCopyPointerByClone< FullConvolutionWithMaterial > theConvolutor
GsfPropagatorWithMaterial::GsfPropagatorWithMaterial ( const GsfPropagatorAdapter Propagator,
const FullConvolutionWithMaterial Convolutor 
)

Constructor with explicit multi state propagator and convolutor.

Definition at line 21 of file GsfPropagatorWithMaterial.cc.

22  :
23  Propagator(aGsfPropagator.propagationDirection()),
24  theGeometricalPropagator(aGsfPropagator.clone()),
25  theConvolutor(aConvolutor.clone()),
27 {
28  // if ( propWithPathTimer1==0 ) defineTimer();
29 }
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:48
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
DeepCopyPointerByClone< FullConvolutionWithMaterial > theConvolutor
GsfPropagatorWithMaterial::~GsfPropagatorWithMaterial ( )
inline

Definition at line 37 of file GsfPropagatorWithMaterial.h.

37 {}

Member Function Documentation

virtual GsfPropagatorWithMaterial* GsfPropagatorWithMaterial::clone ( void  ) const
inlinevirtual

Implements Propagator.

Definition at line 97 of file GsfPropagatorWithMaterial.h.

References GsfPropagatorWithMaterial(), theConvolutor, and theGeometricalPropagator.

Referenced by GsfTrajectorySmoother::GsfTrajectorySmoother().

98  {
100  }
GsfPropagatorWithMaterial(const Propagator &Propagator, const GsfMaterialEffectsUpdator &MEUpdator)
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
DeepCopyPointerByClone< FullConvolutionWithMaterial > theConvolutor
TrajectoryStateOnSurface GsfPropagatorWithMaterial::convoluteStateWithMaterial ( const TrajectoryStateOnSurface  tsos,
const PropagationDirection  propDir 
) const
private

Convolution of state with material effects.

Definition at line 148 of file GsfPropagatorWithMaterial.cc.

References theConvolutor.

Referenced by propagateWithPath().

150 {
151  //
152  // convolute with material
153  //
154  return (*theConvolutor)(tsos,propDir);
155 }
DeepCopyPointerByClone< FullConvolutionWithMaterial > theConvolutor
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::convoluteWithMaterial ( const std::pair< TrajectoryStateOnSurface, double > &  ) const
private

Convolution of state+path with material effects.

Definition at line 136 of file GsfPropagatorWithMaterial.cc.

References Propagator::propagationDirection(), and theConvolutor.

Referenced by propagateWithPath().

137 {
138  //
139  // convolute with material
140  //
141  PropagationDirection propDir = PropagationDirectionFromPath()(aStateWithPath.second,
143  return TsosWP((*theConvolutor)(aStateWithPath.first,propDir),
144  aStateWithPath.second);
145 }
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:155
PropagationDirection
std::pair< TrajectoryStateOnSurface, double > TsosWP
DeepCopyPointerByClone< FullConvolutionWithMaterial > theConvolutor
const FullConvolutionWithMaterial& GsfPropagatorWithMaterial::convolutionWithMaterial ( ) const
inline

Access to the convolutor and thus to the material effects.

Definition at line 93 of file GsfPropagatorWithMaterial.h.

References theConvolutor.

Referenced by GsfTrajectorySmoother::GsfTrajectorySmoother().

93  {
94  return *theConvolutor;
95  }
DeepCopyPointerByClone< FullConvolutionWithMaterial > theConvolutor
const Propagator& GsfPropagatorWithMaterial::geometricalPropagator ( ) const
inline

Access to the geometrical propagator.

Definition at line 89 of file GsfPropagatorWithMaterial.h.

References theGeometricalPropagator.

Referenced by GsfTrajectorySmoother::GsfTrajectorySmoother().

89  {
91  }
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
const MagneticField* GsfPropagatorWithMaterial::magneticField ( ) const
inlinevirtual

Implements Propagator.

Definition at line 102 of file GsfPropagatorWithMaterial.h.

References GsfPropagatorAdapter::magneticField(), and theGeometricalPropagator.

DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
virtual const MagneticField * magneticField() const
bool GsfPropagatorWithMaterial::materialAtSource ( ) const
private

Inclusion of material at the source?

Definition at line 158 of file GsfPropagatorWithMaterial.cc.

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

Referenced by propagateWithPath().

158  {
161  throw cms::Exception("LogicError")
162  << "PropagatorWithMaterial: propagation direction = anyDirection is "
163  << "incompatible with adding of material at source";
164  }
165  }
168 }
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:155
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const
overridevirtual

Propagation to plane with path length calculation.

Reimplemented from Propagator.

Definition at line 52 of file GsfPropagatorWithMaterial.cc.

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

53  {
54  // TimeMe t1(*propWithPathTimer1,false);
55  //
56  // add material before propagation?
57  //
58  TrajectoryStateOnSurface stateAtSource;
59  if ( materialAtSource() )
60  stateAtSource = convoluteStateWithMaterial(tsos,propagationDirection());
61  else
62  stateAtSource = tsos;
63  if ( !stateAtSource.isValid() ) return TsosWP(stateAtSource,0.);
64  //
65  // geometrical propagation
66  //
67  TsosWP propStateWP(theGeometricalPropagator->propagateWithPath(stateAtSource,plane));
68  if ( !(propStateWP.first).isValid() ) return propStateWP;
69  //
70  // return convoluted state
71  //
72  return convoluteWithMaterial(propStateWP);
73 }
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:155
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override
TrajectoryStateOnSurface convoluteStateWithMaterial(const TrajectoryStateOnSurface, const PropagationDirection) const
Convolution of state with material effects.
std::pair< TrajectoryStateOnSurface, double > TsosWP
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?
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
overridevirtual

Propagation to cylinder with path length calculation.

Reimplemented from Propagator.

Definition at line 76 of file GsfPropagatorWithMaterial.cc.

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

77  {
78  // TimeMe t2(*propWithPathTimer2,false);
79  //
80  // add material before propagation?
81  //
82  TrajectoryStateOnSurface stateAtSource;
83  if ( materialAtSource() )
84  stateAtSource = convoluteStateWithMaterial(tsos,propagationDirection());
85  else
86  stateAtSource = tsos;
87  if ( !stateAtSource.isValid() ) return TsosWP(stateAtSource,0.);
88  //
89  // geometrical propagation
90  //
91  TsosWP propStateWP(theGeometricalPropagator->propagateWithPath(stateAtSource,cylinder));
92  if ( !(propStateWP.first).isValid() ) return propStateWP;
93  //
94  // return convoluted state
95  //
96  return convoluteWithMaterial(propStateWP);
97 }
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:155
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override
TrajectoryStateOnSurface convoluteStateWithMaterial(const TrajectoryStateOnSurface, const PropagationDirection) const
Convolution of state with material effects.
std::pair< TrajectoryStateOnSurface, double > TsosWP
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?
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
overridevirtual

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

Implements Propagator.

Definition at line 100 of file GsfPropagatorWithMaterial.cc.

References convoluteWithMaterial(), materialAtSource(), GsfPropagatorAdapter::propagateWithPath(), and theGeometricalPropagator.

101  {
102  static std::atomic<int> nWarn(0);
103  if ( nWarn++<5 )
104  edm::LogInfo("GsfPropagatorWithMaterial")
105  << "GsfPropagatorWithMaterial used from FTS: input state might have been collapsed!";
106  TsosWP propStateWP = theGeometricalPropagator->propagateWithPath(fts,plane);
107  if ( !(propStateWP.first).isValid() || materialAtSource() ) return propStateWP;
108  //
109  // return convoluted state
110  //
111  return convoluteWithMaterial(propStateWP);
112 }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override
std::pair< TrajectoryStateOnSurface, double > TsosWP
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?
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
std::pair< TrajectoryStateOnSurface, double > GsfPropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
overridevirtual

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

Implements Propagator.

Definition at line 115 of file GsfPropagatorWithMaterial.cc.

References convoluteWithMaterial(), materialAtSource(), GsfPropagatorAdapter::propagateWithPath(), and theGeometricalPropagator.

116  {
117  static std::atomic<int> nWarn(0);
118  if ( nWarn++<5 )
119  edm::LogInfo("GsfPropagatorWithMaterial")
120  << "GsfPropagatorWithMaterial used from FTS: input state might have been collapsed!";
121  TsosWP propStateWP = theGeometricalPropagator->propagateWithPath(fts,cylinder);
122  if ( !(propStateWP.first).isValid() || materialAtSource() ) return propStateWP;
123  //
124  // return convoluted state
125  //
126  return convoluteWithMaterial(propStateWP);
127 }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &) const override
std::pair< TrajectoryStateOnSurface, double > TsosWP
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?
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
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 85 of file GsfPropagatorWithMaterial.h.

References theMaterialLocation.

85  {
86  theMaterialLocation = location;
87  }
virtual bool GsfPropagatorWithMaterial::setMaxDirectionChange ( float  phiMax)
inlinevirtual

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 70 of file GsfPropagatorWithMaterial.h.

References GsfPropagatorAdapter::setMaxDirectionChange(), and theGeometricalPropagator.

70  {
72  }
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
virtual bool setMaxDirectionChange(float phiMax)
void GsfPropagatorWithMaterial::setPropagationDirection ( PropagationDirection  dir)
overridevirtual

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 130 of file GsfPropagatorWithMaterial.cc.

References GsfPropagatorAdapter::setPropagationDirection(), Propagator::setPropagationDirection(), and theGeometricalPropagator.

130  {
133 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:144
DeepCopyPointerByClone< GsfPropagatorAdapter > theGeometricalPropagator
virtual void setPropagationDirection(PropagationDirection dir) override
dbl *** dir
Definition: mlp_gen.cc:35

Member Data Documentation

DeepCopyPointerByClone<FullConvolutionWithMaterial> GsfPropagatorWithMaterial::theConvolutor
private
DeepCopyPointerByClone<GsfPropagatorAdapter> GsfPropagatorWithMaterial::theGeometricalPropagator
private
MaterialLocation GsfPropagatorWithMaterial::theMaterialLocation
private

Definition at line 122 of file GsfPropagatorWithMaterial.h.

Referenced by materialAtSource(), and setMaterialLocation().