|
|
Go to the documentation of this file.
35 : theCategory(
"Muon|RecoMuon|TSGFromPropagation"),
36 theMeasTrackerName(iConfig.getParameter<
std::
string>(
"MeasurementTrackerName")),
38 theMaxChi2(iConfig.getParameter<double>(
"MaxChi2")),
39 theFixedErrorRescaling(iConfig.getParameter<double>(
"ErrorRescaling")),
40 theUseVertexStateFlag(iConfig.getParameter<
bool>(
"UseVertexState")),
41 theUpdateStateFlag(iConfig.getParameter<
bool>(
"UpdateState")),
44 if (resetMethod !=
"discrete" && resetMethod !=
"fixed" && resetMethod !=
"matrix") {
45 edm::LogError(
"TSGFromPropagation") <<
"Wrong error rescaling method: " << resetMethod <<
"\n"
46 <<
"Possible choices are: discrete, fixed, matrix.\n"
47 <<
"Use discrete method" << std::endl;
48 resetMethod =
"discrete";
50 if (
"fixed" == resetMethod) {
53 if (
"matrix" == resetMethod) {
58 theSelectStateFlag(iConfig.getParameter<
bool>(
"SelectState")),
60 theSigmaZ(iConfig.getParameter<
double>(
"SigmaZ")),
63 theMeasurementTrackerEventToken(
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());
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())
191 bool trackerGeomChanged =
false;
199 trackerGeomChanged =
true;
210 if (staMuon.first && staMuon.first->isValid()) {
212 innerTS = staMuon.first->firstMeasurement().updatedState();
214 innerTS = staMuon.first->lastMeasurement().updatedState();
238 result = fromInside(iniState);
253 const DetId&
id)
const {
259 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
260 tms.erase(tmsend, tms.end());
266 std::vector<TrajectoryMeasurement>
result;
269 if (compatDets.empty())
272 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end();
274 if (idws->second.isValid() && (idws->first)) {
275 std::vector<TrajectoryMeasurement> tmptm =
283 result.insert(
result.end(), tmptm.begin(), tmptm.end());
318 float pt = (staMuon.second)->
pt();
T const * product() const
TrajectoryStateOnSurface innerState(const TrackCand &) const
std::pair< const Trajectory *, reco::TrackRef > TrackCand
std::unique_ptr< const TrajectoryStateUpdator > theUpdator
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
const edm::ParameterSet theErrorMatrixPset
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
const Chi2MeasurementEstimator * estimator() const
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
double z0() const
z coordinate
GlobalPoint globalPosition() const
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
std::unique_ptr< const DirectTrackerNavigation > theNavigation
const MuonServiceProxy * theService
const std::string theMeasTrackerName
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *, std::vector< TrajectorySeed > &) override
generate seed(s) for a track
void getRescalingFactor(const TrackCand &staMuon)
const edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken
edm::ESHandle< Propagator > propagator() const
const std::string theCategory
FreeTrajectoryState const * freeState(bool withErrors=true) const
TSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
MeasurementDetWithData idToDet(const DetId &id) const
Previous MeasurementDetSystem interface.
const ResetMethod theResetMethod
edm::ESHandle< GeometricSearchTracker > theTracker
const edm::EventSetup & eventSetup() const
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
void setEvent(const edm::Event &) override
set an event
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
const edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
edm::ESHandle< MeasurementTracker > theMeasTracker
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
const double theFixedErrorRescaling
Log< level::Error, false > LogError
const bool theSelectStateFlag
double dxyDis(const TrajectoryStateOnSurface &tsos) const
double zDis(const TrajectoryStateOnSurface &tsos) const
GlobalVector globalMomentum() const
edm::Handle< reco::BeamSpot > beamSpot
~TSGFromPropagation() override
destructor
const bool theUseVertexStateFlag
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
edm::ESHandle< MagneticField > magneticField() const
get the magnetic field
T getParameter(std::string const &) const
const bool theUpdateStateFlag
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
void init(const MuonServiceProxy *) override
initialize
double theFlexErrorRescaling
const TrajectoryStateUpdator * updator() const
unsigned long long theCacheId_TG
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster
unsigned long long theCacheId_MT