80 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
82 while ( itTracks != tracks.end() )
99 trajectories.push_back( ptr );
116 if ( tracks.size() != external.size() )
118 edm::LogInfo(
"ReferenceTrajectories") <<
"@SUB=DualBzeroTrajectoryFactory::trajectories" 119 <<
"Inconsistent input:\n" 120 <<
"\tnumber of tracks = " << tracks.size()
121 <<
"\tnumber of external predictions = " << external.size();
128 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
129 ExternalPredictionCollection::const_iterator itExternal = external.begin();
131 while ( itTracks != tracks.end() )
137 if ( (*itExternal).isValid() )
142 if ( !propExternal.
isValid() )
continue;
157 ptr->setParameterErrors( externalParamErrors.sub( 2, 5 ) );
158 trajectories.push_back( ptr );
174 trajectories.push_back( ptr );
194 Trajectory::DataContainer::iterator itM;
196 for ( itM = allTrajMeas.begin(); itM != allTrajMeas.end(); itM++ )
198 if (
useRecHit( ( *itM ).recHit() ) ) usedTrajMeas.push_back( *itM );
201 unsigned int iMeas = 0;
202 unsigned int nMeas = usedTrajMeas.size();
203 unsigned int nRefStateMeas = nMeas/2;
205 for ( itM = usedTrajMeas.begin(); itM != usedTrajMeas.end(); itM++, iMeas++ )
209 if ( iMeas < nRefStateMeas ) {
211 }
else if ( iMeas > nRefStateMeas ) {
214 if ( ( *itM ).updatedState().isValid() )
216 input.
refTsos = ( *itM ).updatedState();
239 const std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
241 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 ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override
Produce the reference trajectories.
virtual const Trajectory::DataContainer orderedTrajectoryMeasurements(const Trajectory &trajectory) const
def setup(process, global_tag, zero_tesla=False)
AlignmentAlgorithmBase::ConstTrajTrackPair ConstTrajTrackPair
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
double theMomentumEstimate
static std::string const input
virtual ~DualBzeroTrajectoryFactory()
const SurfaceType & surface() const
std::vector< TrajectoryMeasurement > DataContainer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const bool allowZeroMaterial_
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection
PropagationDirection propagationDirection(void) const
CLHEP::HepSymMatrix AlgebraicSymMatrix
A factory that produces instances of class ReferenceTrajectory from a given TrajTrackPairCollection.
#define DEFINE_EDM_PLUGIN(factory, type, name)
virtual DualBzeroTrajectoryFactory * clone() const override
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
T const * product() const
DualBzeroTrajectoryFactory(const edm::ParameterSet &config)
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length