56 theMass(config.getParameter<double>(
"ParticleMass")),
57 theUseBzeroIfFieldOff(config.getParameter<bool>(
"UseBzeroIfFieldOff")),
58 theBzeroFactory(nullptr) {
59 edm::LogInfo(
"Alignment") <<
"@SUB=ReferenceTrajectoryFactory"
66 pset.copyForModify(config);
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()) {
106 trajectories.push_back(
123 if (tracks.size() != external.size()) {
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())) {
153 AlgebraicSymMatrix externalParamErrors(asHepMatrix<5>((*itExternal).localError().matrix()));
154 refTraj->setParameterErrors(externalParamErrors);
155 trajectories.push_back(refTraj);
176 edm::LogInfo(
"Alignment") <<
"@SUB=ReferenceTrajectoryFactory::bzeroFactory"
177 <<
"Using BzeroReferenceTrajectoryFactory for some (all?) events.";
~ReferenceTrajectoryFactory() override
MaterialEffects materialEffects(void) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
ReferenceTrajectoryFactory * clone() const override
bool theUseBzeroIfFieldOff
auto const & tracks
cannot be loose
static std::string const input
bool getData(T &iHolder) const
bool sameSurface(const Surface &s1, const Surface &s2) const
tuple BzeroReferenceTrajectoryFactory
BzeroReferenceTrajectoryFactory.
const bool allowZeroMaterial_
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
virtual const TrajectoryInput innermostStateAndRecHits(const ConstTrajTrackPair &track) const
AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_MagFieldToken
const TrajectoryFactoryBase * theBzeroFactory
T getParameter(std::string const &) const
tuple config
parse the configuration file
virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const =0
PropagationDirection propagationDirection(void) const
CLHEP::HepSymMatrix AlgebraicSymMatrix
ReferenceTrajectoryFactory(const edm::ParameterSet &config, edm::ConsumesCollector &iC)
std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection
#define DEFINE_EDM_PLUGIN(factory, type, name)
ReferenceTrajectoryBase::ReferenceTrajectoryPtr ReferenceTrajectoryPtr
std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection