53 theMass(config.getParameter<double>(
"ParticleMass")),
54 theUseBzeroIfFieldOff(config.getParameter<bool>(
"UseBzeroIfFieldOff")),
57 edm::LogInfo(
"Alignment") <<
"@SUB=ReferenceTrajectoryFactory"
59 <<
"\nusing Bzero if |B| = 0: "
65 theMass(other.theMass),
66 theUseBzeroIfFieldOff(other.theUseBzeroIfFieldOff),
90 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
92 while ( itTracks != tracks.end() )
97 if ( input.first.isValid() )
124 if ( tracks.size() != external.size() )
126 edm::LogInfo(
"ReferenceTrajectories") <<
"@SUB=ReferenceTrajectoryFactory::trajectories"
127 <<
"Inconsistent input:\n"
128 <<
"\tnumber of tracks = " << tracks.size()
129 <<
"\tnumber of external predictions = " << external.size();
139 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
140 ExternalPredictionCollection::const_iterator itExternal = external.begin();
142 while ( itTracks != tracks.end() )
146 if ( input.first.isValid() )
148 if ( (*itExternal).isValid() &&
sameSurface( (*itExternal).surface(), input.first.surface() ) )
159 AlgebraicSymMatrix externalParamErrors( asHepMatrix<5>( (*itExternal).localError().matrix() ) );
160 refTraj->setParameterErrors( externalParamErrors );
161 trajectories.push_back( refTraj );
186 edm::LogInfo(
"Alignment") <<
"@SUB=ReferenceTrajectoryFactory::bzeroFactory"
187 <<
"Using BzeroReferenceTrajectoryFactory for some (all?) events.";
T getParameter(std::string const &) const
MaterialEffects materialEffects(void) const
virtual ReferenceTrajectoryFactory * clone() const override
bool theUseBzeroIfFieldOff
static std::string const input
bool sameSurface(const Surface &s1, const Surface &s2) const
tuple BzeroReferenceTrajectoryFactory
BzeroReferenceTrajectoryFactory.
void addParameter(std::string const &name, T const &value)
virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override
Produce the reference trajectories.
const edm::ParameterSet & configuration() const
void eraseSimpleParameter(std::string const &name)
void copyForModify(ParameterSet const &other)
virtual ~ReferenceTrajectoryFactory()
const TrajectoryFactoryBase * bzeroFactory() const
virtual const TrajectoryInput innermostStateAndRecHits(const ConstTrajTrackPair &track) const
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection
const TrajectoryFactoryBase * theBzeroFactory
T const * product() const
ReferenceTrajectoryFactory(const edm::ParameterSet &config)
virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const =0
PropagationDirection propagationDirection(void) const
CLHEP::HepSymMatrix AlgebraicSymMatrix
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::pair< TrajectoryStateOnSurface, TransientTrackingRecHit::ConstRecHitContainer > TrajectoryInput
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
ReferenceTrajectoryBase::ReferenceTrajectoryPtr ReferenceTrajectoryPtr