20 includeZeroHitMuons(conf.getParameter<bool>(
"includeZeroHitMuons")),
21 acceptOneStubMatchings(conf.getParameter<bool>(
"acceptOneStubMatchings")),
22 UseTracker(conf.getParameter<bool>(
"UseTracker")),
23 UseMuon(conf.getParameter<bool>(
"UseMuon")),
24 AbsoluteNumberOfHits_track(conf.getParameter<bool>(
"AbsoluteNumberOfHits_track")),
25 NHitCut_track(conf.getParameter<unsigned int>(
"NHitCut_track")),
26 EfficiencyCut_track(conf.getParameter<double>(
"EfficiencyCut_track")),
27 PurityCut_track(conf.getParameter<double>(
"PurityCut_track")),
28 AbsoluteNumberOfHits_muon(conf.getParameter<bool>(
"AbsoluteNumberOfHits_muon")),
29 NHitCut_muon(conf.getParameter<unsigned int>(
"NHitCut_muon")),
30 EfficiencyCut_muon(conf.getParameter<double>(
"EfficiencyCut_muon")),
31 PurityCut_muon(conf.getParameter<double>(
"PurityCut_muon")),
32 UsePixels(conf.getParameter<bool>(
"UsePixels")),
33 UseGrouped(conf.getParameter<bool>(
"UseGrouped")),
34 UseSplitting(conf.getParameter<bool>(
"UseSplitting")),
35 ThreeHitTracksAreSpecial(conf.getParameter<bool>(
"ThreeHitTracksAreSpecial")),
36 dumpDT(conf.getParameter<bool>(
"dumpDT")),
37 dumpInputCollections(conf.getParameter<bool>(
"dumpInputCollections")),
38 crossingframe(conf.getParameter<bool>(
"crossingframe")),
39 simtracksTag(conf.getParameter<edm::InputTag>(
"simtracksTag")),
40 simtracksXFTag(conf.getParameter<edm::InputTag>(
"simtracksXFTag")),
46 if (
UseTracker)
edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n UseTracker = TRUE : Tracker SimHits and RecHits WILL be counted";
47 else edm::LogVerbatim(
"MuonAssociatorByHits") <<
"\n UseTracker = FALSE : Tracker SimHits and RecHits WILL NOT be counted";
50 if (
UseMuon)
edm::LogVerbatim(
"MuonAssociatorByHits")<<
" UseMuon = TRUE : Muon SimHits and RecHits WILL be counted";
51 else edm::LogVerbatim(
"MuonAssociatorByHits") <<
" UseMuon = FALSE : Muon SimHits and RecHits WILL NOT be counted"<<endl;
56 <<
"\n includeZeroHitMuons = TRUE"
57 <<
"\n ==> (re)set NHitCut_muon = 0, PurityCut_muon = 0, EfficiencyCut_muon = 0"<<endl;
83 includeZeroHitMuons(conf.getParameter<bool>(
"includeZeroHitMuons")),
84 acceptOneStubMatchings(conf.getParameter<bool>(
"acceptOneStubMatchings")),
85 UseTracker(conf.getParameter<bool>(
"UseTracker")),
86 UseMuon(conf.getParameter<bool>(
"UseMuon")),
87 AbsoluteNumberOfHits_track(conf.getParameter<bool>(
"AbsoluteNumberOfHits_track")),
88 NHitCut_track(conf.getParameter<unsigned int>(
"NHitCut_track")),
89 EfficiencyCut_track(conf.getParameter<double>(
"EfficiencyCut_track")),
90 PurityCut_track(conf.getParameter<double>(
"PurityCut_track")),
91 AbsoluteNumberOfHits_muon(conf.getParameter<bool>(
"AbsoluteNumberOfHits_muon")),
92 NHitCut_muon(conf.getParameter<unsigned int>(
"NHitCut_muon")),
93 EfficiencyCut_muon(conf.getParameter<double>(
"EfficiencyCut_muon")),
94 PurityCut_muon(conf.getParameter<double>(
"PurityCut_muon")),
95 UsePixels(conf.getParameter<bool>(
"UsePixels")),
96 UseGrouped(conf.getParameter<bool>(
"UseGrouped")),
97 UseSplitting(conf.getParameter<bool>(
"UseSplitting")),
98 ThreeHitTracksAreSpecial(conf.getParameter<bool>(
"ThreeHitTracksAreSpecial")),
99 dumpDT(conf.getParameter<bool>(
"dumpDT")),
100 dumpInputCollections(conf.getParameter<bool>(
"dumpInputCollections")),
101 crossingframe(conf.getParameter<bool>(
"crossingframe")),
102 simtracksTag(conf.getParameter<edm::InputTag>(
"simtracksTag")),
103 simtracksXFTag(conf.getParameter<edm::InputTag>(
"simtracksXFTag")),
109 if (
UseTracker)
edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n UseTracker = TRUE : Tracker SimHits and RecHits WILL be counted";
110 else edm::LogVerbatim(
"MuonAssociatorByHits") <<
"\n UseTracker = FALSE : Tracker SimHits and RecHits WILL NOT be counted";
113 if (
UseMuon)
edm::LogVerbatim(
"MuonAssociatorByHits")<<
" UseMuon = TRUE : Muon SimHits and RecHits WILL be counted";
114 else edm::LogVerbatim(
"MuonAssociatorByHits") <<
" UseMuon = FALSE : Muon SimHits and RecHits WILL NOT be counted"<<endl;
119 <<
"\n includeZeroHitMuons = TRUE"
120 <<
"\n ==> (re)set NHitCut_muon = 0, PurityCut_muon = 0, EfficiencyCut_muon = 0"<<endl;
142 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
146 for (IndexAssociation::const_iterator it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
147 for (std::vector<IndexMatch>::const_iterator itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
153 return outputCollection;
166 int tracker_nshared = 0;
167 int muon_nshared = 0;
168 int global_nshared = 0;
170 double tracker_quality = 0;
171 double tracker_quality_cut;
175 double muon_quality = 0;
176 double muon_quality_cut;
180 double global_quality = 0;
199 if (TPCollectionH.
size()!=0) tPC = *(TPCollectionH.
product());
203 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"reco::Track collection --- size = "<<tC.size();
207 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"TrackingParticle collection --- size = "<<tPC.size();
209 for(TrackingParticleCollection::const_iterator ITER=tPC.begin(); ITER!=tPC.end(); ITER++, j++) {
211 <<
"TrackingParticle "<<j<<
", q = "<<ITER->charge()<<
", p = "<<ITER->p()
212 <<
", pT = "<<ITER->pt()<<
", eta = "<<ITER->eta()<<
", phi = "<<ITER->phi();
215 <<
"\t pdg code = "<<ITER->pdgId()<<
", made of "<<ITER->numberOfHits()<<
" PSimHit"
216 <<
" (in "<<ITER->numberOfTrackerLayers()<<
" layers)"
217 <<
" from "<<ITER->g4Tracks().size()<<
" SimTrack:";
220 <<
"\t\t Id:"<<g4T->trackId()<<
"/Evt:("<<g4T->eventId().event()<<
","<<g4T->eventId().bunchCrossing()<<
")";
236 <<
" has size = "<<SimTk->size();
241 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
242 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
243 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
244 <<
"\n * "<<*ITER <<endl;
249 <<
" has size = "<<SimVtx->size();
254 <<
" : "<< *VITER <<endl;
261 <<
" has size = "<<simTC.size()<<endl;
263 for(edm::SimTrackContainer::const_iterator ITER=simTC.begin(); ITER!=simTC.end(); ITER++, k++){
266 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
267 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
268 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
269 <<
"\n * "<<*ITER <<endl;
273 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"SimVertex collection with InputTag = "<<
"g4SimHits"
274 <<
" has size = "<<simVC.size()<<endl;
276 for (edm::SimVertexContainer::const_iterator VITER=simVC.begin(); VITER!=simVC.end(); VITER++, kv++){
279 <<
" : "<< *VITER <<endl;
285 for (TrackHitsCollection::const_iterator track=tC.begin(); track!=tC.end(); track++, tindex++) {
287 <<
"\n"<<
"reco::Track "<<tindex
288 <<
", number of RecHits = "<< (track->second - track->first) <<
"\n";
289 tracker_matchedIds_valid.clear();
290 muon_matchedIds_valid.clear();
292 tracker_matchedIds_INVALID.clear();
293 muon_matchedIds_INVALID.clear();
295 bool this_track_matched =
false;
296 int n_matching_simhits = 0;
300 int n_tracker_all = 0;
306 int n_tracker_valid = 0;
307 int n_muon_valid = 0;
312 int n_tracker_matched_valid = 0;
313 int n_muon_matched_valid = 0;
314 int n_dt_matched_valid = 0;
315 int n_csc_matched_valid = 0;
316 int n_rpc_matched_valid = 0;
319 int n_tracker_INVALID = 0;
320 int n_muon_INVALID = 0;
321 int n_dt_INVALID = 0;
322 int n_csc_INVALID = 0;
323 int n_rpc_INVALID = 0;
325 int n_tracker_matched_INVALID = 0;
326 int n_muon_matched_INVALID = 0;
327 int n_dt_matched_INVALID = 0;
328 int n_csc_matched_INVALID = 0;
329 int n_rpc_matched_INVALID = 0;
332 getMatchedIds(tracker_matchedIds_valid, muon_matchedIds_valid,
333 tracker_matchedIds_INVALID, muon_matchedIds_INVALID,
334 n_tracker_valid, n_dt_valid, n_csc_valid, n_rpc_valid,
335 n_tracker_matched_valid, n_dt_matched_valid, n_csc_matched_valid, n_rpc_matched_valid,
336 n_tracker_INVALID, n_dt_INVALID, n_csc_INVALID, n_rpc_INVALID,
337 n_tracker_matched_INVALID, n_dt_matched_INVALID, n_csc_matched_INVALID, n_rpc_matched_INVALID,
338 track->first, track->second,
339 trackertruth, dttruth, csctruth, rpctruth,
342 n_matching_simhits = tracker_matchedIds_valid.size() + muon_matchedIds_valid.size() +
343 tracker_matchedIds_INVALID.size() +muon_matchedIds_INVALID.size();
345 n_muon_valid = n_dt_valid + n_csc_valid + n_rpc_valid;
346 n_valid = n_tracker_valid + n_muon_valid;
347 n_muon_INVALID = n_dt_INVALID + n_csc_INVALID + n_rpc_INVALID;
348 n_INVALID = n_tracker_INVALID + n_muon_INVALID;
351 n_tracker_all = n_tracker_valid + n_tracker_INVALID;
352 n_dt_all = n_dt_valid + n_dt_INVALID;
353 n_csc_all = n_csc_valid + n_csc_INVALID;
354 n_rpc_all = n_rpc_valid + n_rpc_INVALID;
355 n_all = n_valid + n_INVALID;
357 n_muon_matched_valid = n_dt_matched_valid + n_csc_matched_valid + n_rpc_matched_valid;
358 n_muon_matched_INVALID = n_dt_matched_INVALID + n_csc_matched_INVALID + n_rpc_matched_INVALID;
361 int n_tracker_selected_hits = n_tracker_valid;
362 int n_muon_selected_hits = n_muon_valid;
363 int n_dt_selected_hits = n_dt_valid;
364 int n_csc_selected_hits = n_csc_valid;
365 int n_rpc_selected_hits = n_rpc_valid;
368 int n_tracker_matched = n_tracker_matched_valid;
369 int n_muon_matched = n_muon_matched_valid;
370 int n_dt_matched = n_dt_matched_valid;
371 int n_csc_matched = n_csc_matched_valid;
372 int n_rpc_matched = n_rpc_matched_valid;
379 InvMuonHits =
" ***INVALID MUON HITS***";
380 ZeroHitMuon =
" ***ZERO-HIT MUON***";
382 n_muon_selected_hits = n_muon_INVALID;
383 n_dt_selected_hits = n_dt_INVALID;
384 n_csc_selected_hits = n_csc_INVALID;
385 n_rpc_selected_hits = n_rpc_INVALID;
387 n_muon_matched = n_muon_matched_INVALID;
388 n_dt_matched = n_dt_matched_INVALID;
389 n_csc_matched = n_csc_matched_INVALID;
390 n_rpc_matched = n_rpc_matched_INVALID;
393 int n_selected_hits = n_tracker_selected_hits + n_muon_selected_hits;
394 int n_matched = n_tracker_matched + n_muon_matched;
397 <<
"\n"<<
"# TrackingRecHits: "<<(track->second - track->first)
398 <<
"\n"<<
"# used RecHits = " << n_all <<
" ("<<n_tracker_all<<
"/"
399 <<n_dt_all<<
"/"<<n_csc_all<<
"/"<<n_rpc_all<<
" in Tracker/DT/CSC/RPC)"<<
", obtained from " << n_matching_simhits <<
" SimHits"
400 <<
"\n"<<
"# selected RecHits = " <<n_selected_hits <<
" (" <<n_tracker_selected_hits<<
"/"
401 <<n_dt_selected_hits<<
"/"<<n_csc_selected_hits<<
"/"<<n_rpc_selected_hits<<
" in Tracker/DT/CSC/RPC)"<<InvMuonHits
402 <<
"\n"<<
"# matched RecHits = " <<n_matched<<
" ("<<n_tracker_matched<<
"/"
403 <<n_dt_matched<<
"/"<<n_csc_matched<<
"/"<<n_rpc_matched<<
" in Tracker/DT/CSC/RPC)";
405 if (n_all>0 && n_matching_simhits == 0)
407 <<
"*** WARNING in MuonAssociatorByHits::associateRecoToSim: no matching PSimHit found for this reco::Track !";
409 if (n_matching_simhits != 0) {
411 <<
"\n"<<
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
412 <<
"\n"<<
"reco::Track "<<tindex<<ZeroHitMuon
413 <<
"\n\t"<<
"made of "<<n_selected_hits<<
" selected RecHits (tracker:"<<n_tracker_selected_hits<<
"/muons:"<<n_muon_selected_hits<<
")";
416 for (TrackingParticleCollection::const_iterator trpart = tPC.begin(); trpart != tPC.end(); ++trpart, ++tpindex) {
417 tracker_nshared =
getShared(tracker_matchedIds_valid, trpart);
418 muon_nshared =
getShared(muon_matchedIds_valid, trpart);
421 muon_nshared =
getShared(muon_matchedIds_INVALID, trpart);
423 global_nshared = tracker_nshared + muon_nshared;
426 else if(n_tracker_selected_hits != 0) tracker_quality = (
static_cast<double>(tracker_nshared)/static_cast<double>(n_tracker_selected_hits));
427 else tracker_quality = 0;
430 else if(n_muon_selected_hits != 0) muon_quality = (
static_cast<double>(muon_nshared)/static_cast<double>(n_muon_selected_hits));
431 else muon_quality = 0;
434 if (n_selected_hits != 0) {
436 global_quality = global_nshared;
438 global_quality = (
static_cast<double>(global_nshared)/static_cast<double>(n_selected_hits));
439 }
else global_quality = 0;
441 bool trackerOk =
false;
442 if (n_tracker_selected_hits != 0) {
443 if (tracker_quality > tracker_quality_cut) trackerOk =
true;
449 if (n_muon_selected_hits != 0) {
450 if (muon_quality > muon_quality_cut) muonOk =
true;
454 bool matchOk = trackerOk || muonOk;
458 matchOk = trackerOk && muonOk;
462 outputCollection[tindex].push_back(
IndexMatch(tpindex, global_quality));
463 this_track_matched =
true;
466 <<
"\n\t"<<
" **MATCHED** with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
467 <<
"\n\t"<<
" N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")"
468 <<
"\n"<<
" to: TrackingParticle " <<tpindex<<
", q = "<<(*trpart).charge()<<
", p = "<<(*trpart).p()
469 <<
", pT = "<<(*trpart).pt()<<
", eta = "<<(*trpart).eta()<<
", phi = "<<(*trpart).phi()
470 <<
"\n\t"<<
" pdg code = "<<(*trpart).pdgId()<<
", made of "<<(*trpart).numberOfHits()<<
" PSimHits"
471 <<
" from "<<(*trpart).g4Tracks().size()<<
" SimTrack:";
473 g4T!=(*trpart).g4Track_end();
476 <<
"\t"<<
" Id:"<<(*g4T).trackId()<<
"/Evt:("<<(*g4T).eventId().event()<<
","<<(*g4T).eventId().bunchCrossing()<<
")";
481 if (global_nshared != 0)
483 <<
"\n\t"<<
" NOT matched to TrackingParticle "<<tpindex
484 <<
" with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
485 <<
"\n"<<
" N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")";
490 if (!this_track_matched) {
492 <<
"\n"<<
" NOT matched to any TrackingParticle";
496 <<
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"<<
"\n";
503 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"0 reconstructed tracks (-->> 0 associated !)";
506 for (IndexAssociation::iterator it = outputCollection.begin(), ed = outputCollection.end(); it != ed; ++it) {
507 std::sort(it->second.begin(), it->second.end());
509 return outputCollection;
521 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
525 for (IndexAssociation::const_iterator it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
526 for (std::vector<IndexMatch>::const_iterator itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
528 std::make_pair(tC[itma->idx], itma->quality));
533 return outputCollection;
547 int tracker_nshared = 0;
548 int muon_nshared = 0;
549 int global_nshared = 0;
551 double tracker_quality = 0;
552 double tracker_quality_cut;
556 double muon_quality = 0;
557 double muon_quality_cut;
561 double global_quality = 0;
563 double tracker_purity = 0;
564 double muon_purity = 0;
565 double global_purity = 0;
585 if (TPCollectionH.
size()!=0) tPC = *(TPCollectionH.
product());
587 bool any_trackingParticle_matched =
false;
590 for (TrackHitsCollection::const_iterator track=tC.begin(); track!=tC.end(); track++, tindex++) {
592 <<
"\n"<<
"reco::Track "<<tindex
593 <<
", number of RecHits = "<< (track->second - track->first) <<
"\n";
595 tracker_matchedIds_valid.clear();
596 muon_matchedIds_valid.clear();
598 tracker_matchedIds_INVALID.clear();
599 muon_matchedIds_INVALID.clear();
601 int n_matching_simhits = 0;
605 int n_tracker_all = 0;
611 int n_tracker_valid = 0;
612 int n_muon_valid = 0;
617 int n_tracker_matched_valid = 0;
618 int n_muon_matched_valid = 0;
619 int n_dt_matched_valid = 0;
620 int n_csc_matched_valid = 0;
621 int n_rpc_matched_valid = 0;
624 int n_tracker_INVALID = 0;
625 int n_muon_INVALID = 0;
626 int n_dt_INVALID = 0;
627 int n_csc_INVALID = 0;
628 int n_rpc_INVALID = 0;
630 int n_tracker_matched_INVALID = 0;
631 int n_muon_matched_INVALID = 0;
632 int n_dt_matched_INVALID = 0;
633 int n_csc_matched_INVALID = 0;
634 int n_rpc_matched_INVALID = 0;
637 getMatchedIds(tracker_matchedIds_valid, muon_matchedIds_valid,
638 tracker_matchedIds_INVALID, muon_matchedIds_INVALID,
639 n_tracker_valid, n_dt_valid, n_csc_valid, n_rpc_valid,
640 n_tracker_matched_valid, n_dt_matched_valid, n_csc_matched_valid, n_rpc_matched_valid,
641 n_tracker_INVALID, n_dt_INVALID, n_csc_INVALID, n_rpc_INVALID,
642 n_tracker_matched_INVALID, n_dt_matched_INVALID, n_csc_matched_INVALID, n_rpc_matched_INVALID,
643 track->first, track->second,
644 trackertruth, dttruth, csctruth, rpctruth,
647 n_matching_simhits = tracker_matchedIds_valid.size() + muon_matchedIds_valid.size() +
648 tracker_matchedIds_INVALID.size() +muon_matchedIds_INVALID.size();
650 n_muon_valid = n_dt_valid + n_csc_valid + n_rpc_valid;
651 n_valid = n_tracker_valid + n_muon_valid;
652 n_muon_INVALID = n_dt_INVALID + n_csc_INVALID + n_rpc_INVALID;
653 n_INVALID = n_tracker_INVALID + n_muon_INVALID;
656 n_tracker_all = n_tracker_valid + n_tracker_INVALID;
657 n_dt_all = n_dt_valid + n_dt_INVALID;
658 n_csc_all = n_csc_valid + n_csc_INVALID;
659 n_rpc_all = n_rpc_valid + n_rpc_INVALID;
660 n_all = n_valid + n_INVALID;
662 n_muon_matched_valid = n_dt_matched_valid + n_csc_matched_valid + n_rpc_matched_valid;
663 n_muon_matched_INVALID = n_dt_matched_INVALID + n_csc_matched_INVALID + n_rpc_matched_INVALID;
666 int n_tracker_selected_hits = n_tracker_valid;
667 int n_muon_selected_hits = n_muon_valid;
668 int n_dt_selected_hits = n_dt_valid;
669 int n_csc_selected_hits = n_csc_valid;
670 int n_rpc_selected_hits = n_rpc_valid;
673 int n_tracker_matched = n_tracker_matched_valid;
674 int n_muon_matched = n_muon_matched_valid;
675 int n_dt_matched = n_dt_matched_valid;
676 int n_csc_matched = n_csc_matched_valid;
677 int n_rpc_matched = n_rpc_matched_valid;
684 InvMuonHits =
" ***INVALID MUON HITS***";
685 ZeroHitMuon =
" ***ZERO-HIT MUON***";
687 n_muon_selected_hits = n_muon_INVALID;
688 n_dt_selected_hits = n_dt_INVALID;
689 n_csc_selected_hits = n_csc_INVALID;
690 n_rpc_selected_hits = n_rpc_INVALID;
692 n_muon_matched = n_muon_matched_INVALID;
693 n_dt_matched = n_dt_matched_INVALID;
694 n_csc_matched = n_csc_matched_INVALID;
695 n_rpc_matched = n_rpc_matched_INVALID;
698 int n_selected_hits = n_tracker_selected_hits + n_muon_selected_hits;
699 int n_matched = n_tracker_matched + n_muon_matched;
702 <<
"\n"<<
"# TrackingRecHits: "<<(track->second - track->first)
703 <<
"\n"<<
"# used RecHits = " <<n_all <<
" ("<<n_tracker_all<<
"/"
704 <<n_dt_all<<
"/"<<n_csc_all<<
"/"<<n_rpc_all<<
" in Tracker/DT/CSC/RPC)"<<
", obtained from " << n_matching_simhits <<
" SimHits"
705 <<
"\n"<<
"# selected RecHits = " <<n_selected_hits <<
" (" <<n_tracker_selected_hits<<
"/"
706 <<n_dt_selected_hits<<
"/"<<n_csc_selected_hits<<
"/"<<n_rpc_selected_hits<<
" in Tracker/DT/CSC/RPC)"<<InvMuonHits
707 <<
"\n"<<
"# matched RecHits = " <<n_matched<<
" ("<<n_tracker_matched<<
"/"
708 <<n_dt_matched<<
"/"<<n_csc_matched<<
"/"<<n_rpc_matched<<
" in Tracker/DT/CSC/RPC)";
710 if (printRtS && n_all>0 && n_matching_simhits==0)
712 <<
"*** WARNING in MuonAssociatorByHits::associateSimToReco: no matching PSimHit found for this reco::Track !";
714 if (n_matching_simhits != 0) {
716 for (TrackingParticleCollection::const_iterator trpart = tPC.begin(); trpart != tPC.end(); ++trpart, ++tpindex) {
719 int n_tracker_recounted_simhits = 0;
720 int n_muon_simhits = 0;
721 int n_global_simhits = 0;
724 int n_tracker_selected_simhits = 0;
725 int n_muon_selected_simhits = 0;
726 int n_global_selected_simhits = 0;
729 tracker_nshared =
getShared(tracker_matchedIds_valid, trpart);
730 muon_nshared =
getShared(muon_matchedIds_valid, trpart);
733 muon_nshared =
getShared(muon_matchedIds_INVALID, trpart);
735 global_nshared = tracker_nshared + muon_nshared;
736 if (global_nshared == 0)
continue;
802 n_tracker_recounted_simhits = trpart->numberOfTrackerHits();
804 n_muon_simhits = trpart->numberOfHits() - trpart->numberOfTrackerHits();
807 if (trpart->numberOfHits()==0) {
809 n_tracker_recounted_simhits = tracker_nshared;
810 n_muon_simhits = muon_nshared;
812 n_global_simhits = n_tracker_recounted_simhits + n_muon_simhits;
815 n_muon_selected_simhits = n_muon_simhits;
816 n_global_selected_simhits = n_muon_selected_simhits;
819 n_tracker_selected_simhits = n_tracker_recounted_simhits;
820 n_global_selected_simhits += n_tracker_selected_simhits;
824 else if (n_tracker_selected_simhits!=0)
825 tracker_quality =
static_cast<double>(tracker_nshared)/static_cast<double>(n_tracker_selected_simhits);
826 else tracker_quality = 0;
829 else if (n_muon_selected_simhits!=0)
830 muon_quality =
static_cast<double>(muon_nshared)/static_cast<double>(n_muon_selected_simhits);
831 else muon_quality = 0;
834 if (n_global_selected_simhits != 0) {
836 global_quality = global_nshared;
838 global_quality =
static_cast<double>(global_nshared)/static_cast<double>(n_global_selected_simhits);
840 else global_quality = 0;
843 if (n_selected_hits != 0) {
845 global_purity = global_nshared;
847 global_purity =
static_cast<double>(global_nshared)/static_cast<double>(n_selected_hits);
849 else global_purity = 0;
851 bool trackerOk =
false;
852 if (n_tracker_selected_hits != 0) {
853 if (tracker_quality > tracker_quality_cut) trackerOk =
true;
855 tracker_purity =
static_cast<double>(tracker_nshared)/static_cast<double>(n_tracker_selected_hits);
865 if (n_muon_selected_hits != 0) {
866 if (muon_quality > muon_quality_cut) muonOk =
true;
868 muon_purity =
static_cast<double>(muon_nshared)/static_cast<double>(n_muon_selected_hits);
875 bool matchOk = trackerOk || muonOk;
879 matchOk = trackerOk && muonOk;
883 outputCollection[tpindex].push_back(
IndexMatch(tindex,global_quality));
884 any_trackingParticle_matched =
true;
887 <<
"************************************************************************************************************************"
888 <<
"\n"<<
"TrackingParticle " << tpindex <<
", q = "<<(*trpart).charge()<<
", p = "<<(*trpart).p()
889 <<
", pT = "<<(*trpart).pt()<<
", eta = "<<(*trpart).eta()<<
", phi = "<<(*trpart).phi()
890 <<
"\n"<<
" pdg code = "<<(*trpart).pdgId()
891 <<
", made of "<<(*trpart).numberOfHits()<<
" PSimHits, recounted "<<n_global_simhits<<
" PSimHits"
892 <<
" (tracker:"<<n_tracker_recounted_simhits<<
"/muons:"<<n_muon_simhits<<
")"
893 <<
", from "<<(*trpart).g4Tracks().size()<<
" SimTrack:";
895 g4T!=(*trpart).g4Track_end();
898 <<
" Id:"<<(*g4T).trackId()<<
"/Evt:("<<(*g4T).eventId().event()<<
","<<(*g4T).eventId().bunchCrossing()<<
")";
901 <<
"\t selected "<<n_global_selected_simhits<<
" PSimHits"
902 <<
" (tracker:"<<n_tracker_selected_simhits<<
"/muons:"<<n_muon_selected_simhits<<
")"
903 <<
"\n\t **MATCHED** with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
904 <<
"\n\t and purity = "<<global_purity<<
" (tracker: "<<tracker_purity<<
" / muon: "<<muon_purity<<
")"
905 <<
"\n\t N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")"
906 <<
"\n" <<
" to: reco::Track "<<tindex<<ZeroHitMuon
907 <<
"\n\t"<<
" made of "<<n_selected_hits<<
" RecHits (tracker:"<<n_tracker_valid<<
"/muons:"<<n_muon_selected_hits<<
")";
911 if (global_nshared != 0) {
913 <<
"************************************************************************************************************************"
914 <<
"\n"<<
"TrackingParticle " << tpindex <<
", q = "<<(*trpart).charge()<<
", p = "<<(*trpart).p()
915 <<
", pT = "<<(*trpart).pt()<<
", eta = "<<(*trpart).eta()<<
", phi = "<<(*trpart).phi()
916 <<
"\n"<<
" pdg code = "<<(*trpart).pdgId()
917 <<
", made of "<<(*trpart).numberOfHits()<<
" PSimHits, recounted "<<n_global_simhits<<
" PSimHits"
918 <<
" (tracker:"<<n_tracker_recounted_simhits<<
"/muons:"<<n_muon_simhits<<
")"
919 <<
", from "<<(*trpart).g4Tracks().size()<<
" SimTrack:";
921 g4T!=(*trpart).g4Track_end();
924 <<
" Id:"<<(*g4T).trackId()<<
"/Evt:("<<(*g4T).eventId().event()<<
","<<(*g4T).eventId().bunchCrossing()<<
")";
927 <<
"\t selected "<<n_global_selected_simhits<<
" PSimHits"
928 <<
" (tracker:"<<n_tracker_selected_simhits<<
"/muons:"<<n_muon_selected_simhits<<
")"
929 <<
"\n\t NOT matched to reco::Track "<<tindex<<ZeroHitMuon
930 <<
" with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
931 <<
"\n\t and purity = "<<global_purity<<
" (tracker: "<<tracker_purity<<
" / muon: "<<muon_purity<<
")"
932 <<
"\n\t N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")";
939 if (!any_trackingParticle_matched) {
942 <<
"************************************************************************************************************************"
943 <<
"\n NO TrackingParticle associated to ANY input reco::Track ! \n"
944 <<
"************************************************************************************************************************"<<
"\n";
947 <<
"************************************************************************************************************************"<<
"\n";
951 for (IndexAssociation::iterator it = outputCollection.begin(), ed = outputCollection.end(); it != ed; ++it) {
952 std::sort(it->second.begin(), it->second.end());
954 return outputCollection;
961 int& n_tracker_valid,
int& n_dt_valid,
int& n_csc_valid,
int& n_rpc_valid,
962 int& n_tracker_matched_valid,
int& n_dt_matched_valid,
int& n_csc_matched_valid,
int& n_rpc_matched_valid,
963 int& n_tracker_INVALID,
int& n_dt_INVALID,
int& n_csc_INVALID,
int& n_rpc_INVALID,
964 int& n_tracker_matched_INVALID,
int& n_dt_matched_INVALID,
int& n_csc_matched_INVALID,
int& n_rpc_matched_INVALID,
971 tracker_matchedIds_valid.clear();
972 muon_matchedIds_valid.clear();
974 tracker_matchedIds_INVALID.clear();
975 muon_matchedIds_INVALID.clear();
982 n_tracker_matched_valid = 0;
983 n_dt_matched_valid = 0;
984 n_csc_matched_valid = 0;
985 n_rpc_matched_valid = 0;
987 n_tracker_INVALID = 0;
992 n_tracker_matched_INVALID = 0;
993 n_dt_matched_INVALID = 0;
994 n_csc_matched_INVALID = 0;
995 n_rpc_matched_INVALID = 0;
997 std::vector<SimHitIdpr> SimTrackIds;
1003 stringstream hit_index;
1010 stringstream detector_id;
1013 string hitlog =
"TrackingRecHit "+hit_index.str();
1015 std::vector<string> DTSimHits;
1020 bool valid_Hit = hitp->
isValid();
1024 stringstream detector_id;
1025 detector_id<< tTopo->
print(detid);
1027 if (valid_Hit) hitlog = hitlog+
" -Tracker - detID = "+detector_id.str();
1028 else hitlog = hitlog+
" *** INVALID ***"+
" -Tracker - detID = "+detector_id.str();
1036 if(!SimTrackIds.empty()) {
1037 n_tracker_matched_valid++;
1042 n_tracker_INVALID++;
1044 if(!SimTrackIds.empty()) {
1045 n_tracker_matched_INVALID++;
1057 stringstream dt_detector_id;
1058 dt_detector_id << dtdetid;
1059 if (valid_Hit) hitlog = hitlog+
" -Muon DT - detID = "+dt_detector_id.str();
1060 else hitlog = hitlog+
" *** INVALID ***"+
" -Muon DT - detID = "+dt_detector_id.str();
1072 if (!SimTrackIds.empty()) {
1073 n_dt_matched_valid++;
1080 if (!SimTrackIds.empty()) {
1081 n_dt_matched_INVALID++;
1091 std::vector<PSimHit> dtSimHits = dttruth.
associateHit(*hitp);
1093 stringstream ndthits;
1094 ndthits<<dtSimHits.size();
1095 wireidlog =
"\t DTWireId :"+wid.str()+
", "+ndthits.str()+
" associated PSimHit :";
1097 for (
unsigned int j=0;
j<dtSimHits.size();
j++) {
1100 stringstream simhit;
1101 simhit<<dtSimHits[
j];
1102 string simhitlog =
"\t\t PSimHit "+index.str()+
": "+simhit.str();
1103 DTSimHits.push_back(simhitlog);
1114 std::vector<const TrackingRecHit *> componentHits, phiHits, zHits;
1115 if (dtsegment->
hasPhi()) {
1117 componentHits.insert(componentHits.end(),phiHits.begin(),phiHits.end());
1119 if (dtsegment->
hasZed()) {
1121 componentHits.insert(componentHits.end(),zHits.begin(),zHits.end());
1124 <<
"\n\t this TrackingRecHit is a DTRecSegment4D with "
1125 <<componentHits.size()<<
" hits (phi:"<<phiHits.size()<<
", z:"<<zHits.size()<<
")";
1127 std::vector<SimHitIdpr> i_SimTrackIds;
1129 for (std::vector<const TrackingRecHit *>::const_iterator ithit =componentHits.begin();
1130 ithit != componentHits.end(); ++ithit) {
1135 i_SimTrackIds.clear();
1144 if (!i_SimTrackIds.empty()) {
1145 n_dt_matched_valid++;
1152 if (!i_SimTrackIds.empty()) {
1153 n_dt_matched_INVALID++;
1160 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, null dynamic_cast of a DT TrackingRecHit !";
1162 unsigned int i_detid = (*ithit)->geographicalId().rawId();
1165 stringstream i_dt_detector_id;
1166 i_dt_detector_id << i_dtdetid;
1169 i_ss<<
"\t\t hit "<<i_compHit<<
" -Muon DT - detID = "<<i_dt_detector_id.str();
1171 string i_hitlog = i_ss.str();
1172 i_hitlog = i_hitlog + write_matched_simtracks(i_SimTrackIds);
1175 SimTrackIds.insert(SimTrackIds.end(),i_SimTrackIds.begin(),i_SimTrackIds.end());
1180 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, DT TrackingRecHit is neither DTRecHit1D nor DTRecSegment4D ! ";
1187 stringstream csc_detector_id;
1188 csc_detector_id << cscdetid;
1189 if (valid_Hit) hitlog = hitlog+
" -Muon CSC- detID = "+csc_detector_id.str();
1190 else hitlog = hitlog+
" *** INVALID ***"+
" -Muon CSC- detID = "+csc_detector_id.str();
1202 if (!SimTrackIds.empty()) {
1203 n_csc_matched_valid++;
1210 if (!SimTrackIds.empty()) {
1211 n_csc_matched_INVALID++;
1224 std::vector<const TrackingRecHit *> componentHits = cscsegment->
recHits();
1226 <<
"\n\t this TrackingRecHit is a CSCSegment with "<<componentHits.size()<<
" hits";
1228 std::vector<SimHitIdpr> i_SimTrackIds;
1230 for (std::vector<const TrackingRecHit *>::const_iterator ithit =componentHits.begin();
1231 ithit != componentHits.end(); ++ithit) {
1236 i_SimTrackIds.clear();
1245 if (!i_SimTrackIds.empty()) {
1246 n_csc_matched_valid++;
1253 if (!i_SimTrackIds.empty()) {
1254 n_csc_matched_INVALID++;
1260 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, null dynamic_cast of a CSC TrackingRecHit !";
1262 unsigned int i_detid = (*ithit)->geographicalId().rawId();
1265 stringstream i_csc_detector_id;
1266 i_csc_detector_id << i_cscdetid;
1269 i_ss<<
"\t\t hit "<<i_compHit<<
" -Muon CSC- detID = "<<i_csc_detector_id.str();
1271 string i_hitlog = i_ss.str();
1272 i_hitlog = i_hitlog + write_matched_simtracks(i_SimTrackIds);
1275 SimTrackIds.insert(SimTrackIds.end(),i_SimTrackIds.begin(),i_SimTrackIds.end());
1280 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, CSC TrackingRecHit is neither CSCRecHit2D nor CSCSegment ! ";
1287 stringstream rpc_detector_id;
1288 rpc_detector_id << rpcdetid;
1289 if (valid_Hit) hitlog = hitlog+
" -Muon RPC- detID = "+rpc_detector_id.str();
1290 else hitlog = hitlog+
" *** INVALID ***"+
" -Muon RPC- detID = "+rpc_detector_id.str();
1298 if (!SimTrackIds.empty()) {
1299 n_rpc_matched_valid++;
1307 if (!SimTrackIds.empty()) {
1308 n_rpc_matched_INVALID++;
1315 <<
"TrackingRecHit "<<iloop<<
" *** WARNING *** Unexpected Hit from Detector = "<<det;
1319 hitlog = hitlog + write_matched_simtracks(SimTrackIds);
1324 for (
unsigned int j=0;
j<DTSimHits.size();
j++) {
1337 for (MapOfMatchedIds::const_iterator iRecH=matchedIds.begin(); iRecH!=matchedIds.end(); ++iRecH) {
1340 std::vector<SimHitIdpr>
const & SimTrackIds = (*iRecH).second;
1344 for (std::vector<SimHitIdpr>::const_iterator iSimH=SimTrackIds.begin(); iSimH!=SimTrackIds.end(); ++iSimH) {
1345 uint32_t simtrackId = iSimH->first;
1350 if (simtrack->trackId() == simtrackId && simtrack->eventId() == evtId) {
1367 if (SimTrackIds.empty())
1368 return " *** UNMATCHED ***";
1370 string hitlog(
" matched to SimTrack");
1372 for(
size_t j=0;
j<SimTrackIds.size();
j++)
1375 snprintf(buf, 64,
" Id:%i/Evt:(%i,%i) ", SimTrackIds[
j].
first, SimTrackIds[
j].
second.event(), SimTrackIds[
j].second.bunchCrossing());
1387 for (
unsigned int j=0;
j<tPCH->size();
j++)
1391 for (
size_t i = 0;
i < tCH->size(); ++
i)
1394 associateMuons(recToSim, simToRec, muonBaseRefVector,type,tpc,event,setup);
1405 switch (trackType) {
1410 muonHitRefs.push_back(std::make_pair(mur->
track()->recHitsBegin(), mur->
track()->recHitsEnd()));
1412 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
1420 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
1422 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
1430 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
1432 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
1438 hitExtractor.
init(*event, *setup);
1440 std::vector<std::pair<size_t, size_t> > muonHitIndices;
1443 std::pair<size_t, size_t> indices(allTMRecHits.
size(), allTMRecHits.
size());
1445 std::vector<const TrackingRecHit *> hits = hitExtractor.
getMuonHits(*mur);
1446 for (std::vector<const TrackingRecHit *>::const_iterator ith = hits.begin(), edh = hits.end(); ith != edh; ++ith) {
1449 indices.second += hits.size();
1451 muonHitIndices.push_back(indices);
1454 typedef std::pair<size_t, size_t> index_pair;
1456 for (std::vector<std::pair<size_t, size_t> >::const_iterator idxs = muonHitIndices.begin(), idxend = muonHitIndices.end(); idxs != idxend; ++idxs) {
1457 muonHitRefs.push_back(std::make_pair(hitRefBegin+idxs->first,
1458 hitRefBegin+idxs->second));
1467 for (MuonAssociatorByHits::IndexAssociation::const_iterator it = recSimColl.begin(), ed = recSimColl.end(); it != ed; ++it) {
1469 const std::vector<MuonAssociatorByHits::IndexMatch> & idxAss = it->second;
1470 std::vector<std::pair<TrackingParticleRef, double> > & tpAss = recToSim[rec];
1471 for (std::vector<MuonAssociatorByHits::IndexMatch>::const_iterator ita = idxAss.begin(), eda = idxAss.end(); ita != eda; ++ita) {
1472 tpAss.
push_back(std::make_pair(tPC[ita->idx], ita->quality));
1476 for (MuonAssociatorByHits::IndexAssociation::const_iterator it = simRecColl.begin(), ed = simRecColl.end(); it != ed; ++it) {
1478 const std::vector<MuonAssociatorByHits::IndexMatch> & idxAss = it->second;
1479 std::vector<std::pair<edm::RefToBase<reco::Muon>,
double> > & recAss = simToRec[sim];
1480 for (std::vector<MuonAssociatorByHits::IndexMatch>::const_iterator ita = idxAss.begin(), eda = idxAss.end(); ita != eda; ++ita) {
1481 recAss.
push_back(std::make_pair(muons[ita->idx], ita->quality));
std::pair< unsigned int, std::vector< SimHitIdpr > > uint_SimHitIdpr_pair
reco::RecoToSimCollection associateRecoToSim(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const
Association Reco To Sim with Collections.
MuonAssociatorByHits(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
bool isNonnull() const
Checks for non-null.
edm::EDGetTokenT< CrossingFrame< SimVertex > > simvertsXFToken_
std::vector< TrackingParticle > TrackingParticleCollection
C const * product() const
Accessor for product collection.
std::string dump(unsigned int indent=0) const
edm::InputTag simtracksXFTag
void associateMuons(MuonToSimCollection &recoToSim, SimToMuonCollection &simToReco, const edm::RefToBaseVector< reco::Muon > &, MuonTrackType, const edm::RefVector< TrackingParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const
bool isTrackerMuon() const
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
std::vector< PSimHit > associateHit(const TrackingRecHit &hit)
const_iterator end() const
edm::EDGetTokenT< edm::SimVertexContainer > simvertsToken_
virtual TrackRef track() const
reference to a Track
boost::ptr_vector< uint_SimHitIdpr_pair > MapOfMatchedIds
const edm::ParameterSet & conf_
edm::InputTag simtracksTag
std::string print(DetId detid) const
const bool AbsoluteNumberOfHits_muon
const bool includeZeroHitMuons
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
std::map< TrackingParticleRef, std::vector< std::pair< edm::RefToBase< reco::Muon >, double > > > SimToMuonCollection
int getShared(MapOfMatchedIds &matchedIds, TrackingParticleCollection::const_iterator trpart) const
void getMatchedIds(MapOfMatchedIds &tracker_matchedIds_valid, MapOfMatchedIds &muon_matchedIds_valid, MapOfMatchedIds &tracker_matchedIds_INVALID, MapOfMatchedIds &muon_matchedIds_INVALID, int &n_tracker_valid, int &n_dt_valid, int &n_csc_valid, int &n_rpc_valid, int &n_tracker_matched_valid, int &n_dt_matched_valid, int &n_csc_matched_valid, int &n_rpc_matched_valid, int &n_tracker_INVALID, int &n_dt_INVALID, int &n_csc_INVALID, int &n_rpc_INVALID, int &n_tracker_matched_INVALID, int &n_dt_matched_INVALID, int &n_csc_matched_INVALID, int &n_rpc_matched_INVALID, trackingRecHit_iterator begin, trackingRecHit_iterator end, TrackerHitAssociator *trackertruth, DTHitAssociator &dttruth, MuonTruth &csctruth, RPCHitAssociator &rpctruth, bool printRts, const TrackerTopology *) const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
void post_insert()
post insert action
std::vector< SimHitIdpr > associateCSCHitId(const CSCRecHit2D *)
unsigned int NHitCut_muon
bool hasPhi() const
Does it have the Phi projection?
const bool acceptOneStubMatchings
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::string write_matched_simtracks(const std::vector< SimHitIdpr > &) const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
const bool AbsoluteNumberOfHits_track
const bool ThreeHitTracksAreSpecial
std::vector< std::pair< trackingRecHit_iterator, trackingRecHit_iterator > > TrackHitsCollection
std::vector< SimTrack >::const_iterator g4t_iterator
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
T const * product() const
void insert(const key_type &k, const data_type &v)
insert an association
std::vector< SimVertex > SimVertexContainer
T const * product() const
IndexAssociation associateRecoToSimIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const
const_iterator begin() const
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
std::vector< SimHitIdpr > associateDTHitId(const DTRecHit1D *dtrechit)
base const & data() const
reco::SimToRecoCollection associateSimToReco(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const
Association Sim To Reco with Collections.
unsigned int NHitCut_track
void push_back(const RefToBase< T > &)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
edm::EDGetTokenT< edm::SimTrackContainer > simtracksToken_
DetId geographicalId() const
IndexAssociation associateSimToRecoIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const
Detector det() const
get the detector field from this detid
double EfficiencyCut_track
std::vector< SimTrack > SimTrackContainer
std::map< edm::RefToBase< reco::Muon >, std::vector< std::pair< TrackingParticleRef, double > >, RefToBaseSort > MuonToSimCollection
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
double EfficiencyCut_muon
edm::EDGetTokenT< CrossingFrame< SimTrack > > simtracksXFToken_
std::vector< SimHitIdpr > associateRecHit(const TrackingRecHit &hit)
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
std::map< size_t, std::vector< IndexMatch > > IndexAssociation
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
DTWireId wireId() const
Return the wireId.
const bool dumpInputCollections