80 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
82 while ( itTracks != tracks.end() )
98 trajectories.push_back( ptr );
115 if ( tracks.size() != external.size() )
117 edm::LogInfo(
"ReferenceTrajectories") <<
"@SUB=DualBzeroTrajectoryFactory::trajectories"
118 <<
"Inconsistent input:\n"
119 <<
"\tnumber of tracks = " << tracks.size()
120 <<
"\tnumber of external predictions = " << external.size();
127 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
128 ExternalPredictionCollection::const_iterator itExternal = external.begin();
130 while ( itTracks != tracks.end() )
136 if ( (*itExternal).isValid() )
141 if ( !propExternal.
isValid() )
continue;
155 ptr->setParameterErrors( externalParamErrors.sub( 2, 5 ) );
156 trajectories.push_back( ptr );
171 trajectories.push_back( ptr );
191 Trajectory::DataContainer::iterator itM;
193 for ( itM = allTrajMeas.begin(); itM != allTrajMeas.end(); itM++ )
195 if (
useRecHit( ( *itM ).recHit() ) ) usedTrajMeas.push_back( *itM );
198 unsigned int iMeas = 0;
199 unsigned int nMeas = usedTrajMeas.size();
200 unsigned int nRefStateMeas = nMeas/2;
202 for ( itM = usedTrajMeas.begin(); itM != usedTrajMeas.end(); itM++, iMeas++ )
206 if ( iMeas < nRefStateMeas ) {
208 }
else if ( iMeas > nRefStateMeas ) {
211 if ( ( *itM ).updatedState().isValid() )
213 input.
refTsos = ( *itM ).updatedState();
236 const std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
238 return tsosWithPath.first;
T getParameter(std::string const &) const
const TrajectoryStateOnSurface propagateExternal(const TrajectoryStateOnSurface &external, const Surface &surface, const MagneticField *magField) const
MaterialEffects materialEffects(void) const
const DualBzeroTrajectoryInput referenceStateAndRecHits(const ConstTrajTrackPair &track) const
virtual const Trajectory::DataContainer orderedTrajectoryMeasurements(const Trajectory &trajectory) const
virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override
Produce the reference trajectories.
AlignmentAlgorithmBase::ConstTrajTrackPair ConstTrajTrackPair
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
double theMomentumEstimate
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length
static std::string const input
virtual ~DualBzeroTrajectoryFactory()
const SurfaceType & surface() const
std::vector< TrajectoryMeasurement > DataContainer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection
T const * product() const
PropagationDirection propagationDirection(void) const
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual DualBzeroTrajectoryFactory * clone() const override
A factory that produces instances of class ReferenceTrajectory from a given TrajTrackPairCollection.
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
DualBzeroTrajectoryFactory(const edm::ParameterSet &config)