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;
81 includeZeroHitMuons(conf.getParameter<bool>(
"includeZeroHitMuons")),
82 acceptOneStubMatchings(conf.getParameter<bool>(
"acceptOneStubMatchings")),
83 UseTracker(conf.getParameter<bool>(
"UseTracker")),
84 UseMuon(conf.getParameter<bool>(
"UseMuon")),
85 AbsoluteNumberOfHits_track(conf.getParameter<bool>(
"AbsoluteNumberOfHits_track")),
86 NHitCut_track(conf.getParameter<unsigned int>(
"NHitCut_track")),
87 EfficiencyCut_track(conf.getParameter<double>(
"EfficiencyCut_track")),
88 PurityCut_track(conf.getParameter<double>(
"PurityCut_track")),
89 AbsoluteNumberOfHits_muon(conf.getParameter<bool>(
"AbsoluteNumberOfHits_muon")),
90 NHitCut_muon(conf.getParameter<unsigned int>(
"NHitCut_muon")),
91 EfficiencyCut_muon(conf.getParameter<double>(
"EfficiencyCut_muon")),
92 PurityCut_muon(conf.getParameter<double>(
"PurityCut_muon")),
93 UsePixels(conf.getParameter<bool>(
"UsePixels")),
94 UseGrouped(conf.getParameter<bool>(
"UseGrouped")),
95 UseSplitting(conf.getParameter<bool>(
"UseSplitting")),
96 ThreeHitTracksAreSpecial(conf.getParameter<bool>(
"ThreeHitTracksAreSpecial")),
97 dumpDT(conf.getParameter<bool>(
"dumpDT")),
98 dumpInputCollections(conf.getParameter<bool>(
"dumpInputCollections")),
99 crossingframe(conf.getParameter<bool>(
"crossingframe")),
100 simtracksTag(conf.getParameter<edm::InputTag>(
"simtracksTag")),
101 simtracksXFTag(conf.getParameter<edm::InputTag>(
"simtracksXFTag")),
107 if (
UseTracker)
edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n UseTracker = TRUE : Tracker SimHits and RecHits WILL be counted";
108 else edm::LogVerbatim(
"MuonAssociatorByHits") <<
"\n UseTracker = FALSE : Tracker SimHits and RecHits WILL NOT be counted";
111 if (
UseMuon)
edm::LogVerbatim(
"MuonAssociatorByHits")<<
" UseMuon = TRUE : Muon SimHits and RecHits WILL be counted";
112 else edm::LogVerbatim(
"MuonAssociatorByHits") <<
" UseMuon = FALSE : Muon SimHits and RecHits WILL NOT be counted"<<endl;
117 <<
"\n includeZeroHitMuons = TRUE"
118 <<
"\n ==> (re)set NHitCut_muon = 0, PurityCut_muon = 0, EfficiencyCut_muon = 0"<<endl;
140 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
144 for (IndexAssociation::const_iterator it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
145 for (std::vector<IndexMatch>::const_iterator itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
151 return outputCollection;
164 int tracker_nshared = 0;
165 int muon_nshared = 0;
166 int global_nshared = 0;
168 double tracker_quality = 0;
169 double tracker_quality_cut;
173 double muon_quality = 0;
174 double muon_quality_cut;
178 double global_quality = 0;
197 if (TPCollectionH.
size()!=0) tPC = *(TPCollectionH.
product());
201 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"reco::Track collection --- size = "<<tC.size();
205 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"TrackingParticle collection --- size = "<<tPC.size();
207 for(TrackingParticleCollection::const_iterator ITER=tPC.begin(); ITER!=tPC.end(); ITER++, j++) {
209 <<
"TrackingParticle "<<j<<
", q = "<<ITER->charge()<<
", p = "<<ITER->p()
210 <<
", pT = "<<ITER->pt()<<
", eta = "<<ITER->eta()<<
", phi = "<<ITER->phi();
213 <<
"\t pdg code = "<<ITER->pdgId()<<
", made of "<<ITER->numberOfHits()<<
" PSimHit"
214 <<
" (in "<<ITER->numberOfTrackerLayers()<<
" layers)"
215 <<
" from "<<ITER->g4Tracks().size()<<
" SimTrack:";
218 <<
"\t\t Id:"<<g4T->trackId()<<
"/Evt:("<<g4T->eventId().event()<<
","<<g4T->eventId().bunchCrossing()<<
")";
234 <<
" has size = "<<SimTk->size();
239 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
240 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
241 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
242 <<
"\n * "<<*ITER <<endl;
247 <<
" has size = "<<SimVtx->size();
252 <<
" : "<< *VITER <<endl;
259 <<
" has size = "<<simTC.size()<<endl;
261 for(edm::SimTrackContainer::const_iterator ITER=simTC.begin(); ITER!=simTC.end(); ITER++, k++){
264 <<
" - Id:"<<ITER->trackId()<<
"/Evt:("<<ITER->eventId().event()<<
","<<ITER->eventId().bunchCrossing()<<
")"
265 <<
" pdgId = "<<ITER->type()<<
", q = "<<ITER->charge()<<
", p = "<<ITER->momentum().P()
266 <<
", pT = "<<ITER->momentum().Pt()<<
", eta = "<<ITER->momentum().Eta()<<
", phi = "<<ITER->momentum().Phi()
267 <<
"\n * "<<*ITER <<endl;
271 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"\n"<<
"SimVertex collection with InputTag = "<<
"g4SimHits"
272 <<
" has size = "<<simVC.size()<<endl;
274 for (edm::SimVertexContainer::const_iterator VITER=simVC.begin(); VITER!=simVC.end(); VITER++, kv++){
277 <<
" : "<< *VITER <<endl;
283 for (TrackHitsCollection::const_iterator track=tC.begin(); track!=tC.end(); track++, tindex++) {
285 <<
"\n"<<
"reco::Track "<<tindex
286 <<
", number of RecHits = "<< (track->second - track->first) <<
"\n";
287 tracker_matchedIds_valid.clear();
288 muon_matchedIds_valid.clear();
290 tracker_matchedIds_INVALID.clear();
291 muon_matchedIds_INVALID.clear();
293 bool this_track_matched =
false;
294 int n_matching_simhits = 0;
298 int n_tracker_all = 0;
304 int n_tracker_valid = 0;
305 int n_muon_valid = 0;
310 int n_tracker_matched_valid = 0;
311 int n_muon_matched_valid = 0;
312 int n_dt_matched_valid = 0;
313 int n_csc_matched_valid = 0;
314 int n_rpc_matched_valid = 0;
317 int n_tracker_INVALID = 0;
318 int n_muon_INVALID = 0;
319 int n_dt_INVALID = 0;
320 int n_csc_INVALID = 0;
321 int n_rpc_INVALID = 0;
323 int n_tracker_matched_INVALID = 0;
324 int n_muon_matched_INVALID = 0;
325 int n_dt_matched_INVALID = 0;
326 int n_csc_matched_INVALID = 0;
327 int n_rpc_matched_INVALID = 0;
330 getMatchedIds(tracker_matchedIds_valid, muon_matchedIds_valid,
331 tracker_matchedIds_INVALID, muon_matchedIds_INVALID,
332 n_tracker_valid, n_dt_valid, n_csc_valid, n_rpc_valid,
333 n_tracker_matched_valid, n_dt_matched_valid, n_csc_matched_valid, n_rpc_matched_valid,
334 n_tracker_INVALID, n_dt_INVALID, n_csc_INVALID, n_rpc_INVALID,
335 n_tracker_matched_INVALID, n_dt_matched_INVALID, n_csc_matched_INVALID, n_rpc_matched_INVALID,
336 track->first, track->second,
337 trackertruth, dttruth, csctruth, rpctruth,
340 n_matching_simhits = tracker_matchedIds_valid.size() + muon_matchedIds_valid.size() +
341 tracker_matchedIds_INVALID.size() +muon_matchedIds_INVALID.size();
343 n_muon_valid = n_dt_valid + n_csc_valid + n_rpc_valid;
344 n_valid = n_tracker_valid + n_muon_valid;
345 n_muon_INVALID = n_dt_INVALID + n_csc_INVALID + n_rpc_INVALID;
346 n_INVALID = n_tracker_INVALID + n_muon_INVALID;
349 n_tracker_all = n_tracker_valid + n_tracker_INVALID;
350 n_dt_all = n_dt_valid + n_dt_INVALID;
351 n_csc_all = n_csc_valid + n_csc_INVALID;
352 n_rpc_all = n_rpc_valid + n_rpc_INVALID;
353 n_all = n_valid + n_INVALID;
355 n_muon_matched_valid = n_dt_matched_valid + n_csc_matched_valid + n_rpc_matched_valid;
356 n_muon_matched_INVALID = n_dt_matched_INVALID + n_csc_matched_INVALID + n_rpc_matched_INVALID;
359 int n_tracker_selected_hits = n_tracker_valid;
360 int n_muon_selected_hits = n_muon_valid;
361 int n_dt_selected_hits = n_dt_valid;
362 int n_csc_selected_hits = n_csc_valid;
363 int n_rpc_selected_hits = n_rpc_valid;
366 int n_tracker_matched = n_tracker_matched_valid;
367 int n_muon_matched = n_muon_matched_valid;
368 int n_dt_matched = n_dt_matched_valid;
369 int n_csc_matched = n_csc_matched_valid;
370 int n_rpc_matched = n_rpc_matched_valid;
377 InvMuonHits =
" ***INVALID MUON HITS***";
378 ZeroHitMuon =
" ***ZERO-HIT MUON***";
380 n_muon_selected_hits = n_muon_INVALID;
381 n_dt_selected_hits = n_dt_INVALID;
382 n_csc_selected_hits = n_csc_INVALID;
383 n_rpc_selected_hits = n_rpc_INVALID;
385 n_muon_matched = n_muon_matched_INVALID;
386 n_dt_matched = n_dt_matched_INVALID;
387 n_csc_matched = n_csc_matched_INVALID;
388 n_rpc_matched = n_rpc_matched_INVALID;
391 int n_selected_hits = n_tracker_selected_hits + n_muon_selected_hits;
392 int n_matched = n_tracker_matched + n_muon_matched;
395 <<
"\n"<<
"# TrackingRecHits: "<<(track->second - track->first)
396 <<
"\n"<<
"# used RecHits = " << n_all <<
" ("<<n_tracker_all<<
"/"
397 <<n_dt_all<<
"/"<<n_csc_all<<
"/"<<n_rpc_all<<
" in Tracker/DT/CSC/RPC)"<<
", obtained from " << n_matching_simhits <<
" SimHits"
398 <<
"\n"<<
"# selected RecHits = " <<n_selected_hits <<
" (" <<n_tracker_selected_hits<<
"/"
399 <<n_dt_selected_hits<<
"/"<<n_csc_selected_hits<<
"/"<<n_rpc_selected_hits<<
" in Tracker/DT/CSC/RPC)"<<InvMuonHits
400 <<
"\n"<<
"# matched RecHits = " <<n_matched<<
" ("<<n_tracker_matched<<
"/"
401 <<n_dt_matched<<
"/"<<n_csc_matched<<
"/"<<n_rpc_matched<<
" in Tracker/DT/CSC/RPC)";
403 if (n_all>0 && n_matching_simhits == 0)
405 <<
"*** WARNING in MuonAssociatorByHits::associateRecoToSim: no matching PSimHit found for this reco::Track !";
407 if (n_matching_simhits != 0) {
409 <<
"\n"<<
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
410 <<
"\n"<<
"reco::Track "<<tindex<<ZeroHitMuon
411 <<
"\n\t"<<
"made of "<<n_selected_hits<<
" selected RecHits (tracker:"<<n_tracker_selected_hits<<
"/muons:"<<n_muon_selected_hits<<
")";
414 for (TrackingParticleCollection::const_iterator trpart = tPC.begin(); trpart != tPC.end(); ++trpart, ++tpindex) {
415 tracker_nshared =
getShared(tracker_matchedIds_valid, trpart);
416 muon_nshared =
getShared(muon_matchedIds_valid, trpart);
419 muon_nshared =
getShared(muon_matchedIds_INVALID, trpart);
421 global_nshared = tracker_nshared + muon_nshared;
424 else if(n_tracker_selected_hits != 0) tracker_quality = (
static_cast<double>(tracker_nshared)/static_cast<double>(n_tracker_selected_hits));
425 else tracker_quality = 0;
428 else if(n_muon_selected_hits != 0) muon_quality = (
static_cast<double>(muon_nshared)/static_cast<double>(n_muon_selected_hits));
429 else muon_quality = 0;
432 if (n_selected_hits != 0) {
434 global_quality = global_nshared;
436 global_quality = (
static_cast<double>(global_nshared)/static_cast<double>(n_selected_hits));
437 }
else global_quality = 0;
439 bool trackerOk =
false;
440 if (n_tracker_selected_hits != 0) {
441 if (tracker_quality > tracker_quality_cut) trackerOk =
true;
447 if (n_muon_selected_hits != 0) {
448 if (muon_quality > muon_quality_cut) muonOk =
true;
452 bool matchOk = trackerOk || muonOk;
456 matchOk = trackerOk && muonOk;
460 outputCollection[tindex].push_back(
IndexMatch(tpindex, global_quality));
461 this_track_matched =
true;
464 <<
"\n\t"<<
" **MATCHED** with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
465 <<
"\n\t"<<
" N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")"
466 <<
"\n"<<
" to: TrackingParticle " <<tpindex<<
", q = "<<(*trpart).charge()<<
", p = "<<(*trpart).p()
467 <<
", pT = "<<(*trpart).pt()<<
", eta = "<<(*trpart).eta()<<
", phi = "<<(*trpart).phi()
468 <<
"\n\t"<<
" pdg code = "<<(*trpart).pdgId()<<
", made of "<<(*trpart).numberOfHits()<<
" PSimHits"
469 <<
" from "<<(*trpart).g4Tracks().size()<<
" SimTrack:";
471 g4T!=(*trpart).g4Track_end();
474 <<
"\t"<<
" Id:"<<(*g4T).trackId()<<
"/Evt:("<<(*g4T).eventId().event()<<
","<<(*g4T).eventId().bunchCrossing()<<
")";
479 if (global_nshared != 0)
481 <<
"\n\t"<<
" NOT matched to TrackingParticle "<<tpindex
482 <<
" with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
483 <<
"\n"<<
" N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")";
488 if (!this_track_matched) {
490 <<
"\n"<<
" NOT matched to any TrackingParticle";
494 <<
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"<<
"\n";
501 edm::LogVerbatim(
"MuonAssociatorByHits")<<
"0 reconstructed tracks (-->> 0 associated !)";
504 for (IndexAssociation::iterator it = outputCollection.begin(), ed = outputCollection.end(); it != ed; ++it) {
505 std::sort(it->second.begin(), it->second.end());
507 return outputCollection;
519 tH.push_back(std::make_pair((*it)->recHitsBegin(), (*it)->recHitsEnd()));
523 for (IndexAssociation::const_iterator it = bareAssoc.begin(), ed = bareAssoc.end(); it != ed; ++it) {
524 for (std::vector<IndexMatch>::const_iterator itma = it->second.begin(), edma = it->second.end(); itma != edma; ++itma) {
526 std::make_pair(tC[itma->idx], itma->quality));
531 return outputCollection;
545 int tracker_nshared = 0;
546 int muon_nshared = 0;
547 int global_nshared = 0;
549 double tracker_quality = 0;
550 double tracker_quality_cut;
554 double muon_quality = 0;
555 double muon_quality_cut;
559 double global_quality = 0;
561 double tracker_purity = 0;
562 double muon_purity = 0;
563 double global_purity = 0;
583 if (TPCollectionH.
size()!=0) tPC = *(TPCollectionH.
product());
585 bool any_trackingParticle_matched =
false;
588 for (TrackHitsCollection::const_iterator track=tC.begin(); track!=tC.end(); track++, tindex++) {
590 <<
"\n"<<
"reco::Track "<<tindex
591 <<
", number of RecHits = "<< (track->second - track->first) <<
"\n";
593 tracker_matchedIds_valid.clear();
594 muon_matchedIds_valid.clear();
596 tracker_matchedIds_INVALID.clear();
597 muon_matchedIds_INVALID.clear();
599 int n_matching_simhits = 0;
603 int n_tracker_all = 0;
609 int n_tracker_valid = 0;
610 int n_muon_valid = 0;
615 int n_tracker_matched_valid = 0;
616 int n_muon_matched_valid = 0;
617 int n_dt_matched_valid = 0;
618 int n_csc_matched_valid = 0;
619 int n_rpc_matched_valid = 0;
622 int n_tracker_INVALID = 0;
623 int n_muon_INVALID = 0;
624 int n_dt_INVALID = 0;
625 int n_csc_INVALID = 0;
626 int n_rpc_INVALID = 0;
628 int n_tracker_matched_INVALID = 0;
629 int n_muon_matched_INVALID = 0;
630 int n_dt_matched_INVALID = 0;
631 int n_csc_matched_INVALID = 0;
632 int n_rpc_matched_INVALID = 0;
635 getMatchedIds(tracker_matchedIds_valid, muon_matchedIds_valid,
636 tracker_matchedIds_INVALID, muon_matchedIds_INVALID,
637 n_tracker_valid, n_dt_valid, n_csc_valid, n_rpc_valid,
638 n_tracker_matched_valid, n_dt_matched_valid, n_csc_matched_valid, n_rpc_matched_valid,
639 n_tracker_INVALID, n_dt_INVALID, n_csc_INVALID, n_rpc_INVALID,
640 n_tracker_matched_INVALID, n_dt_matched_INVALID, n_csc_matched_INVALID, n_rpc_matched_INVALID,
641 track->first, track->second,
642 trackertruth, dttruth, csctruth, rpctruth,
645 n_matching_simhits = tracker_matchedIds_valid.size() + muon_matchedIds_valid.size() +
646 tracker_matchedIds_INVALID.size() +muon_matchedIds_INVALID.size();
648 n_muon_valid = n_dt_valid + n_csc_valid + n_rpc_valid;
649 n_valid = n_tracker_valid + n_muon_valid;
650 n_muon_INVALID = n_dt_INVALID + n_csc_INVALID + n_rpc_INVALID;
651 n_INVALID = n_tracker_INVALID + n_muon_INVALID;
654 n_tracker_all = n_tracker_valid + n_tracker_INVALID;
655 n_dt_all = n_dt_valid + n_dt_INVALID;
656 n_csc_all = n_csc_valid + n_csc_INVALID;
657 n_rpc_all = n_rpc_valid + n_rpc_INVALID;
658 n_all = n_valid + n_INVALID;
660 n_muon_matched_valid = n_dt_matched_valid + n_csc_matched_valid + n_rpc_matched_valid;
661 n_muon_matched_INVALID = n_dt_matched_INVALID + n_csc_matched_INVALID + n_rpc_matched_INVALID;
664 int n_tracker_selected_hits = n_tracker_valid;
665 int n_muon_selected_hits = n_muon_valid;
666 int n_dt_selected_hits = n_dt_valid;
667 int n_csc_selected_hits = n_csc_valid;
668 int n_rpc_selected_hits = n_rpc_valid;
671 int n_tracker_matched = n_tracker_matched_valid;
672 int n_muon_matched = n_muon_matched_valid;
673 int n_dt_matched = n_dt_matched_valid;
674 int n_csc_matched = n_csc_matched_valid;
675 int n_rpc_matched = n_rpc_matched_valid;
682 InvMuonHits =
" ***INVALID MUON HITS***";
683 ZeroHitMuon =
" ***ZERO-HIT MUON***";
685 n_muon_selected_hits = n_muon_INVALID;
686 n_dt_selected_hits = n_dt_INVALID;
687 n_csc_selected_hits = n_csc_INVALID;
688 n_rpc_selected_hits = n_rpc_INVALID;
690 n_muon_matched = n_muon_matched_INVALID;
691 n_dt_matched = n_dt_matched_INVALID;
692 n_csc_matched = n_csc_matched_INVALID;
693 n_rpc_matched = n_rpc_matched_INVALID;
696 int n_selected_hits = n_tracker_selected_hits + n_muon_selected_hits;
697 int n_matched = n_tracker_matched + n_muon_matched;
700 <<
"\n"<<
"# TrackingRecHits: "<<(track->second - track->first)
701 <<
"\n"<<
"# used RecHits = " <<n_all <<
" ("<<n_tracker_all<<
"/"
702 <<n_dt_all<<
"/"<<n_csc_all<<
"/"<<n_rpc_all<<
" in Tracker/DT/CSC/RPC)"<<
", obtained from " << n_matching_simhits <<
" SimHits"
703 <<
"\n"<<
"# selected RecHits = " <<n_selected_hits <<
" (" <<n_tracker_selected_hits<<
"/"
704 <<n_dt_selected_hits<<
"/"<<n_csc_selected_hits<<
"/"<<n_rpc_selected_hits<<
" in Tracker/DT/CSC/RPC)"<<InvMuonHits
705 <<
"\n"<<
"# matched RecHits = " <<n_matched<<
" ("<<n_tracker_matched<<
"/"
706 <<n_dt_matched<<
"/"<<n_csc_matched<<
"/"<<n_rpc_matched<<
" in Tracker/DT/CSC/RPC)";
708 if (printRtS && n_all>0 && n_matching_simhits==0)
710 <<
"*** WARNING in MuonAssociatorByHits::associateSimToReco: no matching PSimHit found for this reco::Track !";
712 if (n_matching_simhits != 0) {
714 for (TrackingParticleCollection::const_iterator trpart = tPC.begin(); trpart != tPC.end(); ++trpart, ++tpindex) {
717 int n_tracker_recounted_simhits = 0;
718 int n_muon_simhits = 0;
719 int n_global_simhits = 0;
722 int n_tracker_selected_simhits = 0;
723 int n_muon_selected_simhits = 0;
724 int n_global_selected_simhits = 0;
727 tracker_nshared =
getShared(tracker_matchedIds_valid, trpart);
728 muon_nshared =
getShared(muon_matchedIds_valid, trpart);
731 muon_nshared =
getShared(muon_matchedIds_INVALID, trpart);
733 global_nshared = tracker_nshared + muon_nshared;
734 if (global_nshared == 0)
continue;
800 n_tracker_recounted_simhits = trpart->numberOfTrackerHits();
802 n_muon_simhits = trpart->numberOfHits() - trpart->numberOfTrackerHits();
805 if (trpart->numberOfHits()==0) {
807 n_tracker_recounted_simhits = tracker_nshared;
808 n_muon_simhits = muon_nshared;
810 n_global_simhits = n_tracker_recounted_simhits + n_muon_simhits;
813 n_muon_selected_simhits = n_muon_simhits;
814 n_global_selected_simhits = n_muon_selected_simhits;
817 n_tracker_selected_simhits = n_tracker_recounted_simhits;
818 n_global_selected_simhits += n_tracker_selected_simhits;
822 else if (n_tracker_selected_simhits!=0)
823 tracker_quality =
static_cast<double>(tracker_nshared)/static_cast<double>(n_tracker_selected_simhits);
824 else tracker_quality = 0;
827 else if (n_muon_selected_simhits!=0)
828 muon_quality =
static_cast<double>(muon_nshared)/static_cast<double>(n_muon_selected_simhits);
829 else muon_quality = 0;
832 if (n_global_selected_simhits != 0) {
834 global_quality = global_nshared;
836 global_quality =
static_cast<double>(global_nshared)/static_cast<double>(n_global_selected_simhits);
838 else global_quality = 0;
841 if (n_selected_hits != 0) {
843 global_purity = global_nshared;
845 global_purity =
static_cast<double>(global_nshared)/static_cast<double>(n_selected_hits);
847 else global_purity = 0;
849 bool trackerOk =
false;
850 if (n_tracker_selected_hits != 0) {
851 if (tracker_quality > tracker_quality_cut) trackerOk =
true;
853 tracker_purity =
static_cast<double>(tracker_nshared)/static_cast<double>(n_tracker_selected_hits);
863 if (n_muon_selected_hits != 0) {
864 if (muon_quality > muon_quality_cut) muonOk =
true;
866 muon_purity =
static_cast<double>(muon_nshared)/static_cast<double>(n_muon_selected_hits);
873 bool matchOk = trackerOk || muonOk;
877 matchOk = trackerOk && muonOk;
881 outputCollection[tpindex].push_back(
IndexMatch(tindex,global_quality));
882 any_trackingParticle_matched =
true;
885 <<
"************************************************************************************************************************"
886 <<
"\n"<<
"TrackingParticle " << tpindex <<
", q = "<<(*trpart).charge()<<
", p = "<<(*trpart).p()
887 <<
", pT = "<<(*trpart).pt()<<
", eta = "<<(*trpart).eta()<<
", phi = "<<(*trpart).phi()
888 <<
"\n"<<
" pdg code = "<<(*trpart).pdgId()
889 <<
", made of "<<(*trpart).numberOfHits()<<
" PSimHits, recounted "<<n_global_simhits<<
" PSimHits"
890 <<
" (tracker:"<<n_tracker_recounted_simhits<<
"/muons:"<<n_muon_simhits<<
")"
891 <<
", from "<<(*trpart).g4Tracks().size()<<
" SimTrack:";
893 g4T!=(*trpart).g4Track_end();
896 <<
" Id:"<<(*g4T).trackId()<<
"/Evt:("<<(*g4T).eventId().event()<<
","<<(*g4T).eventId().bunchCrossing()<<
")";
899 <<
"\t selected "<<n_global_selected_simhits<<
" PSimHits"
900 <<
" (tracker:"<<n_tracker_selected_simhits<<
"/muons:"<<n_muon_selected_simhits<<
")"
901 <<
"\n\t **MATCHED** with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
902 <<
"\n\t and purity = "<<global_purity<<
" (tracker: "<<tracker_purity<<
" / muon: "<<muon_purity<<
")"
903 <<
"\n\t N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")"
904 <<
"\n" <<
" to: reco::Track "<<tindex<<ZeroHitMuon
905 <<
"\n\t"<<
" made of "<<n_selected_hits<<
" RecHits (tracker:"<<n_tracker_valid<<
"/muons:"<<n_muon_selected_hits<<
")";
909 if (global_nshared != 0) {
911 <<
"************************************************************************************************************************"
912 <<
"\n"<<
"TrackingParticle " << tpindex <<
", q = "<<(*trpart).charge()<<
", p = "<<(*trpart).p()
913 <<
", pT = "<<(*trpart).pt()<<
", eta = "<<(*trpart).eta()<<
", phi = "<<(*trpart).phi()
914 <<
"\n"<<
" pdg code = "<<(*trpart).pdgId()
915 <<
", made of "<<(*trpart).numberOfHits()<<
" PSimHits, recounted "<<n_global_simhits<<
" PSimHits"
916 <<
" (tracker:"<<n_tracker_recounted_simhits<<
"/muons:"<<n_muon_simhits<<
")"
917 <<
", from "<<(*trpart).g4Tracks().size()<<
" SimTrack:";
919 g4T!=(*trpart).g4Track_end();
922 <<
" Id:"<<(*g4T).trackId()<<
"/Evt:("<<(*g4T).eventId().event()<<
","<<(*g4T).eventId().bunchCrossing()<<
")";
925 <<
"\t selected "<<n_global_selected_simhits<<
" PSimHits"
926 <<
" (tracker:"<<n_tracker_selected_simhits<<
"/muons:"<<n_muon_selected_simhits<<
")"
927 <<
"\n\t NOT matched to reco::Track "<<tindex<<ZeroHitMuon
928 <<
" with quality = "<<global_quality<<
" (tracker: "<<tracker_quality<<
" / muon: "<<muon_quality<<
")"
929 <<
"\n\t and purity = "<<global_purity<<
" (tracker: "<<tracker_purity<<
" / muon: "<<muon_purity<<
")"
930 <<
"\n\t N shared hits = "<<global_nshared<<
" (tracker: "<<tracker_nshared<<
" / muon: "<<muon_nshared<<
")";
937 if (!any_trackingParticle_matched) {
940 <<
"************************************************************************************************************************"
941 <<
"\n NO TrackingParticle associated to ANY input reco::Track ! \n"
942 <<
"************************************************************************************************************************"<<
"\n";
945 <<
"************************************************************************************************************************"<<
"\n";
949 for (IndexAssociation::iterator it = outputCollection.begin(), ed = outputCollection.end(); it != ed; ++it) {
950 std::sort(it->second.begin(), it->second.end());
952 return outputCollection;
959 int& n_tracker_valid,
int& n_dt_valid,
int& n_csc_valid,
int& n_rpc_valid,
960 int& n_tracker_matched_valid,
int& n_dt_matched_valid,
int& n_csc_matched_valid,
int& n_rpc_matched_valid,
961 int& n_tracker_INVALID,
int& n_dt_INVALID,
int& n_csc_INVALID,
int& n_rpc_INVALID,
962 int& n_tracker_matched_INVALID,
int& n_dt_matched_INVALID,
int& n_csc_matched_INVALID,
int& n_rpc_matched_INVALID,
969 tracker_matchedIds_valid.clear();
970 muon_matchedIds_valid.clear();
972 tracker_matchedIds_INVALID.clear();
973 muon_matchedIds_INVALID.clear();
980 n_tracker_matched_valid = 0;
981 n_dt_matched_valid = 0;
982 n_csc_matched_valid = 0;
983 n_rpc_matched_valid = 0;
985 n_tracker_INVALID = 0;
990 n_tracker_matched_INVALID = 0;
991 n_dt_matched_INVALID = 0;
992 n_csc_matched_INVALID = 0;
993 n_rpc_matched_INVALID = 0;
995 std::vector<SimHitIdpr> SimTrackIds;
1001 stringstream hit_index;
1008 stringstream detector_id;
1011 string hitlog =
"TrackingRecHit "+hit_index.str();
1013 std::vector<string> DTSimHits;
1018 bool valid_Hit = hitp->
isValid();
1022 stringstream detector_id;
1023 detector_id<< tTopo->
print(detid);
1025 if (valid_Hit) hitlog = hitlog+
" -Tracker - detID = "+detector_id.str();
1026 else hitlog = hitlog+
" *** INVALID ***"+
" -Tracker - detID = "+detector_id.str();
1034 if(!SimTrackIds.empty()) {
1035 n_tracker_matched_valid++;
1040 n_tracker_INVALID++;
1042 if(!SimTrackIds.empty()) {
1043 n_tracker_matched_INVALID++;
1055 stringstream dt_detector_id;
1056 dt_detector_id << dtdetid;
1057 if (valid_Hit) hitlog = hitlog+
" -Muon DT - detID = "+dt_detector_id.str();
1058 else hitlog = hitlog+
" *** INVALID ***"+
" -Muon DT - detID = "+dt_detector_id.str();
1070 if (!SimTrackIds.empty()) {
1071 n_dt_matched_valid++;
1078 if (!SimTrackIds.empty()) {
1079 n_dt_matched_INVALID++;
1089 std::vector<PSimHit> dtSimHits = dttruth.
associateHit(*hitp);
1091 stringstream ndthits;
1092 ndthits<<dtSimHits.size();
1093 wireidlog =
"\t DTWireId :"+wid.str()+
", "+ndthits.str()+
" associated PSimHit :";
1095 for (
unsigned int j=0;
j<dtSimHits.size();
j++) {
1098 stringstream simhit;
1099 simhit<<dtSimHits[
j];
1100 string simhitlog =
"\t\t PSimHit "+index.str()+
": "+simhit.str();
1101 DTSimHits.push_back(simhitlog);
1112 std::vector<const TrackingRecHit *> componentHits, phiHits, zHits;
1113 if (dtsegment->
hasPhi()) {
1115 componentHits.insert(componentHits.end(),phiHits.begin(),phiHits.end());
1117 if (dtsegment->
hasZed()) {
1119 componentHits.insert(componentHits.end(),zHits.begin(),zHits.end());
1122 <<
"\n\t this TrackingRecHit is a DTRecSegment4D with "
1123 <<componentHits.size()<<
" hits (phi:"<<phiHits.size()<<
", z:"<<zHits.size()<<
")";
1125 std::vector<SimHitIdpr> i_SimTrackIds;
1127 for (std::vector<const TrackingRecHit *>::const_iterator ithit =componentHits.begin();
1128 ithit != componentHits.end(); ++ithit) {
1133 i_SimTrackIds.clear();
1142 if (!i_SimTrackIds.empty()) {
1143 n_dt_matched_valid++;
1150 if (!i_SimTrackIds.empty()) {
1151 n_dt_matched_INVALID++;
1158 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, null dynamic_cast of a DT TrackingRecHit !";
1160 unsigned int i_detid = (*ithit)->geographicalId().rawId();
1163 stringstream i_dt_detector_id;
1164 i_dt_detector_id << i_dtdetid;
1167 i_ss<<
"\t\t hit "<<i_compHit<<
" -Muon DT - detID = "<<i_dt_detector_id.str();
1169 string i_hitlog = i_ss.str();
1170 i_hitlog = i_hitlog + write_matched_simtracks(i_SimTrackIds);
1173 SimTrackIds.insert(SimTrackIds.end(),i_SimTrackIds.begin(),i_SimTrackIds.end());
1178 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, DT TrackingRecHit is neither DTRecHit1D nor DTRecSegment4D ! ";
1185 stringstream csc_detector_id;
1186 csc_detector_id << cscdetid;
1187 if (valid_Hit) hitlog = hitlog+
" -Muon CSC- detID = "+csc_detector_id.str();
1188 else hitlog = hitlog+
" *** INVALID ***"+
" -Muon CSC- detID = "+csc_detector_id.str();
1200 if (!SimTrackIds.empty()) {
1201 n_csc_matched_valid++;
1208 if (!SimTrackIds.empty()) {
1209 n_csc_matched_INVALID++;
1222 std::vector<const TrackingRecHit *> componentHits = cscsegment->
recHits();
1224 <<
"\n\t this TrackingRecHit is a CSCSegment with "<<componentHits.size()<<
" hits";
1226 std::vector<SimHitIdpr> i_SimTrackIds;
1228 for (std::vector<const TrackingRecHit *>::const_iterator ithit =componentHits.begin();
1229 ithit != componentHits.end(); ++ithit) {
1234 i_SimTrackIds.clear();
1243 if (!i_SimTrackIds.empty()) {
1244 n_csc_matched_valid++;
1251 if (!i_SimTrackIds.empty()) {
1252 n_csc_matched_INVALID++;
1258 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, null dynamic_cast of a CSC TrackingRecHit !";
1260 unsigned int i_detid = (*ithit)->geographicalId().rawId();
1263 stringstream i_csc_detector_id;
1264 i_csc_detector_id << i_cscdetid;
1267 i_ss<<
"\t\t hit "<<i_compHit<<
" -Muon CSC- detID = "<<i_csc_detector_id.str();
1269 string i_hitlog = i_ss.str();
1270 i_hitlog = i_hitlog + write_matched_simtracks(i_SimTrackIds);
1273 SimTrackIds.insert(SimTrackIds.end(),i_SimTrackIds.begin(),i_SimTrackIds.end());
1278 <<
"*** WARNING in MuonAssociatorByHits::getMatchedIds, CSC TrackingRecHit is neither CSCRecHit2D nor CSCSegment ! ";
1285 stringstream rpc_detector_id;
1286 rpc_detector_id << rpcdetid;
1287 if (valid_Hit) hitlog = hitlog+
" -Muon RPC- detID = "+rpc_detector_id.str();
1288 else hitlog = hitlog+
" *** INVALID ***"+
" -Muon RPC- detID = "+rpc_detector_id.str();
1296 if (!SimTrackIds.empty()) {
1297 n_rpc_matched_valid++;
1305 if (!SimTrackIds.empty()) {
1306 n_rpc_matched_INVALID++;
1313 <<
"TrackingRecHit "<<iloop<<
" *** WARNING *** Unexpected Hit from Detector = "<<det;
1317 hitlog = hitlog + write_matched_simtracks(SimTrackIds);
1322 for (
unsigned int j=0;
j<DTSimHits.size();
j++) {
1335 for (MapOfMatchedIds::const_iterator iRecH=matchedIds.begin(); iRecH!=matchedIds.end(); ++iRecH) {
1338 std::vector<SimHitIdpr>
const & SimTrackIds = (*iRecH).second;
1342 for (std::vector<SimHitIdpr>::const_iterator iSimH=SimTrackIds.begin(); iSimH!=SimTrackIds.end(); ++iSimH) {
1343 uint32_t simtrackId = iSimH->first;
1348 if (simtrack->trackId() == simtrackId && simtrack->eventId() == evtId) {
1365 if (SimTrackIds.empty())
1366 return " *** UNMATCHED ***";
1368 string hitlog(
" matched to SimTrack");
1370 for(
size_t j=0;
j<SimTrackIds.size();
j++)
1373 snprintf(buf, 64,
" Id:%i/Evt:(%i,%i) ", SimTrackIds[
j].
first, SimTrackIds[
j].
second.event(), SimTrackIds[
j].second.bunchCrossing());
1385 for (
unsigned int j=0;
j<tPCH->size();
j++)
1400 switch (trackType) {
1405 muonHitRefs.push_back(std::make_pair(mur->
track()->recHitsBegin(), mur->
track()->recHitsEnd()));
1407 muonHitRefs.push_back(std::make_pair(hitRefVector.
begin(), hitRefVector.
end()));
1415 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
1417 muonHitRefs.push_back(std::make_pair(hitRefVector.
begin(), hitRefVector.
end()));
1425 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
1427 muonHitRefs.push_back(std::make_pair(hitRefVector.
begin(), hitRefVector.
end()));
1433 hitExtractor.
init(*event, *setup);
1435 std::vector<std::pair<size_t, size_t> > muonHitIndices;
1438 std::pair<size_t, size_t> indices(allTMRecHits.
size(), allTMRecHits.
size());
1440 std::vector<const TrackingRecHit *> hits = hitExtractor.
getMuonHits(*mur);
1441 for (std::vector<const TrackingRecHit *>::const_iterator ith = hits.begin(), edh = hits.end(); ith != edh; ++ith) {
1444 indices.second += hits.size();
1446 muonHitIndices.push_back(indices);
1449 for (
size_t i = 0,
n = allTMRecHits.
size();
i <
n; ++
i) {
1453 typedef std::pair<size_t, size_t> index_pair;
1455 for (std::vector<std::pair<size_t, size_t> >::const_iterator idxs = muonHitIndices.begin(), idxend = muonHitIndices.end(); idxs != idxend; ++idxs) {
1456 muonHitRefs.push_back(std::make_pair(hitRefBegin+idxs->first,
1457 hitRefBegin+idxs->second));
1466 for (MuonAssociatorByHits::IndexAssociation::const_iterator it = recSimColl.begin(), ed = recSimColl.end(); it != ed; ++it) {
1468 const std::vector<MuonAssociatorByHits::IndexMatch> & idxAss = it->second;
1469 std::vector<std::pair<TrackingParticleRef, double> > & tpAss = recToSim[rec];
1470 for (std::vector<MuonAssociatorByHits::IndexMatch>::const_iterator ita = idxAss.begin(), eda = idxAss.end(); ita != eda; ++ita) {
1471 tpAss.
push_back(std::make_pair(tPC[ita->idx], ita->quality));
1475 for (MuonAssociatorByHits::IndexAssociation::const_iterator it = simRecColl.begin(), ed = simRecColl.end(); it != ed; ++it) {
1477 const std::vector<MuonAssociatorByHits::IndexMatch> & idxAss = it->second;
1478 std::vector<std::pair<edm::RefToBase<reco::Muon>,
double> > & recAss = simToRec[sim];
1479 for (std::vector<MuonAssociatorByHits::IndexMatch>::const_iterator ita = idxAss.begin(), eda = idxAss.end(); ita != eda; ++ita) {
1480 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)
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
const_iterator end() const
Termination of iteration.
std::string print(DetId detid) const
const bool AbsoluteNumberOfHits_muon
const_iterator begin() const
Initialize an iterator over the RefVector.
const bool includeZeroHitMuons
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
bool isNonnull() const
Checks for non-null.
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
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
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.
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
T const * product() const
const_iterator begin() const
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
std::vector< SimHitIdpr > associateDTHitId(const DTRecHit1D *dtrechit)
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)
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