17 double maxMatchEstimator,
24 std::vector<int32_t>
result;
29 const GeomDet * seedState_det = trackerGeometry.
idToDet(seedState_detId);
30 const Surface * seedState_surface=&seedState_det->surface();
34 int nSimTracks = simTrackCollection.size();
35 for(
unsigned recHitCombinationIndex = 0;recHitCombinationIndex < recHitCombinationCollection.size(); recHitCombinationIndex++)
37 const auto & recHitCombination = recHitCombinationCollection[recHitCombinationIndex];
38 int simTrackIndex = recHitCombination.back()->simTrackId(0);
39 if(simTrackIndex < 0 || simTrackIndex >= nSimTracks)
41 throw cms::Exception(
"SeedMatcher") <<
"SimTrack index out of range: " << simTrackIndex << std::endl;
43 const auto & simTrack = simTrackCollection[recHitCombination.back()->simTrackId(0)];
44 double matchEstimator =
matchSimTrack(seedState,simTrack,propagator,magneticField);
45 if(matchEstimator < maxMatchEstimator)
47 result.push_back(recHitCombinationIndex);
68 if ( simTrack_atTrackerSurface_position.basicVector().dot(simTrack_atTrackerSurface_momentum.basicVector() )
76 simTrack_atTrackerSurface_momentum,
83 if (!simtrack_atSeedStateSurface_state.
isValid())
99 edm::LogWarning(
"FastSim SeedToSimTrackMatcher") <<
"Cannot invert seed state error matrix => no match...";
103 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
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
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)
unsigned int detId() const
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
PTrajectoryStateOnDet const & startingState() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
GlobalVector globalMomentum() const
std::vector< FastTrackerRecHitCombination > FastTrackerRecHitCombinationCollection
const BasicVectorType & basicVector() const
std::vector< SimTrack > SimTrackContainer
virtual const TrackerGeomDet * idToDet(DetId) const
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.