54 : theCategory(
"FastSimulation|Muons|FastTSGFromPropagation"),
61 theSimTrackCollectionToken_(
63 recHitCombinationsToken_(
66 theMeasurementTrackerEventToken_(
77 std::vector<TrajectorySeed>&
result) {
101 bool usePredictedState =
false;
104 std::vector<TrajectoryMeasurement> alltm;
106 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++, ndesLayer++) {
107 if ((*inl ==
nullptr))
111 if ((!alltm.empty())) {
120 usePredictedState =
true;
124 if (alltm.size() > 5)
125 alltm.erase(alltm.begin() + 5, alltm.end());
129 std::vector<TrajectorySeedHitCandidate> outerHits;
132 bool isMatch =
false;
133 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
140 const auto& recHitCombination = (*recHitCombinations)[icomb];
141 if (recHitCombination.empty())
143 int32_t simTrackId = recHitCombination.back()->simTrackId(0);
144 const SimTrack& simtrack = (*simTracks)[simTrackId];
157 unsigned int outerId = 0;
158 for (
const auto& recHitRef : recHitCombination) {
169 for (
const auto& recHitRef : recHitCombination) {
172 auto aTrackingRecHit = std::unique_ptr<TrackingRecHit>(theSeedHits.
hit()->
clone());
188 PTSOD, &(
g->surface()), &*
theService->magneticField().product());
200 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
209 const auto& recHitCombination = (*recHitCombinations)[icomb];
210 if (recHitCombination.empty())
212 int32_t simTrackId = recHitCombination.back()->simTrackId(0);
213 const SimTrack& simtrack = (*simTracks)[simTrackId];
226 unsigned int outerId = 0;
227 for (
const auto& recHitRef : recHitCombination) {
238 for (
const auto& recHitRef : recHitCombination) {
241 aTrackingRecHit = theSeedHits.
hit()->
clone();
257 PTSOD, &(
g->surface()), &*
theService->magneticField().product());
290 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++) {
291 if (!
result.empty() || *inl ==
nullptr) {
294 std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *
propagator(), *
estimator());
296 if (compatDets.empty())
318 <<
"Possible choices are: discrete, fixed, matrix.\n" 319 <<
"Use discrete method" << std::endl;
372 theNavigation = std::make_unique<DirectTrackerNavigation>(theTracker);
379 if (staMuon.first && staMuon.first->isValid()) {
381 innerTS = staMuon.first->firstMeasurement().updatedState();
383 innerTS = staMuon.first->lastMeasurement().updatedState();
405 result = fromInside(iniState);
420 const DetId&
id)
const {
426 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
427 tms.erase(tmsend, tms.end());
433 std::vector<TrajectoryMeasurement>
result;
436 if (compatDets.empty())
439 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end();
441 if (idws->second.isValid() && (idws->first)) {
442 std::vector<TrajectoryMeasurement> tmptm =
450 result.insert(
result.end(), tmptm.begin(), tmptm.end());
485 float pt = (staMuon.second)->
pt();
540 float localErrors[15];
542 for (
int i = 0;
i < dim; ++
i) {
543 for (
int j = 0;
j <=
i; ++
j) {
544 localErrors[
k++] =
m(
i,
j);
547 int surfaceSide =
static_cast<int>(ts.
surfaceSide());
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
std::unique_ptr< const TrajectoryStateUpdator > theUpdator
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theGeometryToken
void setRecHitCombinationIndex(edm::OwnVector< T > &recHits, int32_t icomb)
FastTSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
T getParameter(std::string const &) const
edm::Handle< reco::BeamSpot > theBeamSpot
bool theUseVertexStateFlag
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
const LocalTrajectoryError & localError() const
const math::XYZVectorD & trackerSurfacePosition() const
edm::EDGetTokenT< edm::SimTrackContainer > theSimTrackCollectionToken_
edm::Handle< edm::SimTrackContainer > theSimTracks
std::string thePropagatorName
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTTRHBuilderToken
void stateOnDet(const TrajectoryStateOnSurface &ts, unsigned int detid, PTrajectoryStateOnDet &pts) const
A mere copy (without memory leak) of an existing tracking method.
double zDis(const TrajectoryStateOnSurface &tsos) const
const MuonServiceProxy * theService
const LocalTrajectoryParameters & localParameters() const
std::string theResetMethod
Log< level::Error, false > LogError
std::pair< const Trajectory *, reco::TrackRef > TrackCand
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
float charge() const
charge
unsigned int detId() const
double theFlexErrorRescaling
void getRescalingFactor(const TrackCand &staMuon)
static const double pts[33]
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken_
~FastTSGFromPropagation() override
destructor
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
const edm::ParameterSet theConfig
GlobalPoint globalPosition() const
const FastTrackerRecHit * hit() const
The Hit itself.
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
const TrajectoryStateUpdator * updator() const
const BasicVectorType & basicVector() const
const TrackerGeomDet * idToDet(DetId) const override
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *tTopo, std::vector< TrajectorySeed > &) override
generate seed(s) for a track
void init(const MuonServiceProxy *) override
initialize
const TrackerGeometry * theGeometry
double dxyDis(const TrajectoryStateOnSurface &tsos) const
DetId geographicalId() const
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
const Chi2MeasurementEstimator * estimator() const
constexpr uint32_t rawId() const
get the raw id
std::unique_ptr< const DirectTrackerNavigation > theNavigation
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
GlobalVector globalMomentum() const
edm::Handle< FastTrackerRecHitCombinationCollection > recHitCombinations
edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > theTrackerToken
void setEvent(const edm::Event &) override
set an event
double z0() const
z coordinate
edm::EDGetTokenT< reco::BeamSpot > beamSpot_
static int position[264][3]
std::vector< FastTrackerRecHitCombination > FastTrackerRecHitCombinationCollection
const AlgebraicSymMatrix55 & matrix() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
TrajectoryStateOnSurface innerState(const TrackCand &) const
double theFixedErrorRescaling
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken_
edm::ESHandle< Propagator > propagator() const
FastTrackerRecHit * clone() const override
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
std::vector< SimTrack > SimTrackContainer
unsigned long long theCacheId_TG
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster