22 trackerHitAssociatorConfig_(conf,std::
move(iC))
46 for (
unsigned int j=0;
j<tPCH->size();
j++)
50 for (
size_t i = 0;
i < tCH->size(); ++
i)
53 associateMuons(recToSim, simToRec, muonBaseRefVector,type,tpc,event,setup);
69 muonHitRefs.push_back(std::make_pair(mur->
track()->recHitsBegin(), mur->
track()->recHitsEnd()));
71 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
79 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
81 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
89 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
91 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
97 hitExtractor.
init(*event, *setup);
99 std::vector<std::pair<size_t, size_t> > muonHitIndices;
102 std::pair<size_t, size_t> indices(allTMRecHits.
size(), allTMRecHits.
size());
104 std::vector<const TrackingRecHit *> hits = hitExtractor.
getMuonHits(*mur);
105 for (std::vector<const TrackingRecHit *>::const_iterator ith = hits.begin(), edh = hits.end(); ith != edh; ++ith) {
108 indices.second += hits.size();
110 muonHitIndices.push_back(indices);
113 typedef std::pair<size_t, size_t> index_pair;
115 for (std::vector<std::pair<size_t, size_t> >::const_iterator idxs = muonHitIndices.begin(), idxend = muonHitIndices.end(); idxs != idxend; ++idxs) {
116 muonHitRefs.push_back(std::make_pair(hitRefBegin+idxs->first,
117 hitRefBegin+idxs->second));
136 bool printRtS =
true;
146 for (
auto it = recSimColl.begin(), ed = recSimColl.end(); it != ed; ++it) {
148 std::vector<std::pair<TrackingParticleRef, double> > & tpAss = recToSim[rec];
149 for (
auto const &
a : it->second) {
150 tpAss.
push_back(std::make_pair(tPC[
a.idx],
a.quality));
154 for (
auto it = simRecColl.begin(), ed = simRecColl.end(); it != ed; ++it) {
156 std::vector<std::pair<edm::RefToBase<reco::Muon>,
double> > & recAss = simToRec[sim];
157 for (
auto const &
a: it->second ) {
158 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.
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