22 trackerHitAssociatorConfig_(conf,std::move(iC))
45 for (
unsigned int j=0;
j<tPCH->size();
j++)
49 for (
size_t i = 0;
i < tCH->size(); ++
i)
52 associateMuons(recToSim, simToRec, muonBaseRefVector,type,tpc,event,setup);
68 muonHitRefs.push_back(std::make_pair(mur->
track()->recHitsBegin(), mur->
track()->recHitsEnd()));
70 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
78 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
80 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
88 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
90 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
96 hitExtractor.
init(*event, *setup);
98 std::vector<std::pair<size_t, size_t> > muonHitIndices;
101 std::pair<size_t, size_t> indices(allTMRecHits.
size(), allTMRecHits.
size());
103 std::vector<const TrackingRecHit *> hits = hitExtractor.
getMuonHits(*mur);
104 for (std::vector<const TrackingRecHit *>::const_iterator ith = hits.begin(), edh = hits.end(); ith != edh; ++ith) {
107 indices.second += hits.size();
109 muonHitIndices.push_back(indices);
112 typedef std::pair<size_t, size_t> index_pair;
114 for (std::vector<std::pair<size_t, size_t> >::const_iterator idxs = muonHitIndices.begin(), idxend = muonHitIndices.end(); idxs != idxend; ++idxs) {
115 muonHitRefs.push_back(std::make_pair(hitRefBegin+idxs->first,
116 hitRefBegin+idxs->second));
135 bool printRtS =
true;
143 for (
auto it = recSimColl.begin(), ed = recSimColl.end(); it != ed; ++it) {
145 std::vector<std::pair<TrackingParticleRef, double> > & tpAss = recToSim[rec];
146 for (
auto const &
a : it->second) {
147 tpAss.
push_back(std::make_pair(tPC[
a.idx],
a.quality));
151 for (
auto it = simRecColl.begin(), ed = simRecColl.end(); it != ed; ++it) {
153 std::vector<std::pair<edm::RefToBase<reco::Muon>,
double> > & recAss = simToRec[sim];
154 for (
auto const &
a: it->second ) {
155 recAss.
push_back(std::make_pair(muons[
a.idx],
a.quality));
std::map< edm::RefToBase< reco::Muon >, std::vector< std::pair< TrackingParticleRef, double > >, RefToBaseSort > MuonToSimCollection
bool isNonnull() const
Checks for non-null.
bool isTrackerMuon() const
const_iterator end() const
virtual TrackRef track() const
reference to a Track
IndexAssociation associateSimToRecoIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
std::vector< std::pair< trackingRecHit_iterator, trackingRecHit_iterator > > TrackHitsCollection
~MuonToSimAssociatorByHits()
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
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
std::map< TrackingParticleRef, std::vector< std::pair< edm::RefToBase< reco::Muon >, double > > > SimToMuonCollection
T const * product() const
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 override
const_iterator begin() const
IndexAssociation associateRecoToSimIndices(const TrackHitsCollection &, const edm::RefVector< TrackingParticleCollection > &, Resources const &) const
base const & data() const
MuonAssociatorByHitsHelper helper_
void push_back(const RefToBase< T > &)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
TrackerHitAssociator::Config trackerHitAssociatorConfig_
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
MuonToSimAssociatorByHits(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
edm::ParameterSet const conf_
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector