25 produces<reco::MuonCollection>().setBranchAlias(
theAlias +
"s");
27 trackingGeomToken_ = esConsumes<GlobalTrackingGeometry, GlobalTrackingGeometryRecord>();
35 const std::string metname =
"Muon|RecoMuon|MuonIdentification|GlobalMuonToMuonProducer";
37 LogTrace(metname) <<
"Valid RecHits: " << track.
found() <<
" invalid RecHits: " << track.
lost();
41 if ((*recHit)->isValid()) {
42 const GeomDet* geomDet = trackingGeometry->idToDet((*recHit)->geographicalId());
44 double z = geomDet->
toGlobal((*recHit)->localPosition()).
z();
45 LogTrace(metname) << i++ <<
" r: " << r <<
" z: " << z <<
" " << geomDet->
toGlobal((*recHit)->localPosition())
52 const std::string metname =
"Muon|RecoMuon|MuonIdentification|GlobalMuonToMuonProducer";
55 auto muonCollection = std::make_unique<reco::MuonCollection>();
60 if (linksCollection->empty()) {
68 for (reco::MuonTrackLinksCollection::const_iterator
links = linksCollection->begin();
links != linksCollection->end();
73 LogTrace(metname) <<
"standAloneTrack";
95 muonCollection->push_back(muon);
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeomToken_
edm::EDGetTokenT< reco::MuonTrackLinksCollection > trackLinkToken_
GlobalMuonToMuonProducer(const edm::ParameterSet &)
Constructor.
unsigned short lost() const
Number of lost (=invalid) hits on track.
~GlobalMuonToMuonProducer() override
Destructor.
const std::string metname
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
const Plane & surface() const
The nominal surface of the GeomDet.
void setVertex(const Point &vertex) override
set vertex
void setCharge(Charge q) final
set electric charge
edm::InputTag theLinksCollectionLabel
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual void setStandAlone(const TrackRef &t)
void setAlias(std::string alias)
virtual void setCombined(const TrackRef &t)
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
void printTrackRecHits(const reco::Track &track, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
T getParameter(std::string const &) const
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
reconstruct muons
virtual void setTrack(const TrackRef &t)
unsigned short found() const
Number of valid hits on track.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const PositionType & position() const
void setP4(const LorentzVector &p4) final
set 4-momentum
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.