Description: EDPRoducer to generate L3MuonTracjectorySeed from L1MuonParticles
- Author
- Marcin Konecki
Definition at line 24 of file TSGFromL1Muon.h.
Definition at line 71 of file TSGFromL1Muon.cc.
References objects.IsoTrackAnalyzer::candidates, ALCARECOTkAlBeamHalo_cff::filter, edm::Event::getByToken(), hfClusterShapes_cfi::hits, mps_fire::i, SeedFromProtoTrack::isValid(), LogDebug, eostools::move(), edm::Event::put(), L1MuonSeedsMerger::resolve(), mps_fire::result, OrderedHitsGenerator::run(), SurveyInfoScenario_cff::seed, OrderedSeedingHits::size(), SeedingHitSet::size(), theFilterToken, theFitter, theHitGenerator, theMerger, theRegionProducer, theSourceToken, HiIsolationCommonParameters_cff::track, l1t::tracks, and SeedFromProtoTrack::trajectorySeed().
73 auto result = std::make_unique<L3MuonTrajectorySeedCollection>();
82 LogDebug(
"TSGFromL1Muon")<<l1muon->size()<<
" l1 muons to seed from.";
84 L1MuonParticleCollection::const_iterator muItr = l1muon->begin();
85 L1MuonParticleCollection::const_iterator muEnd = l1muon->end();
86 for (
size_t iL1 = 0; muItr < muEnd; ++muItr, ++iL1) {
88 if (muItr->gmtMuonCand().empty())
continue;
96 typedef std::vector<std::unique_ptr<TrackingRegion> > Regions;
98 for (Regions::const_iterator ir=regions.begin(); ir != regions.end(); ++ir) {
104 unsigned int nSets = candidates.
size();
105 for (
unsigned int ic= 0; ic <nSets; ic++) {
108 std::vector<const TrackingRecHit *> trh;
109 for (
unsigned int i= 0, nHits = hits.
size();
i< nHits; ++
i) trh.push_back( hits[
i]->hit() );
113 if (!track)
continue;
115 if (!
filter(track, trh) ) {
delete track;
continue; }
120 for (L1MuonSeedsMerger::TracksAndHits::const_iterator it = tracks.begin();
121 it != tracks.end(); ++it) {
135 LogDebug(
"TSGFromL1Muon")<<
result->size()<<
" seeds to the event.";
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::pair< const reco::Track *, SeedingHitSet > TrackAndHits
std::unique_ptr< L1MuonPixelTrackFitter > theFitter
OrderedHitsGenerator * theHitGenerator
std::unique_ptr< L1MuonRegionProducer > theRegionProducer
edm::EDGetTokenT< PixelTrackFilter > theFilterToken
virtual const OrderedSeedingHits & run(const TrackingRegion ®, const edm::Event &ev, const edm::EventSetup &es)=0
std::vector< TrackAndHits > TracksAndHits
L1MuonSeedsMerger * theMerger
virtual void resolve(TracksAndHits &) const
virtual unsigned int size() const =0
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > theSourceToken
unsigned int size() const