#include <Alignment/ReferenceTrajectories/interface/TrajectoryFactoryBase.h>
instances of classes deriving from ReferenceTrajectoryBase, from a TrajTrackPairCollection.
Definition at line 15 of file TrajectoryFactoryBase.h.
Definition at line 22 of file TrajectoryFactoryBase.h.
typedef AlignmentAlgorithmBase::ConstTrajTrackPairCollection TrajectoryFactoryBase::ConstTrajTrackPairCollection |
Definition at line 23 of file TrajectoryFactoryBase.h.
typedef std::vector< TrajectoryStateOnSurface > TrajectoryFactoryBase::ExternalPredictionCollection |
Definition at line 26 of file TrajectoryFactoryBase.h.
Definition at line 21 of file TrajectoryFactoryBase.h.
typedef std::vector< ReferenceTrajectoryPtr > TrajectoryFactoryBase::ReferenceTrajectoryCollection |
Definition at line 24 of file TrajectoryFactoryBase.h.
typedef ReferenceTrajectoryBase::ReferenceTrajectoryPtr TrajectoryFactoryBase::ReferenceTrajectoryPtr |
Definition at line 20 of file TrajectoryFactoryBase.h.
typedef std::pair< TrajectoryStateOnSurface, TransientTrackingRecHit::ConstRecHitContainer > TrajectoryFactoryBase::TrajectoryInput |
Definition at line 25 of file TrajectoryFactoryBase.h.
TrajectoryFactoryBase::TrajectoryFactoryBase | ( | const edm::ParameterSet & | config | ) |
Definition at line 10 of file TrajectoryFactoryBase.cc.
References edm::ParameterSet::getParameter(), materialEffects(), propagationDirection(), theMaterialEffects, thePropDir, theUseInvalidHits, theUseProjectedHits, and theUseWithoutDet.
00011 { 00012 const std::string strMaterialEffects = config.getParameter< std::string >( "MaterialEffects" ); 00013 theMaterialEffects = this->materialEffects( strMaterialEffects ); 00014 00015 const std::string strPropagationDirection = config.getParameter< std::string >( "PropagationDirection" ); 00016 thePropDir = this->propagationDirection( strPropagationDirection ); 00017 00018 theUseWithoutDet = config.getParameter< bool >( "UseHitWithoutDet" ); 00019 theUseInvalidHits = config.getParameter< bool >( "UseInvalidHits" ); 00020 theUseProjectedHits = config.getParameter< bool >( "UseProjectedHits" ); 00021 }
TrajectoryFactoryBase::~TrajectoryFactoryBase | ( | void | ) | [virtual] |
virtual TrajectoryFactoryBase* TrajectoryFactoryBase::clone | ( | void | ) | const [pure virtual] |
const TrajectoryFactoryBase::TrajectoryInput TrajectoryFactoryBase::innermostStateAndRecHits | ( | const ConstTrajTrackPair & | track | ) | const [protected, virtual] |
Definition at line 28 of file TrajectoryFactoryBase.cc.
References orderedTrajectoryMeasurements(), HLT_VtxMuL3::result, and useRecHit().
Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories(), BzeroReferenceTrajectoryFactory::trajectories(), and ReferenceTrajectoryFactory::trajectories().
00029 { 00030 TrajectoryInput result; 00031 00032 // get the trajectory measurements in the correct order, i.e. reverse if needed 00033 Trajectory::DataContainer trajectoryMeasurements 00034 = this->orderedTrajectoryMeasurements( *track.first ); 00035 Trajectory::DataContainer::iterator itM = trajectoryMeasurements.begin(); 00036 00037 // get the innermost valid trajectory state - the corresponding hit must be o.k. as well 00038 while ( itM != trajectoryMeasurements.end() ) 00039 { 00040 if ( ( *itM ).updatedState().isValid() && useRecHit( ( *itM ).recHit() ) ) break; 00041 ++itM; 00042 } 00043 if ( itM != trajectoryMeasurements.end() ) result.first = ( *itM ).updatedState(); 00044 00045 // get the valid RecHits 00046 while ( itM != trajectoryMeasurements.end() ) 00047 { 00048 TransientTrackingRecHit::ConstRecHitPointer aRecHit = ( *itM ).recHit(); 00049 if ( useRecHit( aRecHit ) ) result.second.push_back( aRecHit ); 00050 ++itM; 00051 } 00052 00053 return result; 00054 }
const TrajectoryFactoryBase::MaterialEffects TrajectoryFactoryBase::materialEffects | ( | const std::string & | strME | ) | const [private] |
Definition at line 111 of file TrajectoryFactoryBase.cc.
References ReferenceTrajectoryBase::combined, ReferenceTrajectoryBase::energyLoss, Exception, ReferenceTrajectoryBase::multipleScattering, and ReferenceTrajectoryBase::none.
00112 { 00113 if ( strME == "MultipleScattering" ) return ReferenceTrajectoryBase::multipleScattering; 00114 if ( strME == "EnergyLoss" ) return ReferenceTrajectoryBase::energyLoss; 00115 if ( strME == "Combined" ) return ReferenceTrajectoryBase::combined; 00116 if ( strME == "None" ) return ReferenceTrajectoryBase::none; 00117 00118 throw cms::Exception("BadConfig") 00119 << "[TrajectoryFactoryBase::materialEffects] Unknown parameter: " << strME; 00120 }
const MaterialEffects TrajectoryFactoryBase::materialEffects | ( | void | ) | const [inline] |
Definition at line 40 of file TrajectoryFactoryBase.h.
References theMaterialEffects.
Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories(), BzeroReferenceTrajectoryFactory::trajectories(), ReferenceTrajectoryFactory::trajectories(), DualBzeroTrajectoryFactory::trajectories(), DualTrajectoryFactory::trajectories(), and TrajectoryFactoryBase().
00040 { return theMaterialEffects; }
const Trajectory::DataContainer TrajectoryFactoryBase::orderedTrajectoryMeasurements | ( | const Trajectory & | trajectory | ) | const [protected, virtual] |
Definition at line 58 of file TrajectoryFactoryBase.cc.
References anyDirection, dir, Trajectory::direction(), Trajectory::measurements(), and thePropDir.
Referenced by innermostStateAndRecHits(), DualBzeroTrajectoryFactory::referenceStateAndRecHits(), and DualTrajectoryFactory::referenceStateAndRecHits().
00059 { 00060 const PropagationDirection dir = trajectory.direction(); 00061 const bool hitsAreReverse = ( ( dir == thePropDir || thePropDir == anyDirection ) ? false : true ); 00062 00063 const Trajectory::DataContainer & original = trajectory.measurements(); 00064 00065 if ( hitsAreReverse ) 00066 { 00067 // Simply use this line instead of the copying by hand? 00068 // const Trajectory::DataContainer reordered(original.rbegin(), original.rend()); 00069 Trajectory::DataContainer reordered; 00070 reordered.reserve( original.size() ); 00071 00072 Trajectory::DataContainer::const_reverse_iterator itM; 00073 for ( itM = original.rbegin(); itM != original.rend(); ++itM ) 00074 { 00075 reordered.push_back( *itM ); 00076 } 00077 return reordered; 00078 } 00079 00080 return original; 00081 }
const PropagationDirection TrajectoryFactoryBase::propagationDirection | ( | const std::string & | strPD | ) | const [private] |
Definition at line 124 of file TrajectoryFactoryBase.cc.
References alongMomentum, anyDirection, Exception, and oppositeToMomentum.
00125 { 00126 if ( strPD == "oppositeToMomentum" ) return oppositeToMomentum; 00127 if ( strPD == "alongMomentum" ) return alongMomentum; 00128 if ( strPD == "anyDirection" ) return anyDirection; 00129 00130 throw cms::Exception("BadConfig") 00131 << "[TrajectoryFactoryBase::propagationDirection] Unknown parameter: " << strPD; 00132 }
const PropagationDirection TrajectoryFactoryBase::propagationDirection | ( | void | ) | const [inline] |
Definition at line 41 of file TrajectoryFactoryBase.h.
References thePropDir.
Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories(), BzeroReferenceTrajectoryFactory::trajectories(), ReferenceTrajectoryFactory::trajectories(), DualBzeroTrajectoryFactory::trajectories(), DualTrajectoryFactory::trajectories(), and TrajectoryFactoryBase().
00041 { return thePropDir; }
bool TrajectoryFactoryBase::sameSurface | ( | const Surface & | s1, | |
const Surface & | s2 | |||
) | const [protected] |
Definition at line 84 of file TrajectoryFactoryBase.cc.
References GloballyPositioned< T >::eta(), GloballyPositioned< T >::phi(), and GloballyPositioned< T >::position().
Referenced by BzeroReferenceTrajectoryFactory::trajectories(), and ReferenceTrajectoryFactory::trajectories().
00085 { 00086 // - Should use perp2() instead of perp() 00087 // - Should not rely on floating point equality, but make a minimal range, e.g. 1.e-6 ? 00088 return ( s1.eta() == s2.eta() ) && ( s1.phi() == s2.phi() ) && ( s1.position().perp() == s2.position().perp() ); 00089 }
virtual const ReferenceTrajectoryCollection TrajectoryFactoryBase::trajectories | ( | const edm::EventSetup & | setup, | |
const ConstTrajTrackPairCollection & | tracks, | |||
const ExternalPredictionCollection & | external | |||
) | const [pure virtual] |
virtual const ReferenceTrajectoryCollection TrajectoryFactoryBase::trajectories | ( | const edm::EventSetup & | setup, | |
const ConstTrajTrackPairCollection & | tracks | |||
) | const [pure virtual] |
Referenced by MillePedeAlignmentAlgorithm::run().
bool TrajectoryFactoryBase::useRecHit | ( | const TransientTrackingRecHit::ConstRecHitPointer & | hitPtr | ) | const [protected] |
Definition at line 93 of file TrajectoryFactoryBase.cc.
References theUseInvalidHits, theUseProjectedHits, and theUseWithoutDet.
Referenced by innermostStateAndRecHits(), DualBzeroTrajectoryFactory::referenceStateAndRecHits(), and DualTrajectoryFactory::referenceStateAndRecHits().
00094 { 00095 const GeomDet* det = hitPtr->det(); 00096 if ( !det && !theUseWithoutDet ) return false; 00097 00098 if ( !( theUseInvalidHits || hitPtr->isValid() ) ) return false; 00099 00100 if ( !theUseProjectedHits ) 00101 { 00102 const ProjectedRecHit2D* projectedHit = dynamic_cast< const ProjectedRecHit2D* >( hitPtr.get() ); 00103 if ( projectedHit != 0 ) return false; 00104 } 00105 00106 return true; 00107 }
Definition at line 55 of file TrajectoryFactoryBase.h.
Referenced by materialEffects(), and TrajectoryFactoryBase().
Definition at line 56 of file TrajectoryFactoryBase.h.
Referenced by orderedTrajectoryMeasurements(), propagationDirection(), and TrajectoryFactoryBase().
bool TrajectoryFactoryBase::theUseInvalidHits [private] |
Definition at line 59 of file TrajectoryFactoryBase.h.
Referenced by TrajectoryFactoryBase(), and useRecHit().
Definition at line 60 of file TrajectoryFactoryBase.h.
Referenced by TrajectoryFactoryBase(), and useRecHit().
bool TrajectoryFactoryBase::theUseWithoutDet [private] |
Definition at line 58 of file TrajectoryFactoryBase.h.
Referenced by TrajectoryFactoryBase(), and useRecHit().