50 for (
unsigned int j=0;
j<tPCH->size();
j++)
54 for (
size_t i = 0;
i < tCH->size(); ++
i)
57 associateMuons(recToSim, simToRec, muonBaseRefVector,type,tpc,event,setup);
73 muonHitRefs.push_back(std::make_pair(mur->
track()->recHitsBegin(), mur->
track()->recHitsEnd()));
75 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
83 muonHitRefs.push_back(std::make_pair(mur->
outerTrack()->recHitsBegin(), mur->
outerTrack()->recHitsEnd()));
85 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
93 muonHitRefs.push_back(std::make_pair(mur->
globalTrack()->recHitsBegin(), mur->
globalTrack()->recHitsEnd()));
95 muonHitRefs.push_back(std::make_pair(allTMRecHits.
data().end(), allTMRecHits.
data().end()));
101 hitExtractor.
init(*event, *setup);
103 std::vector<std::pair<size_t, size_t> > muonHitIndices;
106 std::pair<size_t, size_t> indices(allTMRecHits.
size(), allTMRecHits.
size());
108 std::vector<const TrackingRecHit *> hits = hitExtractor.
getMuonHits(*mur);
109 for (std::vector<const TrackingRecHit *>::const_iterator ith = hits.begin(), edh = hits.end(); ith != edh; ++ith) {
112 indices.second += hits.size();
114 muonHitIndices.push_back(indices);
117 typedef std::pair<size_t, size_t> index_pair;
119 for (std::vector<std::pair<size_t, size_t> >::const_iterator idxs = muonHitIndices.begin(), idxend = muonHitIndices.end(); idxs != idxend; ++idxs) {
120 muonHitRefs.push_back(std::make_pair(hitRefBegin+idxs->first,
121 hitRefBegin+idxs->second));
140 bool printRtS =
true;
148 for (
auto it = recSimColl.begin(), ed = recSimColl.end(); it != ed; ++it) {
150 std::vector<std::pair<TrackingParticleRef, double> > & tpAss = recToSim[rec];
151 for (
auto const &
a : it->second) {
152 tpAss.
push_back(std::make_pair(tPC[
a.idx],
a.quality));
156 for (
auto it = simRecColl.begin(), ed = simRecColl.end(); it != ed; ++it) {
158 std::vector<std::pair<edm::RefToBase<reco::Muon>,
double> > & recAss = simToRec[sim];
159 for (
auto const &
a: it->second ) {
160 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="")
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