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
PropagatorWithMaterial Class Referencefinal

#include <PropagatorWithMaterial.h>

Inheritance diagram for PropagatorWithMaterial:
Propagator

Public Types

enum  MaterialLocation { atSource, atDestination, fromDirection }
 

Public Member Functions

virtual PropagatorWithMaterialclone () const
 
const PropagatorgeometricalPropagator () const
 Access to the geometrical propagator. More...
 
virtual const MagneticFieldmagneticField () const
 
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)
 
virtual bool setMaxDirectionChange (float phiMax)
 Limit on change in azimuthal angle. More...
 
virtual void setPropagationDirection (PropagationDirection dir) override
 Propagation direction. More...
 
virtual ~PropagatorWithMaterial ()
 
- 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...
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const override
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const override
 
virtual 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 113 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 13 of file PropagatorWithMaterial.cc.

Referenced by clone().

18  :
19  Propagator(dir),
20  rkProduct(mf,dir),
23  new AnalyticalPropagator(mf,dir,maxDPhi,useOldAnalPropLogic)
24  ),
27 
28 
29 }
virtual Propagator * clone() const
defaultRKPropagator::Product rkProduct
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
MaterialLocation theMaterialLocation
dbl *** dir
Definition: mlp_gen.cc:35
const MagneticField * field
PropagatorWithMaterial::~PropagatorWithMaterial ( )
virtual

Definition at line 10 of file PropagatorWithMaterial.cc.

10 {}

Member Function Documentation

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

Implements Propagator.

Definition at line 95 of file PropagatorWithMaterial.h.

References PropagatorWithMaterial().

96  {
97  return new PropagatorWithMaterial(*this);
98  }
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 84 of file PropagatorWithMaterial.h.

References theGeometricalPropagator.

84  {
86  }
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
virtual const MagneticField* PropagatorWithMaterial::magneticField ( ) const
inlinevirtual

Implements Propagator.

Definition at line 92 of file PropagatorWithMaterial.h.

References field.

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

Inclusion of material at the source?

Definition at line 118 of file PropagatorWithMaterial.cc.

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

Referenced by propagateWithPath().

118  {
120  throw cms::Exception("TrackingTools/MaterialEffects",
121  "PropagatorWithMaterial: propagation direction = anyDirection is incompatible with adding of material at source");
122 
125 }
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
#define unlikely(x)
MaterialLocation theMaterialLocation
return(e1-e2)*(e1-e2)+dp *dp
static std::string const source
Definition: EdmProvDump.cc:43
const MaterialEffectsUpdator& PropagatorWithMaterial::materialEffectsUpdator ( ) const
inline

Access to the MaterialEffectsUpdator.

Definition at line 88 of file PropagatorWithMaterial.h.

References theMEUpdator.

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

Reimplemented from Propagator.

Definition at line 59 of file PropagatorWithMaterial.cc.

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

60  {
61  //
62  // add material at starting surface, if requested
63  //
64  TsosWP newTsosWP(tsos,0.);
65  if ( materialAtSource() ) {
66  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
67  if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
68  }
69  if unlikely( !newTsosWP.first.isValid() ) return newTsosWP;
70  //
71  // geometrical propagation
72  //
73  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first,plane);
74  if unlikely( !newTsosWP.first.isValid() || materialAtSource() ) return newTsosWP;
75  //
76  // add material at destination surface, if requested
77  //
78  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
81  if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
82  return newTsosWP;
83 }
bool materialAtSource() const
Inclusion of material at the source?
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
#define unlikely(x)
U second(std::pair< T, U > const &p)
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 32 of file PropagatorWithMaterial.cc.

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

33  {
34  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,plane);
35  if ( (newTsosWP.first).isValid() && !materialAtSource() ) {
36  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
37  PropagationDirectionFromPath()(newTsosWP.second,
39  if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
40  }
41  return newTsosWP;
42 }
bool materialAtSource() const
Inclusion of material at the source?
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
#define unlikely(x)
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
return(e1-e2)*(e1-e2)+dp *dp
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
overrideprivatevirtual

Reimplemented from Propagator.

Definition at line 86 of file PropagatorWithMaterial.cc.

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

87  {
88  //
89  // add material at starting surface, if requested
90  //
91  TsosWP newTsosWP(tsos,0.);
92  if ( materialAtSource() ) {
93  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
94  if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
95  }
96  if unlikely( !newTsosWP.first.isValid() ) return newTsosWP;
97  //
98  // geometrical propagation
99  //
100  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first,cylinder);
101  if unlikely( !(newTsosWP.first).isValid() || materialAtSource() ) return newTsosWP;
102  //
103  // add material at destination surface, if requested
104  //
105  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
108  if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
109  return newTsosWP;
110 }
bool materialAtSource() const
Inclusion of material at the source?
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
#define unlikely(x)
U second(std::pair< T, U > const &p)
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
overrideprivatevirtual

Implements Propagator.

Definition at line 45 of file PropagatorWithMaterial.cc.

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

46  {
47  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,cylinder);
48  if ( (newTsosWP.first).isValid() && !materialAtSource() ) {
49  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
50  PropagationDirectionFromPath()(newTsosWP.second,
52  if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
53  }
54  return newTsosWP;
55 }
bool materialAtSource() const
Inclusion of material at the source?
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
#define unlikely(x)
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
return(e1-e2)*(e1-e2)+dp *dp
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 80 of file PropagatorWithMaterial.h.

References theMaterialLocation.

80  {
81  theMaterialLocation = location;
82  }
MaterialLocation theMaterialLocation
virtual bool PropagatorWithMaterial::setMaxDirectionChange ( float  phiMax)
inlinevirtual

Limit on change in azimuthal angle.

Reimplemented from Propagator.

Definition at line 65 of file PropagatorWithMaterial.h.

References Propagator::setMaxDirectionChange(), and theGeometricalPropagator.

65  {
67  }
virtual bool setMaxDirectionChange(float phiMax)
Definition: Propagator.h:165
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
void PropagatorWithMaterial::setPropagationDirection ( PropagationDirection  dir)
overridevirtual

Propagation direction.

Reimplemented from Propagator.

Definition at line 112 of file PropagatorWithMaterial.cc.

References Propagator::setPropagationDirection(), and theGeometricalPropagator.

112  {
115 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:140
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
dbl *** dir
Definition: mlp_gen.cc:35

Member Data Documentation

const MagneticField* PropagatorWithMaterial::field
private

Definition at line 116 of file PropagatorWithMaterial.h.

Referenced by magneticField().

defaultRKPropagator::Product PropagatorWithMaterial::rkProduct
private

Definition at line 107 of file PropagatorWithMaterial.h.

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

Definition at line 115 of file PropagatorWithMaterial.h.

Referenced by materialAtSource(), and setMaterialLocation().

DeepCopyPointerByClone<MaterialEffectsUpdator> PropagatorWithMaterial::theMEUpdator
private

Definition at line 112 of file PropagatorWithMaterial.h.

Referenced by materialEffectsUpdator(), and propagateWithPath().

bool PropagatorWithMaterial::useRungeKutta_
private

Definition at line 117 of file PropagatorWithMaterial.h.