18 double maxMatchEstimator,
23 std::vector<int32_t>
result;
28 const GeomDet* seedState_det = trackerGeometry.
idToDet(seedState_detId);
29 const Surface* seedState_surface = &seedState_det->surface();
34 for (
unsigned recHitCombinationIndex = 0; recHitCombinationIndex < recHitCombinationCollection.size();
35 recHitCombinationIndex++) {
36 const auto& recHitCombination = recHitCombinationCollection[recHitCombinationIndex];
37 int simTrackIndex = recHitCombination.back()->simTrackId(0);
38 if (simTrackIndex < 0 || simTrackIndex >= nSimTracks) {
39 throw cms::Exception(
"SeedMatcher") <<
"SimTrack index out of range: " << simTrackIndex << std::endl;
43 if (matchEstimator < maxMatchEstimator) {
44 result.push_back(recHitCombinationIndex);
56 simTrack.trackerSurfacePosition().y(),
57 simTrack.trackerSurfacePosition().z());
59 simTrack.trackerSurfaceMomentum().y(),
60 simTrack.trackerSurfaceMomentum().z());
63 if (simTrack_atTrackerSurface_position.basicVector().dot(simTrack_atTrackerSurface_momentum.basicVector()) *
71 simTrack_atTrackerSurface_position, simTrack_atTrackerSurface_momentum,
simTrack.charge(), &
magneticField);
77 if (!simtrack_atSeedStateSurface_state.
isValid()) {
92 if (!
error.Invert()) {
93 edm::LogWarning(
"FastSim SeedToSimTrackMatcher") <<
"Cannot invert seed state error matrix => no match...";
97 return ROOT::Math::Similarity(difference,
error);
static std::vector< int > matchRecHitCombinations(const TrajectorySeed &seed, const FastTrackerRecHitCombinationCollection &recHitCombinationCollection, const std::vector< SimTrack > &simTrackCollection, double maxMatchEstimator, const Propagator &propagator, const MagneticField &magneticField, const TrackerGeometry &trackerGeometry)
const LocalTrajectoryError & localError() const
const LocalTrajectoryParameters & localParameters() const
const SurfaceType & surface() const
unsigned int detId() const
GlobalPoint globalPosition() const
static double matchSimTrack(const TrajectoryStateOnSurface &seedState, const SimTrack &simTrack, const Propagator &propagator, const MagneticField &magneticField)
AlgebraicVector5 vector() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const BasicVectorType & basicVector() const
const TrackerGeomDet * idToDet(DetId) const override
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
GlobalVector globalMomentum() const
std::vector< FastTrackerRecHitCombination > FastTrackerRecHitCombinationCollection
const AlgebraicSymMatrix55 & matrix() const
Log< level::Warning, false > LogWarning
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.
std::vector< SimTrack > SimTrackContainer