37 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)
75 if ( nls.empty() )
return;
79 bool usePredictedState =
false;
82 std::vector<TrajectoryMeasurement> alltm;
84 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
85 inl != nls.end(); inl++, ndesLayer++ ) {
86 if ( (*inl == 0) )
break;
89 if ( (!alltm.empty()) ) {
95 if ( alltm.empty() ) {
97 usePredictedState =
true;
101 if ( alltm.size() > 5 ) alltm.erase(alltm.begin() + 5, alltm.end());
104 for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin();
105 itm != alltm.end(); itm++, i++) {
109 container.
push_back(itm->recHit()->hit()->clone());
111 result.push_back(ts);
121 for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
122 inl != nls.end(); inl++ ) {
124 if ( !result.empty() || *inl == 0 ) {
127 std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *
propagator(), *
estimator());
129 if ( compatDets.empty() )
continue;
131 result.push_back(ts);
153 <<
"Possible choices are: discrete, fixed, matrix.\n"
154 <<
"Use discrete method" <<std::endl;
196 bool measTrackerChanged =
false;
207 measTrackerChanged =
true;
217 bool trackerGeomChanged =
false;
225 trackerGeomChanged =
true;
238 if ( staMuon.first && staMuon.first->isValid() ) {
240 innerTS = staMuon.first->firstMeasurement().updatedState();
243 innerTS = staMuon.first->lastMeasurement().updatedState();
266 result = fromInside(iniState);
291 std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(),
isInvalid());
292 tms.erase(tmsend, tms.end());
299 std::vector<TrajectoryMeasurement>
result;
302 if ( compatDets.empty() )
return result;
304 for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end(); ++idws) {
305 if ( idws->second.isValid() && (idws->first) ) {
306 std::vector<TrajectoryMeasurement> tmptm =
313 result.insert(result.end(),tmptm.begin(), tmptm.end());
353 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
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
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
const Surface & surface() 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 trackerSeeds(const TrackCand &, const TrackingRegion &, std::vector< TrajectorySeed > &)
generate seed(s) for a track
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