#include <MuonAssociatorEDProducer.h>
Definition at line 13 of file MuonAssociatorEDProducer.h.
MuonAssociatorEDProducer::MuonAssociatorEDProducer |
( |
const edm::ParameterSet & |
parset | ) |
|
|
explicit |
Perform some sanity checks of the configuration
Definition at line 7 of file MuonAssociatorEDProducer.cc.
References edm::ParameterSet::addParameter(), associatorByHits, edm::ParameterSet::dump(), edm::ParameterSet::getParameter(), edm::InputTag::instance(), edm::InputTag::label(), LogTrace, parset_, AlCaHLTBitMon_QueryRunRegistry::string, tpTag, tpToken_, tracksTag, and tracksToken_.
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";
edm::ParameterSet parset_
T getParameter(std::string const &) const
edm::EDGetTokenT< TrackingParticleCollection > tpToken_
T getUntrackedParameter(std::string const &, T const &) const
std::string dump(unsigned int indent=0) const
MuonAssociatorByHits * associatorByHits
void addParameter(std::string const &name, T const &value)
edm::EDGetTokenT< edm::View< reco::Track > > tracksToken_
bool ignoreMissingTrackCollection
MuonAssociatorEDProducer::~MuonAssociatorEDProducer |
( |
| ) |
|
|
override |
void MuonAssociatorEDProducer::beginJob |
( |
void |
| ) |
|
|
privatevirtual |
void MuonAssociatorEDProducer::endJob |
( |
void |
| ) |
|
|
privatevirtual |
Definition at line 73 of file MuonAssociatorEDProducer.cc.
References MuonAssociatorByHits::associateRecoToSim(), MuonAssociatorByHits::associateSimToReco(), associatorByHits, ignoreMissingTrackCollection, edm::InputTag::instance(), edm::InputTag::label(), LogTrace, eostools::move(), harvestTrackValidationPlots::str, tpTag, tpToken_, findElectronsInSiStrips_cfi::trackCollection, tracksTag, and tracksToken_.
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::EDGetTokenT< TrackingParticleCollection > tpToken_
MuonAssociatorByHits * associatorByHits
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
bool MuonAssociatorEDProducer::ignoreMissingTrackCollection |
|
private |