diff --git a/CommonTools/RecoAlgos/BuildFile.xml b/CommonTools/RecoAlgos/BuildFile.xml
index 0e2712608a101..3b52eda82bb6c 100644
--- a/CommonTools/RecoAlgos/BuildFile.xml
+++ b/CommonTools/RecoAlgos/BuildFile.xml
@@ -10,7 +10,6 @@
-
diff --git a/CommonTools/RecoAlgos/plugins/ME0MuonTrackCollProducer.cc b/RecoMuon/MuonIdentification/plugins/ME0MuonTrackCollProducer.cc
similarity index 57%
rename from CommonTools/RecoAlgos/plugins/ME0MuonTrackCollProducer.cc
rename to RecoMuon/MuonIdentification/plugins/ME0MuonTrackCollProducer.cc
index f35b6225dc0c0..5ae12a0664a83 100644
--- a/CommonTools/RecoAlgos/plugins/ME0MuonTrackCollProducer.cc
+++ b/RecoMuon/MuonIdentification/plugins/ME0MuonTrackCollProducer.cc
@@ -1,43 +1,24 @@
+#include "FWCore/Framework/interface/stream/EDProducer.h"
+#include "FWCore/Framework/interface/Event.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
-#include "DataFormats/TrackReco/interface/TrackFwd.h"
-#include "DataFormats/TrackReco/interface/Track.h"
-#include "DataFormats/MuonDetId/interface/CSCDetId.h"
-#include "DataFormats/MuonDetId/interface/DTChamberId.h"
-#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
-#include "DataFormats/VertexReco/interface/Vertex.h"
-#include "DataFormats/VertexReco/interface/VertexFwd.h"
-#include "DataFormats/MuonReco/interface/Muon.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/MuonReco/interface/ME0Muon.h"
+#include "DataFormats/MuonReco/interface/ME0MuonCollection.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "RecoMuon/MuonIdentification/interface/ME0MuonSelector.h"
-#include "FWCore/Framework/interface/ESHandle.h"
-
-#include
#include
-#include "FWCore/Framework/interface/stream/EDProducer.h"
-#include "FWCore/Framework/interface/Event.h"
-#include "FWCore/ParameterSet/interface/ParameterSet.h"
-#include "DataFormats/MuonReco/interface/MuonFwd.h"
-#include "DataFormats/MuonReco/interface/ME0Muon.h"
-#include "DataFormats/MuonReco/interface/ME0MuonCollection.h"
-#include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
-#include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
-#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
class ME0MuonTrackCollProducer : public edm::stream::EDProducer<> {
public:
explicit ME0MuonTrackCollProducer(const edm::ParameterSet&);
- //std::vector findSimVtx(edm::Event& iEvent);
- ~ME0MuonTrackCollProducer() override;
+ ~ME0MuonTrackCollProducer() override = default;
private:
void produce(edm::Event&, const edm::EventSetup&) override;
- edm::Handle > OurMuons;
- //edm::Handle muonCollectionH;
- edm::InputTag OurMuonsTag;
- std::vector selectionTags;
const edm::ParameterSet parset_;
edm::EDGetTokenT OurMuonsToken_;
};
@@ -48,15 +29,10 @@ class ME0MuonTrackCollProducer : public edm::stream::EDProducer<> {
DEFINE_FWK_MODULE(ME0MuonTrackCollProducer);
ME0MuonTrackCollProducer::ME0MuonTrackCollProducer(const edm::ParameterSet& parset)
- : OurMuonsTag(parset.getParameter("me0MuonTag")),
- selectionTags(parset.getParameter >("selectionTags")),
- parset_(parset) {
+ : parset_(parset), OurMuonsToken_(consumes(parset.getParameter("me0MuonTag"))) {
produces();
- OurMuonsToken_ = consumes(OurMuonsTag);
}
-ME0MuonTrackCollProducer::~ME0MuonTrackCollProducer() {}
-
void ME0MuonTrackCollProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
using namespace reco;
using namespace edm;
@@ -77,11 +53,7 @@ void ME0MuonTrackCollProducer::produce(edm::Event& iEvent, const edm::EventSetup
trackref = thismuon->innerTrack();
const reco::Track* trk = &(*trackref);
- // pointer to old track:
- //reco::Track* newTrk = new reco::Track(*trk);
-
selectedTracks->push_back(*trk);
- //selectedTrackExtras->push_back( *newExtra );
}
iEvent.put(std::move(selectedTracks));
}
diff --git a/CommonTools/RecoAlgos/python/me0Associator.py b/RecoMuon/MuonIdentification/python/me0Associator.py
similarity index 86%
rename from CommonTools/RecoAlgos/python/me0Associator.py
rename to RecoMuon/MuonIdentification/python/me0Associator.py
index f5de9d5d7845b..1b873a5c41a94 100644
--- a/CommonTools/RecoAlgos/python/me0Associator.py
+++ b/RecoMuon/MuonIdentification/python/me0Associator.py
@@ -4,7 +4,6 @@
#----------ME0Muon Collection Production for association by chi2
me0muon = cms.EDProducer("ME0MuonTrackCollProducer",
me0MuonTag = cms.InputTag("me0SegmentMatching"),
- selectionTags = cms.vstring('All'),
)
#--------------------
me0muonColl_seq = cms.Sequence(
diff --git a/RecoMuon/MuonIdentification/test/testME0MuonAnalyzer_Example.py b/RecoMuon/MuonIdentification/test/testME0MuonAnalyzer_Example.py
index f93bb5bccfff0..711c91d6afd3e 100644
--- a/RecoMuon/MuonIdentification/test/testME0MuonAnalyzer_Example.py
+++ b/RecoMuon/MuonIdentification/test/testME0MuonAnalyzer_Example.py
@@ -56,7 +56,7 @@
)
-from CommonTools.RecoAlgos.me0Associator import *
+from RecoMuon.MuonIdentification.me0Associator import *
#process.me0MuonSel = cms.Sequence(
# me0muonColl_seq