76 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
78 while ( itTracks != tracks.end() )
92 trajectories.push_back( ptr );
109 if ( tracks.size() != external.size() )
111 edm::LogInfo(
"ReferenceTrajectories") <<
"@SUB=DualTrajectoryFactory::trajectories"
112 <<
"Inconsistent input:\n"
113 <<
"\tnumber of tracks = " << tracks.size()
114 <<
"\tnumber of external predictions = " << external.size();
121 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
122 ExternalPredictionCollection::const_iterator itExternal = external.begin();
124 while ( itTracks != tracks.end() )
130 if ( (*itExternal).isValid() )
135 if ( !propExternal.
isValid() )
continue;
148 ptr->setParameterErrors( externalParamErrors );
149 trajectories.push_back( ptr );
161 trajectories.push_back( ptr );
181 Trajectory::DataContainer::iterator itM;
183 for ( itM = allTrajMeas.begin(); itM != allTrajMeas.end(); itM++ )
185 if (
useRecHit( ( *itM ).recHit() ) ) usedTrajMeas.push_back( *itM );
188 unsigned int iMeas = 0;
189 unsigned int nMeas = usedTrajMeas.size();
190 unsigned int nRefStateMeas = nMeas/2;
192 for ( itM = usedTrajMeas.begin(); itM != usedTrajMeas.end(); itM++, iMeas++ )
196 if ( iMeas < nRefStateMeas ) {
198 }
else if ( iMeas > nRefStateMeas ) {
201 if ( ( *itM ).updatedState().isValid() )
203 input.
refTsos = ( *itM ).updatedState();
226 const std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
228 return tsosWithPath.first;
T getParameter(std::string const &) const
const TrajectoryStateOnSurface propagateExternal(const TrajectoryStateOnSurface &external, const Surface &surface, const MagneticField *magField) const
const DualTrajectoryInput referenceStateAndRecHits(const ConstTrajTrackPair &track) const
MaterialEffects materialEffects(void) const
virtual const Trajectory::DataContainer orderedTrajectoryMeasurements(const Trajectory &trajectory) const
AlignmentAlgorithmBase::ConstTrajTrackPair ConstTrajTrackPair
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const
Produce the reference trajectories.
virtual ~DualTrajectoryFactory()
std::vector< TrajectoryMeasurement > DataContainer
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const
propagation to plane with path length
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
virtual DualTrajectoryFactory * clone() const
DualTrajectoryFactory(const edm::ParameterSet &config)
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection
T const * product() const
const Surface & surface() const
PropagationDirection propagationDirection(void) const
CLHEP::HepSymMatrix AlgebraicSymMatrix
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
A factory that produces instances of class ReferenceTrajectory from a given TrajTrackPairCollection.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")