#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 (const 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::EDGetTokenT < edm::SimTrackContainer > | simtracksToken_ |
edm::InputTag | simtracksXFTag |
edm::EDGetTokenT < CrossingFrame< SimTrack > > | simtracksXFToken_ |
edm::EDGetTokenT < edm::SimVertexContainer > | simvertsToken_ |
edm::EDGetTokenT < CrossingFrame< SimVertex > > | simvertsXFToken_ |
const bool | ThreeHitTracksAreSpecial |
const bool | UseGrouped |
bool | UseMuon |
const bool | UsePixels |
const bool | UseSplitting |
bool | UseTracker |
Definition at line 30 of file MuonAssociatorByHits.h.
|
private |
Definition at line 134 of file MuonAssociatorByHits.h.
typedef boost::ptr_vector<uint_SimHitIdpr_pair> MuonAssociatorByHits::MapOfMatchedIds |
Definition at line 36 of file MuonAssociatorByHits.h.
typedef std::map<edm::RefToBase<reco::Muon>, std::vector<std::pair<TrackingParticleRef, double> >, RefToBaseSort> MuonAssociatorByHits::MuonToSimCollection |
Definition at line 78 of file MuonAssociatorByHits.h.
typedef std::pair<uint32_t, EncodedEventId> MuonAssociatorByHits::SimHitIdpr |
Definition at line 33 of file MuonAssociatorByHits.h.
typedef std::map<TrackingParticleRef, std::vector<std::pair<edm::RefToBase<reco::Muon>, double> > > MuonAssociatorByHits::SimToMuonCollection |
Definition at line 79 of file MuonAssociatorByHits.h.
|
private |
Definition at line 128 of file MuonAssociatorByHits.h.
typedef std::pair<unsigned int,std::vector<SimHitIdpr> > MuonAssociatorByHits::uint_SimHitIdpr_pair |
Definition at line 35 of file MuonAssociatorByHits.h.
MuonAssociatorByHits::MuonAssociatorByHits | ( | const edm::ParameterSet & | conf, |
edm::ConsumesCollector && | iC | ||
) |
Definition at line 19 of file MuonAssociatorByHits.cc.
References conf_, crossingframe, edm::ParameterSet::dump(), EfficiencyCut_muon, includeZeroHitMuons, NHitCut_muon, PurityCut_muon, simtracksToken_, simtracksXFTag, simtracksXFToken_, simvertsToken_, simvertsXFToken_, UseMuon, and UseTracker.
MuonAssociatorByHits::MuonAssociatorByHits | ( | const edm::ParameterSet & | conf | ) |
Definition at line 80 of file MuonAssociatorByHits.cc.
References conf_, edm::ParameterSet::dump(), EfficiencyCut_muon, includeZeroHitMuons, NHitCut_muon, PurityCut_muon, UseMuon, and UseTracker.
MuonAssociatorByHits::~MuonAssociatorByHits | ( | ) |
Definition at line 128 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 1391 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, 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 1379 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 133 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 155 of file MuonAssociatorByHits.cc.
References AbsoluteNumberOfHits_muon, AbsoluteNumberOfHits_track, acceptOneStubMatchings, conf_, crossingframe, dumpInputCollections, edm::EventSetup::get(), edm::Event::getByLabel(), getMatchedIds(), getShared(), includeZeroHitMuons, j, gen::k, NHitCut_muon, NHitCut_track, edm::Handle< T >::product(), edm::ESHandle< class >::product(), edm::RefVector< C, T, F >::product(), PurityCut_muon, PurityCut_track, simtracksTag, simtracksXFTag, edm::RefVector< C, T, F >::size(), python.multivaluedict::sort(), AlCaHLTBitMon_QueryRunRegistry::string, and ThreeHitTracksAreSpecial.
Referenced by associateMuons(), and associateRecoToSim().
|
virtual |
Association Sim To Reco with Collections.
Implements TrackAssociatorBase.
Definition at line 512 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 535 of file MuonAssociatorByHits.cc.
References AbsoluteNumberOfHits_muon, AbsoluteNumberOfHits_track, acceptOneStubMatchings, conf_, EfficiencyCut_muon, EfficiencyCut_track, edm::EventSetup::get(), getMatchedIds(), getShared(), includeZeroHitMuons, NHitCut_muon, NHitCut_track, edm::ESHandle< class >::product(), edm::RefVector< C, T, F >::product(), PurityCut_muon, PurityCut_track, edm::RefVector< C, T, F >::size(), python.multivaluedict::sort(), AlCaHLTBitMon_QueryRunRegistry::string, ThreeHitTracksAreSpecial, UseMuon, and UseTracker.
Referenced by associateMuons(), and associateSimToReco().
|
inlineprivate |
|
inlineprivate |
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 TrackerTopology * | tTopo | ||
) | const |
Definition at line 957 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(), cmsHarvester::index, TrackingRecHit::isValid(), j, DetId::Muon, DTRecSegment4D::phiSegment(), TrackerTopology::print(), DetId::rawId(), DTRecSegment2D::recHits(), MuonSubdetId::RPC, RPCDetId, DetId::subdetId(), 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 1330 of file MuonAssociatorByHits.cc.
References newFWLiteAna::found.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
|
private |
Definition at line 1364 of file MuonAssociatorByHits.cc.
References first, j, and edm::second().
|
private |
Definition at line 101 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 97 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 94 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 114 of file MuonAssociatorByHits.h.
Referenced by associateMuons(), associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 111 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 109 of file MuonAssociatorByHits.h.
|
private |
Definition at line 110 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices().
|
private |
Definition at line 103 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 99 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices().
|
private |
Definition at line 93 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 102 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 98 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 104 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 100 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 112 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices().
|
private |
Definition at line 118 of file MuonAssociatorByHits.h.
Referenced by MuonAssociatorByHits().
|
private |
Definition at line 113 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 116 of file MuonAssociatorByHits.h.
Referenced by MuonAssociatorByHits().
|
private |
Definition at line 119 of file MuonAssociatorByHits.h.
Referenced by MuonAssociatorByHits().
|
private |
Definition at line 117 of file MuonAssociatorByHits.h.
Referenced by MuonAssociatorByHits().
|
private |
Definition at line 108 of file MuonAssociatorByHits.h.
Referenced by associateRecoToSimIndices(), and associateSimToRecoIndices().
|
private |
Definition at line 106 of file MuonAssociatorByHits.h.
|
private |
Definition at line 96 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices(), and MuonAssociatorByHits().
|
private |
Definition at line 105 of file MuonAssociatorByHits.h.
|
private |
Definition at line 107 of file MuonAssociatorByHits.h.
|
private |
Definition at line 95 of file MuonAssociatorByHits.h.
Referenced by associateSimToRecoIndices(), and MuonAssociatorByHits().