58 theMass(
config.getParameter<double>(
"ParticleMass")) {
59 edm::LogInfo(
"Alignment") <<
"@SUB=DualTrajectoryFactory" 72 edm::LogWarning(
"Alignment") <<
"@SUB=DualTrajectoryFactory::trajectories" 74 <<
": You should probably use the DualBzeroTrajectoryFactory\n" 75 <<
"or fix this code to switch automatically as the ReferenceTrajectoryFactory does.";
78 ConstTrajTrackPairCollection::const_iterator itTracks =
tracks.begin();
80 while (itTracks !=
tracks.end()) {
83 if (
input.refTsos.isValid()) {
108 <<
"@SUB=DualTrajectoryFactory::trajectories" 109 <<
"Inconsistent input:\n" 110 <<
"\tnumber of tracks = " <<
tracks.size() <<
"\tnumber of external predictions = " <<
external.size();
116 edm::LogWarning(
"Alignment") <<
"@SUB=DualTrajectoryFactory::trajectories" 118 <<
": You should probably use the DualBzeroTrajectoryFactory\n" 119 <<
"or fix this code to switch automatically as the ReferenceTrajectoryFactory does.";
122 ConstTrajTrackPairCollection::const_iterator itTracks =
tracks.begin();
123 ExternalPredictionCollection::const_iterator itExternal =
external.begin();
125 while (itTracks !=
tracks.end()) {
128 if (
input.refTsos.isValid()) {
129 if ((*itExternal).isValid()) {
143 ptr->setParameterErrors(externalParamErrors);
170 Trajectory::DataContainer::iterator itM;
172 for (itM = allTrajMeas.begin(); itM != allTrajMeas.end(); itM++) {
174 usedTrajMeas.push_back(*itM);
177 unsigned int iMeas = 0;
178 unsigned int nMeas = usedTrajMeas.size();
179 unsigned int nRefStateMeas = nMeas / 2;
181 for (itM = usedTrajMeas.begin(); itM != usedTrajMeas.end(); itM++, iMeas++) {
184 if (iMeas < nRefStateMeas) {
185 input.bwdRecHits.push_back(aRecHit);
186 }
else if (iMeas > nRefStateMeas) {
187 input.fwdRecHits.push_back(aRecHit);
189 if ((*itM).updatedState().isValid()) {
190 input.refTsos = (*itM).updatedState();
191 input.bwdRecHits.push_back(aRecHit);
192 input.fwdRecHits.push_back(aRecHit);
196 input.bwdRecHits.push_back(aRecHit);
211 const std::pair<TrajectoryStateOnSurface, double> tsosWithPath =
propagator.propagateWithPath(
external, surface);
212 return tsosWithPath.first;
const TrajectoryStateOnSurface propagateExternal(const TrajectoryStateOnSurface &external, const Surface &surface, const MagneticField *magField) const
const LocalTrajectoryError & localError() const
Global3DPoint GlobalPoint
AlignmentAlgorithmBase::ConstTrajTrackPair ConstTrajTrackPair
const DualTrajectoryInput referenceStateAndRecHits(const ConstTrajTrackPair &track) const
MaterialEffects materialEffects(void) const
static std::string const input
std::vector< TrajectoryMeasurement > DataContainer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const bool allowZeroMaterial_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_MagFieldToken
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
const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override
Produce the reference trajectories.
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
DualTrajectoryFactory * clone() const override
~DualTrajectoryFactory() override
const AlgebraicSymMatrix55 & matrix() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
dictionary config
Read in AllInOne config in JSON format.
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
PropagationDirection propagationDirection(void) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
Log< level::Warning, false > LogWarning
A factory that produces instances of class ReferenceTrajectory from a given TrajTrackPairCollection.
DualTrajectoryFactory(const edm::ParameterSet &config, edm::ConsumesCollector &iC)
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection