CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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=nullptr, 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
< Propagator
theGeometricalPropagator
 
MaterialLocation theMaterialLocation
 
DeepCopyPointerByClone
< MaterialEffectsUpdator
theMEUpdator
 
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 = nullptr,
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),
22  : new AnalyticalPropagator(mf, dir, maxDPhi, useOldAnalPropLogic)),
25  field(mf),
defaultRKPropagator::Product rkProduct
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
Propagator * clone() const override
constexpr float ptMin
tuple useRungeKutta
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
MaterialLocation theMaterialLocation
const MagneticField * field
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 PropagatorWithMaterial().

86 { return new PropagatorWithMaterial(*this); }
PropagatorWithMaterial(PropagationDirection dir, const float mass, const MagneticField *mf=nullptr, 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.

Referenced by CRackTrajectoryBuilder::innerState().

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 propagateWithPath().

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 UNLIKELY (!updateOk)
61  newTsosWP.first = TrajectoryStateOnSurface();
62  }
63  if UNLIKELY (!newTsosWP.first.isValid())
64  return newTsosWP;
65  //
66  // geometrical propagation
67  //
68  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first, plane);
69  if UNLIKELY (!newTsosWP.first.isValid() || materialAtSource())
70  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 UNLIKELY (!updateOk)
77  newTsosWP.first = TrajectoryStateOnSurface();
78  return newTsosWP;
79 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
U second(std::pair< T, U > const &p)
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
if(conf_.getParameter< bool >("UseStripCablingDB"))
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 UNLIKELY (!updateOk)
35  newTsosWP.first = TrajectoryStateOnSurface();
36  }
37  return newTsosWP;
38 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
#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 UNLIKELY (!updateOk)
90  newTsosWP.first = TrajectoryStateOnSurface();
91  }
92  if UNLIKELY (!newTsosWP.first.isValid())
93  return newTsosWP;
94  //
95  // geometrical propagation
96  //
97  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first, cylinder);
98  if UNLIKELY (!(newTsosWP.first).isValid() || materialAtSource())
99  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 UNLIKELY (!updateOk)
106  newTsosWP.first = TrajectoryStateOnSurface();
107  return newTsosWP;
108 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
U second(std::pair< T, U > const &p)
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
if(conf_.getParameter< bool >("UseStripCablingDB"))
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 UNLIKELY (!updateOk)
47  newTsosWP.first = TrajectoryStateOnSurface();
48  }
49  return newTsosWP;
50 }
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool materialAtSource() const
Inclusion of material at the source?
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
#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 theMaterialLocation.

78 { theMaterialLocation = location; }
MaterialLocation 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(), 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.

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.