#include <TrajectoryFactoryBase.h>
Definition at line 19 of file TrajectoryFactoryBase.h.
Definition at line 26 of file TrajectoryFactoryBase.h.
typedef AlignmentAlgorithmBase::ConstTrajTrackPairCollection TrajectoryFactoryBase::ConstTrajTrackPairCollection |
Definition at line 27 of file TrajectoryFactoryBase.h.
typedef std::vector< TrajectoryStateOnSurface > TrajectoryFactoryBase::ExternalPredictionCollection |
Definition at line 30 of file TrajectoryFactoryBase.h.
Definition at line 25 of file TrajectoryFactoryBase.h.
typedef std::vector< ReferenceTrajectoryPtr > TrajectoryFactoryBase::ReferenceTrajectoryCollection |
Definition at line 28 of file TrajectoryFactoryBase.h.
typedef ReferenceTrajectoryBase::ReferenceTrajectoryPtr TrajectoryFactoryBase::ReferenceTrajectoryPtr |
Definition at line 24 of file TrajectoryFactoryBase.h.
typedef std::pair< TrajectoryStateOnSurface, TransientTrackingRecHit::ConstRecHitContainer > TrajectoryFactoryBase::TrajectoryInput |
Definition at line 29 of file TrajectoryFactoryBase.h.
TrajectoryFactoryBase::TrajectoryFactoryBase | ( | const edm::ParameterSet & | config | ) |
Definition at line 10 of file TrajectoryFactoryBase.cc.
References edm::ParameterSet::getParameter(), materialEffects(), propagationDirection(), AlCaHLTBitMon_QueryRunRegistry::string, theMaterialEffects, thePropDir, theUseBeamSpot, theUseInvalidHits, theUseProjectedHits, and theUseWithoutDet.
: theConfig(config) { const std::string strMaterialEffects = config.getParameter< std::string >( "MaterialEffects" ); theMaterialEffects = this->materialEffects( strMaterialEffects ); const std::string strPropagationDirection = config.getParameter< std::string >( "PropagationDirection" ); thePropDir = this->propagationDirection( strPropagationDirection ); theUseWithoutDet = config.getParameter< bool >( "UseHitWithoutDet" ); theUseInvalidHits = config.getParameter< bool >( "UseInvalidHits" ); theUseProjectedHits = config.getParameter< bool >( "UseProjectedHits" ); theUseBeamSpot = config.getParameter< bool >( "UseBeamSpot" ); edm::LogInfo("Alignment") << "@SUB=TrajectoryFactoryBase" << "TrajectoryFactory '" << config.getParameter<std::string>("TrajectoryFactoryName") << "' with following settings:" << "\nmaterial effects: " << strMaterialEffects << "\npropagation: " << strPropagationDirection << "\nuse hits without det: " << (theUseWithoutDet ? "yes" : "no") << "\nuse invalid hits: " << (theUseInvalidHits ? "yes" : "no") << "\nuse projected hits: " << (theUseProjectedHits ? "yes" : "no") << "\nuse beamspot: " << (theUseBeamSpot ? "yes" : "no"); }
TrajectoryFactoryBase::~TrajectoryFactoryBase | ( | void | ) | [virtual] |
Definition at line 36 of file TrajectoryFactoryBase.cc.
{}
virtual TrajectoryFactoryBase* TrajectoryFactoryBase::clone | ( | void | ) | const [pure virtual] |
const edm::ParameterSet& TrajectoryFactoryBase::configuration | ( | ) | const [inline] |
Definition at line 48 of file TrajectoryFactoryBase.h.
References theConfig.
Referenced by ReferenceTrajectoryFactory::bzeroFactory().
{ return theConfig; }
const TrajectoryFactoryBase::TrajectoryInput TrajectoryFactoryBase::innermostStateAndRecHits | ( | const ConstTrajTrackPair & | track | ) | const [protected, virtual] |
Definition at line 40 of file TrajectoryFactoryBase.cc.
References orderedTrajectoryMeasurements(), query::result, and useRecHit().
Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories(), BzeroReferenceTrajectoryFactory::trajectories(), and ReferenceTrajectoryFactory::trajectories().
{ TrajectoryInput result; // get the trajectory measurements in the correct order, i.e. reverse if needed Trajectory::DataContainer trajectoryMeasurements = this->orderedTrajectoryMeasurements( *track.first ); Trajectory::DataContainer::iterator itM = trajectoryMeasurements.begin(); // get the innermost valid trajectory state - the corresponding hit must be o.k. as well while ( itM != trajectoryMeasurements.end() ) { if ( ( *itM ).updatedState().isValid() && useRecHit( ( *itM ).recHit() ) ) break; ++itM; } if ( itM != trajectoryMeasurements.end() ) result.first = ( *itM ).updatedState(); // get the valid RecHits while ( itM != trajectoryMeasurements.end() ) { TransientTrackingRecHit::ConstRecHitPointer aRecHit = ( *itM ).recHit(); if ( useRecHit( aRecHit ) ) result.second.push_back( aRecHit ); ++itM; } return result; }
MaterialEffects TrajectoryFactoryBase::materialEffects | ( | void | ) | const [inline] |
Definition at line 46 of file TrajectoryFactoryBase.h.
References theMaterialEffects.
Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories(), BzeroReferenceTrajectoryFactory::trajectories(), ReferenceTrajectoryFactory::trajectories(), DualBzeroTrajectoryFactory::trajectories(), DualTrajectoryFactory::trajectories(), and TrajectoryFactoryBase().
{ return theMaterialEffects; }
TrajectoryFactoryBase::MaterialEffects TrajectoryFactoryBase::materialEffects | ( | const std::string & | strME | ) | const [private] |
Definition at line 123 of file TrajectoryFactoryBase.cc.
References ReferenceTrajectoryBase::breakPoints, ReferenceTrajectoryBase::brokenLinesCoarse, ReferenceTrajectoryBase::brokenLinesFine, runregparse::combined, ReferenceTrajectoryBase::energyLoss, Exception, ReferenceTrajectoryBase::multipleScattering, and none.
{ if ( strME == "MultipleScattering" ) return ReferenceTrajectoryBase::multipleScattering; if ( strME == "EnergyLoss" ) return ReferenceTrajectoryBase::energyLoss; if ( strME == "Combined" ) return ReferenceTrajectoryBase::combined; if ( strME == "None" ) return ReferenceTrajectoryBase::none; if ( strME == "BreakPoints" ) return ReferenceTrajectoryBase::breakPoints; if ( strME == "BrokenLines" ) return ReferenceTrajectoryBase::brokenLinesCoarse; if ( strME == "BrokenLinesCoarse" ) return ReferenceTrajectoryBase::brokenLinesCoarse; if ( strME == "BrokenLinesFine" ) return ReferenceTrajectoryBase::brokenLinesFine; throw cms::Exception("BadConfig") << "[TrajectoryFactoryBase::materialEffects] Unknown parameter: " << strME; }
const Trajectory::DataContainer TrajectoryFactoryBase::orderedTrajectoryMeasurements | ( | const Trajectory & | trajectory | ) | const [protected, virtual] |
Definition at line 70 of file TrajectoryFactoryBase.cc.
References anyDirection, dir, Trajectory::direction(), Trajectory::measurements(), definitions::original, and thePropDir.
Referenced by innermostStateAndRecHits(), DualBzeroTrajectoryFactory::referenceStateAndRecHits(), and DualTrajectoryFactory::referenceStateAndRecHits().
{ const PropagationDirection dir = trajectory.direction(); const bool hitsAreReverse = ( ( dir == thePropDir || thePropDir == anyDirection ) ? false : true ); const Trajectory::DataContainer & original = trajectory.measurements(); if ( hitsAreReverse ) { // Simply use this line instead of the copying by hand? // const Trajectory::DataContainer reordered(original.rbegin(), original.rend()); Trajectory::DataContainer reordered; reordered.reserve( original.size() ); Trajectory::DataContainer::const_reverse_iterator itM; for ( itM = original.rbegin(); itM != original.rend(); ++itM ) { reordered.push_back( *itM ); } return reordered; } return original; }
PropagationDirection TrajectoryFactoryBase::propagationDirection | ( | void | ) | const [inline] |
Definition at line 47 of file TrajectoryFactoryBase.h.
References thePropDir.
Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories(), BzeroReferenceTrajectoryFactory::trajectories(), ReferenceTrajectoryFactory::trajectories(), DualBzeroTrajectoryFactory::trajectories(), DualTrajectoryFactory::trajectories(), and TrajectoryFactoryBase().
{ return thePropDir; }
PropagationDirection TrajectoryFactoryBase::propagationDirection | ( | const std::string & | strPD | ) | const [private] |
Definition at line 140 of file TrajectoryFactoryBase.cc.
References alongMomentum, anyDirection, Exception, and oppositeToMomentum.
{ if ( strPD == "oppositeToMomentum" ) return oppositeToMomentum; if ( strPD == "alongMomentum" ) return alongMomentum; if ( strPD == "anyDirection" ) return anyDirection; throw cms::Exception("BadConfig") << "[TrajectoryFactoryBase::propagationDirection] Unknown parameter: " << strPD; }
bool TrajectoryFactoryBase::sameSurface | ( | const Surface & | s1, |
const Surface & | s2 | ||
) | const [protected] |
Definition at line 96 of file TrajectoryFactoryBase.cc.
References GloballyPositioned< T >::eta(), GloballyPositioned< T >::phi(), and GloballyPositioned< T >::position().
Referenced by BzeroReferenceTrajectoryFactory::trajectories(), and ReferenceTrajectoryFactory::trajectories().
virtual const ReferenceTrajectoryCollection TrajectoryFactoryBase::trajectories | ( | const edm::EventSetup & | setup, |
const ConstTrajTrackPairCollection & | tracks, | ||
const ExternalPredictionCollection & | external, | ||
const reco::BeamSpot & | beamSpot | ||
) | const [pure virtual] |
virtual const ReferenceTrajectoryCollection TrajectoryFactoryBase::trajectories | ( | const edm::EventSetup & | setup, |
const ConstTrajTrackPairCollection & | tracks, | ||
const reco::BeamSpot & | beamSpot | ||
) | const [pure virtual] |
bool TrajectoryFactoryBase::useRecHit | ( | const TransientTrackingRecHit::ConstRecHitPointer & | hitPtr | ) | const [protected] |
Definition at line 105 of file TrajectoryFactoryBase.cc.
References theUseInvalidHits, theUseProjectedHits, and theUseWithoutDet.
Referenced by innermostStateAndRecHits(), DualBzeroTrajectoryFactory::referenceStateAndRecHits(), and DualTrajectoryFactory::referenceStateAndRecHits().
{ const GeomDet* det = hitPtr->det(); if ( !det && !theUseWithoutDet ) return false; if ( !( theUseInvalidHits || hitPtr->isValid() ) ) return false; if ( !theUseProjectedHits ) { const ProjectedRecHit2D* projectedHit = dynamic_cast< const ProjectedRecHit2D* >( hitPtr.get() ); if ( projectedHit != 0 ) return false; } return true; }
const edm::ParameterSet TrajectoryFactoryBase::theConfig [private] |
Definition at line 64 of file TrajectoryFactoryBase.h.
Referenced by configuration().
Definition at line 62 of file TrajectoryFactoryBase.h.
Referenced by materialEffects(), and TrajectoryFactoryBase().
Definition at line 63 of file TrajectoryFactoryBase.h.
Referenced by orderedTrajectoryMeasurements(), propagationDirection(), and TrajectoryFactoryBase().
bool TrajectoryFactoryBase::theUseBeamSpot [protected] |
Definition at line 72 of file TrajectoryFactoryBase.h.
Referenced by BzeroReferenceTrajectoryFactory::trajectories(), ReferenceTrajectoryFactory::trajectories(), DualBzeroTrajectoryFactory::trajectories(), DualTrajectoryFactory::trajectories(), and TrajectoryFactoryBase().
bool TrajectoryFactoryBase::theUseInvalidHits [private] |
Definition at line 67 of file TrajectoryFactoryBase.h.
Referenced by TrajectoryFactoryBase(), and useRecHit().
bool TrajectoryFactoryBase::theUseProjectedHits [private] |
Definition at line 68 of file TrajectoryFactoryBase.h.
Referenced by TrajectoryFactoryBase(), and useRecHit().
bool TrajectoryFactoryBase::theUseWithoutDet [private] |
Definition at line 66 of file TrajectoryFactoryBase.h.
Referenced by TrajectoryFactoryBase(), and useRecHit().