53 <<
"reco::Track collection --- size = " << tC.size();
57 <<
"TrackingParticle collection --- size = " << tPC.size();
59 for (TrackingParticleCollection::const_iterator ITER = tPC.begin(); ITER != tPC.end(); ITER++, j++) {
61 <<
"TrackingParticle " << j <<
", q = " << ITER->charge() <<
", p = " << ITER->p() <<
", pT = " << ITER->pt()
62 <<
", eta = " << ITER->eta() <<
", phi = " << ITER->phi();
65 <<
"\t pdg code = " << ITER->pdgId() <<
", made of " << ITER->numberOfHits() <<
" PSimHit" 66 <<
" (in " << ITER->numberOfTrackerLayers() <<
" layers)" 67 <<
" from " << ITER->g4Tracks().size() <<
" SimTrack:";
69 edm::LogVerbatim(
"MuonAssociatorByHits") <<
"\t\t Id:" << g4T->trackId() <<
"/Evt:(" << g4T->eventId().event()
70 <<
"," << g4T->eventId().bunchCrossing() <<
")";
87 <<
"CrossingFrame<SimTrack> collection with InputTag = " <<
simtracksXFTag <<
" has size = " << SimTk->size();
91 <<
"SimTrack " << k <<
" - Id:" << ITER->trackId() <<
"/Evt:(" << ITER->eventId().event() <<
"," 92 << ITER->eventId().bunchCrossing() <<
")" 93 <<
" pdgId = " << ITER->type() <<
", q = " << ITER->charge() <<
", p = " << ITER->momentum().P()
94 <<
", pT = " << ITER->momentum().Pt() <<
", eta = " << ITER->momentum().Eta()
95 <<
", phi = " << ITER->momentum().Phi() <<
"\n * " << *ITER << endl;
101 <<
"CrossingFrame<SimVertex> collection with InputTag = " <<
simtracksXFTag 102 <<
" has size = " << SimVtx->size();
105 edm::LogVerbatim(
"MuonAssociatorByHits") <<
"SimVertex " << kv <<
" : " << *VITER << endl;
112 <<
"SimTrack collection with InputTag = " <<
simtracksTag <<
" has size = " << simTC.size() << endl;
114 for (edm::SimTrackContainer::const_iterator ITER = simTC.begin(); ITER != simTC.end(); ITER++, k++) {
116 <<
"SimTrack " << k <<
" - Id:" << ITER->trackId() <<
"/Evt:(" << ITER->eventId().event() <<
"," 117 << ITER->eventId().bunchCrossing() <<
")" 118 <<
" pdgId = " << ITER->type() <<
", q = " << ITER->charge() <<
", p = " << ITER->momentum().P()
119 <<
", pT = " << ITER->momentum().Pt() <<
", eta = " << ITER->momentum().Eta()
120 <<
", phi = " << ITER->momentum().Phi() <<
"\n * " << *ITER << endl;
125 <<
"SimVertex collection with InputTag = " 127 <<
" has size = " << simVC.size() << endl;
129 for (edm::SimVertexContainer::const_iterator VITER = simVC.begin(); VITER != simVC.end(); VITER++, kv++) {
130 edm::LogVerbatim(
"MuonAssociatorByHits") <<
"SimVertex " << kv <<
" : " << *VITER << endl;
138 : helper_(conf), conf_(conf), trackerHitAssociatorConfig_(conf,
std::
move(iC)) {
159 for (
auto it = tC.
begin(), ed = tC.
end(); it != ed; ++it) {
160 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
189 for (
auto it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
190 for (
auto itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
191 outputCollection.insert(tC[it->first], std::make_pair(TPCollectionH[itma->idx], itma->quality));
195 outputCollection.post_insert();
196 return outputCollection;
206 for (
auto it = tC.
begin(), ed = tC.
end(); it != ed; ++it) {
207 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
220 bool printRtS =
false;
230 for (
auto it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
231 for (
auto itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
232 outputCollection.insert(TPCollectionH[it->first], std::make_pair(tC[itma->idx], itma->quality));
236 outputCollection.post_insert();
237 return outputCollection;
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet const conf_
MuonAssociatorByHits(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
std::vector< TrackingParticle > TrackingParticleCollection
std::function< void(const TrackHitsCollection &, const TrackingParticleCollection &)> diagnostics_
EDProductGetter const & productGetter() const
const_iterator end() const
def setup(process, global_tag, zero_tesla=False)
TrackerHitAssociator::Config trackerHitAssociatorConfig_
IndexAssociation associateSimToRecoIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
virtual ~MuonAssociatorByHits()
std::unique_ptr< muonAssociatorByHitsDiagnostics::InputDumper > diagnostics_
std::vector< std::pair< trackingRecHit_iterator, trackingRecHit_iterator > > TrackHitsCollection
MuonAssociatorByHitsHelper::TrackHitsCollection TrackHitsCollection
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
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
T const * product() const
std::vector< SimTrack > SimTrackContainer