#include <Alignment/ReferenceTrajectories/plugins/BzeroReferenceTrajectoryFactory.h>
Public Member Functions | |
BzeroReferenceTrajectoryFactory (const edm::ParameterSet &config) | |
virtual BzeroReferenceTrajectoryFactory * | clone (void) const |
virtual const ReferenceTrajectoryCollection | trajectories (const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const ExternalPredictionCollection &external) const |
virtual const ReferenceTrajectoryCollection | trajectories (const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks) const |
Produce the reference trajectories. | |
virtual | ~BzeroReferenceTrajectoryFactory (void) |
Private Attributes | |
double | theMass |
double | theMomentumEstimate |
Definition at line 9 of file BzeroReferenceTrajectoryFactory.h.
BzeroReferenceTrajectoryFactory::BzeroReferenceTrajectoryFactory | ( | const edm::ParameterSet & | config | ) |
Definition at line 14 of file BzeroReferenceTrajectoryFactory.cc.
References edm::ParameterSet::getParameter(), theMass, and theMomentumEstimate.
Referenced by clone().
00014 : 00015 TrajectoryFactoryBase( config ) 00016 { 00017 theMass = config.getParameter< double >( "ParticleMass" ); 00018 theMomentumEstimate = config.getParameter< double >( "MomentumEstimate" ); 00019 }
BzeroReferenceTrajectoryFactory::~BzeroReferenceTrajectoryFactory | ( | void | ) | [virtual] |
virtual BzeroReferenceTrajectoryFactory* BzeroReferenceTrajectoryFactory::clone | ( | void | ) | const [inline, virtual] |
Implements TrajectoryFactoryBase.
Definition at line 25 of file BzeroReferenceTrajectoryFactory.h.
References BzeroReferenceTrajectoryFactory().
00025 { return new BzeroReferenceTrajectoryFactory( *this ); }
const BzeroReferenceTrajectoryFactory::ReferenceTrajectoryCollection BzeroReferenceTrajectoryFactory::trajectories | ( | const edm::EventSetup & | setup, | |
const ConstTrajTrackPairCollection & | tracks, | |||
const ExternalPredictionCollection & | external | |||
) | const [virtual] |
Definition at line 58 of file BzeroReferenceTrajectoryFactory.cc.
References edm::EventSetup::get(), TrajectoryFactoryBase::innermostStateAndRecHits(), iggi_31X_cfg::input, TrajectoryFactoryBase::materialEffects(), edm::ESHandle< T >::product(), TrajectoryFactoryBase::propagationDirection(), TrajectoryFactoryBase::sameSurface(), theMass, theMomentumEstimate, and trajectories().
00061 { 00062 ReferenceTrajectoryCollection trajectories; 00063 00064 if ( tracks.size() != external.size() ) 00065 { 00066 edm::LogInfo("ReferenceTrajectories") << "@SUB=BzeroReferenceTrajectoryFactory::trajectories" 00067 << "Inconsistent input:\n" 00068 << "\tnumber of tracks = " << tracks.size() 00069 << "\tnumber of external predictions = " << external.size(); 00070 return trajectories; 00071 } 00072 00073 edm::ESHandle< MagneticField > magneticField; 00074 setup.get< IdealMagneticFieldRecord >().get( magneticField ); 00075 00076 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin(); 00077 ExternalPredictionCollection::const_iterator itExternal = external.begin(); 00078 00079 while ( itTracks != tracks.end() ) 00080 { 00081 TrajectoryInput input = innermostStateAndRecHits( *itTracks ); 00082 // Check input: If all hits were rejected, the TSOS is initialized as invalid. 00083 if ( input.first.isValid() ) 00084 { 00085 if ( (*itExternal).isValid() && sameSurface( (*itExternal).surface(), input.first.surface() ) ) 00086 { 00087 // set the flag for reversing the RecHits to false, since they are already in the correct order. 00088 ReferenceTrajectoryPtr refTraj( new BzeroReferenceTrajectory( *itExternal, input.second, false, 00089 magneticField.product(), materialEffects(), 00090 propagationDirection(), theMass, 00091 theMomentumEstimate ) ); 00092 00093 AlgebraicSymMatrix externalParamErrors( asHepMatrix<5>( (*itExternal).localError().matrix() ) ); 00094 refTraj->setParameterErrors( externalParamErrors.sub( 2, 5 ) ); 00095 00096 trajectories.push_back( refTraj ); 00097 } 00098 else 00099 { 00100 trajectories.push_back(ReferenceTrajectoryPtr(new BzeroReferenceTrajectory(input.first, input.second, false, 00101 magneticField.product(), 00102 materialEffects(), 00103 propagationDirection(), 00104 theMass, theMomentumEstimate))); 00105 } 00106 } 00107 00108 ++itTracks; 00109 ++itExternal; 00110 } 00111 00112 return trajectories; 00113 }
const BzeroReferenceTrajectoryFactory::ReferenceTrajectoryCollection BzeroReferenceTrajectoryFactory::trajectories | ( | const edm::EventSetup & | setup, | |
const ConstTrajTrackPairCollection & | tracks | |||
) | const [virtual] |
Produce the reference trajectories.
Definition at line 26 of file BzeroReferenceTrajectoryFactory.cc.
References edm::EventSetup::get(), TrajectoryFactoryBase::innermostStateAndRecHits(), iggi_31X_cfg::input, TrajectoryFactoryBase::materialEffects(), edm::ESHandle< T >::product(), TrajectoryFactoryBase::propagationDirection(), theMass, and theMomentumEstimate.
Referenced by trajectories().
00028 { 00029 ReferenceTrajectoryCollection trajectories; 00030 00031 edm::ESHandle< MagneticField > magneticField; 00032 setup.get< IdealMagneticFieldRecord >().get( magneticField ); 00033 00034 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin(); 00035 00036 while ( itTracks != tracks.end() ) 00037 { 00038 TrajectoryInput input = this->innermostStateAndRecHits( *itTracks ); 00039 // Check input: If all hits were rejected, the TSOS is initialized as invalid. 00040 if ( input.first.isValid() ) 00041 { 00042 // set the flag for reversing the RecHits to false, since they are already in the correct order. 00043 trajectories.push_back(ReferenceTrajectoryPtr(new BzeroReferenceTrajectory(input.first, input.second, false, 00044 magneticField.product(), 00045 materialEffects(), 00046 propagationDirection(), 00047 theMass, theMomentumEstimate))); 00048 } 00049 00050 ++itTracks; 00051 } 00052 00053 return trajectories; 00054 }
double BzeroReferenceTrajectoryFactory::theMass [private] |
Definition at line 29 of file BzeroReferenceTrajectoryFactory.h.
Referenced by BzeroReferenceTrajectoryFactory(), and trajectories().
double BzeroReferenceTrajectoryFactory::theMomentumEstimate [private] |
Definition at line 30 of file BzeroReferenceTrajectoryFactory.h.
Referenced by BzeroReferenceTrajectoryFactory(), and trajectories().