#include <MuonAssociatorByHits.h>
Classes | |
struct | IndexMatch |
struct | RefToBaseSort |
Public Types | |
typedef boost::ptr_vector < uint_SimHitIdpr_pair > | MapOfMatchedIds |
typedef std::map < edm::RefToBase< reco::Muon > , std::vector< std::pair < TrackingParticleRef, double > >, RefToBaseSort > | MuonToSimCollection |
enum | MuonTrackType { InnerTk, OuterTk, GlobalTk, Segments } |
typedef std::pair< uint32_t, EncodedEventId > | SimHitIdpr |
typedef std::map < TrackingParticleRef, std::vector< std::pair < edm::RefToBase< reco::Muon > , double > > > | SimToMuonCollection |
typedef std::pair< unsigned int, std::vector< SimHitIdpr > > | uint_SimHitIdpr_pair |
Private Types | |
typedef std::map< size_t, std::vector< IndexMatch > > | IndexAssociation |
typedef std::vector< std::pair < trackingRecHit_iterator, trackingRecHit_iterator > > | TrackHitsCollection |
Private Member Functions | |
IndexAssociation | associateRecoToSimIndices (const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const |
IndexAssociation | associateSimToRecoIndices (const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const |
const TrackingRecHit * | getHitPtr (edm::OwnVector< TrackingRecHit >::const_iterator iter) const |
const TrackingRecHit * | getHitPtr (trackingRecHit_iterator iter) const |
int | LayerFromDetid (const DetId &) const |
std::string | write_matched_simtracks (const std::vector< SimHitIdpr > &) const |
Private Attributes | |
const bool | AbsoluteNumberOfHits_muon |
const bool | AbsoluteNumberOfHits_track |
const bool | acceptOneStubMatchings |
const edm::ParameterSet & | conf_ |
const bool | crossingframe |
const bool | dumpDT |
const bool | dumpInputCollections |
double | EfficiencyCut_muon |
double | EfficiencyCut_track |
const bool | includeZeroHitMuons |
unsigned int | NHitCut_muon |
unsigned int | NHitCut_track |
double | PurityCut_muon |
double | PurityCut_track |
edm::InputTag | simtracksTag |
edm::InputTag | simtracksXFTag |
const bool | ThreeHitTracksAreSpecial |
const bool | UseGrouped |
bool | UseMuon |
const bool | UsePixels |
const bool | UseSplitting |
bool | UseTracker |
Definition at line 26 of file MuonAssociatorByHits.h.
|
private |
Definition at line 124 of file MuonAssociatorByHits.h.
typedef boost::ptr_vector<uint_SimHitIdpr_pair> MuonAssociatorByHits::MapOfMatchedIds |
Definition at line 32 of file MuonAssociatorByHits.h.
typedef std::map<edm::RefToBase<reco::Muon>, std::vector<std::pair<TrackingParticleRef, double> >, RefToBaseSort> MuonAssociatorByHits::MuonToSimCollection |
Definition at line 73 of file MuonAssociatorByHits.h.
typedef std::pair<uint32_t, EncodedEventId> MuonAssociatorByHits::SimHitIdpr |
Definition at line 29 of file MuonAssociatorByHits.h.
typedef std::map<TrackingParticleRef, std::vector<std::pair<edm::RefToBase<reco::Muon>, double> > > MuonAssociatorByHits::SimToMuonCollection |
Definition at line 74 of file MuonAssociatorByHits.h.
|
private |
Definition at line 118 of file MuonAssociatorByHits.h.
typedef std::pair<unsigned int,std::vector<SimHitIdpr> > MuonAssociatorByHits::uint_SimHitIdpr_pair |
Definition at line 31 of file MuonAssociatorByHits.h.
MuonAssociatorByHits::MuonAssociatorByHits | ( | const edm::ParameterSet & | conf | ) |
Definition at line 25 of file MuonAssociatorByHits.cc.
References conf_, edm::ParameterSet::dump(), EfficiencyCut_muon, includeZeroHitMuons, NHitCut_muon, PurityCut_muon, UseMuon, and UseTracker.
MuonAssociatorByHits::~MuonAssociatorByHits | ( | ) |
Definition at line 71 of file MuonAssociatorByHits.cc.
void MuonAssociatorByHits::associateMuons | ( | MuonToSimCollection & | recoToSim, |
SimToMuonCollection & | simToReco, | ||
const edm::RefToBaseVector< reco::Muon > & | muons, | ||
MuonTrackType | trackType, | ||
const edm::RefVector< TrackingParticleCollection > & | tPC, | ||
const edm::Event * | event = 0 , |
||
const edm::EventSetup * | setup = 0 |
||
) | const |
PART 1: Fill MuonAssociatorByHits::TrackHitsCollection
PART 2: call the association routines
Definition at line 1388 of file MuonAssociatorByHits.cc.
References associateRecoToSimIndices(), associateSimToRecoIndices(), edm::RefToBaseVector< T >::begin(), edm::RefVector< C, T, F >::begin(), conf_, edm::RefToBaseVector< T >::end(), edm::RefVector< C, T, F >::end(), TrackerMuonHitExtractor::getMuonHits(), GlobalTk, reco::Muon::globalTrack(), i, errorMatrix2Lands::indices, TrackerMuonHitExtractor::init(), InnerTk, edm::Ref< C, T, F >::isNonnull(), reco::Muon::isTrackerMuon(), n, OuterTk, reco::Muon::outerTrack(), edm::RefToBaseVector< T >::push_back(), edm::RefVector< C, T, F >::push_back(), edm::OwnVector< T, P >::push_back(), Segments, edm::OwnVector< T, P >::size(), and reco::Muon::track().
Referenced by RecoMuonValidator::analyze(), associateMuons(), and MuonMCClassifier::produce().
void MuonAssociatorByHits::associateMuons | ( | MuonToSimCollection & | recoToSim, |
SimToMuonCollection & | simToReco, | ||
const edm::Handle< edm::View< reco::Muon > > & | tCH, | ||
MuonTrackType | type, | ||
const edm::Handle< TrackingParticleCollection > & | tPCH, | ||
const edm::Event * | event = 0 , |
||
const edm::EventSetup * | setup = 0 |
||
) | const |
Definition at line 1376 of file MuonAssociatorByHits.cc.
References associateMuons(), event(), edm::HandleBase::id(), j, edm::RefVector< C, T, F >::push_back(), and HcalObjRepresent::setup().
|
virtual |
Association Reco To Sim with Collections.
Implements TrackAssociatorBase.
Definition at line 76 of file MuonAssociatorByHits.cc.
References associateRecoToSimIndices(), edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::end(), edm::AssociationMap< Tag >::insert(), and edm::AssociationMap< Tag >::post_insert().
Referenced by MuonAssociatorEDProducer::produce().
|
private |
Definition at line 98 of file MuonAssociatorByHits.cc.
References AbsoluteNumberOfHits_muon, AbsoluteNumberOfHits_track, acceptOneStubMatchings, conf_, crossingframe, dumpInputCollections, edm::Event::getByLabel(), getMatchedIds(), getShared(), includeZeroHitMuons, j, gen::k, NHitCut_muon, NHitCut_track, edm::Handle< T >::product(), edm::RefVector< C, T, F >::product(), PurityCut_muon, PurityCut_track, simtracksTag, simtracksXFTag, edm::RefVector< C, T, F >::size(), python.multivaluedict::sort(), and ThreeHitTracksAreSpecial.
Referenced by associateMuons(), and associateRecoToSim().
|
virtual |
Association Sim To Reco with Collections.
Implements TrackAssociatorBase.
Definition at line 450 of file MuonAssociatorByHits.cc.
References associateSimToRecoIndices(), edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::end(), edm::AssociationMap< Tag >::insert(), and edm::AssociationMap< Tag >::post_insert().
Referenced by MuonAssociatorEDProducer::produce().
|
private |
Definition at line 473 of file MuonAssociatorByHits.cc.
References AbsoluteNumberOfHits_muon, AbsoluteNumberOfHits_track, acceptOneStubMatchings, conf_, MuonSubdetId::CSC, MuonTruth::cscBadChambers, DetId::det(), EfficiencyCut_muon, EfficiencyCut_track, getMatchedIds(), getShared(), includeZeroHitMuons, CSCBadChambers::isInBadChamber(), LayerFromDetid(), DetId::Muon, NHitCut_muon, NHitCut_track, SiStripDetId::partnerDetId(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, edm::RefVector< C, T, F >::product(), PurityCut_muon, PurityCut_track, DetId::rawId(), edm::RefVector< C, T, F >::size(), python.multivaluedict::sort(), DetId::subdetId(), SiStripDetId::TEC, ThreeHitTracksAreSpecial, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, DetId::Tracker, UseGrouped, UseMuon, UsePixels, UseSplitting, and UseTracker.
Referenced by associateMuons(), and associateSimToReco().
|
inlineprivate |
Definition at line 112 of file MuonAssociatorByHits.h.
|
inlineprivate |
Definition at line 113 of file MuonAssociatorByHits.h.
void MuonAssociatorByHits::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 |
Definition at line 922 of file MuonAssociatorByHits.cc.
References MuonTruth::associateCSCHitId(), DTHitAssociator::associateDTHitId(), DTHitAssociator::associateHit(), TrackerHitAssociator::associateHitId(), RPCHitAssociator::associateRecHit(), MuonSubdetId::CSC, CSCDetId, DetId::det(), cond::rpcobgas::detid, MuonSubdetId::DT, end, TrackingRecHit::geographicalId(), DTRecSegment4D::hasPhi(), DTRecSegment4D::hasZed(), getHLTprescales::index, TrackingRecHit::isValid(), j, DetId::Muon, DTRecSegment4D::phiSegment(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), CSCSegment::recHits(), DTRecSegment2D::recHits(), MuonSubdetId::RPC, RPCDetId, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, DetId::Tracker, DTRecHit1D::wireId(), and DTRecSegment4D::zSegment().
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
int MuonAssociatorByHits::getShared | ( | MapOfMatchedIds & | matchedIds, |
TrackingParticleCollection::const_iterator | trpart | ||
) | const |
Definition at line 1318 of file MuonAssociatorByHits.cc.
References newFWLiteAna::found.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 879 of file MuonAssociatorByHits.cc.
References DetId::det(), PXFDetId::disk(), PXBDetId::layer(), TOBDetId::layer(), TIBDetId::layer(), align::tib::layerNumber(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, DetId::Tracker, TIDDetId::wheel(), and TECDetId::wheel().
Referenced by associateSimToRecoIndices().
|
private |
|
private |
Definition at line 96 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 92 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 89 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 109 of file MuonAssociatorByHits.h.
Referenced by associateMuons(), associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 106 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices().
|
private |
Definition at line 104 of file MuonAssociatorByHits.h.
|
private |
Definition at line 105 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices().
|
private |
Definition at line 98 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 94 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices().
|
private |
Definition at line 88 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 97 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 93 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 99 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 95 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 107 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices().
|
private |
Definition at line 108 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices().
|
private |
Definition at line 103 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 101 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices().
|
private |
Definition at line 91 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 100 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices().
|
private |
Definition at line 102 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices().
|
private |
Definition at line 90 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices(), and MuonAssociatorByHits().