CMS 3D CMS Logo

MkFitOutputConverter.cc
Go to the documentation of this file.
2 
7 
15 
19 
22 
31 
38 
39 // mkFit indludes
40 #include "LayerNumberConverter.h"
41 #include "Track.h"
42 #include "mkFit/HitStructures.h"
43 
44 namespace {
45  template <typename T>
46  bool isBarrel(T subdet) {
47  return subdet == PixelSubdetector::PixelBarrel || subdet == StripSubdetector::TIB ||
48  subdet == StripSubdetector::TOB;
49  }
50 
51  template <typename T>
52  bool isEndcap(T subdet) {
53  return subdet == PixelSubdetector::PixelEndcap || subdet == StripSubdetector::TID ||
54  subdet == StripSubdetector::TEC;
55  }
56 } // namespace
57 
59 public:
60  explicit MkFitOutputConverter(edm::ParameterSet const& iConfig);
61  ~MkFitOutputConverter() override = default;
62 
63  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
64 
65 private:
66  void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
67 
69  const mkfit::EventOfHits& eventOfHits,
70  const MkFitClusterIndexToHit& pixelClusterIndexToHit,
71  const MkFitClusterIndexToHit& stripClusterIndexToHit,
73  const MagneticField& mf,
76  const TkClonerImpl& hitCloner,
77  const std::vector<const DetLayer*>& detLayers,
78  const mkfit::TrackVec& mkFitSeeds) const;
79 
80  std::pair<TrajectoryStateOnSurface, const GeomDet*> backwardFit(const FreeTrajectoryState& fts,
84  const TkClonerImpl& hitCloner,
85  bool lastHitWasInvalid,
86  bool lastHitWasChanged) const;
87 
88  std::pair<TrajectoryStateOnSurface, const GeomDet*> convertInnermostState(const FreeTrajectoryState& fts,
91  const Propagator& propagatorOpposite) const;
92 
109 };
110 
112  : eventOfHitsToken_{consumes<MkFitEventOfHits>(iConfig.getParameter<edm::InputTag>("mkFitEventOfHits"))},
113  pixelClusterIndexToHitToken_{consumes(iConfig.getParameter<edm::InputTag>("mkFitPixelHits"))},
114  stripClusterIndexToHitToken_{consumes(iConfig.getParameter<edm::InputTag>("mkFitStripHits"))},
115  mkfitSeedToken_{consumes<MkFitSeedWrapper>(iConfig.getParameter<edm::InputTag>("mkFitSeeds"))},
116  tracksToken_{consumes<MkFitOutputWrapper>(iConfig.getParameter<edm::InputTag>("tracks"))},
117  seedToken_{consumes<edm::View<TrajectorySeed>>(iConfig.getParameter<edm::InputTag>("seeds"))},
118  propagatorAlongToken_{
119  esConsumes<Propagator, TrackingComponentsRecord>(iConfig.getParameter<edm::ESInputTag>("propagatorAlong"))},
120  propagatorOppositeToken_{esConsumes<Propagator, TrackingComponentsRecord>(
121  iConfig.getParameter<edm::ESInputTag>("propagatorOpposite"))},
122  mfToken_{esConsumes<MagneticField, IdealMagneticFieldRecord>()},
123  ttrhBuilderToken_{esConsumes<TransientTrackingRecHitBuilder, TransientRecHitRecord>(
124  iConfig.getParameter<edm::ESInputTag>("ttrhBuilder"))},
125  mkFitGeomToken_{esConsumes<MkFitGeometry, TrackerRecoGeometryRecord>()},
126  putTrackCandidateToken_{produces<TrackCandidateCollection>()},
127  putSeedStopInfoToken_{produces<std::vector<SeedStopInfo>>()} {}
128 
131 
132  desc.add("mkFitEventOfHits", edm::InputTag{"mkFitEventOfHits"});
133  desc.add("mkFitPixelHits", edm::InputTag{"mkFitSiPixelHits"});
134  desc.add("mkFitStripHits", edm::InputTag{"mkFitSiStripHits"});
135  desc.add("mkFitSeeds", edm::InputTag{"mkFitSeedConverter"});
136  desc.add("tracks", edm::InputTag{"mkFitProducer"});
137  desc.add("seeds", edm::InputTag{"initialStepSeeds"});
138  desc.add("ttrhBuilder", edm::ESInputTag{"", "WithTrackAngle"});
139  desc.add("propagatorAlong", edm::ESInputTag{"", "PropagatorWithMaterial"});
140  desc.add("propagatorOpposite", edm::ESInputTag{"", "PropagatorWithMaterialOpposite"});
141 
142  descriptions.addWithDefaultLabel(desc);
143 }
144 
146  const auto& seeds = iEvent.get(seedToken_);
147  const auto& mkfitSeeds = iEvent.get(mkfitSeedToken_);
148 
149  const auto& ttrhBuilder = iSetup.getData(ttrhBuilderToken_);
150  const auto* tkBuilder = dynamic_cast<TkTransientTrackingRecHitBuilder const*>(&ttrhBuilder);
151  if (!tkBuilder) {
152  throw cms::Exception("LogicError") << "TTRHBuilder must be of type TkTransientTrackingRecHitBuilder";
153  }
154  const auto& mkFitGeom = iSetup.getData(mkFitGeomToken_);
155 
156  // Convert mkfit presentation back to CMSSW
159  iEvent.get(eventOfHitsToken_).get(),
162  seeds,
163  iSetup.getData(mfToken_),
166  tkBuilder->cloner(),
167  mkFitGeom.detLayers(),
168  mkfitSeeds.seeds()));
169 
170  // TODO: SeedStopInfo is currently unfilled
171  iEvent.emplace(putSeedStopInfoToken_, seeds.size());
172 }
173 
175  const mkfit::EventOfHits& eventOfHits,
176  const MkFitClusterIndexToHit& pixelClusterIndexToHit,
177  const MkFitClusterIndexToHit& stripClusterIndexToHit,
179  const MagneticField& mf,
182  const TkClonerImpl& hitCloner,
183  const std::vector<const DetLayer*>& detLayers,
184  const mkfit::TrackVec& mkFitSeeds) const {
186  const auto& candidates = mkFitOutput.tracks();
187  output.reserve(candidates.size());
188 
189  LogTrace("MkFitOutputConverter") << "Number of candidates " << candidates.size();
190 
191  int candIndex = -1;
192  for (const auto& cand : candidates) {
193  ++candIndex;
194  LogTrace("MkFitOutputConverter") << "Candidate " << candIndex << " pT " << cand.pT() << " eta " << cand.momEta()
195  << " phi " << cand.momPhi() << " chi2 " << cand.chi2();
196 
197  // hits
199  // nTotalHits() gives sum of valid hits (nFoundHits()) and
200  // invalid/missing hits (up to a maximum of 32 inside mkFit,
201  // restriction to be lifted in the future)
202  const int nhits = cand.nTotalHits();
203  bool lastHitInvalid = false;
204  for (int i = 0; i < nhits; ++i) {
205  const auto& hitOnTrack = cand.getHitOnTrack(i);
206  LogTrace("MkFitOutputConverter") << " hit on layer " << hitOnTrack.layer << " index " << hitOnTrack.index;
207  if (hitOnTrack.index < 0) {
208  // See index-desc.txt file in mkFit for description of negative values
209  //
210  // In order to use the regular InvalidTrackingRecHit I'd need
211  // a GeomDet (and "unfortunately" that is needed in
212  // TrackProducer).
213  //
214  // I guess we could take the track state and propagate it to
215  // each layer to find the actual module the track crosses, and
216  // check whether it is active or not to be able to mark
217  // inactive hits
218  const auto* detLayer = detLayers.at(hitOnTrack.layer);
219  if (detLayer == nullptr) {
220  throw cms::Exception("LogicError") << "DetLayer for layer index " << hitOnTrack.layer << " is null!";
221  }
222  // In principle an InvalidTrackingRecHitNoDet could be
223  // inserted here, but it seems that it is best to deal with
224  // them in the TrackProducer.
225  lastHitInvalid = true;
226  } else {
227  auto const isPixel = eventOfHits[hitOnTrack.layer].is_pix_lyr();
228  auto const& hits = isPixel ? pixelClusterIndexToHit.hits() : stripClusterIndexToHit.hits();
229 
230  auto const& thit = static_cast<BaseTrackerRecHit const&>(*hits[hitOnTrack.index]);
231  if (thit.firstClusterRef().isPixel() || thit.detUnit()->type().isEndcap()) {
232  recHits.push_back(hits[hitOnTrack.index]->clone());
233  } else {
234  recHits.push_back(std::make_unique<SiStripRecHit1D>(
235  thit.localPosition(),
236  LocalError(thit.localPositionError().xx(), 0.f, std::numeric_limits<float>::max()),
237  *thit.det(),
238  thit.firstClusterRef()));
239  }
240  LogTrace("MkFitOutputConverter") << " pos " << recHits.back().globalPosition().x() << " "
241  << recHits.back().globalPosition().y() << " "
242  << recHits.back().globalPosition().z() << " mag2 "
243  << recHits.back().globalPosition().mag2() << " detid "
244  << recHits.back().geographicalId().rawId() << " cluster " << hitOnTrack.index;
245  lastHitInvalid = false;
246  }
247  }
248 
249  const auto lastHitId = recHits.back().geographicalId();
250 
251  // MkFit hits are *not* in the order of propagation, sort by 3D radius for now (as we don't have loopers)
252  // TODO: Improve the sorting (extract keys? maybe even bubble sort would work well as the hits are almost in the correct order)
253  recHits.sort([](const auto& a, const auto& b) {
254  const auto asub = a.geographicalId().subdetId();
255  const auto bsub = b.geographicalId().subdetId();
256  if (asub != bsub) {
257  // Subdetector order (BPix, FPix, TIB, TID, TOB, TEC) corresponds also the navigation
258  return asub < bsub;
259  }
260 
261  const auto& apos = a.globalPosition();
262  const auto& bpos = b.globalPosition();
263 
264  if (isBarrel(asub)) {
265  return apos.perp2() < bpos.perp2();
266  }
267  return std::abs(apos.z()) < std::abs(bpos.z());
268  });
269 
270  const bool lastHitChanged = (recHits.back().geographicalId() != lastHitId); // TODO: make use of the bools
271 
272  // seed
273  const auto seedIndex = cand.label();
274  LogTrace("MkFitOutputConverter") << " from seed " << seedIndex << " seed hits";
275 
276  // state
277  auto state = cand.state(); // copy because have to modify
278  state.convertFromCCSToGlbCurvilinear();
279  const auto& param = state.parameters;
280  const auto& err = state.errors;
282  for (int i = 0; i < 5; ++i) {
283  for (int j = i; j < 5; ++j) {
284  cov[i][j] = err.At(i, j);
285  }
286  }
287 
288  auto fts = FreeTrajectoryState(
290  GlobalPoint(param[0], param[1], param[2]), GlobalVector(param[3], param[4], param[5]), state.charge, &mf),
292  if (!fts.curvilinearError().posDef()) {
293  edm::LogWarning("MkFitOutputConverter") << "Curvilinear error not pos-def\n"
294  << fts.curvilinearError().matrix() << "\ncandidate ignored";
295  continue;
296  }
297 
298  auto tsosDet =
299  mkFitOutput.propagatedToFirstLayer()
301  : backwardFit(fts, recHits, propagatorAlong, propagatorOpposite, hitCloner, lastHitInvalid, lastHitChanged);
302  if (!tsosDet.first.isValid()) {
303  edm::LogWarning("MkFitOutputConverter")
304  << "Backward fit of candidate " << candIndex << " failed, ignoring the candidate";
305  continue;
306  }
307 
308  // convert to persistent, from CkfTrackCandidateMakerBase
309  auto pstate = trajectoryStateTransform::persistentState(tsosDet.first, tsosDet.second->geographicalId().rawId());
310 
311  output.emplace_back(
312  recHits,
313  seeds.at(seedIndex),
314  pstate,
315  seeds.refAt(seedIndex),
316  0, // mkFit does not produce loopers, so set nLoops=0
317  static_cast<uint8_t>(StopReason::UNINITIALIZED) // TODO: ignore details of stopping reason as well for now
318  );
319  }
320  return output;
321 }
322 
323 std::pair<TrajectoryStateOnSurface, const GeomDet*> MkFitOutputConverter::backwardFit(
324  const FreeTrajectoryState& fts,
328  const TkClonerImpl& hitCloner,
329  bool lastHitWasInvalid,
330  bool lastHitWasChanged) const {
331  // First filter valid hits as in TransientInitialStateEstimator
333 
334  for (int i = hits.size() - 1; i >= 0; --i) {
335  if (hits[i].det()) {
336  // TransientTrackingRecHit::ConstRecHitContainer has shared_ptr,
337  // and it is passed to backFitter below so it is really needed
338  // to keep the interface. Since we keep the ownership in hits,
339  // let's disable the deleter.
340  firstHits.emplace_back(&(hits[i]), edm::do_nothing_deleter{});
341  }
342  }
343 
344  // Then propagate along to the surface of the last hit to get a TSOS
345  const auto& lastHitSurface = firstHits.front()->det()->surface();
346 
347  const Propagator* tryFirst = &propagatorAlong;
348  const Propagator* trySecond = &propagatorOpposite;
349  if (lastHitWasInvalid || lastHitWasChanged) {
350  LogTrace("MkFitOutputConverter") << "Propagating first opposite, then along, because lastHitWasInvalid? "
351  << lastHitWasInvalid << " or lastHitWasChanged? " << lastHitWasChanged;
352  std::swap(tryFirst, trySecond);
353  } else {
354  const auto lastHitSubdet = firstHits.front()->geographicalId().subdetId();
355  const auto& surfacePos = lastHitSurface.position();
356  const auto& lastHitPos = firstHits.front()->globalPosition();
357  bool doSwitch = false;
358  if (isBarrel(lastHitSubdet)) {
359  doSwitch = (surfacePos.perp2() < lastHitPos.perp2());
360  } else {
361  doSwitch = (surfacePos.z() < lastHitPos.z());
362  }
363  if (doSwitch) {
364  LogTrace("MkFitOutputConverter")
365  << "Propagating first opposite, then along, because surface is inner than the hit; surface perp2 "
366  << surfacePos.perp() << " hit " << lastHitPos.perp2() << " surface z " << surfacePos.z() << " hit "
367  << lastHitPos.z();
368 
369  std::swap(tryFirst, trySecond);
370  }
371  }
372 
373  auto tsosDouble = tryFirst->propagateWithPath(fts, lastHitSurface);
374  if (!tsosDouble.first.isValid()) {
375  LogDebug("MkFitOutputConverter") << "Propagating to startingState failed, trying in another direction next";
376  tsosDouble = trySecond->propagateWithPath(fts, lastHitSurface);
377  }
378  auto& startingState = tsosDouble.first;
379 
380  if (!startingState.isValid()) {
381  edm::LogWarning("MkFitOutputConverter")
382  << "startingState is not valid, FTS was\n"
383  << fts << " last hit surface surface:"
384  << "\n position " << lastHitSurface.position() << "\n phiSpan " << lastHitSurface.phiSpan().first << ","
385  << lastHitSurface.phiSpan().first << "\n rSpan " << lastHitSurface.rSpan().first << ","
386  << lastHitSurface.rSpan().first << "\n zSpan " << lastHitSurface.zSpan().first << ","
387  << lastHitSurface.zSpan().first;
388  return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
389  }
390 
391  // Then return back to the logic from TransientInitialStateEstimator
392  startingState.rescaleError(100.);
393 
394  // avoid cloning
395  KFUpdator const aKFUpdator;
396  Chi2MeasurementEstimator const aChi2MeasurementEstimator(100., 3);
397  KFTrajectoryFitter backFitter(
398  &propagatorAlong, &aKFUpdator, &aChi2MeasurementEstimator, firstHits.size(), nullptr, &hitCloner);
399 
400  // assume for now that the propagation in mkfit always alongMomentum
401  PropagationDirection backFitDirection = oppositeToMomentum;
402 
403  // only direction matters in this context
405 
406  // ignore loopers for now
407  Trajectory fitres = backFitter.fitOne(fakeSeed, firstHits, startingState, TrajectoryFitter::standard);
408 
409  LogDebug("MkFitOutputConverter") << "using a backward fit of :" << firstHits.size() << " hits, starting from:\n"
410  << startingState << " to get the estimate of the initial state of the track.";
411 
412  if (!fitres.isValid()) {
413  edm::LogWarning("MkFitOutputConverter") << "FitTester: first hits fit failed";
414  return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
415  }
416 
417  TrajectoryMeasurement const& firstMeas = fitres.lastMeasurement();
418 
419  // magnetic field can be different!
420  TrajectoryStateOnSurface firstState(firstMeas.updatedState().localParameters(),
421  firstMeas.updatedState().localError(),
422  firstMeas.updatedState().surface(),
423  propagatorAlong.magneticField());
424 
425  firstState.rescaleError(100.);
426 
427  LogDebug("MkFitOutputConverter") << "the initial state is found to be:\n:" << firstState
428  << "\n it's field pointer is: " << firstState.magneticField()
429  << "\n the pointer from the state of the back fit was: "
430  << firstMeas.updatedState().magneticField();
431 
432  return std::make_pair(firstState, firstMeas.recHit()->det());
433 }
434 
435 std::pair<TrajectoryStateOnSurface, const GeomDet*> MkFitOutputConverter::convertInnermostState(
436  const FreeTrajectoryState& fts,
439  const Propagator& propagatorOpposite) const {
440  auto det = hits[0].det();
441  if (det == nullptr) {
442  throw cms::Exception("LogicError") << "Got nullptr from the first hit det()";
443  }
444 
445  const auto& firstHitSurface = det->surface();
446 
447  auto tsosDouble = propagatorAlong.propagateWithPath(fts, firstHitSurface);
448  if (!tsosDouble.first.isValid()) {
449  LogDebug("MkFitOutputConverter") << "Propagating to startingState along momentum failed, trying opposite next";
450  tsosDouble = propagatorOpposite.propagateWithPath(fts, firstHitSurface);
451  }
452 
453  return std::make_pair(tsosDouble.first, det);
454 }
455 
Propagator.h
edm::StreamID
Definition: StreamID.h:30
Chi2MeasurementEstimator.h
MkFitSeedWrapper.h
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
PixelSubdetector.h
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
Chi2MeasurementEstimator
Definition: Chi2MeasurementEstimator.h:15
TrackCandidateCollection.h
MkFitOutputConverter::stripClusterIndexToHitToken_
const edm::EDGetTokenT< MkFitClusterIndexToHit > stripClusterIndexToHitToken_
Definition: MkFitOutputConverter.cc:95
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
MkFitOutputConverter::mkfitSeedToken_
const edm::EDGetTokenT< MkFitSeedWrapper > mkfitSeedToken_
Definition: MkFitOutputConverter.cc:96
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edm::EDGetTokenT< MkFitEventOfHits >
edm::EDPutTokenT< TrackCandidateCollection >
MkFitOutputConverter::MkFitOutputConverter
MkFitOutputConverter(edm::ParameterSet const &iConfig)
Definition: MkFitOutputConverter.cc:111
edm::do_nothing_deleter
Definition: do_nothing_deleter.h:34
trajectoryStateTransform::persistentState
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
Definition: TrajectoryStateTransform.cc:14
TransientRecHitRecord.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
MkFitOutputConverter::propagatorOppositeToken_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
Definition: MkFitOutputConverter.cc:100
TrackerRecoGeometryRecord.h
MkFitOutputWrapper.h
oppositeToMomentum
Definition: PropagationDirection.h:4
KFTrajectoryFitter
Definition: KFTrajectoryFitter.h:22
MkFitOutputWrapper::tracks
mkfit::TrackVec const & tracks() const
Definition: MkFitOutputWrapper.h:22
TrajectoryMeasurement::updatedState
TrajectoryStateOnSurface const & updatedState() const
Definition: TrajectoryMeasurement.h:184
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
MkFitOutputConverter::backwardFit
std::pair< TrajectoryStateOnSurface, const GeomDet * > backwardFit(const FreeTrajectoryState &fts, const edm::OwnVector< TrackingRecHit > &hits, const Propagator &propagatorAlong, const Propagator &propagatorOpposite, const TkClonerImpl &hitCloner, bool lastHitWasInvalid, bool lastHitWasChanged) const
Definition: MkFitOutputConverter.cc:323
MkFitOutputConverter::mfToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
Definition: MkFitOutputConverter.cc:101
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
TkTransientTrackingRecHitBuilder.h
MkFitOutputConverter::propagatorAlongName_
const std::string propagatorAlongName_
Definition: MkFitOutputConverter.cc:107
MkFitOutputConverter::convertInnermostState
std::pair< TrajectoryStateOnSurface, const GeomDet * > convertInnermostState(const FreeTrajectoryState &fts, const edm::OwnVector< TrackingRecHit > &hits, const Propagator &propagatorAlong, const Propagator &propagatorOpposite) const
Definition: MkFitOutputConverter.cc:435
Propagator
Definition: Propagator.h:44
MkFitOutputConverter::putSeedStopInfoToken_
const edm::EDPutTokenT< std::vector< SeedStopInfo > > putSeedStopInfoToken_
Definition: MkFitOutputConverter.cc:105
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
MakerMacros.h
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MkFitEventOfHits.h
MkFitOutputConverter::pixelClusterIndexToHitToken_
const edm::EDGetTokenT< MkFitClusterIndexToHit > pixelClusterIndexToHitToken_
Definition: MkFitOutputConverter.cc:94
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
MkFitOutputConverter::ttrhBuilderName_
const std::string ttrhBuilderName_
Definition: MkFitOutputConverter.cc:106
IdealMagneticFieldRecord.h
MkFitOutputConverter::~MkFitOutputConverter
~MkFitOutputConverter() override=default
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
MkFitOutputConverter::propagatorAlongToken_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAlongToken_
Definition: MkFitOutputConverter.cc:99
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
nhits
Definition: HIMultiTrackSelector.h:42
TrajectorySeed.h
b
double b
Definition: hdecay.h:118
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
edm::View
Definition: CaloClusterFwd.h:14
mkfit::TrackVec
std::vector< Track > TrackVec
Definition: MkFitOutputWrapper.h:8
MkFitOutputConverter::ttrhBuilderToken_
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > ttrhBuilderToken_
Definition: MkFitOutputConverter.cc:102
KFUpdator.h
TrajectoryFitter::standard
Definition: TrajectoryFitter.h:21
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
TrackCandidateCollection
std::vector< TrackCandidate > TrackCandidateCollection
Definition: TrackCandidateCollection.h:7
a
double a
Definition: hdecay.h:119
MkFitOutputConverter::mkFitGeomToken_
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > mkFitGeomToken_
Definition: MkFitOutputConverter.cc:103
HLT_FULL_cff.propagatorOpposite
propagatorOpposite
Definition: HLT_FULL_cff.py:116
Event.h
MkFitClusterIndexToHit
Definition: MkFitClusterIndexToHit.h:8
fastTrackerRecHitType::isPixel
bool isPixel(HitType hitType)
Definition: FastTrackerRecHit.h:37
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
PropagatorWithMaterial.h
LocalError
Definition: LocalError.h:12
Trajectory::lastMeasurement
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
cand
Definition: decayParser.h:32
MkFitClusterIndexToHit::hits
std::vector< TrackingRecHit const * > & hits()
Definition: MkFitClusterIndexToHit.h:12
iEvent
int iEvent
Definition: GenABIO.cc:224
DetachedQuadStep_cff.mkFitSeeds
mkFitSeeds
Definition: DetachedQuadStep_cff.py:208
TkClonerImpl.h
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< Propagator, TrackingComponentsRecord >
InitialStepPreSplitting_cff.eventOfHits
eventOfHits
Definition: InitialStepPreSplitting_cff.py:154
TrajectoryStateOnSurface::rescaleError
void rescaleError(double factor)
Definition: TrajectoryStateOnSurface.h:82
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
SiStripRecHit1D.h
MkFitClusterIndexToHit.h
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
MkFitOutputConverter::putTrackCandidateToken_
const edm::EDPutTokenT< TrackCandidateCollection > putTrackCandidateToken_
Definition: MkFitOutputConverter.cc:104
HLT_FULL_cff.propagatorAlong
propagatorAlong
Definition: HLT_FULL_cff.py:118
MkFitOutputConverter::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: MkFitOutputConverter.cc:129
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DetachedQuadStep_cff.seeds
seeds
Definition: DetachedQuadStep_cff.py:195
TkClonerImpl
Definition: TkClonerImpl.h:12
MkFitOutputConverter::propagatorOppositeName_
const std::string propagatorOppositeName_
Definition: MkFitOutputConverter.cc:108
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
MkFitOutputWrapper::propagatedToFirstLayer
bool propagatedToFirstLayer() const
Definition: MkFitOutputWrapper.h:23
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
SeedStopInfo.h
Trajectory
Definition: Trajectory.h:38
T
long double T
Definition: Basic3DVectorLD.h:48
HLT_FULL_cff.candidates
candidates
Definition: HLT_FULL_cff.py:55017
StopReason::UNINITIALIZED
TrackingComponentsRecord.h
Exception
Definition: hltDiff.cc:245
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
TrajectorySeed
Definition: TrajectorySeed.h:18
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Propagator::propagateWithPath
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
TrajectoryStateTransform.h
MkFitOutputConverter::convertCandidates
TrackCandidateCollection convertCandidates(const MkFitOutputWrapper &mkFitOutput, const mkfit::EventOfHits &eventOfHits, const MkFitClusterIndexToHit &pixelClusterIndexToHit, const MkFitClusterIndexToHit &stripClusterIndexToHit, const edm::View< TrajectorySeed > &seeds, const MagneticField &mf, const Propagator &propagatorAlong, const Propagator &propagatorOpposite, const TkClonerImpl &hitCloner, const std::vector< const DetLayer * > &detLayers, const mkfit::TrackVec &mkFitSeeds) const
Definition: MkFitOutputConverter.cc:174
MkFitOutputConverter::eventOfHitsToken_
const edm::EDGetTokenT< MkFitEventOfHits > eventOfHitsToken_
Definition: MkFitOutputConverter.cc:93
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
KFTrajectoryFitter.h
MkFitOutputWrapper
Definition: MkFitOutputWrapper.h:11
MkFitOutputConverter::tracksToken_
const edm::EDGetTokenT< MkFitOutputWrapper > tracksToken_
Definition: MkFitOutputConverter.cc:97
TransientTrackingRecHitBuilder.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
ParameterSet.h
MkFitOutputConverter::produce
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition: MkFitOutputConverter.cc:145
EDProducer.h
InvalidTrackingRecHit.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::Event
Definition: Event.h:73
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
MagneticField
Definition: MagneticField.h:19
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
TrajectoryMeasurement
Definition: TrajectoryMeasurement.h:25
GeomDetEnumerators::isEndcap
bool isEndcap(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:62
StripSubdetector.h
TrajectoryStateOnSurface::magneticField
const MagneticField * magneticField() const
Definition: TrajectoryStateOnSurface.h:62
MkFitOutputConverter
Definition: MkFitOutputConverter.cc:58
edm::InputTag
Definition: InputTag.h:15
do_nothing_deleter.h
KFUpdator
Definition: KFUpdator.h:32
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
Trajectory::isValid
bool isValid() const
Definition: Trajectory.h:257
MkFitOutputConverter::seedToken_
const edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken_
Definition: MkFitOutputConverter.cc:98
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87
edm::OwnVector< TrackingRecHit >
MkFitGeometry.h