CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
PropagatorWithMaterial Class Referencefinal

#include <PropagatorWithMaterial.h>

Inheritance diagram for PropagatorWithMaterial:
Propagator

Public Types

enum  MaterialLocation { atSource, atDestination, fromDirection }
 

Public Member Functions

PropagatorWithMaterialclone () const override
 
const PropagatorgeometricalPropagator () const
 Access to the geometrical propagator. More...
 
const MagneticFieldmagneticField () const override
 
const MaterialEffectsUpdatormaterialEffectsUpdator () const
 Access to the MaterialEffectsUpdator. More...
 
 PropagatorWithMaterial (PropagationDirection dir, const float mass, const MagneticField *mf=0, const float maxDPhi=1.6, bool useRungeKutta=false, float ptMin=-1., bool useOldGeoPropLogic=true)
 
void setMaterialLocation (const MaterialLocation location)
 
bool setMaxDirectionChange (float phiMax) override
 Limit on change in azimuthal angle. More...
 
void setPropagationDirection (PropagationDirection dir) override
 Propagation direction. More...
 
 ~PropagatorWithMaterial () override
 
- Public Member Functions inherited from Propagator
template<typename STA , typename SUR >
TrajectoryStateOnSurface propagate (STA const &state, SUR const &surface) const
 
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 final
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual ~Propagator ()
 

Private Types

typedef std::pair< TrajectoryStateOnSurface, double > TsosWP
 

Private Member Functions

bool materialAtSource () const
 Inclusion of material at the source? More...
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const override
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const override
 

Private Attributes

const MagneticFieldfield
 
defaultRKPropagator::Product rkProduct
 
DeepCopyPointerByClone< PropagatortheGeometricalPropagator
 
MaterialLocation theMaterialLocation
 
DeepCopyPointerByClone< MaterialEffectsUpdatortheMEUpdator
 
bool useRungeKutta_
 

Detailed Description

Propagation including material effects.

Propagates using a specific for the geometrical part and a MaterialEffectsUpdator to include multiple scattering and energy loss. By default material effects are included at the source in the case of forward propagation and at the destination for backward propagation. Material effects at the source can only be included when propagating from a TrajectoryStateOnSurface. Ported from ORCA.

Author
todorov, cerati

Definition at line 25 of file PropagatorWithMaterial.h.

Member Typedef Documentation

typedef std::pair<TrajectoryStateOnSurface, double> PropagatorWithMaterial::TsosWP
private

Definition at line 100 of file PropagatorWithMaterial.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

PropagatorWithMaterial::PropagatorWithMaterial ( PropagationDirection  dir,
const float  mass,
const MagneticField mf = 0,
const float  maxDPhi = 1.6,
bool  useRungeKutta = false,
float  ptMin = -1.,
bool  useOldGeoPropLogic = true 
)

Constructor with PropagationDirection and mass hypothesis. Uses AnalyticalPropagator and CombinedMaterialEffectsUpdator with explicit mass hypothesis.MaxDPhi is a cut on the max change in phi during state propagation. For propagation of very low pt tracks (e.g. loopers), this cut can be loosened. If ptMin > 0, then multiple scattering calculations will take into account the uncertainty in the reconstructed track momentum, (by default neglected), but assuming that the track Pt will never fall below ptMin.

Definition at line 12 of file PropagatorWithMaterial.cc.

Referenced by clone().

19  : Propagator(dir),
20  rkProduct(mf, dir),
25  field(mf),
defaultRKPropagator::Product rkProduct
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
MaterialLocation theMaterialLocation
const MagneticField * field
Propagator * clone() const override
PropagatorWithMaterial::~PropagatorWithMaterial ( )
override

Definition at line 10 of file PropagatorWithMaterial.cc.

10 {}

Member Function Documentation

