31 TSGFromPropagation::TSGFromPropagation(
const edm::ParameterSet & iConfig,
edm::ConsumesCollector& iC,
const MuonServiceProxy* service) : theTkLayerMeasurements (), theTracker(0), theMeasTracker(0), theNavigation(0), theService(service),theUpdator(0), theEstimator(0), theTSTransformer(0), theSigmaZ(0), theConfig (iConfig)
71 if ( nls.empty() )
return;
75 bool usePredictedState =
false;
78 std::vector<TrajectoryMeasurement> alltm;
80 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
81 inl != nls.end(); inl++, ndesLayer++ ) {
82 if ( (*inl == 0) )
break;
85 if ( (!alltm.empty()) ) {
91 if ( alltm.empty() ) {
93 usePredictedState =
true;
97 if ( alltm.size() > 5 ) alltm.erase(alltm.begin() + 5, alltm.end());
100 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin();
101 itm != alltm.end(); itm++, i++) {
105 container.
push_back(itm->recHit()->hit()->clone());
107 result.push_back(ts);
117 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
118 inl != nls.end(); inl++ ) {
120 if ( !result.empty() || *inl == 0 ) {
123 std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *
propagator(), *
estimator());
125 if ( compatDets.empty() )
continue;
127 result.push_back(ts);
149 <<
"Possible choices are: discrete, fixed, matrix.\n"
150 <<
"Use discrete method" <<std::endl;
206 bool trackerGeomChanged =
false;
214 trackerGeomChanged =
true;
227 if ( staMuon.first && staMuon.first->isValid() ) {
229 innerTS = staMuon.first->firstMeasurement().updatedState();
232 innerTS = staMuon.first->lastMeasurement().updatedState();
255 result = fromInside(iniState);
280 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
281 tms.erase(tmsend, tms.end());
288 std::vector<TrajectoryMeasurement>
result;
291 if ( compatDets.empty() )
return result;
293 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end(); ++idws) {
294 if ( idws->second.isValid() && (idws->first) ) {
295 std::vector<TrajectoryMeasurement> tmptm =
302 result.insert(result.end(),tmptm.begin(), tmptm.end());
342 float pt = (staMuon.second)->
pt();
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void rescaleError(double factor)
T getParameter(std::string const &) const
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const edm::EventSetup & eventSetup() const
get the whole EventSetup
const MuonServiceProxy * theService
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
std::pair< const Trajectory *, reco::TrackRef > TrackCand
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
LayerMeasurements theTkLayerMeasurements
const CurvilinearTrajectoryError & curvilinearError() const
void init(const MuonServiceProxy *)
initialize
GlobalPoint globalPosition() const
CurvilinearTrajectoryError get(GlobalVector momentum, bool convolute=true)
main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or sca...
TSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
edm::ParameterSet theConfig
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
const TrajectoryStateUpdator * theUpdator
virtual ~TSGFromPropagation()
destructor
TrajectoryStateOnSurface innerState(const TrackCand &) const
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
edm::ESHandle< MeasurementTracker > theMeasTracker
const SurfaceType & surface() const
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
void getRescalingFactor(const TrackCand &staMuon)
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
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
bool theUseVertexStateFlag
double dxyDis(const TrajectoryStateOnSurface &tsos) const
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
const TrajectoryStateUpdator * updator() const
tuple Chi2MeasurementEstimator
GlobalVector momentum() const
edm::InputTag theMeasurementTrackerEventTag
std::string thePropagatorName
void rescaleError(double factor)
const GlobalTrajectoryParameters & globalParameters() const
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *, std::vector< TrajectorySeed > &)
generate seed(s) for a track
edm::ESHandle< GeometricSearchTracker > theTracker
double theFixedErrorRescaling
const LayerMeasurements * tkLayerMeasurements() const
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
const DirectTrackerNavigation * theNavigation
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
std::string theMeasTrackerName
GlobalVector globalMomentum() const
void setEvent(const edm::Event &)
set an event
std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
find compatible layers for a given trajectory state
unsigned long long theCacheId_MT
edm::InputTag theBeamSpotInputTag
const Chi2MeasurementEstimator * estimator() const
std::vector< TrajectoryMeasurement > findMeasurements_new(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer (faster way)
MuonErrorMatrix * theErrorMatrixAdjuster
edm::ESHandle< Propagator > propagator() const
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
const Chi2MeasurementEstimator * theEstimator
std::string theResetMethod
edm::Handle< reco::BeamSpot > beamSpot
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator