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 Reference

#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...
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
 
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Plane &plane) 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 TrajectoryStateOnSurface &tsos, const Plane &plane) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
 
 PropagatorWithMaterial (PropagationDirection dir, const float mass, const MagneticField *mf=0, const float maxDPhi=1.6, bool useRungeKutta=false, float ptMin=-1., bool useOldGeoPropLogic=true)
 
 PropagatorWithMaterial (const Propagator &Propagator, const MaterialEffectsUpdator &MEUpdator, const MagneticField *mf=0, bool useRungeKutta=false)
 
void setMaterialLocation (const MaterialLocation location)
 
virtual bool setMaxDirectionChange (float phiMax)
 Limit on change in azimuthal angle. More...
 
virtual void setPropagationDirection (PropagationDirection dir) const
 Propagation direction. More...
 
virtual ~PropagatorWithMaterial ()
 
- Public Member Functions inherited from Propagator
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &, const Surface &) const
 
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &, const reco::BeamSpot &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &, const Surface &) const
 
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &, const Surface &) const
 
virtual std::pair
< FreeTrajectoryState, double > 
propagateWithPath (const FreeTrajectoryState &, const GlobalPoint &, const GlobalPoint &) const
 
virtual PropagationDirection propagationDirection () const
 
 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...
 

Private Attributes

const MagneticFieldfield
 
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.

Date:
2012/02/03 22:51:35
Revision:
1.13
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 141 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 14 of file PropagatorWithMaterial.cc.

References AnalyticalPropagator_cfi::AnalyticalPropagator, theGeometricalPropagator, and useRungeKutta_.

Referenced by clone().

19  :
20  Propagator(dir),
24 
25  if(useRungeKutta_)
28  useOldAnalPropLogic));
29 
30 }
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:41
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
MaterialLocation theMaterialLocation
tuple mass
Definition: scaleCards.py:27
dbl *** dir
Definition: mlp_gen.cc:35
const MagneticField * field
PropagatorWithMaterial::PropagatorWithMaterial ( const Propagator Propagator,
const MaterialEffectsUpdator MEUpdator,
const MagneticField mf = 0,
bool  useRungeKutta = false 
)

Constructor with explicit propagator and material effects objects.

Definition at line 32 of file PropagatorWithMaterial.cc.

35  :
36  Propagator(aPropagator.propagationDirection()),
37  theGeometricalPropagator(aPropagator.clone()),
38  theMEUpdator(aMEUpdator.clone()),
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:41
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
MaterialLocation theMaterialLocation
const MagneticField * field
PropagatorWithMaterial::~PropagatorWithMaterial ( )
virtual

Definition at line 11 of file PropagatorWithMaterial.cc.

11 {}

Member Function Documentation

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

Implements Propagator.

Definition at line 125 of file PropagatorWithMaterial.h.

References PropagatorWithMaterial().

126  {
127  return new PropagatorWithMaterial(*this);
128  }
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 114 of file PropagatorWithMaterial.h.

References theGeometricalPropagator.

114  {
115  return *theGeometricalPropagator;
116  }
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
virtual const MagneticField* PropagatorWithMaterial::magneticField ( ) const
inlinevirtual

Implements Propagator.

Definition at line 122 of file PropagatorWithMaterial.h.

References field.

Referenced by CRackTrajectoryBuilder::innerState().

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

Inclusion of material at the source?

Definition at line 128 of file PropagatorWithMaterial.cc.

References alongMomentum, anyDirection, atDestination, atSource, edm::hlt::Exception, fromDirection, python.rootplot.argparse::message, Propagator::propagationDirection(), and theMaterialLocation.

Referenced by propagateWithPath().

128  {
131  string message("PropagatorWithMaterial: propagation direction = anyDirection is ");
132  message += "incompatible with adding of material at source";
133  throw cms::Exception("TrackingTools/MaterialEffects",message);
134  }
135  }
138 }
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
MaterialLocation theMaterialLocation
const MaterialEffectsUpdator& PropagatorWithMaterial::materialEffectsUpdator ( ) const
inline

Access to the MaterialEffectsUpdator.

Definition at line 118 of file PropagatorWithMaterial.h.

References theMEUpdator.

118  {
119  return *theMEUpdator;
120  }
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const
inlinevirtual

Reimplemented from Propagator.

Definition at line 50 of file PropagatorWithMaterial.h.

References propagateWithPath().