PropagatorWithMaterial* PropagatorWithMaterial::clone ( void  ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 86 of file PropagatorWithMaterial.h.

References dso_internal, materialAtSource(), and PropagatorWithMaterial().

86 { return new PropagatorWithMaterial(*this); }
PropagatorWithMaterial(PropagationDirection dir, const float mass, const MagneticField *mf=0, const float maxDPhi=1.6, bool useRungeKutta=false, float ptMin=-1., bool useOldGeoPropLogic=true)
const Propagator& PropagatorWithMaterial::geometricalPropagator ( ) const
inline

Access to the geometrical propagator.

Definition at line 80 of file PropagatorWithMaterial.h.

References theGeometricalPropagator.

80 { return *theGeometricalPropagator; }
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
const MagneticField* PropagatorWithMaterial::magneticField ( ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 84 of file PropagatorWithMaterial.h.

References field.

84 { return field; }
const MagneticField * field
bool PropagatorWithMaterial::materialAtSource ( ) const
private

Inclusion of material at the source?

Definition at line 115 of file PropagatorWithMaterial.cc.

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

Referenced by clone(), and propagateWithPath().

115  {
116  if
119  "TrackingTools/MaterialEffects",
120  "PropagatorWithMaterial: propagation direction = anyDirection is incompatible with adding of material at source");
121 
124 }
return((rh^lh)&mask)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
Namespace of DDCMS conversion namespace.
MaterialLocation theMaterialLocation
#define UNLIKELY(x)
Definition: Likely.h:21
static std::string const source
Definition: EdmProvDump.cc:47
const MaterialEffectsUpdator& PropagatorWithMaterial::materialEffectsUpdator ( ) const
inline

Access to the MaterialEffectsUpdator.

Definition at line 82 of file PropagatorWithMaterial.h.

References theMEUpdator.

82 { return *theMEUpdator; }
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const
overrideprivatevirtual

Reimplemented from Propagator.

Definition at line 52 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagateWithPath(), Propagator::propagationDirection(), theGeometricalPropagator, theMEUpdator, UNLIKELY, and MaterialEffectsUpdator::updateStateInPlace().

53  {
54  //
55  // add material at starting surface, if requested
56  //
57  TsosWP newTsosWP(tsos, 0.);
58  if (materialAtSource()) {
59  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first, propagationDirection());
60  if
61  UNLIKELY(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
62  }
63  if
64  UNLIKELY(!newTsosWP.first.isValid()) return newTsosWP;
65  //
66  // geometrical propagation
67  //
68  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first, plane);
69  if
70  UNLIKELY(!newTsosWP.first.isValid() || materialAtSource()) return newTsosWP;
71  //
72  // add material at destination surface, if requested
73  //
74  bool updateOk = theMEUpdator->updateStateInPlace(
75  newTsosWP.first, PropagationDirectionFromPath()(newTsosWP.second, propagationDirection()));
76  if
77  UNLIKELY(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
78  return newTsosWP;
79 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
return((rh^lh)&mask)
U second(std::pair< T, U > const &p)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
#define UNLIKELY(x)
Definition: Likely.h:21
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 28 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagateWithPath(), Propagator::propagationDirection(), theGeometricalPropagator, theMEUpdator, UNLIKELY, and MaterialEffectsUpdator::updateStateInPlace().

29  {
30  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts, plane);
31  if ((newTsosWP.first).isValid() && !materialAtSource()) {
32  bool updateOk = theMEUpdator->updateStateInPlace(
33  newTsosWP.first, PropagationDirectionFromPath()(newTsosWP.second, propagationDirection()));
34  if
35  UNLIKELY(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
36  }
37  return newTsosWP;
38 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
return((rh^lh)&mask)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
#define UNLIKELY(x)
Definition: Likely.h:21
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
overrideprivatevirtual

Reimplemented from Propagator.

Definition at line 81 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagateWithPath(), Propagator::propagationDirection(), theGeometricalPropagator, theMEUpdator, UNLIKELY, and MaterialEffectsUpdator::updateStateInPlace().

82  {
83  //
84  // add material at starting surface, if requested
85  //
86  TsosWP newTsosWP(tsos, 0.);
87  if (materialAtSource()) {
88  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first, propagationDirection());
89  if
90  UNLIKELY(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
91  }
92  if
93  UNLIKELY(!newTsosWP.first.isValid()) return newTsosWP;
94  //
95  // geometrical propagation
96  //
97  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first, cylinder);
98  if
99  UNLIKELY(!(newTsosWP.first).isValid() || materialAtSource()) return newTsosWP;
100  //
101  // add material at destination surface, if requested
102  //
103  bool updateOk = theMEUpdator->updateStateInPlace(
104  newTsosWP.first, PropagationDirectionFromPath()(newTsosWP.second, propagationDirection()));
105  if
106  UNLIKELY(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
107  return newTsosWP;
108 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
return((rh^lh)&mask)
U second(std::pair< T, U > const &p)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
#define UNLIKELY(x)
Definition: Likely.h:21
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 40 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagateWithPath(), Propagator::propagationDirection(), theGeometricalPropagator, theMEUpdator, UNLIKELY, and MaterialEffectsUpdator::updateStateInPlace().

41  {
42  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts, cylinder);
43  if ((newTsosWP.first).isValid() && !materialAtSource()) {
44  bool updateOk = theMEUpdator->updateStateInPlace(
45  newTsosWP.first, PropagationDirectionFromPath()(newTsosWP.second, propagationDirection()));
46  if
47  UNLIKELY(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
48  }
49  return newTsosWP;
50 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
return((rh^lh)&mask)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
#define UNLIKELY(x)
Definition: Likely.h:21
void PropagatorWithMaterial::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 78 of file PropagatorWithMaterial.h.

References EcalCondDBWriter_cfi::location, and theMaterialLocation.

bool PropagatorWithMaterial::setMaxDirectionChange ( float  phiMax)
inlineoverridevirtual

Limit on change in azimuthal angle.

Reimplemented from Propagator.

Definition at line 65 of file PropagatorWithMaterial.h.

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

virtual bool setMaxDirectionChange(float phiMax)
Definition: Propagator.h:151
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
void PropagatorWithMaterial::setPropagationDirection ( PropagationDirection  dir)
overridevirtual

Propagation direction.

Reimplemented from Propagator.

Definition at line 110 of file PropagatorWithMaterial.cc.

References Propagator::setPropagationDirection(), and theGeometricalPropagator.

Referenced by setMaxDirectionChange().

110  {
113 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
DeepCopyPointerByClone< Propagator > theGeometricalPropagator

Member Data Documentation

const MagneticField* PropagatorWithMaterial::field
private

Definition at line 103 of file PropagatorWithMaterial.h.

Referenced by magneticField().

defaultRKPropagator::Product PropagatorWithMaterial::rkProduct
private

Definition at line 95 of file PropagatorWithMaterial.h.

DeepCopyPointerByClone<Propagator> PropagatorWithMaterial::theGeometricalPropagator
private
MaterialLocation PropagatorWithMaterial::theMaterialLocation
private

Definition at line 102 of file PropagatorWithMaterial.h.

Referenced by materialAtSource(), and setMaterialLocation().

DeepCopyPointerByClone<MaterialEffectsUpdator> PropagatorWithMaterial::theMEUpdator
private

Definition at line 99 of file PropagatorWithMaterial.h.

Referenced by materialEffectsUpdator(), and propagateWithPath().

bool PropagatorWithMaterial::useRungeKutta_
private

Definition at line 104 of file PropagatorWithMaterial.h.