56 theMass(
config.getParameter<double>(
"ParticleMass")),
57 theUseBzeroIfFieldOff(
config.getParameter<
bool>(
"UseBzeroIfFieldOff")),
58 theBzeroFactory(nullptr) {
59 edm::LogInfo(
"Alignment") <<
"@SUB=ReferenceTrajectoryFactory" 68 pset.eraseSimpleParameter(
"TrajectoryFactoryName");
69 pset.addParameter(
"TrajectoryFactoryName",
std::string(
"BzeroReferenceTrajectoryFactory"));
70 pset.addParameter(
"MomentumEstimate",
config.getParameter<
double>(
"MomentumEstimateFieldOff"));
76 theMass(
other.theMass),
77 theUseBzeroIfFieldOff(
other.theUseBzeroIfFieldOff),
78 theBzeroFactory(nullptr)
93 ConstTrajTrackPairCollection::const_iterator itTracks =
tracks.begin();
95 while (itTracks !=
tracks.end()) {
99 if (
input.first.isValid()) {
105 config.hitsAreReverse =
false;
125 <<
"@SUB=ReferenceTrajectoryFactory::trajectories" 126 <<
"Inconsistent input:\n" 127 <<
"\tnumber of tracks = " <<
tracks.size() <<
"\tnumber of external predictions = " <<
external.size();
136 ConstTrajTrackPairCollection::const_iterator itTracks =
tracks.begin();
137 ExternalPredictionCollection::const_iterator itExternal =
external.begin();
139 while (itTracks !=
tracks.end()) {
142 if (
input.first.isValid()) {
143 if ((*itExternal).isValid() &&
sameSurface((*itExternal).surface(),
input.first.surface())) {
149 config.hitsAreReverse =
false;
153 AlgebraicSymMatrix externalParamErrors(asHepMatrix<5>((*itExternal).localError().matrix()));
154 refTraj->setParameterErrors(externalParamErrors);
161 config.hitsAreReverse =
false;
176 edm::LogInfo(
"Alignment") <<
"@SUB=ReferenceTrajectoryFactory::bzeroFactory" 177 <<
"Using BzeroReferenceTrajectoryFactory for some (all?) events.";
~ReferenceTrajectoryFactory() override
ReferenceTrajectoryFactory * clone() const override
bool theUseBzeroIfFieldOff
bool sameSurface(const Surface &s1, const Surface &s2) const
MaterialEffects materialEffects(void) const
static std::string const input
const bool allowZeroMaterial_
BzeroReferenceTrajectoryFactory
BzeroReferenceTrajectoryFactory.
const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override
Produce the reference trajectories.
std::pair< TrajectoryStateOnSurface, TransientTrackingRecHit::ConstRecHitContainer > TrajectoryInput
Log< level::Info, false > LogInfo
const TrajectoryFactoryBase * bzeroFactory() const
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
auto const & tracks
cannot be loose
virtual const TrajectoryInput innermostStateAndRecHits(const ConstTrajTrackPair &track) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_MagFieldToken
const TrajectoryFactoryBase * theBzeroFactory
config
parse the configuration file
virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const =0
CLHEP::HepSymMatrix AlgebraicSymMatrix
ReferenceTrajectoryFactory(const edm::ParameterSet &config, edm::ConsumesCollector &iC)
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
PropagationDirection propagationDirection(void) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
ReferenceTrajectoryBase::ReferenceTrajectoryPtr ReferenceTrajectoryPtr
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection