8 :
tracksTag(parset.getParameter<
edm::InputTag>(
"tracksTag")),
9 tpTag(parset.getParameter<
edm::InputTag>(
"tpTag")),
12 edm::LogVerbatim(
"MuonAssociatorEDProducer") <<
"constructing MuonAssociatorEDProducer";
13 produces<reco::RecoToSimCollection>();
14 produces<reco::SimToRecoCollection>();
19 LogTrace(
"MuonAssociatorEDProducer") <<
"constructing MuonAssociatorByHits" <<
parset_.
dump();
20 edm::LogVerbatim(
"MuonAssociatorEDProducer") <<
"\n MuonAssociatorByHits will associate reco::Tracks with " 27 if (recoTracksLabel ==
"standAloneMuons" || recoTracksLabel ==
"standAloneSETMuons" ||
28 recoTracksLabel ==
"cosmicMuons" || recoTracksLabel ==
"hltL2Muons") {
31 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
tracksTag <<
"\n with UseTracker = true" 32 <<
"\n ---> setting UseTracker = false ";
37 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
tracksTag <<
"\n with UseMuon = false" 38 <<
"\n ---> setting UseMuon = true ";
43 if (recoTracksLabel ==
"generalTracks" || recoTracksLabel ==
"ctfWithMaterialTracksP5LHCNavigation" ||
44 recoTracksLabel ==
"hltL3TkTracksFromL2" ||
45 (recoTracksLabel ==
"hltL3Muons" && recoTracksInstance ==
"L2Seeded")) {
48 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
tracksTag <<
"\n with UseMuon = true" 49 <<
"\n ---> setting UseMuon = false ";
54 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
tracksTag <<
"\n with UseTracker = false" 55 <<
"\n ---> setting UseTracker = true ";
60 LogTrace(
"MuonAssociatorEDProducer") <<
"MuonAssociatorEDProducer::beginJob " 61 ": constructing MuonAssociatorByHits";
75 LogTrace(
"MuonAssociatorEDProducer") <<
"getting TrackingParticle collection - " <<
tpTag;
76 event.getByToken(
tpToken_, TPCollection);
77 LogTrace(
"MuonAssociatorEDProducer") <<
"\t... size = " << TPCollection->size();
80 LogTrace(
"MuonAssociatorEDProducer") <<
"getting reco::Track collection - " <<
tracksTag;
81 bool trackAvailable =
event.getByToken(
tracksToken_, trackCollection);
83 LogTrace(
"MuonAssociatorEDProducer") <<
"\t... size = " << trackCollection->size();
85 LogTrace(
"MuonAssociatorEDProducer") <<
"\t... NOT FOUND.";
87 std::unique_ptr<reco::RecoToSimCollection> rts;
88 std::unique_ptr<reco::SimToRecoCollection>
str;
94 LogTrace(
"MuonAssociatorEDProducer") <<
"\n ignoring missing track collection." 98 <<
"\n >>> RecoToSim association <<< \n" 100 <<
" (size = " << trackCollection->size() <<
") \n" 102 <<
" (size = " << TPCollection->size() <<
")";
108 <<
"\n >>> SimToReco association <<< \n" 110 <<
" (size = " << TPCollection->size() <<
") \n" 112 <<
" (size = " << trackCollection->size() <<
")";
edm::ParameterSet parset_
T getParameter(std::string const &) const
edm::EDGetTokenT< TrackingParticleCollection > tpToken_
MuonAssociatorEDProducer(const edm::ParameterSet &)
~MuonAssociatorEDProducer() override
std::string dump(unsigned int indent=0) const
def setup(process, global_tag, zero_tesla=False)
ignoreMissingTrackCollection
void produce(edm::Event &, const edm::EventSetup &) override
MuonAssociatorByHits * associatorByHits
void addParameter(std::string const &name, T const &value)
reco::RecoToSimCollection associateRecoToSim(edm::Handle< edm::View< reco::Track >> &tCH, edm::Handle< TrackingParticleCollection > &tPCH, const edm::Event *event, const edm::EventSetup *setup) const
edm::EDGetTokenT< edm::View< reco::Track > > tracksToken_
virtual reco::SimToRecoCollection associateSimToReco(edm::Handle< edm::View< reco::Track >> &tCH, edm::Handle< TrackingParticleCollection > &tPCH, const edm::Event *event, const edm::EventSetup *setup) const
bool ignoreMissingTrackCollection