20 using namespace muonAssociatorByHitsDiagnostics;
22 namespace muonAssociatorByHitsDiagnostics {
30 crossingframe(conf.getParameter<bool>(
"crossingframe")) {}
55 <<
"reco::Track collection --- size = " << tC.size();
59 <<
"TrackingParticle collection --- size = " << tPC.size();
61 for (TrackingParticleCollection::const_iterator ITER = tPC.begin(); ITER != tPC.end(); ITER++, j++) {
63 <<
"TrackingParticle " << j <<
", q = " << ITER->charge() <<
", p = " << ITER->p() <<
", pT = " << ITER->pt()
64 <<
", eta = " << ITER->eta() <<
", phi = " << ITER->phi();
67 <<
"\t pdg code = " << ITER->pdgId() <<
", made of " << ITER->numberOfHits() <<
" PSimHit"
68 <<
" (in " << ITER->numberOfTrackerLayers() <<
" layers)"
69 <<
" from " << ITER->g4Tracks().size() <<
" SimTrack:";
71 edm::LogVerbatim(
"MuonAssociatorByHits") <<
"\t\t Id:" << g4T->trackId() <<
"/Evt:(" << g4T->eventId().event()
72 <<
"," << g4T->eventId().bunchCrossing() <<
")";
89 <<
"CrossingFrame<SimTrack> collection with InputTag = " <<
simtracksXFTag <<
" has size = " << SimTk->size();
93 <<
"SimTrack " << k <<
" - Id:" << ITER->trackId() <<
"/Evt:(" << ITER->eventId().event() <<
","
94 << ITER->eventId().bunchCrossing() <<
")"
95 <<
" pdgId = " << ITER->type() <<
", q = " << ITER->charge() <<
", p = " << ITER->momentum().P()
96 <<
", pT = " << ITER->momentum().Pt() <<
", eta = " << ITER->momentum().Eta()
97 <<
", phi = " << ITER->momentum().Phi() <<
"\n * " << *ITER << endl;
103 <<
"CrossingFrame<SimVertex> collection with InputTag = " <<
simtracksXFTag
104 <<
" has size = " << SimVtx->size();
107 edm::LogVerbatim(
"MuonAssociatorByHits") <<
"SimVertex " << kv <<
" : " << *VITER << endl;
114 <<
"SimTrack collection with InputTag = " <<
simtracksTag <<
" has size = " << simTC.size() << endl;
116 for (edm::SimTrackContainer::const_iterator ITER = simTC.begin(); ITER != simTC.end(); ITER++, k++) {
118 <<
"SimTrack " << k <<
" - Id:" << ITER->trackId() <<
"/Evt:(" << ITER->eventId().event() <<
","
119 << ITER->eventId().bunchCrossing() <<
")"
120 <<
" pdgId = " << ITER->type() <<
", q = " << ITER->charge() <<
", p = " << ITER->momentum().P()
121 <<
", pT = " << ITER->momentum().Pt() <<
", eta = " << ITER->momentum().Eta()
122 <<
", phi = " << ITER->momentum().Phi() <<
"\n * " << *ITER << endl;
127 <<
"SimVertex collection with InputTag = "
129 <<
" has size = " << simVC.size() << endl;
131 for (edm::SimVertexContainer::const_iterator VITER = simVC.begin(); VITER != simVC.end(); VITER++, kv++) {
132 edm::LogVerbatim(
"MuonAssociatorByHits") <<
"SimVertex " << kv <<
" : " << *VITER << endl;
141 trackerHitAssociatorConfig_(conf, std::
move(iC)),
142 gemHitAssociatorConfig_(conf, iC),
143 rpcHitAssociatorConfig_(conf, iC),
144 cscHitAssociatorConfig_(conf, iC),
145 dtHitAssociatorConfig_(conf, iC),
163 for (
auto it = tC.
begin(), ed = tC.
end(); it != ed; ++it) {
164 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
183 tTopo, &trackertruth, &csctruth, &dttruth, &rpctruth, &gemtruth, {}};
192 for (
auto it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
193 for (
auto itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
194 outputCollection.insert(tC[it->first], std::make_pair(TPCollectionH[itma->idx], itma->quality));
198 outputCollection.post_insert();
199 return outputCollection;
209 for (
auto it = tC.
begin(), ed = tC.
end(); it != ed; ++it) {
210 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
221 bool printRtS =
false;
229 tTopo, &trackertruth, &csctruth, &dttruth, &rpctruth, &gemtruth, {}};
232 for (
auto it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
233 for (
auto itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
234 outputCollection.insert(TPCollectionH[it->first], std::make_pair(tC[itma->idx], itma->quality));
238 outputCollection.post_insert();
239 return outputCollection;
Log< level::Info, true > LogVerbatim
T getUntrackedParameter(std::string const &, T const &) const
MuonAssociatorByHits(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
GEMHitAssociator::Config gemHitAssociatorConfig_
std::function< void(const TrackHitsCollection &, const TrackingParticleCollection &)> diagnostics_
EDProductGetter const & productGetter() const
const_iterator end() const
TrackerHitAssociator::Config trackerHitAssociatorConfig_
IndexAssociation associateSimToRecoIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
virtual ~MuonAssociatorByHits()
string simVertexCollection
std::unique_ptr< muonAssociatorByHitsDiagnostics::InputDumper > diagnostics_
bool getData(T &iHolder) const
std::vector< std::pair< trackingRecHit_iterator, trackingRecHit_iterator > > TrackHitsCollection
CSCHitAssociator::Config cscHitAssociatorConfig_
MuonAssociatorByHitsHelper::TrackHitsCollection TrackHitsCollection
RPCHitAssociator::Config rpcHitAssociatorConfig_
std::vector< SimTrack >::const_iterator g4t_iterator
T const * product() const
reco::RecoToSimCollection associateRecoToSim(edm::Handle< edm::View< reco::Track >> &tCH, edm::Handle< TrackingParticleCollection > &tPCH, const edm::Event *event, const edm::EventSetup *setup) const
std::vector< SimVertex > SimVertexContainer
string simTrackCollection
const_iterator begin() const
IndexAssociation associateRecoToSimIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
MuonAssociatorByHitsHelper helper_
virtual reco::SimToRecoCollection associateSimToReco(edm::Handle< edm::View< reco::Track >> &tCH, edm::Handle< TrackingParticleCollection > &tPCH, const edm::Event *event, const edm::EventSetup *setup) const
std::vector< TrackingParticle > TrackingParticleCollection
std::vector< SimTrack > SimTrackContainer
DTHitAssociator::Config dtHitAssociatorConfig_
tuple dump
OutputFilePath = cms.string('/tmp/zhokin/'), OutputFileExt = cms.string(''),.
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_