59 theMass(config.getParameter<double>(
"ParticleMass"))
61 edm::LogInfo(
"Alignment") <<
"@SUB=DualTrajectoryFactory" 79 edm::LogWarning(
"Alignment") <<
"@SUB=DualTrajectoryFactory::trajectories" 81 <<
": You should probably use the DualBzeroTrajectoryFactory\n" 82 <<
"or fix this code to switch automatically as the ReferenceTrajectoryFactory does.";
85 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
87 while ( itTracks != tracks.end() )
103 trajectories.push_back( ptr );
120 if ( tracks.size() != external.size() )
122 edm::LogInfo(
"ReferenceTrajectories") <<
"@SUB=DualTrajectoryFactory::trajectories" 123 <<
"Inconsistent input:\n" 124 <<
"\tnumber of tracks = " << tracks.size()
125 <<
"\tnumber of external predictions = " << external.size();
132 edm::LogWarning(
"Alignment") <<
"@SUB=DualTrajectoryFactory::trajectories" 134 <<
": You should probably use the DualBzeroTrajectoryFactory\n" 135 <<
"or fix this code to switch automatically as the ReferenceTrajectoryFactory does.";
138 ConstTrajTrackPairCollection::const_iterator itTracks = tracks.begin();
139 ExternalPredictionCollection::const_iterator itExternal = external.begin();
141 while ( itTracks != tracks.end() )
147 if ( (*itExternal).isValid() )
152 if ( !propExternal.
isValid() )
continue;
166 ptr->setParameterErrors( externalParamErrors );
167 trajectories.push_back( ptr );
181 trajectories.push_back( ptr );
201 Trajectory::DataContainer::iterator itM;
203 for ( itM = allTrajMeas.begin(); itM != allTrajMeas.end(); itM++ )
205 if (
useRecHit( ( *itM ).recHit() ) ) usedTrajMeas.push_back( *itM );
208 unsigned int iMeas = 0;
209 unsigned int nMeas = usedTrajMeas.size();
210 unsigned int nRefStateMeas = nMeas/2;
212 for ( itM = usedTrajMeas.begin(); itM != usedTrajMeas.end(); itM++, iMeas++ )
216 if ( iMeas < nRefStateMeas ) {
218 }
else if ( iMeas > nRefStateMeas ) {
221 if ( ( *itM ).updatedState().isValid() )
223 input.
refTsos = ( *itM ).updatedState();
246 const std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
248 return tsosWithPath.first;
const TrajectoryStateOnSurface propagateExternal(const TrajectoryStateOnSurface &external, const Surface &surface, const MagneticField *magField) const
const DualTrajectoryInput referenceStateAndRecHits(const ConstTrajTrackPair &track) const
MaterialEffects materialEffects(void) const
Global3DPoint GlobalPoint
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
static std::string const input
virtual ~DualTrajectoryFactory()
virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override
Produce the reference trajectories.
const SurfaceType & surface() const
std::vector< TrajectoryMeasurement > DataContainer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const bool allowZeroMaterial_
virtual DualTrajectoryFactory * clone() const override
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
std::vector< ConstRecHitPointer > ConstRecHitContainer
DualTrajectoryFactory(const edm::ParameterSet &config)
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection
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.
T const * product() const
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length