File indexing completed on 2024-04-06 12:27:00
0001 #ifndef RecoMuon_MuonIdentification_GlobalMuonToMuonProducer_H
0002 #define RecoMuon_MuonIdentification_GlobalMuonToMuonProducer_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "FWCore/Framework/interface/global/EDProducer.h"
0011
0012 #include "FWCore/Utilities/interface/InputTag.h"
0013
0014 namespace reco {
0015 class Track;
0016 }
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/Utilities/interface/ESGetToken.h"
0019 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0020 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
0021 #include "DataFormats/MuonReco/interface/Muon.h"
0022 #include "DataFormats/MuonReco/interface/MuonTrackLinks.h"
0023 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0024
0025 class GlobalMuonToMuonProducer : public edm::global::EDProducer<> {
0026 public:
0027
0028 GlobalMuonToMuonProducer(const edm::ParameterSet &);
0029
0030
0031 ~GlobalMuonToMuonProducer() override;
0032
0033
0034 void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
0035
0036 protected:
0037 private:
0038 std::string theAlias;
0039
0040 void setAlias(std::string alias) {
0041 alias.erase(alias.size() - 1, alias.size());
0042 theAlias = alias;
0043 }
0044
0045
0046 void printTrackRecHits(const reco::Track &track, edm::ESHandle<GlobalTrackingGeometry> trackingGeometry) const;
0047
0048 private:
0049 edm::InputTag theLinksCollectionLabel;
0050 edm::EDGetTokenT<reco::MuonTrackLinksCollection> trackLinkToken_;
0051 edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> trackingGeomToken_;
0052 };
0053 #endif