#include <TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h>
Public Types | |
enum | MaterialLocation { atSource, atDestination, fromDirection } |
Public Member Functions | |
virtual PropagatorWithMaterial * | clone () const |
const Propagator & | geometricalPropagator () const |
Access to the geometrical propagator. | |
virtual const MagneticField * | magneticField () const |
const MaterialEffectsUpdator & | materialEffectsUpdator () const |
Access to the MaterialEffectsUpdator. | |
virtual TrajectoryStateOnSurface | propagate (const FreeTrajectoryState &fts, const Cylinder &cylinder) const |
virtual TrajectoryStateOnSurface | propagate (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const |
virtual TrajectoryStateOnSurface | propagate (const FreeTrajectoryState &fts, const Plane &plane) const |
virtual TrajectoryStateOnSurface | propagate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const |
virtual std::pair < TrajectoryStateOnSurface, double > | propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &plane) const |
PropagatorWithMaterial (const Propagator &Propagator, const MaterialEffectsUpdator &MEUpdator, const MagneticField *mf=0, bool useRungeKutta=false) | |
Constructor with explicit propagator and material effects objects. | |
PropagatorWithMaterial (PropagationDirection dir, const float mass, const MagneticField *mf=0, const float maxDPhi=1.6, bool useRungeKutta=false) | |
Constructor with PropagationDirection and mass hypothesis. | |
void | setMaterialLocation (const MaterialLocation location) |
Choice of location for including material effects: fromDirection is equivalent to atSource for propagation alongMomentum and to atDestination for propagation oppositeToMomentum. | |
virtual bool | setMaxDirectionChange (float phiMax) |
Limit on change in azimuthal angle. | |
virtual void | setPropagationDirection (PropagationDirection dir) |
Propagation direction. | |
~PropagatorWithMaterial () | |
Private Types | |
typedef std::pair < TrajectoryStateOnSurface, double > | TsosWP |
Private Member Functions | |
bool | materialAtSource () const |
Inclusion of material at the source? | |
Private Attributes | |
const MagneticField * | field |
DeepCopyPointerByClone < Propagator > | theGeometricalPropagator |
MaterialLocation | theMaterialLocation |
DeepCopyPointerByClone < MaterialEffectsUpdator > | theMEUpdator |
bool | useRungeKutta_ |
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.
Definition at line 25 of file PropagatorWithMaterial.h.
typedef std::pair<TrajectoryStateOnSurface,double> PropagatorWithMaterial::TsosWP [private] |
Definition at line 137 of file PropagatorWithMaterial.h.
Definition at line 97 of file PropagatorWithMaterial.h.
00097 {atSource, atDestination, fromDirection};
PropagatorWithMaterial::PropagatorWithMaterial | ( | PropagationDirection | dir, | |
const float | mass, | |||
const MagneticField * | mf = 0 , |
|||
const float | maxDPhi = 1.6 , |
|||
bool | useRungeKutta = false | |||
) |
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.
Definition at line 10 of file PropagatorWithMaterial.cc.
References AnalyticalPropagator_cfi::AnalyticalPropagator, theGeometricalPropagator, and useRungeKutta_.
Referenced by clone().
00014 : 00015 Propagator(dir), 00016 theGeometricalPropagator(), 00017 theMEUpdator(new CombinedMaterialEffectsUpdator(mass)), 00018 theMaterialLocation(atDestination), field(mf),useRungeKutta_(useRungeKutta) { 00019 00020 if(useRungeKutta_) 00021 theGeometricalPropagator = DeepCopyPointerByClone<Propagator>(new RKTestPropagator(mf,dir)); 00022 else theGeometricalPropagator = DeepCopyPointerByClone<Propagator>(new AnalyticalPropagator(mf,dir,maxDPhi)); 00023 00024 }
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 26 of file PropagatorWithMaterial.cc.
00029 : 00030 Propagator(aPropagator.propagationDirection()), 00031 theGeometricalPropagator(aPropagator.clone()), 00032 theMEUpdator(aMEUpdator.clone()), 00033 theMaterialLocation(atDestination), field(mf),useRungeKutta_(useRungeKutta) {}
PropagatorWithMaterial::~PropagatorWithMaterial | ( | ) | [inline] |
virtual PropagatorWithMaterial* PropagatorWithMaterial::clone | ( | void | ) | const [inline, virtual] |
Implements Propagator.
Definition at line 121 of file PropagatorWithMaterial.h.
References PropagatorWithMaterial().
00122 { 00123 return new PropagatorWithMaterial(*this); 00124 }
const Propagator& PropagatorWithMaterial::geometricalPropagator | ( | ) | const [inline] |
Access to the geometrical propagator.
Definition at line 110 of file PropagatorWithMaterial.h.
References theGeometricalPropagator.
00110 { 00111 return *theGeometricalPropagator; 00112 }
virtual const MagneticField* PropagatorWithMaterial::magneticField | ( | ) | const [inline, virtual] |
Implements Propagator.
Definition at line 118 of file PropagatorWithMaterial.h.
References field.
Referenced by CRackTrajectoryBuilder::innerState().
00118 {return field;}
bool PropagatorWithMaterial::materialAtSource | ( | ) | const [private] |
Inclusion of material at the source?
Definition at line 120 of file PropagatorWithMaterial.cc.
References alongMomentum, anyDirection, atDestination, atSource, Exception, fromDirection, Propagator::propagationDirection(), and theMaterialLocation.
Referenced by propagateWithPath().
00120 { 00121 if ( propagationDirection()==anyDirection ) { 00122 if ( theMaterialLocation!=atDestination ) { 00123 string message("PropagatorWithMaterial: propagation direction = anyDirection is "); 00124 message += "incompatible with adding of material at source"; 00125 throw cms::Exception("TrackingTools/MaterialEffects",message); 00126 } 00127 } 00128 return theMaterialLocation==atSource || (theMaterialLocation==fromDirection&& 00129 propagationDirection()==alongMomentum); 00130 }
const MaterialEffectsUpdator& PropagatorWithMaterial::materialEffectsUpdator | ( | ) | const [inline] |
Access to the MaterialEffectsUpdator.
Definition at line 114 of file PropagatorWithMaterial.h.
References theMEUpdator.
00114 { 00115 return *theMEUpdator; 00116 }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate | ( | const FreeTrajectoryState & | fts, | |
const Cylinder & | cylinder | |||
) | const [inline, virtual] |
Implements Propagator.
Definition at line 76 of file PropagatorWithMaterial.h.
References propagateWithPath().
00078 { 00079 // should be implemented (in case underlying propagator has an independent 00080 // implementation) 00081 return propagateWithPath(fts,cylinder).first; 00082 }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate | ( | const TrajectoryStateOnSurface & | tsos, | |
const Cylinder & | cylinder | |||
) | const [inline, virtual] |
Reimplemented from Propagator.
Definition at line 68 of file PropagatorWithMaterial.h.
References propagateWithPath().
00070 { 00071 // should be implemented (in case underlying propagator has an independent 00072 // implementation) 00073 return propagateWithPath(tsos,cylinder).first; 00074 }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate | ( | const FreeTrajectoryState & | fts, | |
const Plane & | plane | |||
) | const [inline, virtual] |
Implements Propagator.
Definition at line 54 of file PropagatorWithMaterial.h.
References propagateWithPath().
00056 { 00057 // should be implemented (in case underlying propagator has an independent 00058 // implementation) 00059 return propagateWithPath(fts,plane).first; 00060 }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate | ( | const TrajectoryStateOnSurface & | tsos, | |
const Plane & | plane | |||
) | const [inline, virtual] |
Reimplemented from Propagator.
Definition at line 46 of file PropagatorWithMaterial.h.
References propagateWithPath().
Referenced by ElectronPixelSeedAnalyzer::analyze(), ElectronSiStripSeedGenerator::checkHitsAndTSOS(), PixelHitMatcher::compatibleSeeds(), OutInConversionSeedFinder::createSeed(), InOutConversionSeedFinder::createSeed(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), RoadSearchTrackCandidateMakerAlgorithm::extrapolateTrajectory(), ConversionTrackEcalImpactPoint::find(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHit(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHits(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHitsByDet(), ElectronPixelSeedGenerator::prepareElTrackSeed(), ElectronGSPixelSeedGenerator::prepareElTrackSeed(), RoadSearchTrackCandidateMakerAlgorithm::PrepareTrackCandidates(), TrackerOnlyConversionProducer::produce(), TrajectorySeedProducer::produce(), ConvBremSeedProducer::produce(), SeedGeneratorForLaserBeams::propagateWithMaterial(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), and CRackTrajectoryBuilder::SortHits().
00048 { 00049 // should be implemented (in case underlying propagator has an independent 00050 // implementation) 00051 return propagateWithPath(tsos,plane).first; 00052 }
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath | ( | const FreeTrajectoryState & | fts, | |
const Cylinder & | cylinder | |||
) | const [virtual] |
Implements Propagator.
Definition at line 48 of file PropagatorWithMaterial.cc.
References materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.
00049 { 00050 TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,cylinder); 00051 if ( !(newTsosWP.first).isValid() || materialAtSource() ) return newTsosWP; 00052 TrajectoryStateOnSurface updatedTSoS = 00053 theMEUpdator->updateState(newTsosWP.first, 00054 PropagationDirectionFromPath()(newTsosWP.second, 00055 propagationDirection())); 00056 return TsosWP(updatedTSoS,newTsosWP.second); 00057 }
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath | ( | const TrajectoryStateOnSurface & | tsos, | |
const Cylinder & | cylinder | |||
) | const [virtual] |
Reimplemented from Propagator.
Definition at line 88 of file PropagatorWithMaterial.cc.
References TrajectoryStateOnSurface::isValid(), materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.
00089 { 00090 // 00091 // add material at starting surface, if requested 00092 // 00093 TrajectoryStateOnSurface stateAtSource; 00094 if ( materialAtSource() ) 00095 stateAtSource = theMEUpdator->updateState(tsos,propagationDirection()); 00096 else 00097 stateAtSource = tsos; 00098 if ( !stateAtSource.isValid() ) return TsosWP(stateAtSource,0.); 00099 // 00100 // geometrical propagation 00101 // 00102 TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(stateAtSource,cylinder); 00103 if ( !(newTsosWP.first).isValid() || materialAtSource() ) return newTsosWP; 00104 // 00105 // add material at destination surface, if requested 00106 // 00107 TrajectoryStateOnSurface updatedTSoS = 00108 theMEUpdator->updateState(newTsosWP.first, 00109 PropagationDirectionFromPath()(newTsosWP.second, 00110 propagationDirection())); 00111 return TsosWP(updatedTSoS,newTsosWP.second); 00112 }
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath | ( | const FreeTrajectoryState & | fts, | |
const Plane & | plane | |||
) | const [virtual] |
Implements Propagator.
Definition at line 36 of file PropagatorWithMaterial.cc.
References materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.
00037 { 00038 TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,plane); 00039 if ( !(newTsosWP.first).isValid() || materialAtSource() ) return newTsosWP; 00040 TrajectoryStateOnSurface updatedTSoS = 00041 theMEUpdator->updateState(newTsosWP.first, 00042 PropagationDirectionFromPath()(newTsosWP.second, 00043 propagationDirection())); 00044 return TsosWP(updatedTSoS,newTsosWP.second); 00045 }
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath | ( | const TrajectoryStateOnSurface & | tsos, | |
const Plane & | plane | |||
) | const [virtual] |
Reimplemented from Propagator.
Definition at line 61 of file PropagatorWithMaterial.cc.
References TrajectoryStateOnSurface::isValid(), materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.
Referenced by propagate().
00062 { 00063 // 00064 // add material at starting surface, if requested 00065 // 00066 TrajectoryStateOnSurface stateAtSource; 00067 if ( materialAtSource() ) 00068 stateAtSource = theMEUpdator->updateState(tsos,propagationDirection()); 00069 else 00070 stateAtSource = tsos; 00071 if ( !stateAtSource.isValid() ) return TsosWP(stateAtSource,0.); 00072 // 00073 // geometrical propagation 00074 // 00075 TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(stateAtSource,plane); 00076 if ( !(newTsosWP.first).isValid() || materialAtSource() ) return newTsosWP; 00077 // 00078 // add material at destination surface, if requested 00079 // 00080 TrajectoryStateOnSurface updatedTSoS = 00081 theMEUpdator->updateState(newTsosWP.first, 00082 PropagationDirectionFromPath()(newTsosWP.second, 00083 propagationDirection())); 00084 return TsosWP(updatedTSoS,newTsosWP.second); 00085 }
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 106 of file PropagatorWithMaterial.h.
References theMaterialLocation.
00106 { 00107 theMaterialLocation = location; 00108 }
virtual bool PropagatorWithMaterial::setMaxDirectionChange | ( | float | phiMax | ) | [inline, virtual] |
Limit on change in azimuthal angle.
Reimplemented from Propagator.
Definition at line 91 of file PropagatorWithMaterial.h.
References theGeometricalPropagator.
00091 { 00092 return theGeometricalPropagator->setMaxDirectionChange(phiMax); 00093 }
void PropagatorWithMaterial::setPropagationDirection | ( | PropagationDirection | dir | ) | [virtual] |
Propagation direction.
Reimplemented from Propagator.
Definition at line 114 of file PropagatorWithMaterial.cc.
References Propagator::setPropagationDirection(), and theGeometricalPropagator.
00114 { 00115 theGeometricalPropagator->setPropagationDirection(dir); 00116 Propagator::setPropagationDirection(dir); 00117 }
const MagneticField* PropagatorWithMaterial::field [private] |
Definition at line 132 of file PropagatorWithMaterial.h.
Referenced by geometricalPropagator(), propagateWithPath(), PropagatorWithMaterial(), setMaxDirectionChange(), and setPropagationDirection().
Definition at line 139 of file PropagatorWithMaterial.h.
Referenced by materialAtSource(), and setMaterialLocation().
Definition at line 136 of file PropagatorWithMaterial.h.
Referenced by materialEffectsUpdator(), and propagateWithPath().
bool PropagatorWithMaterial::useRungeKutta_ [private] |