35 LogTrace(
"Muon|RecoMuon|GlobalMuonProducer") <<
"constructor called" << endl;
42 trajectoryBuilderParameters.
addParameter<
InputTag>(
"VertexCollectionLabel", vertexCollectionTag);
44 trajectoryBuilderParameters.
addParameter<
bool>(
"selectHighPurity", selectHighPurity_);
53 updatedStaAssoMapToken =
67 auto mtl = std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService);
68 auto gmtb = std::make_unique<GlobalMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService, iC);
70 theTrackFinder = std::make_unique<MuonTrackFinder>(
std::move(gmtb),
std::move(mtl), iC);
73 produces<reco::TrackCollection>().setBranchAlias(theAlias +
"Tracks");
74 produces<TrackingRecHitCollection>().setBranchAlias(theAlias +
"RecHits");
75 produces<reco::TrackExtraCollection>().setBranchAlias(theAlias +
"TrackExtras");
76 produces<vector<Trajectory> >().setBranchAlias(theAlias +
"Trajectories");
77 produces<TrajTrackAssociationCollection>().setBranchAlias(theAlias +
"TrajTrackMap");
78 produces<reco::MuonTrackLinksCollection>().setBranchAlias(theAlias +
"s");
85 LogTrace(
"Muon|RecoMuon|GlobalMuonProducer") <<
"destructor called" << endl;
94 const string metname =
"Muon|RecoMuon|GlobalMuonProducer";
103 event.getByToken(staMuonsToken, staMuons);
107 LogTrace(
metname) <<
"Taking " << staMuons->size() <<
" Stand Alone Muons " << endl;
109 vector<MuonTrajectoryBuilder::TrackCand> staTrackCands;
115 if (
event.getByToken(staMuonsTrajToken, staMuonsTraj) &&
event.getByToken(staAssoMapToken, staAssoMap) &&
116 event.getByToken(updatedStaAssoMapToken, updatedStaAssoMap)) {
123 if (theSTACollectionLabel.instance() ==
"UpdatedAtVtx") {
124 iEnd = updatedStaAssoMap->
end();
125 iii = updatedStaAssoMap->
find(it->val);
127 tkUpdated = (*updatedStaAssoMap)[it->val];
131 ((tkUpdated.
isNonnull() && tkRegular.
isNonnull()) && ((tkUpdated->eta() * tkRegular->eta()) < 0)) ? -1 : 1;
137 tkCand.first = &*traj;
138 staTrackCands.push_back(tkCand);
144 staTrackCands.push_back(staCand);
151 <<
"================================" << endl
T getParameter(std::string const &) const
std::pair< const Trajectory *, reco::TrackRef > TrackCand
friend struct const_iterator
const std::string metname
bool isNonnull() const
Checks for non-null.
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
key_type key() const
Accessor for product key.
const_iterator find(const key_type &k) const
find element with specified reference key
void produce(edm::Event &, const edm::EventSetup &) override
reconstruct muons
const_iterator end() const
last iterator over the map (read only)
void addParameter(std::string const &name, T const &value)
~GlobalMuonProducer() override
destructor
GlobalMuonProducer(const edm::ParameterSet &)
constructor with config
const_iterator begin() const
first iterator over the map (read only)
static int position[264][3]