Referenced by CosmicTrajectoryBuilder::AddHit(), SiStripElectronSeedGenerator::altCheckHitsAndTSOS(), ElectronSeedAnalyzer::analyze(), SiStripElectronSeedGenerator::checkHitsAndTSOS(), ConversionProducer::checkPhi(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), RoadSearchTrackCandidateMakerAlgorithm::extrapolateTrajectory(), ConversionTrackEcalImpactPoint::find(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHit(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHits(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHitsByDet(), ConversionProducer::getTrackImpactPosition(), FastElectronSeedGenerator::prepareElTrackSeed(), RoadSearchTrackCandidateMakerAlgorithm::PrepareTrackCandidates(), TrajectorySeedProducer::produce(), TrackCandidateProducer::produce(), ConvBremSeedProducer::produce(), TkConvValidator::recalculateMomentumAtFittedVertex(), CRackTrajectoryBuilder::run(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), and CRackTrajectoryBuilder::SortHits().

52  {
53  // should be implemented (in case underlying propagator has an independent
54  // implementation)
55  return propagateWithPath(tsos,plane).first;
56  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const FreeTrajectoryState fts,
const Plane plane 
) const
inlinevirtual

Implements Propagator.

Definition at line 58 of file PropagatorWithMaterial.h.

References propagateWithPath().

60  {
61  // should be implemented (in case underlying propagator has an independent
62  // implementation)
63  return propagateWithPath(fts,plane).first;
64  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
inlinevirtual

Reimplemented from Propagator.

Definition at line 72 of file PropagatorWithMaterial.h.

References propagateWithPath().

74  {
75  // should be implemented (in case underlying propagator has an independent
76  // implementation)
77  return propagateWithPath(tsos,cylinder).first;
78  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
inlinevirtual

Implements Propagator.

Definition at line 80 of file PropagatorWithMaterial.h.

References propagateWithPath().

82  {
83  // should be implemented (in case underlying propagator has an independent
84  // implementation)
85  return propagateWithPath(fts,cylinder).first;
86  }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const
virtual

Reimplemented from Propagator.

Definition at line 69 of file PropagatorWithMaterial.cc.

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

Referenced by propagate().

70  {
71  //
72  // add material at starting surface, if requested
73  //
74  TsosWP newTsosWP(tsos,0.);
75  if ( materialAtSource() ) {
76  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
77  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
78  }
79  if ( !newTsosWP.first.isValid() ) return newTsosWP;
80  //
81  // geometrical propagation
82  //
83  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first,plane);
84  if ( !newTsosWP.first.isValid() || materialAtSource() ) return newTsosWP;
85  //
86  // add material at destination surface, if requested
87  //
88  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
89  PropagationDirectionFromPath()(newTsosWP.second,
91  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
92  return newTsosWP;
93 }
bool materialAtSource() const
Inclusion of material at the source?
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
virtual

Implements Propagator.

Definition at line 42 of file PropagatorWithMaterial.cc.

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

43  {
44  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,plane);
45  if ( (newTsosWP.first).isValid() && !materialAtSource() ) {
46  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
47  PropagationDirectionFromPath()(newTsosWP.second,
49  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
50  }
51  return newTsosWP;
52 }
bool materialAtSource() const
Inclusion of material at the source?
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const
virtual

Reimplemented from Propagator.

Definition at line 96 of file PropagatorWithMaterial.cc.

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

97  {
98  //
99  // add material at starting surface, if requested
100  //
101  TsosWP newTsosWP(tsos,0.);
102  if ( materialAtSource() ) {
103  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
104  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
105  }
106  if ( !newTsosWP.first.isValid() ) return newTsosWP;
107  //
108  // geometrical propagation
109  //
110  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first,cylinder);
111  if ( !(newTsosWP.first).isValid() || materialAtSource() ) return newTsosWP;
112  //
113  // add material at destination surface, if requested
114  //
115  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
116  PropagationDirectionFromPath()(newTsosWP.second,
118  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
119  return newTsosWP;
120 }
bool materialAtSource() const
Inclusion of material at the source?
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
virtual

Implements Propagator.

Definition at line 55 of file PropagatorWithMaterial.cc.

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

56  {
57  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,cylinder);
58  if ( (newTsosWP.first).isValid() && !materialAtSource() ) {
59  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
60  PropagationDirectionFromPath()(newTsosWP.second,
62  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
63  }
64  return newTsosWP;
65 }
bool materialAtSource() const
Inclusion of material at the source?
virtual PropagationDirection propagationDirection() const
Definition: Propagator.h:143
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual bool updateStateInPlace(TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
DeepCopyPointerByClone< MaterialEffectsUpdator > theMEUpdator
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
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 110 of file PropagatorWithMaterial.h.

References theMaterialLocation.

110  {
111  theMaterialLocation = location;
112  }
MaterialLocation theMaterialLocation
virtual bool PropagatorWithMaterial::setMaxDirectionChange ( float  phiMax)
inlinevirtual

Limit on change in azimuthal angle.

Reimplemented from Propagator.

Definition at line 95 of file PropagatorWithMaterial.h.

References Propagator::setMaxDirectionChange(), and theGeometricalPropagator.

95  {
97  }
virtual bool setMaxDirectionChange(float phiMax)
Definition: Propagator.h:157
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
void PropagatorWithMaterial::setPropagationDirection ( PropagationDirection  dir) const
virtual

Propagation direction.

Reimplemented from Propagator.

Definition at line 122 of file PropagatorWithMaterial.cc.

References Propagator::setPropagationDirection(), and theGeometricalPropagator.

122  {
125 }
DeepCopyPointerByClone< Propagator > theGeometricalPropagator
virtual void setPropagationDirection(PropagationDirection dir) const
Definition: Propagator.h:132
dbl *** dir
Definition: mlp_gen.cc:35

Member Data Documentation

const MagneticField* PropagatorWithMaterial::field
private

Definition at line 144 of file PropagatorWithMaterial.h.

Referenced by magneticField().

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

Definition at line 143 of file PropagatorWithMaterial.h.

Referenced by materialAtSource(), and setMaterialLocation().

DeepCopyPointerByClone<MaterialEffectsUpdator> PropagatorWithMaterial::theMEUpdator
private

Definition at line 140 of file PropagatorWithMaterial.h.

Referenced by materialEffectsUpdator(), and propagateWithPath().

bool PropagatorWithMaterial::useRungeKutta_
private

Definition at line 145 of file PropagatorWithMaterial.h.

Referenced by PropagatorWithMaterial().