35 : theCategory(
"Muon|RecoMuon|TSGFromPropagation"),
37 theMaxChi2(iConfig.getParameter<double>(
"MaxChi2")),
38 theFixedErrorRescaling(iConfig.getParameter<double>(
"ErrorRescaling")),
39 theUseVertexStateFlag(iConfig.getParameter<bool>(
"UseVertexState")),
40 theUpdateStateFlag(iConfig.getParameter<bool>(
"UpdateState")),
43 if (resetMethod !=
"discrete" && resetMethod !=
"fixed" && resetMethod !=
"matrix") {
44 edm::LogError(
"TSGFromPropagation") <<
"Wrong error rescaling method: " << resetMethod <<
"\n"
45 <<
"Possible choices are: discrete, fixed, matrix.\n"
46 <<
"Use discrete method" << std::endl;
47 resetMethod =
"discrete";
49 if (
"fixed" == resetMethod) {
52 if (
"matrix" == resetMethod) {
71 std::vector<TrajectorySeed>&
result) {
95 bool usePredictedState =
false;
98 std::vector<TrajectoryMeasurement> alltm;
100 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++, ndesLayer++) {
101 if ((*inl ==
nullptr))
105 if ((!alltm.empty())) {
114 usePredictedState =
true;
118 if (alltm.size() > 5)
119 alltm.erase(alltm.begin() + 5, alltm.end());
122 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++, i++) {
126 container.
push_back(itm->recHit()->hit()->clone());
128 result.push_back(ts);
138 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin(); inl != nls.end(); inl++) {
139 if (!result.empty() || *inl ==
nullptr) {
142 std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *
propagator(), *
estimator());
144 if (compatDets.empty())
147 result.push_back(ts);
184 theNavigation = std::make_unique<DirectTrackerNavigation>(theTracker);
191 if (staMuon.first && staMuon.first->isValid()) {
193 innerTS = staMuon.first->firstMeasurement().updatedState();
195 innerTS = staMuon.first->lastMeasurement().updatedState();
219 result = fromInside(iniState);
234 const DetId&
id)
const {
240 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
241 tms.erase(tmsend, tms.end());
247 std::vector<TrajectoryMeasurement>
result;
250 if (compatDets.empty())
253 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end();
255 if (idws->second.isValid() && (idws->first)) {
256 std::vector<TrajectoryMeasurement> tmptm =
264 result.insert(result.end(), tmptm.begin(), tmptm.end());
299 float pt = (staMuon.second)->
pt();
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
void rescaleError(double factor)
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *, std::vector< TrajectorySeed > &) override
generate seed(s) for a track
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
const edm::EventSetup & eventSetup() const
const MuonServiceProxy * theService
const edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
void init(const MuonServiceProxy *) override
initialize
double zDis(const TrajectoryStateOnSurface &tsos) const
unsigned long long theCacheId_TG
const GlobalTrajectoryParameters & parameters() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double theFlexErrorRescaling
theErrorMatrixPset(iConfig.getParameter< edm::ParameterSet >("errorMatrixPset"))
const CurvilinearTrajectoryError & curvilinearError() const
theBeamSpotToken(iC.consumes< reco::BeamSpot >(iConfig.getParameter< edm::InputTag >("beamSpot")))
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster
GlobalPoint globalPosition() const
theSelectStateFlag(iConfig.getParameter< bool >("SelectState"))
TSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
std::unique_ptr< const TrajectoryStateUpdator > theUpdator
Log< level::Error, false > LogError
std::pair< const Trajectory *, reco::TrackRef > TrackCand
const ResetMethod theResetMethod
edm::ESHandle< MagneticField > magneticField() const
get the magnetic field
const CurvilinearTrajectoryError & curvilinearError() const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
void setEvent(const edm::Event &) override
set an event
theSigmaZ(iConfig.getParameter< double >("SigmaZ"))
theTrackerToken(iC.esConsumes())
TrajectoryStateOnSurface innerState(const TrackCand &) const
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
const SurfaceType & surface() const
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
std::unique_ptr< const DirectTrackerNavigation > theNavigation
void getRescalingFactor(const TrackCand &staMuon)
const double theFixedErrorRescaling
const edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
FreeTrajectoryState const * freeState(bool withErrors=true) const
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
double dxyDis(const TrajectoryStateOnSurface &tsos) const
const std::string theCategory
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
const TrajectoryStateUpdator * updator() const
const edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > theTrackerToken
GlobalVector momentum() const
const bool theUseVertexStateFlag
void rescaleError(double factor)
const bool theUpdateStateFlag
const GlobalTrajectoryParameters & globalParameters() const
theMeasurementTrackerEventToken(iC.consumes< MeasurementTrackerEvent >(iConfig.getParameter< edm::InputTag >("MeasurementTrackerEvent")))
T getParameter(std::string const &) const
thePropagatorName(iConfig.getParameter< std::string >("Propagator"))
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
GlobalVector globalMomentum() const
const bool theSelectStateFlag
const Chi2MeasurementEstimator * estimator() const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::ESHandle< Propagator > propagator() const
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
const edm::ParameterSet theErrorMatrixPset
edm::Handle< reco::BeamSpot > beamSpot
~TSGFromPropagation() override
destructor