38 TSGFromPropagation::TSGFromPropagation(
const edm::ParameterSet & iConfig,
const MuonServiceProxy* service) : theTkLayerMeasurements (0), theTracker(0), theMeasTracker(0), theNavigation(0), theService(service),theUpdator(0), theEstimator(0), theTSTransformer(0), theSigmaZ(0), theConfig (iConfig)
76 if ( nls.empty() )
return;
80 bool usePredictedState =
false;
83 std::vector<TrajectoryMeasurement> alltm;
85 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
86 inl != nls.end(); inl++, ndesLayer++ ) {
87 if ( (*inl == 0) )
break;
90 if ( (!alltm.empty()) ) {
96 if ( alltm.empty() ) {
98 usePredictedState =
true;
102 if ( alltm.size() > 5 ) alltm.erase(alltm.begin() + 5, alltm.end());
105 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin();
106 itm != alltm.end(); itm++, i++) {
110 container.
push_back(itm->recHit()->hit()->clone());
112 result.push_back(ts);
122 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
123 inl != nls.end(); inl++ ) {
125 if ( !result.empty() || *inl == 0 ) {
128 std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *
propagator(), *
estimator());
130 if ( compatDets.empty() )
continue;
132 result.push_back(ts);
154 <<
"Possible choices are: discrete, fixed, matrix.\n"
155 <<
"Use discrete method" <<std::endl;
197 bool measTrackerChanged =
false;
208 measTrackerChanged =
true;
218 bool trackerGeomChanged =
false;
226 trackerGeomChanged =
true;
239 if ( staMuon.first && staMuon.first->isValid() ) {
241 innerTS = staMuon.first->firstMeasurement().updatedState();
244 innerTS = staMuon.first->lastMeasurement().updatedState();
267 result = fromInside(iniState);
292 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
293 tms.erase(tmsend, tms.end());
300 std::vector<TrajectoryMeasurement>
result;
303 if ( compatDets.empty() )
return result;
305 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end(); ++idws) {
306 if ( idws->second.isValid() && (idws->first) ) {
307 std::vector<TrajectoryMeasurement> tmptm =
314 result.insert(result.end(),tmptm.begin(), tmptm.end());
354 float pt = (staMuon.second)->pt();
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
TSGFromPropagation(const edm::ParameterSet &pset)
constructor
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
double theFlexErrorRescaling
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const =0
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...
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
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)
FreeTrajectoryState * freeState(bool withErrors=true) const
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
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
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
const TrajectoryStateUpdator * updator() const
tuple Chi2MeasurementEstimator
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
GlobalVector momentum() const
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)
const LayerMeasurements * theTkLayerMeasurements
MuonErrorMatrix * theErrorMatrixAdjuster
edm::ESHandle< Propagator > propagator() const
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