43 using namespace ctfseeding;
44 using namespace l1extra;
46 template <
class T>
T sqr(
T t) {
return t*
t;}
50 : theConfig(cfg),theRegionProducer(0),theHitGenerator(0),theFitter(0),theFilter(0),theMerger(0)
52 produces<L3MuonTrajectorySeedCollection>();
68 std::string regfactoryName = regfactoryPSet.
getParameter<std::string>(
"ComponentName");
75 std::string hitsfactoryName = hitsfactoryPSet.
getParameter<std::string>(
"ComponentName");
79 std::string fitterName = fitterPSet.
getParameter<std::string>(
"ComponentName");
88 std::string cleanerName = cleanerPSet.
getParameter<std::string>(
"ComponentName");
101 LogDebug(
"TSGFromL1Muon")<<l1muon->size()<<
" l1 muons to seed from.";
103 L1MuonParticleCollection::const_iterator muItr = l1muon->begin();
104 L1MuonParticleCollection::const_iterator muEnd = l1muon->end();
105 for (
size_t iL1 = 0; muItr < muEnd; ++muItr, ++iL1) {
107 if (muItr->gmtMuonCand().empty())
continue;
115 typedef std::vector<TrackingRegion * > Regions;
117 for (Regions::const_iterator ir=regions.begin(); ir != regions.end(); ++ir) {
123 unsigned int nSets = candidates.
size();
124 for (
unsigned int ic= 0; ic <nSets; ic++) {
127 std::vector<const TrackingRecHit *> trh;
128 for (
unsigned int i= 0, nHits = hits.
size();
i< nHits; ++
i) trh.push_back( hits[
i]->hit() );
132 if (!track)
continue;
134 if (!(*
theFilter)(track) ) {
delete track;
continue; }
139 for (L1MuonSeedsMerger::TracksAndHits::const_iterator it = tracks.begin();
140 it != tracks.end(); ++it) {
152 for (Regions::const_iterator it=regions.begin(); it != regions.end(); ++it)
delete (*it);
155 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
PixelTrackFilter * theFilter
L1MuonRegionProducer * theRegionProducer
std::vector< L3MuonTrajectorySeed > L3MuonTrajectorySeedCollection
std::pair< const reco::Track *, SeedingHitSet > TrackAndHits
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
virtual reco::Track * run(const edm::EventSetup &es, const std::vector< const TrackingRecHit * > &hits, const TrackingRegion ®ion) const
virtual void resolve(TracksAndHits &) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Square< F >::type sqr(const F &f)
unsigned int size() const
void setL1Constraint(const L1MuGMTCand &muon)
virtual void beginRun(edm::Run &run, const edm::EventSetup &es)
virtual void produce(edm::Event &ev, const edm::EventSetup &es)
void setL1Constraint(const L1MuGMTCand &muon)
T get(const Candidate &c)