8 tracksTag(parset.getParameter<
edm::InputTag >(
"tracksTag")),
9 tpTag(parset.getParameter<
edm::InputTag >(
"tpTag")),
14 edm::LogVerbatim(
"MuonAssociatorEDProducer") <<
"constructing MuonAssociatorEDProducer";
15 produces<reco::RecoToSimCollection>();
16 produces<reco::SimToRecoCollection>();
21 LogTrace(
"MuonAssociatorEDProducer") <<
"constructing MuonAssociatorByHits" <<
parset_.
dump();
23 <<
"\n\t\t and TrackingParticles with "<<
tpTag;
29 if (recoTracksLabel ==
"standAloneMuons" || recoTracksLabel ==
"standAloneSETMuons" ||
30 recoTracksLabel ==
"cosmicMuons" || recoTracksLabel ==
"hltL2Muons") {
33 <<
"\n*** WARNING : inconsistent input tracksTag = "<<
tracksTag 34 <<
"\n with UseTracker = true"<<
"\n ---> setting UseTracker = false ";
39 <<
"\n*** WARNING : inconsistent input tracksTag = "<<
tracksTag 40 <<
"\n with UseMuon = false"<<
"\n ---> setting UseMuon = true ";
45 if (recoTracksLabel ==
"generalTracks" || recoTracksLabel ==
"ctfWithMaterialTracksP5LHCNavigation" ||
46 recoTracksLabel ==
"hltL3TkTracksFromL2" ||
47 (recoTracksLabel ==
"hltL3Muons" && recoTracksInstance ==
"L2Seeded")) {
50 <<
"\n*** WARNING : inconsistent input tracksTag = "<<
tracksTag 51 <<
"\n with UseMuon = true"<<
"\n ---> setting UseMuon = false ";
56 <<
"\n*** WARNING : inconsistent input tracksTag = "<<
tracksTag 57 <<
"\n with UseTracker = false"<<
"\n ---> setting UseTracker = true ";
62 LogTrace(
"MuonAssociatorEDProducer") <<
"MuonAssociatorEDProducer::beginJob : constructing MuonAssociatorByHits";
77 LogTrace(
"MuonAssociatorEDProducer") <<
"getting TrackingParticle collection - "<<
tpTag;
78 event.getByToken(
tpToken_, TPCollection);
79 LogTrace(
"MuonAssociatorEDProducer") <<
"\t... size = "<<TPCollection->size();
82 LogTrace(
"MuonAssociatorEDProducer") <<
"getting reco::Track collection - "<<
tracksTag;
83 bool trackAvailable =
event.getByToken (
tracksToken_, trackCollection);
84 if (trackAvailable)
LogTrace(
"MuonAssociatorEDProducer") <<
"\t... size = "<<trackCollection->size();
85 else LogTrace(
"MuonAssociatorEDProducer") <<
"\t... NOT FOUND.";
87 std::unique_ptr<reco::RecoToSimCollection> rts;
88 std::unique_ptr<reco::SimToRecoCollection>
str;
93 LogTrace(
"MuonAssociatorEDProducer") <<
"\n ignoring missing track collection." <<
"\n";
97 <<
"\n >>> RecoToSim association <<< \n" 98 <<
" Track collection : " 100 <<
" TrackingParticle collection : " 106 <<
"\n >>> SimToReco association <<< \n" 107 <<
" TrackingParticle collection : " 109 <<
" Track collection : " 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