18 using namespace muonAssociatorByHitsDiagnostics;
20 namespace muonAssociatorByHitsDiagnostics {
26 simtracksTag(conf.getParameter<edm::
InputTag>(
"simtracksTag")),
27 simtracksXFTag(conf.getParameter<edm::
InputTag>(
"simtracksXFTag")),
28 crossingframe(conf.getParameter<bool>(
"crossingframe")) {}
54 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"reco::Track collection --- size = "<<tC.size();
58 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"TrackingParticle collection --- size = "<<tPC.size();
60 for(TrackingParticleCollection::const_iterator ITER=tPC.begin(); ITER!=tPC.end(); ITER++, j++) {
62 <<
"TrackingParticle "<<j<<
", q = "<<ITER->charge()<<
", p = "<<ITER->p()
63 <<
", pT = "<<ITER->pt()<<
", eta = "<<ITER->eta()<<
", phi = "<<ITER->phi();
66 <<
"\t pdg code = "<<ITER->pdgId()<<
", made of "<<ITER->numberOfHits()<<
" PSimHit"
67 <<
" (in "<<ITER->numberOfTrackerLayers()<<
" layers)"
68 <<
" from "<<ITER->g4Tracks().size()<<
" SimTrack:";
71 <<
"\t\t Id:"<<g4T->trackId()<<
"/Evt:("<<g4T->eventId().event()<<
","<<g4T->eventId().bunchCrossing()<<
")";
84 event.getByLabel(simtracksXFTag,cf_simtracks);
86 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"CrossingFrame<SimTrack> collection with InputTag = "<<simtracksXFTag
87 <<
" has size = "<<SimTk->size();
92 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
93 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
94 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
95 <<
"\n * "<<*ITER <<endl;
97 event.getByLabel(simtracksXFTag,cf_simvertices);
99 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"CrossingFrame<SimVertex> collection with InputTag = "<<simtracksXFTag
100 <<
" has size = "<<SimVtx->size();
105 <<
" : "<< *VITER <<endl;
109 event.getByLabel(simtracksTag,simTrackCollection);
111 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"SimTrack collection with InputTag = "<<simtracksTag
112 <<
" has size = "<<simTC.size()<<endl;
114 for(edm::SimTrackContainer::const_iterator ITER=simTC.begin(); ITER!=simTC.end(); ITER++, k++){
117 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
118 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
119 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
120 <<
"\n * "<<*ITER <<endl;
122 event.getByLabel(simtracksTag,simVertexCollection);
124 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"SimVertex collection with InputTag = "<<
"g4SimHits"
125 <<
" has size = "<<simVC.size()<<endl;
127 for (edm::SimVertexContainer::const_iterator VITER=simVC.begin(); VITER!=simVC.end(); VITER++, kv++){
130 <<
" : "<< *VITER <<endl;
141 trackerHitAssociatorConfig_(conf, std::
move(iC))
166 for (
auto it = tC.
begin(), ed = tC.
end(); it != ed; ++it) {
167 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
197 for (
auto it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
198 for (
auto itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
199 outputCollection.insert(tC[it->first], std::make_pair(TPCollectionH[itma->idx], itma->quality));
203 outputCollection.post_insert();
204 return outputCollection;
214 for (
auto it = tC.
begin(), ed = tC.
end(); it != ed; ++it) {
215 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
228 bool printRtS =
false;
238 for (
auto it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
239 for (
auto itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
240 outputCollection.insert(TPCollectionH[ it->first],
241 std::make_pair(tC[itma->idx], itma->quality));
245 outputCollection.post_insert();
246 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
EDProductGetter const & productGetter() const
const_iterator end() const
TrackerHitAssociator::Config trackerHitAssociatorConfig_
IndexAssociation associateSimToRecoIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
std::unique_ptr< muonAssociatorByHitsDiagnostics::InputDumper > diagnostics_
std::vector< std::pair< trackingRecHit_iterator, trackingRecHit_iterator > > TrackHitsCollection
std::function< void(const TrackHitsCollection &, const TrackingParticleCollection &)> diagnostics_
MuonAssociatorByHitsHelper::TrackHitsCollection TrackHitsCollection
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< SimTrack >::const_iterator g4t_iterator
reco::RecoToSimCollection associateRecoToSim(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< SimVertex > SimVertexContainer
T const * product() const
const_iterator begin() const
IndexAssociation associateRecoToSimIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
virtual reco::SimToRecoCollection associateSimToReco(edm::Handle< edm::View< reco::Track > > &tCH, edm::Handle< TrackingParticleCollection > &tPCH, const edm::Event *event, const edm::EventSetup *setup) const
MuonAssociatorByHitsHelper helper_
std::vector< SimTrack > SimTrackContainer