70 ConstTrajTrackPairCollection::const_iterator itTracks =
tracks.begin();
72 while (itTracks !=
tracks.end()) {
75 if (
input.refTsos.isValid()) {
100 <<
"@SUB=DualBzeroTrajectoryFactory::trajectories" 101 <<
"Inconsistent input:\n" 102 <<
"\tnumber of tracks = " <<
tracks.size() <<
"\tnumber of external predictions = " <<
external.size();
108 ConstTrajTrackPairCollection::const_iterator itTracks =
tracks.begin();
109 ExternalPredictionCollection::const_iterator itExternal =
external.begin();
111 while (itTracks !=
tracks.end()) {
114 if (
input.refTsos.isValid()) {
115 if ((*itExternal).isValid()) {
129 ptr->setParameterErrors(externalParamErrors.sub(2, 5));
157 Trajectory::DataContainer::iterator itM;
159 for (itM = allTrajMeas.begin(); itM != allTrajMeas.end(); itM++) {
161 usedTrajMeas.push_back(*itM);
164 unsigned int iMeas = 0;
165 unsigned int nMeas = usedTrajMeas.size();
166 unsigned int nRefStateMeas = nMeas / 2;
168 for (itM = usedTrajMeas.begin(); itM != usedTrajMeas.end(); itM++, iMeas++) {
171 if (iMeas < nRefStateMeas) {
172 input.bwdRecHits.push_back(aRecHit);
173 }
else if (iMeas > nRefStateMeas) {
174 input.fwdRecHits.push_back(aRecHit);
176 if ((*itM).updatedState().isValid()) {
177 input.refTsos = (*itM).updatedState();
178 input.bwdRecHits.push_back(aRecHit);
179 input.fwdRecHits.push_back(aRecHit);
183 input.bwdRecHits.push_back(aRecHit);
198 const std::pair<TrajectoryStateOnSurface, double> tsosWithPath =
propagator.propagateWithPath(
external, surface);
199 return tsosWithPath.first;
const LocalTrajectoryError & localError() const
DualBzeroTrajectoryFactory * clone() const override
dictionary config
Read in AllInOne config in JSON format.
const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override
Produce the reference trajectories.
const TrajectoryStateOnSurface propagateExternal(const TrajectoryStateOnSurface &external, const Surface &surface, const MagneticField *magField) const
AlignmentAlgorithmBase::ConstTrajTrackPair ConstTrajTrackPair
double theMomentumEstimate
MaterialEffects materialEffects(void) const
~DualBzeroTrajectoryFactory() override
static std::string const input
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_MagFieldToken
DualBzeroTrajectoryFactory(const edm::ParameterSet &config, edm::ConsumesCollector &iC)
std::vector< TrajectoryMeasurement > DataContainer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const bool allowZeroMaterial_
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
std::vector< ConstRecHitPointer > ConstRecHitContainer
virtual const Trajectory::DataContainer orderedTrajectoryMeasurements(const Trajectory &trajectory) const
Log< level::Info, false > LogInfo
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
const DualBzeroTrajectoryInput referenceStateAndRecHits(const ConstTrajTrackPair &track) const
const AlgebraicSymMatrix55 & matrix() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
A factory that produces instances of class ReferenceTrajectory from a given TrajTrackPairCollection.
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
PropagationDirection propagationDirection(void) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection