|
|
Go to the documentation of this file.
52 : theCategory(
"FastSimulation|Muons|FastTSGFromPropagation"),
60 theSimTrackCollectionToken_(
62 recHitCombinationsToken_(
65 theMeasurementTrackerEventToken_(
73 std::vector<TrajectorySeed>&
result) {
97 bool usePredictedState =
false;
100 std::vector<TrajectoryMeasurement> alltm;
102 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++, ndesLayer++) {
103 if ((*inl ==
nullptr))
107 if ((!alltm.empty())) {
116 usePredictedState =
true;
120 if (alltm.size() > 5)
121 alltm.erase(alltm.begin() + 5, alltm.end());
125 std::vector<TrajectorySeedHitCandidate> outerHits;
129 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
136 const auto& recHitCombination = (*recHitCombinations)[icomb];
137 if (recHitCombination.empty())
139 int32_t simTrackId = recHitCombination.back()->simTrackId(0);
140 const SimTrack& simtrack = (*simTracks)[simTrackId];
153 unsigned int outerId = 0;
154 for (
const auto& recHitRef : recHitCombination) {
165 for (
const auto& recHitRef : recHitCombination) {
168 auto aTrackingRecHit = std::unique_ptr<TrackingRecHit>(theSeedHits.
hit()->
clone());
184 PTSOD, &(
g->surface()), &*
theService->magneticField().product());
196 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
205 const auto& recHitCombination = (*recHitCombinations)[icomb];
206 if (recHitCombination.empty())
208 int32_t simTrackId = recHitCombination.back()->simTrackId(0);
209 const SimTrack& simtrack = (*simTracks)[simTrackId];
222 unsigned int outerId = 0;
223 for (
const auto& recHitRef : recHitCombination) {
234 for (
const auto& recHitRef : recHitCombination) {
237 aTrackingRecHit = theSeedHits.
hit()->
clone();
253 PTSOD, &(
g->surface()), &*
theService->magneticField().product());
286 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++) {
287 if (!
result.empty() || *inl ==
nullptr) {
290 std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *
propagator(), *
estimator());
292 if (compatDets.empty())
314 <<
"Possible choices are: discrete, fixed, matrix.\n"
315 <<
"Use discrete method" << std::endl;
377 bool trackerGeomChanged =
false;
385 trackerGeomChanged =
true;
396 if (staMuon.first && staMuon.first->isValid()) {
398 innerTS = staMuon.first->firstMeasurement().updatedState();
400 innerTS = staMuon.first->lastMeasurement().updatedState();
422 result = fromInside(iniState);
437 const DetId&
id)
const {
443 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
444 tms.erase(tmsend, tms.end());
450 std::vector<TrajectoryMeasurement>
result;
453 if (compatDets.empty())
456 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end();
458 if (idws->second.isValid() && (idws->first)) {
459 std::vector<TrajectoryMeasurement> tmptm =
467 result.insert(
result.end(), tmptm.begin(), tmptm.end());
502 float pt = (staMuon.second)->
pt();
557 float localErrors[15];
559 for (
int i = 0;
i < dim; ++
i) {
560 for (
int j = 0;
j <=
i; ++
j) {
561 localErrors[
k++] =
m(
i,
j);
564 int surfaceSide = static_cast<int>(ts.
surfaceSide());
const TrackerGeomDet * idToDet(DetId) const override
T const * product() const
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
GlobalVector momentum() const
const TrajectoryStateUpdator * updator() const
std::pair< const Trajectory *, reco::TrackRef > TrackCand
ESHandle< TrackerGeometry > geometry
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
double z0() const
z coordinate
double dxyDis(const TrajectoryStateOnSurface &tsos) const
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *tTopo, std::vector< TrajectorySeed > &) override
generate seed(s) for a track
GlobalPoint globalPosition() const
void setRecHitCombinationIndex(edm::OwnVector< T > &recHits, int32_t icomb)
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
void init(const MuonServiceProxy *) override
initialize
const TrackerGeometry * theGeometry
float charge() const
charge
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const Chi2MeasurementEstimator * estimator() const
std::unique_ptr< const DirectTrackerNavigation > theNavigation
const AlgebraicSymMatrix55 & matrix() const
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
edm::EDGetTokenT< reco::BeamSpot > beamSpot_
DetId geographicalId() const
edm::Handle< FastTrackerRecHitCombinationCollection > recHitCombinations
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken_
void setEvent(const edm::Event &) override
set an event
const FastTrackerRecHit * hit() const
The Hit itself.
unsigned int detId() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
TrajectoryStateOnSurface innerState(const TrackCand &) const
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
double theFixedErrorRescaling
const CurvilinearTrajectoryError & curvilinearError() const
edm::ESHandle< Propagator > propagator() const
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
FastTSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
const LocalTrajectoryParameters & localParameters() const
std::vector< FastTrackerRecHitCombination > FastTrackerRecHitCombinationCollection
bool theUseVertexStateFlag
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
const math::XYZVectorD & trackerSurfacePosition() const
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
unsigned long long theCacheId_TG
edm::ESHandle< MeasurementTracker > theMeasTracker
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
std::unique_ptr< const TrajectoryStateUpdator > theUpdator
static int position[264][3]
edm::Handle< reco::BeamSpot > theBeamSpot
edm::Handle< edm::SimTrackContainer > theSimTracks
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const GlobalTrajectoryParameters & parameters() const
edm::EDGetTokenT< edm::SimTrackContainer > theSimTrackCollectionToken_
unsigned long long theCacheId_MT
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
static const double pts[33]
const BasicVectorType & basicVector() const
void rescaleError(double factor)
T getParameter(std::string const &) const
std::string thePropagatorName
GlobalVector globalMomentum() const
std::string theResetMethod
edm::ESHandle< GeometricSearchTracker > theTracker
constexpr uint32_t rawId() const
get the raw id
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
std::vector< SimTrack > SimTrackContainer
const MuonServiceProxy * theService
const CurvilinearTrajectoryError & curvilinearError() const
~FastTSGFromPropagation() override
destructor
const SurfaceType & surface() const
const edm::ParameterSet theConfig
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
const GlobalTrajectoryParameters & globalParameters() const
bool isMatch(std::string_view, std::string_view)
double theFlexErrorRescaling
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken_
void getRescalingFactor(const TrackCand &staMuon)
const LocalTrajectoryError & localError() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
FastTrackerRecHit * clone() const override
void rescaleError(double factor)
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
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS