|
|
Go to the documentation of this file.
54 : theCategory(
"FastSimulation|Muons|FastTSGFromPropagation"),
62 theSimTrackCollectionToken_(
64 recHitCombinationsToken_(
67 theMeasurementTrackerEventToken_(
75 std::vector<TrajectorySeed>&
result) {
99 bool usePredictedState =
false;
102 std::vector<TrajectoryMeasurement> alltm;
104 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++, ndesLayer++) {
105 if ((*inl ==
nullptr))
109 if ((!alltm.empty())) {
118 usePredictedState =
true;
122 if (alltm.size() > 5)
123 alltm.erase(alltm.begin() + 5, alltm.end());
127 std::vector<TrajectorySeedHitCandidate> outerHits;
130 bool isMatch =
false;
131 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
138 const auto& recHitCombination = (*recHitCombinations)[icomb];
139 if (recHitCombination.empty())
141 int32_t simTrackId = recHitCombination.back()->simTrackId(0);
142 const SimTrack& simtrack = (*simTracks)[simTrackId];
155 unsigned int outerId = 0;
156 for (
const auto& recHitRef : recHitCombination) {
167 for (
const auto& recHitRef : recHitCombination) {
170 auto aTrackingRecHit = std::unique_ptr<TrackingRecHit>(theSeedHits.
hit()->
clone());
186 PTSOD, &(
g->surface()), &*
theService->magneticField().product());
198 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
207 const auto& recHitCombination = (*recHitCombinations)[icomb];
208 if (recHitCombination.empty())
210 int32_t simTrackId = recHitCombination.back()->simTrackId(0);
211 const SimTrack& simtrack = (*simTracks)[simTrackId];
224 unsigned int outerId = 0;
225 for (
const auto& recHitRef : recHitCombination) {
236 for (
const auto& recHitRef : recHitCombination) {
239 aTrackingRecHit = theSeedHits.
hit()->
clone();
255 PTSOD, &(
g->surface()), &*
theService->magneticField().product());
288 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++) {
289 if (!
result.empty() || *inl ==
nullptr) {
292 std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *
propagator(), *
estimator());
294 if (compatDets.empty())
316 <<
"Possible choices are: discrete, fixed, matrix.\n"
317 <<
"Use discrete method" << std::endl;
379 bool trackerGeomChanged =
false;
387 trackerGeomChanged =
true;
398 if (staMuon.first && staMuon.first->isValid()) {
400 innerTS = staMuon.first->firstMeasurement().updatedState();
402 innerTS = staMuon.first->lastMeasurement().updatedState();
424 result = fromInside(iniState);
439 const DetId&
id)
const {
445 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
446 tms.erase(tmsend, tms.end());
452 std::vector<TrajectoryMeasurement>
result;
455 if (compatDets.empty())
458 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end();
460 if (idws->second.isValid() && (idws->first)) {
461 std::vector<TrajectoryMeasurement> tmptm =
469 result.insert(
result.end(), tmptm.begin(), tmptm.end());
504 float pt = (staMuon.second)->
pt();
559 float localErrors[15];
561 for (
int i = 0;
i < dim; ++
i) {
562 for (
int j = 0;
j <=
i; ++
j) {
563 localErrors[
k++] =
m(
i,
j);
566 int surfaceSide = static_cast<int>(ts.
surfaceSide());
const TrackerGeomDet * idToDet(DetId) const override
T const * product() const
TrajectoryStateOnSurface outerTkState(const TrackCand &) 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
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
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
Log< level::Error, false > LogError
static const double pts[33]
const BasicVectorType & basicVector() 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
T getParameter(std::string const &) const
~FastTSGFromPropagation() override
destructor
const edm::ParameterSet theConfig
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
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
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