42 using namespace ctfseeding;
43 using namespace l1extra;
45 template <
class T>
T sqr(
T t) {
return t*
t;}
49 : theConfig(cfg),theRegionProducer(0),theHitGenerator(0),theFitter(0),theMerger(0)
51 produces<L3MuonTrajectorySeedCollection>();
102 LogDebug(
"TSGFromL1Muon")<<l1muon->size()<<
" l1 muons to seed from.";
104 L1MuonParticleCollection::const_iterator muItr = l1muon->begin();
105 L1MuonParticleCollection::const_iterator muEnd = l1muon->end();
106 for (
size_t iL1 = 0; muItr < muEnd; ++muItr, ++iL1) {
108 if (muItr->gmtMuonCand().empty())
continue;
116 typedef std::vector<TrackingRegion * > Regions;
118 for (Regions::const_iterator ir=regions.begin(); ir != regions.end(); ++ir) {
124 unsigned int nSets = candidates.
size();
125 for (
unsigned int ic= 0; ic <nSets; ic++) {
128 std::vector<const TrackingRecHit *> trh;
129 for (
unsigned int i= 0, nHits = hits.
size();
i< nHits; ++
i) trh.push_back( hits[
i]->hit() );
133 if (!track)
continue;
135 if (!(*
theFilter)(track) ) {
delete track;
continue; }
140 for (L1MuonSeedsMerger::TracksAndHits::const_iterator it = tracks.begin();
141 it != tracks.end(); ++it) {
153 for (Regions::const_iterator it=regions.begin(); it != regions.end(); ++it)
delete (*it);
156 LogDebug(
"TSGFromL1Muon")<<result->size()<<
" seeds to the event.";
T getParameter(std::string const &) const
edm::ParameterSet theConfig
TSGFromL1Muon(const edm::ParameterSet &cfg)
void setPxConstraint(const SeedingHitSet &hits)
virtual std::vector< TrackingRegion * > regions(const edm::Event &ev, const edm::EventSetup &es) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
L1MuonRegionProducer * theRegionProducer
std::vector< L3MuonTrajectorySeed > L3MuonTrajectorySeedCollection
std::pair< const reco::Track *, SeedingHitSet > TrackAndHits
virtual void produce(edm::Event &ev, const edm::EventSetup &es) override
virtual unsigned int size() const =0
OrderedHitsGenerator * theHitGenerator
L1MuonPixelTrackFitter * theFitter
TrajectorySeed trajectorySeed() const
virtual const OrderedSeedingHits & run(const TrackingRegion ®, const edm::Event &ev, const edm::EventSetup &es)=0
std::vector< TrackAndHits > TracksAndHits
L1MuonSeedsMerger * theMerger
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag theSourceTag
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::unique_ptr< PixelTrackFilter > theFilter
virtual reco::Track * run(const edm::EventSetup &es, const std::vector< const TrackingRecHit * > &hits, const TrackingRegion ®ion) const
virtual void resolve(TracksAndHits &) const
virtual void beginRun(const edm::Run &run, const edm::EventSetup &es) override
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > theSourceToken
Square< F >::type sqr(const F &f)
unsigned int size() const
void setL1Constraint(const L1MuGMTCand &muon)
void setL1Constraint(const L1MuGMTCand &muon)
T get(const Candidate &c)