Skip to content

Commit

Permalink
Added esConsumes to TSGFromL2Muon
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr15Jones committed Sep 17, 2021
1 parent 002868b commit 0db8feb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RecoMuon/TrackerSeedGenerator/plugins/TSGFromL2Muon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ TSGFromL2Muon::TSGFromL2Muon(const edm::ParameterSet& cfg) {
//L2 collection
theL2CollectionLabel = cfg.getParameter<edm::InputTag>("MuonCollectionLabel");
l2muonToken = consumes<reco::TrackCollection>(theL2CollectionLabel);

theTTopoToken = esConsumes();
}

TSGFromL2Muon::~TSGFromL2Muon() = default;
Expand All @@ -59,9 +61,7 @@ void TSGFromL2Muon::produce(edm::Event& ev, const edm::EventSetup& es) {
auto result = std::make_unique<L3MuonTrajectorySeedCollection>();

//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHand;
es.get<TrackerTopologyRcd>().get(tTopoHand);
const TrackerTopology* tTopo = tTopoHand.product();
const TrackerTopology* tTopo = &es.getData(theTTopoToken);

//intialize tools
theService->update(es);
Expand Down
2 changes: 2 additions & 0 deletions RecoMuon/TrackerSeedGenerator/plugins/TSGFromL2Muon.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class MuonServiceProxy;
class TrackerSeedGenerator;
class MuonTrackingRegionBuilder;
class TrackerSeedCleaner;
class TrackerTopologyRcd;

//
// Generate tracker seeds from L2 muons
Expand All @@ -37,5 +38,6 @@ class TSGFromL2Muon : public edm::stream::EDProducer<> {
std::unique_ptr<TrackerSeedGenerator> theTkSeedGenerator;
std::unique_ptr<TrackerSeedCleaner> theSeedCleaner;
edm::EDGetTokenT<reco::TrackCollection> l2muonToken;
edm::ESGetToken<TrackerTopology, TrackerTopologyRcd > theTTopoToken;
};
#endif

0 comments on commit 0db8feb

Please sign in to comment.