36 LogTrace(
"Muon|RecoMuon|GlobalMuonProducer") <<
"constructor called" << endl;
50 updatedStaAssoMapToken =
64 auto mtl = std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService);
65 auto gmtb = std::make_unique<GlobalMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService, iC);
70 produces<reco::TrackCollection>().setBranchAlias(theAlias +
"Tracks");
71 produces<TrackingRecHitCollection>().setBranchAlias(theAlias +
"RecHits");
72 produces<reco::TrackExtraCollection>().setBranchAlias(theAlias +
"TrackExtras");
73 produces<vector<Trajectory> >().setBranchAlias(theAlias +
"Trajectories");
74 produces<TrajTrackAssociationCollection>().setBranchAlias(theAlias +
"TrajTrackMap");
75 produces<reco::MuonTrackLinksCollection>().setBranchAlias(theAlias +
"s");
82 LogTrace(
"Muon|RecoMuon|GlobalMuonProducer") <<
"destructor called" << endl;
86 delete theTrackFinder;
93 const string metname =
"Muon|RecoMuon|GlobalMuonProducer";
98 theService->update(eventSetup);
102 event.getByToken(staMuonsToken, staMuons);
106 LogTrace(
metname) <<
"Taking " << staMuons->size() <<
" Stand Alone Muons " << endl;
108 vector<MuonTrajectoryBuilder::TrackCand> staTrackCands;
114 if (
event.getByToken(staMuonsTrajToken, staMuonsTraj) &&
event.getByToken(staAssoMapToken, staAssoMap) &&
115 event.getByToken(updatedStaAssoMapToken, updatedStaAssoMap)) {
122 if (theSTACollectionLabel.instance() ==
"UpdatedAtVtx") {
123 iEnd = updatedStaAssoMap->
end();
124 iii = updatedStaAssoMap->
find(it->val);
126 tkUpdated = (*updatedStaAssoMap)[it->val];
130 ((tkUpdated.
isNonnull() && tkRegular.
isNonnull()) && ((tkUpdated->eta() * tkRegular->eta()) < 0)) ? -1 : 1;
136 tkCand.first = &*traj;
137 staTrackCands.push_back(tkCand);
143 staTrackCands.push_back(staCand);
147 theTrackFinder->reconstruct(staTrackCands,
event, eventSetup);
150 <<
"================================" << endl