20 theDeltaEta(conf.getParameter<double>(
"deltaEta")),
21 theDeltaPhi(conf.getParameter<double>(
"deltaPhi")),
22 theProximityPropagatorName(conf.getParameter<std::
string>(
"propagatorProximity")),
23 theProximityPropagator(nullptr),
25 theEtaPhiEstimator(nullptr) {
35 iDesc.
add<
double>(
"deltaEta", .1);
36 iDesc.
add<
double>(
"deltaPhi", .1);
37 iDesc.
add<
std::string>(
"propagatorProximity",
"SteppingHelixPropagatorAny");
38 iDesc.
add<
bool>(
"useSeedLayer",
false);
39 iDesc.
add<
double>(
"rescaleErrorIfFail", 1.);
83 const std::vector<const DetLayer*>& nl,
88 for (std::vector<const DetLayer*>::const_iterator il = nl.begin(); il != nl.end(); il++) {
89 TSOS stateToUse = currentState;
92 LogDebug(
"CkfPattern") <<
" self propagating in findCompatibleMeasurements.\n from: \n" << stateToUse;
97 stateToUse = middle.
extrapolate(stateToUse, center, *prop);
101 LogDebug(
"CkfPattern") <<
"to: " << stateToUse;
105 std::vector<TM>
tmp = layerMeasurements.measurements((**il), stateToUse, *prop, *
theEstimator);
108 LogDebug(
"CkfPattern") <<
"only an invalid hit is found. trying differently";
111 LogDebug(
"CkfPattern") << tmp.size() <<
" measurements returned by LayerMeasurements";
122 result.insert(result.end() - invalidHits, tmp.begin(), tmp.end());
128 LogDebug(
"CkfPattern") <<
"starting from:\n"
136 std::vector<TrajectoryMeasurement>&
result)
const {
139 std::vector<const DetLayer*> nl;
142 LogDebug(
"CkfPattern") <<
"using JR patch for no measurement case";
149 const Surface* surface = &g->surface();
160 LogDebug(
"CkfPattern") <<
"using the layer of the seed first.";
177 if (result.empty() || (
unsigned int)invalidHits == result.size()) {
179 LogDebug(
"CkfPattern") <<
"Need to go to next layer to get measurements";
183 LogDebug(
"CkfPattern") <<
" there was no next layer with wellInside. Use the next with no check.";
196 <<
" to find measurements on next layers.";
209 LogDebug(
"CkfPattern") <<
" no next layers... going " << traj.
direction() <<
"\n from: \n"
219 if (result.size() > 1) {
224 bool afterInvalid =
false;
225 for (std::vector<TM>::const_iterator
i = result.begin();
i != result.end();
i++) {
226 if (!
i->recHit().isValid())
228 if (afterInvalid &&
i->recHit().isValid()) {
229 edm::LogError(
"CkfPattern") <<
"CkfTrajectoryBuilder error: valid hit after invalid!";
const Propagator * theProximityPropagator
void rescaleError(double factor)
ConstRecHitPointer const & recHit() const
bool empty() const
True if trajectory has no measurements.
uint16_t *__restrict__ id
double theRescaleErrorIfFail
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
const edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorToken
GlobalPoint globalPosition() const
Log< level::Error, false > LogError
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
constexpr std::array< uint8_t, layerIndexSize > layer
const TrajectoryMeasurement & lastMeasurement() const
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)
bool getData(T &iHolder) const
PropagationDirection direction() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
~MuonCkfTrajectoryBuilder() override
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
unsigned int detId() const
MuonCkfTrajectoryBuilder(const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const TrackerGeomDet * idToDet(DetId) const override
const MeasurementTracker & measurementTracker() const
const MeasurementTrackerEvent * theMeasurementTracker
void collectMeasurement(const DetLayer *layer, const std::vector< const DetLayer * > &nl, const TrajectoryStateOnSurface ¤tState, std::vector< TM > &result, int &invalidHits, const Propagator *) const
const TrackerGeometry * geomTracker() const
PTrajectoryStateOnDet const & startingState() const
std::unique_ptr< Chi2MeasurementEstimatorBase > theEtaPhiEstimator
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
T getParameter(std::string const &) const
void findCompatibleMeasurements(const TrajectorySeed &seed, const TempTrajectory &traj, std::vector< TrajectoryMeasurement > &result) const override
bool check(const edm::EventSetup &iSetup)
edm::ESWatcher< BaseCkfTrajectoryBuilder::Chi2MeasurementEstimatorRecord > theEstimatorWatcher
GlobalVector globalMomentum() const
const NavigationSchool * theNavigationSchool
TrajectoryStateOnSurface const & updatedState() const
void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
const GeometricSearchTracker * geometricSearchTracker() const
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)
const Chi2MeasurementEstimatorBase * theEstimator