36 LogDebug(
"Muon|RecoMuon|TevMuonProducer") <<
"constructor called" << endl;
47 theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
52 theRefitter = std::make_unique<GlobalMuonRefitter>(refitterParameters, theService.get(), iC);
56 theTrackLoader = std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get());
61 for (
unsigned int ww = 0; ww < theRefits.size(); ww++) {
62 LogDebug(
"Muon|RecoMuon|TevMuonProducer") <<
"Refit " << theRefits[ww];
63 produces<reco::TrackCollection>(theRefits[ww]);
64 produces<TrackingRecHitCollection>(theRefits[ww]);
65 produces<reco::TrackExtraCollection>(theRefits[ww]);
66 produces<vector<Trajectory> >(theRefits[ww]);
67 produces<TrajTrackAssociationCollection>(theRefits[ww]);
68 produces<reco::TrackToTrackMap>(theRefits[ww]);
70 produces<DYTestimators>(
"dytInfo");
82 const string metname =
"Muon|RecoMuon|TevMuonProducer";
84 LogTrace(metname) <<
"TeV Muon Reconstruction started" << endl;
100 auto dytInfo = std::make_unique<DYTestimators>();
102 size_t GLBmuonSize = glbMuons->size();
103 vector<DYTInfo> dytTmp(GLBmuonSize);
109 vector<MuonTrajectoryBuilder::TrackCand> glbTrackCands;
115 for (
unsigned int ww = 0; ww <
theRefits.size(); ww++) {
117 std::vector<std::pair<Trajectory*, reco::TrackRef> > miniMap;
121 for (reco::TrackCollection::const_iterator
track = glbTracks->begin();
track != glbTracks->end();
122 track++, ++trackIndex) {
131 if (!refitted.empty()) {
132 auto refit = std::make_unique<Trajectory>(refitted.front());
134 std::pair<Trajectory*, reco::TrackRef> thisPair(refit.get(), glbRef);
135 miniMap.push_back(thisPair);
136 trajectories.push_back(
std::move(refit));
142 filler.insert(glbMuons, dytTmp.begin(), dytTmp.end());
144 event.put(
std::move(dytInfo),
"dytInfo");
146 LogTrace(metname) <<
"Done." << endl;
std::unique_ptr< MuonServiceProxy > theService
the event setup proxy, it takes care the services update
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
void produce(edm::Event &, const edm::EventSetup &) override
reconstruct muons
const std::string metname
std::vector< int > theRefitIndex
std::vector< Track > TrackCollection
collection of Tracks
edm::EDGetTokenT< std::vector< Trajectory > > glbMuonsTrajToken
bool getData(T &iHolder) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken
TevMuonProducer(const edm::ParameterSet &)
constructor with config
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
edm::InputTag theGLBCollectionLabel
STA Label.
MuonCandidate::TrajectoryContainer TrajectoryContainer
~TevMuonProducer() override
destructor
std::vector< std::string > theRefits
T const * product() const
T getParameter(std::string const &) const
std::unique_ptr< MuonTrackLoader > theTrackLoader
std::unique_ptr< GlobalMuonRefitter > theRefitter
edm::EDGetTokenT< reco::TrackCollection > glbMuonsToken