CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MkFitOutputConverter.cc
Go to the documentation of this file.
2 
7 
15 
19 
22 
31 
38 
39 // mkFit indludes
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:
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,
82  const Propagator& propagatorAlong,
83  const Propagator& propagatorOpposite,
84  const TkClonerImpl& hitCloner,
85  bool lastHitWasInvalid,
86  bool lastHitWasChanged) const;
87 
88  std::pair<TrajectoryStateOnSurface, const GeomDet*> convertInnermostState(const FreeTrajectoryState& fts,
90  const Propagator& propagatorAlong,
91  const Propagator& propagatorOpposite) const;
92 
106 
107  const float qualityMaxInvPt_;
108  const float qualityMinTheta_;
109  const float qualityMaxRsq_;
110  const float qualityMaxZ_;
111  const float qualityMaxPosErrSq_;
112  const bool qualitySignPt_;
113 };
114 
116  : eventOfHitsToken_{consumes<MkFitEventOfHits>(iConfig.getParameter<edm::InputTag>("mkFitEventOfHits"))},
117  pixelClusterIndexToHitToken_{consumes(iConfig.getParameter<edm::InputTag>("mkFitPixelHits"))},
118  stripClusterIndexToHitToken_{consumes(iConfig.getParameter<edm::InputTag>("mkFitStripHits"))},
119  mkfitSeedToken_{consumes<MkFitSeedWrapper>(iConfig.getParameter<edm::InputTag>("mkFitSeeds"))},
120  tracksToken_{consumes<MkFitOutputWrapper>(iConfig.getParameter<edm::InputTag>("tracks"))},
121  seedToken_{consumes<edm::View<TrajectorySeed>>(iConfig.getParameter<edm::InputTag>("seeds"))},
122  propagatorAlongToken_{
123  esConsumes<Propagator, TrackingComponentsRecord>(iConfig.getParameter<edm::ESInputTag>("propagatorAlong"))},
124  propagatorOppositeToken_{esConsumes<Propagator, TrackingComponentsRecord>(
125  iConfig.getParameter<edm::ESInputTag>("propagatorOpposite"))},
126  mfToken_{esConsumes<MagneticField, IdealMagneticFieldRecord>()},
127  ttrhBuilderToken_{esConsumes<TransientTrackingRecHitBuilder, TransientRecHitRecord>(
128  iConfig.getParameter<edm::ESInputTag>("ttrhBuilder"))},
129  mkFitGeomToken_{esConsumes<MkFitGeometry, TrackerRecoGeometryRecord>()},
130  putTrackCandidateToken_{produces<TrackCandidateCollection>()},
131  putSeedStopInfoToken_{produces<std::vector<SeedStopInfo>>()},
132  qualityMaxInvPt_{float(iConfig.getParameter<double>("qualityMaxInvPt"))},
133  qualityMinTheta_{float(iConfig.getParameter<double>("qualityMinTheta"))},
134  qualityMaxRsq_{float(pow(iConfig.getParameter<double>("qualityMaxR"), 2))},
135  qualityMaxZ_{float(iConfig.getParameter<double>("qualityMaxZ"))},
136  qualityMaxPosErrSq_{float(pow(iConfig.getParameter<double>("qualityMaxPosErr"), 2))},
137  qualitySignPt_{iConfig.getParameter<bool>("qualitySignPt")} {}
138 
141 
142  desc.add("mkFitEventOfHits", edm::InputTag{"mkFitEventOfHits"});
143  desc.add("mkFitPixelHits", edm::InputTag{"mkFitSiPixelHits"});
144  desc.add("mkFitStripHits", edm::InputTag{"mkFitSiStripHits"});
145  desc.add("mkFitSeeds", edm::InputTag{"mkFitSeedConverter"});
146  desc.add("tracks", edm::InputTag{"mkFitProducer"});
147  desc.add("seeds", edm::InputTag{"initialStepSeeds"});
148  desc.add("ttrhBuilder", edm::ESInputTag{"", "WithTrackAngle"});
149  desc.add("propagatorAlong", edm::ESInputTag{"", "PropagatorWithMaterial"});
150  desc.add("propagatorOpposite", edm::ESInputTag{"", "PropagatorWithMaterialOpposite"});
151 
152  desc.add<double>("qualityMaxInvPt", 100)->setComment("max(1/pt) for converted tracks");
153  desc.add<double>("qualityMinTheta", 0.01)->setComment("lower bound on theta (or pi-theta) for converted tracks");
154  desc.add<double>("qualityMaxR", 120)->setComment("max(R) for the state position for converted tracks");
155  desc.add<double>("qualityMaxZ", 280)->setComment("max(|Z|) for the state position for converted tracks");
156  desc.add<double>("qualityMaxPosErr", 100)->setComment("max position error for converted tracks");
157  desc.add<bool>("qualitySignPt", true)->setComment("check sign of 1/pt for converted tracks");
158 
159  descriptions.addWithDefaultLabel(desc);
160 }
161 
163  const auto& seeds = iEvent.get(seedToken_);
164  const auto& mkfitSeeds = iEvent.get(mkfitSeedToken_);
165 
166  const auto& ttrhBuilder = iSetup.getData(ttrhBuilderToken_);
167  const auto* tkBuilder = dynamic_cast<TkTransientTrackingRecHitBuilder const*>(&ttrhBuilder);
168  if (!tkBuilder) {
169  throw cms::Exception("LogicError") << "TTRHBuilder must be of type TkTransientTrackingRecHitBuilder";
170  }
171  const auto& mkFitGeom = iSetup.getData(mkFitGeomToken_);
172 
173  // Convert mkfit presentation back to CMSSW
176  iEvent.get(eventOfHitsToken_).get(),
179  seeds,
180  iSetup.getData(mfToken_),
183  tkBuilder->cloner(),
184  mkFitGeom.detLayers(),
185  mkfitSeeds.seeds()));
186 
187  // TODO: SeedStopInfo is currently unfilled
188  iEvent.emplace(putSeedStopInfoToken_, seeds.size());
189 }
190 
192  const mkfit::EventOfHits& eventOfHits,
193  const MkFitClusterIndexToHit& pixelClusterIndexToHit,
194  const MkFitClusterIndexToHit& stripClusterIndexToHit,
196  const MagneticField& mf,
199  const TkClonerImpl& hitCloner,
200  const std::vector<const DetLayer*>& detLayers,
201  const mkfit::TrackVec& mkFitSeeds) const {
203  const auto& candidates = mkFitOutput.tracks();
204  output.reserve(candidates.size());
205 
206  LogTrace("MkFitOutputConverter") << "Number of candidates " << candidates.size();
207 
208  int candIndex = -1;
209  for (const auto& cand : candidates) {
210  ++candIndex;
211  LogTrace("MkFitOutputConverter") << "Candidate " << candIndex << " pT " << cand.pT() << " eta " << cand.momEta()
212  << " phi " << cand.momPhi() << " chi2 " << cand.chi2();
213 
214  // state: check for basic quality first
215  if (cand.state().invpT() > qualityMaxInvPt_ || (qualitySignPt_ && cand.state().invpT() < 0) ||
216  cand.state().theta() < qualityMinTheta_ || (M_PI - cand.state().theta()) < qualityMinTheta_ ||
217  cand.state().posRsq() > qualityMaxRsq_ || std::abs(cand.state().z()) > qualityMaxZ_ ||
218  (cand.state().errors.At(0, 0) + cand.state().errors.At(1, 1) + cand.state().errors.At(2, 2)) >
220  edm::LogInfo("MkFitOutputConverter")
221  << "Candidate " << candIndex << " failed state quality checks" << cand.state().parameters;
222  continue;
223  }
224 
225  auto state = cand.state(); // copy because have to modify
226  state.convertFromCCSToGlbCurvilinear();
227  const auto& param = state.parameters;
228  const auto& err = state.errors;
230  for (int i = 0; i < 5; ++i) {
231  for (int j = i; j < 5; ++j) {
232  cov[i][j] = err.At(i, j);
233  }
234  }
235 
236  auto fts = FreeTrajectoryState(
238  GlobalPoint(param[0], param[1], param[2]), GlobalVector(param[3], param[4], param[5]), state.charge, &mf),
240  if (!fts.curvilinearError().posDef()) {
241  edm::LogInfo("MkFitOutputConverter")
242  << "Curvilinear error not pos-def\n"
243  << fts.curvilinearError().matrix() << "\ncandidate " << candIndex << "ignored";
244  continue;
245  }
246 
247  //Sylvester's criterion, start from the smaller submatrix size
248  double det = 0;
249  if ((!fts.curvilinearError().matrix().Sub<AlgebraicSymMatrix22>(0, 0).Det(det)) || det < 0) {
250  edm::LogInfo("MkFitOutputConverter")
251  << "Fail pos-def check sub2.det for candidate " << candIndex << " with fts " << fts;
252  continue;
253  } else if ((!fts.curvilinearError().matrix().Sub<AlgebraicSymMatrix33>(0, 0).Det(det)) || det < 0) {
254  edm::LogInfo("MkFitOutputConverter")
255  << "Fail pos-def check sub3.det for candidate " << candIndex << " with fts " << fts;
256  continue;
257  } else if ((!fts.curvilinearError().matrix().Sub<AlgebraicSymMatrix44>(0, 0).Det(det)) || det < 0) {
258  edm::LogInfo("MkFitOutputConverter")
259  << "Fail pos-def check sub4.det for candidate " << candIndex << " with fts " << fts;
260  continue;
261  } else if ((!fts.curvilinearError().matrix().Det2(det)) || det < 0) {
262  edm::LogInfo("MkFitOutputConverter")
263  << "Fail pos-def check det for candidate " << candIndex << " with fts " << fts;
264  continue;
265  }
266 
267  // hits
269  // nTotalHits() gives sum of valid hits (nFoundHits()) and invalid/missing hits.
270  const int nhits = cand.nTotalHits();
271  bool lastHitInvalid = false;
272  for (int i = 0; i < nhits; ++i) {
273  const auto& hitOnTrack = cand.getHitOnTrack(i);
274  LogTrace("MkFitOutputConverter") << " hit on layer " << hitOnTrack.layer << " index " << hitOnTrack.index;
275  if (hitOnTrack.index < 0) {
276  // See index-desc.txt file in mkFit for description of negative values
277  //
278  // In order to use the regular InvalidTrackingRecHit I'd need
279  // a GeomDet (and "unfortunately" that is needed in
280  // TrackProducer).
281  //
282  // I guess we could take the track state and propagate it to
283  // each layer to find the actual module the track crosses, and
284  // check whether it is active or not to be able to mark
285  // inactive hits
286  const auto* detLayer = detLayers.at(hitOnTrack.layer);
287  if (detLayer == nullptr) {
288  throw cms::Exception("LogicError") << "DetLayer for layer index " << hitOnTrack.layer << " is null!";
289  }
290  // In principle an InvalidTrackingRecHitNoDet could be
291  // inserted here, but it seems that it is best to deal with
292  // them in the TrackProducer.
293  lastHitInvalid = true;
294  } else {
295  auto const isPixel = eventOfHits[hitOnTrack.layer].is_pix_lyr();
296  auto const& hits = isPixel ? pixelClusterIndexToHit.hits() : stripClusterIndexToHit.hits();
297 
298  auto const& thit = static_cast<BaseTrackerRecHit const&>(*hits[hitOnTrack.index]);
299  if (thit.firstClusterRef().isPixel() || thit.detUnit()->type().isEndcap()) {
300  recHits.push_back(hits[hitOnTrack.index]->clone());
301  } else {
302  recHits.push_back(std::make_unique<SiStripRecHit1D>(
303  thit.localPosition(),
304  LocalError(thit.localPositionError().xx(), 0.f, std::numeric_limits<float>::max()),
305  *thit.det(),
306  thit.firstClusterRef()));
307  }
308  LogTrace("MkFitOutputConverter") << " pos " << recHits.back().globalPosition().x() << " "
309  << recHits.back().globalPosition().y() << " "
310  << recHits.back().globalPosition().z() << " mag2 "
311  << recHits.back().globalPosition().mag2() << " detid "
312  << recHits.back().geographicalId().rawId() << " cluster " << hitOnTrack.index;
313  lastHitInvalid = false;
314  }
315  }
316 
317  const auto lastHitId = recHits.back().geographicalId();
318 
319  // MkFit hits are *not* in the order of propagation, sort by 3D radius for now (as we don't have loopers)
320  // TODO: Improve the sorting (extract keys? maybe even bubble sort would work well as the hits are almost in the correct order)
321  recHits.sort([](const auto& a, const auto& b) {
322  const auto asub = a.geographicalId().subdetId();
323  const auto bsub = b.geographicalId().subdetId();
324  if (asub != bsub) {
325  // Subdetector order (BPix, FPix, TIB, TID, TOB, TEC) corresponds also the navigation
326  return asub < bsub;
327  }
328 
329  const auto& apos = a.globalPosition();
330  const auto& bpos = b.globalPosition();
331 
332  if (isBarrel(asub)) {
333  return apos.perp2() < bpos.perp2();
334  }
335  return std::abs(apos.z()) < std::abs(bpos.z());
336  });
337 
338  const bool lastHitChanged = (recHits.back().geographicalId() != lastHitId); // TODO: make use of the bools
339 
340  // seed
341  const auto seedIndex = cand.label();
342  LogTrace("MkFitOutputConverter") << " from seed " << seedIndex << " seed hits";
343 
344  auto tsosDet =
345  mkFitOutput.propagatedToFirstLayer()
346  ? convertInnermostState(fts, recHits, propagatorAlong, propagatorOpposite)
347  : backwardFit(fts, recHits, propagatorAlong, propagatorOpposite, hitCloner, lastHitInvalid, lastHitChanged);
348  if (!tsosDet.first.isValid()) {
349  edm::LogInfo("MkFitOutputConverter")
350  << "Backward fit of candidate " << candIndex << " failed, ignoring the candidate";
351  continue;
352  }
353 
354  // convert to persistent, from CkfTrackCandidateMakerBase
355  auto pstate = trajectoryStateTransform::persistentState(tsosDet.first, tsosDet.second->geographicalId().rawId());
356 
357  output.emplace_back(
358  recHits,
359  seeds.at(seedIndex),
360  pstate,
361  seeds.refAt(seedIndex),
362  0, // mkFit does not produce loopers, so set nLoops=0
363  static_cast<uint8_t>(StopReason::UNINITIALIZED) // TODO: ignore details of stopping reason as well for now
364  );
365  }
366  return output;
367 }
368 
369 std::pair<TrajectoryStateOnSurface, const GeomDet*> MkFitOutputConverter::backwardFit(
370  const FreeTrajectoryState& fts,
371  const edm::OwnVector<TrackingRecHit>& hits,
374  const TkClonerImpl& hitCloner,
375  bool lastHitWasInvalid,
376  bool lastHitWasChanged) const {
377  // First filter valid hits as in TransientInitialStateEstimator
379 
380  for (int i = hits.size() - 1; i >= 0; --i) {
381  if (hits[i].det()) {
382  // TransientTrackingRecHit::ConstRecHitContainer has shared_ptr,
383  // and it is passed to backFitter below so it is really needed
384  // to keep the interface. Since we keep the ownership in hits,
385  // let's disable the deleter.
386  firstHits.emplace_back(&(hits[i]), edm::do_nothing_deleter{});
387  }
388  }
389 
390  // Then propagate along to the surface of the last hit to get a TSOS
391  const auto& lastHitSurface = firstHits.front()->det()->surface();
392 
393  const Propagator* tryFirst = &propagatorAlong;
394  const Propagator* trySecond = &propagatorOpposite;
395  if (lastHitWasInvalid || lastHitWasChanged) {
396  LogTrace("MkFitOutputConverter") << "Propagating first opposite, then along, because lastHitWasInvalid? "
397  << lastHitWasInvalid << " or lastHitWasChanged? " << lastHitWasChanged;
398  std::swap(tryFirst, trySecond);
399  } else {
400  const auto lastHitSubdet = firstHits.front()->geographicalId().subdetId();
401  const auto& surfacePos = lastHitSurface.position();
402  const auto& lastHitPos = firstHits.front()->globalPosition();
403  bool doSwitch = false;
404  if (isBarrel(lastHitSubdet)) {
405  doSwitch = (surfacePos.perp2() < lastHitPos.perp2());
406  } else {
407  doSwitch = (surfacePos.z() < lastHitPos.z());
408  }
409  if (doSwitch) {
410  LogTrace("MkFitOutputConverter")
411  << "Propagating first opposite, then along, because surface is inner than the hit; surface perp2 "
412  << surfacePos.perp() << " hit " << lastHitPos.perp2() << " surface z " << surfacePos.z() << " hit "
413  << lastHitPos.z();
414 
415  std::swap(tryFirst, trySecond);
416  }
417  }
418 
419  auto tsosDouble = tryFirst->propagateWithPath(fts, lastHitSurface);
420  if (!tsosDouble.first.isValid()) {
421  LogDebug("MkFitOutputConverter") << "Propagating to startingState failed, trying in another direction next";
422  tsosDouble = trySecond->propagateWithPath(fts, lastHitSurface);
423  }
424  auto& startingState = tsosDouble.first;
425 
426  if (!startingState.isValid()) {
427  edm::LogWarning("MkFitOutputConverter")
428  << "startingState is not valid, FTS was\n"
429  << fts << " last hit surface surface:"
430  << "\n position " << lastHitSurface.position() << "\n phiSpan " << lastHitSurface.phiSpan().first << ","
431  << lastHitSurface.phiSpan().first << "\n rSpan " << lastHitSurface.rSpan().first << ","
432  << lastHitSurface.rSpan().first << "\n zSpan " << lastHitSurface.zSpan().first << ","
433  << lastHitSurface.zSpan().first;
434  return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
435  }
436 
437  // Then return back to the logic from TransientInitialStateEstimator
438  startingState.rescaleError(100.);
439 
440  // avoid cloning
441  KFUpdator const aKFUpdator;
442  Chi2MeasurementEstimator const aChi2MeasurementEstimator(100., 3);
443  KFTrajectoryFitter backFitter(
444  &propagatorAlong, &aKFUpdator, &aChi2MeasurementEstimator, firstHits.size(), nullptr, &hitCloner);
445 
446  // assume for now that the propagation in mkfit always alongMomentum
447  PropagationDirection backFitDirection = oppositeToMomentum;
448 
449  // only direction matters in this context
451 
452  // ignore loopers for now
453  Trajectory fitres = backFitter.fitOne(fakeSeed, firstHits, startingState, TrajectoryFitter::standard);
454 
455  LogDebug("MkFitOutputConverter") << "using a backward fit of :" << firstHits.size() << " hits, starting from:\n"
456  << startingState << " to get the estimate of the initial state of the track.";
457 
458  if (!fitres.isValid()) {
459  edm::LogWarning("MkFitOutputConverter") << "FitTester: first hits fit failed";
460  return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
461  }
462 
463  TrajectoryMeasurement const& firstMeas = fitres.lastMeasurement();
464 
465  // magnetic field can be different!
466  TrajectoryStateOnSurface firstState(firstMeas.updatedState().localParameters(),
467  firstMeas.updatedState().localError(),
468  firstMeas.updatedState().surface(),
469  propagatorAlong.magneticField());
470 
471  firstState.rescaleError(100.);
472 
473  LogDebug("MkFitOutputConverter") << "the initial state is found to be:\n:" << firstState
474  << "\n it's field pointer is: " << firstState.magneticField()
475  << "\n the pointer from the state of the back fit was: "
476  << firstMeas.updatedState().magneticField();
477 
478  return std::make_pair(firstState, firstMeas.recHit()->det());
479 }
480 
481 std::pair<TrajectoryStateOnSurface, const GeomDet*> MkFitOutputConverter::convertInnermostState(
482  const FreeTrajectoryState& fts,
483  const edm::OwnVector<TrackingRecHit>& hits,
485  const Propagator& propagatorOpposite) const {
486  auto det = hits[0].det();
487  if (det == nullptr) {
488  throw cms::Exception("LogicError") << "Got nullptr from the first hit det()";
489  }
490 
491  const auto& firstHitSurface = det->surface();
492 
493  auto tsosDouble = propagatorAlong.propagateWithPath(fts, firstHitSurface);
494  if (!tsosDouble.first.isValid()) {
495  LogDebug("MkFitOutputConverter") << "Propagating to startingState along momentum failed, trying opposite next";
496  tsosDouble = propagatorOpposite.propagateWithPath(fts, firstHitSurface);
497  }
498 
499  return std::make_pair(tsosDouble.first, det);
500 }
501 
static constexpr auto TEC
void setComment(std::string const &value)
const edm::EDGetTokenT< MkFitClusterIndexToHit > pixelClusterIndexToHitToken_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T mag2() const
Definition: PV3DBase.h:63
reference back()
Definition: OwnVector.h:431
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
ConstRecHitPointer const & recHit() const
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > mkFitGeomToken_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
const LocalTrajectoryParameters & localParameters() const
tuple propagatorAlong
Definition: HLT_FULL_cff.py:98
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< TrackCandidate > TrackCandidateCollection
size_type size() const
Definition: OwnVector.h:300
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
T y() const
Definition: PV3DBase.h:60
GeometricSearchDet Det
Definition: DetBelowR.h:8
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
PropagationDirection
const edm::EDGetTokenT< MkFitOutputWrapper > tracksToken_
virtual GlobalPoint globalPosition() const
const MagneticField * magneticField() const
#define LogTrace(id)
RefToBase< value_type > refAt(size_type i) const
bool getData(T &iHolder) const
Definition: EventSetup.h:122
const edm::EDPutTokenT< std::vector< SeedStopInfo > > putSeedStopInfoToken_
void push_back(D *&d)
Definition: OwnVector.h:326
int iEvent
Definition: GenABIO.cc:224
const SurfaceType & surface() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
~MkFitOutputConverter() override=default
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
bool propagatedToFirstLayer() const
T z() const
Definition: PV3DBase.h:61
MkFitOutputConverter(edm::ParameterSet const &iConfig)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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
const edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken_
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:346
const edm::EDPutTokenT< TrackCandidateCollection > putTrackCandidateToken_
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
const LocalTrajectoryError & localError() const
static constexpr auto TOB
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
bool isEndcap(GeomDetEnumerators::SubDetector m)
const edm::EDGetTokenT< MkFitSeedWrapper > mkfitSeedToken_
#define M_PI
std::vector< ConstRecHitPointer > ConstRecHitContainer
Log< level::Info, false > LogInfo
GlobalPoint position() const
std::vector< Track > TrackVec
bool isValid() const
Definition: Trajectory.h:257
static constexpr auto TIB
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
Definition: Event.h:433
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void sort(S s)
Definition: OwnVector.h:502
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
double b
Definition: hdecay.h:118
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
virtual const MagneticField * magneticField() const =0
std::pair< TrajectoryStateOnSurface, const GeomDet * > convertInnermostState(const FreeTrajectoryState &fts, const edm::OwnVector< TrackingRecHit > &hits, const Propagator &propagatorAlong, const Propagator &propagatorOpposite) const
tuple propagatorOpposite
Definition: HLT_FULL_cff.py:96
const edm::EDGetTokenT< MkFitEventOfHits > eventOfHitsToken_
double a
Definition: hdecay.h:119
bool isPixel(HitType hitType)
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
const_reference at(size_type pos) const
TrajectoryStateOnSurface const & updatedState() const
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAlongToken_
std::vector< TrackingRecHit const * > & hits()
DetId geographicalId() const
Log< level::Warning, false > LogWarning
mkfit::TrackVec const & tracks() const
long double T
T x() const
Definition: PV3DBase.h:59
static constexpr auto TID
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
Global3DVector GlobalVector
Definition: GlobalVector.h:10
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > ttrhBuilderToken_
#define LogDebug(id)
const edm::EDGetTokenT< MkFitClusterIndexToHit > stripClusterIndexToHitToken_