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();
33 int nSimTracks = simTrackCollection.size();
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;
41 const auto&
simTrack = simTrackCollection[recHitCombination.back()->simTrackId(0)];
43 if (matchEstimator < maxMatchEstimator) {
44 result.push_back(recHitCombinationIndex);
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);
const math::XYZVectorD & trackerSurfacePosition() const
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 LocalTrajectoryParameters & localParameters() const
GlobalPoint globalPosition() const
float charge() const
charge
AlgebraicVector5 vector() const
const SurfaceType & surface() const
static double matchSimTrack(const TrajectoryStateOnSurface &seedState, const SimTrack &simTrack, const Propagator &propagator, const MagneticField &magneticField)
ROOT::Math::SVector< double, 5 > AlgebraicVector5
unsigned int detId() const
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
const TrackerGeomDet * idToDet(DetId) const override
PTrajectoryStateOnDet const & startingState() const
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
string simTrackCollection
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
GlobalVector globalMomentum() const
std::vector< FastTrackerRecHitCombination > FastTrackerRecHitCombinationCollection
Log< level::Warning, false > LogWarning
const BasicVectorType & basicVector() const
std::vector< SimTrack > SimTrackContainer
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.