71 virtual void endJob()
override ;
104 produces<std::vector<Trajectory> >();
105 produces<TrajTrackAssociationCollection>();
157 std::auto_ptr<std::vector<Trajectory> > trajectoryCollection(
new std::vector<Trajectory>);
167 reco::TrackCollection::const_iterator globalMuonTrack = globalMuonTracks->begin();
168 for (; globalMuonTrack != globalMuonTracks->end(); ++globalMuonTrack) {
170 if (fabs(
globalMuon->combinedMuon()->phi() - globalMuonTrack->phi()) < 1
e-10 &&
171 fabs(
globalMuon->combinedMuon()->eta() - globalMuonTrack->eta()) < 1
e-10)
break;
173 if (globalMuonTrack == globalMuonTracks->end()) {
174 throw cms::Exception(
"BadConfig") <<
"The tracks label doesn't correspond to the same objects as the muons label" << std::endl;
181 if (trackerTrajectories.size() == 1) {
182 const Trajectory trackerTrajectory = *(trackerTrajectories.begin());
204 tracker_tsos =
TrajectoryStateOnSurface(globalTrajParams, curviError, trackerGeometry->idToDet(outerDetId)->surface());
211 std::vector<TrajectoryStateOnSurface> TSOSes;
213 DetId id = (*hit)->geographicalId();
216 bool extrapolated =
false;
218 extrapolation = propagator->propagate(last_tsos, dtGeometry->idToDet(
id)->surface());
222 extrapolation = propagator->propagate(last_tsos, cscGeometry->idToDet(
id)->surface());
226 if (extrapolated && extrapolation.
isValid()) {
228 TSOSes.push_back(extrapolation);
233 if (muonHits.
size() > 0) {
238 for (
unsigned int i = 0;
i < muonHits.
size();
i++) {
244 trajectoryCollection->push_back(trajectory);
248 reference_map[trajCounter] = trackCounter;
254 unsigned int numTrajectories = trajectoryCollection->size();
262 for (trajCounter = 0; trajCounter < numTrajectories; trajCounter++) {
268 iEvent.
put(trajTrackMap);
T getParameter(std::string const &) const
RecHitPointer build(const TrackingRecHit *p, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
Call the MuonTransientTrackingRecHit::specificBuild.
ConstRecHitPointer const & recHit() const
#define DEFINE_FWK_MODULE(type)
edm::InputTag m_globalMuons
virtual void beginJob() override
uint32_t rawId() const
get the raw id
TrackTransformer * m_trackTransformer
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag m_globalMuonTracks
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
virtual void produce(edm::Event &, const edm::EventSetup &) override
TrackerToMuonPropagator(const edm::ParameterSet &)
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
TrajectoryMeasurement const & firstMeasurement() const
virtual void endJob() override
void push(const TrajectoryMeasurement &tm)
~TrackerToMuonPropagator()
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix