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),theFilter(0),theMerger(0)
51 produces<L3MuonTrajectorySeedCollection>();
67 std::string regfactoryName = regfactoryPSet.
getParameter<std::string>(
"ComponentName");
74 std::string hitsfactoryName = hitsfactoryPSet.
getParameter<std::string>(
"ComponentName");
78 std::string fitterName = fitterPSet.
getParameter<std::string>(
"ComponentName");
87 std::string cleanerName = cleanerPSet.
getParameter<std::string>(
"ComponentName");
100 LogDebug(
"TSGFromL1Muon")<<l1muon->size()<<
" l1 muons to seed from.";
102 L1MuonParticleCollection::const_iterator muItr = l1muon->begin();
103 L1MuonParticleCollection::const_iterator muEnd = l1muon->end();
104 for (
size_t iL1 = 0; muItr < muEnd; ++muItr, ++iL1) {
106 if (muItr->gmtMuonCand().empty())
continue;
114 typedef std::vector<TrackingRegion * > Regions;
116 for (Regions::const_iterator ir=regions.begin(); ir != regions.end(); ++ir) {
122 unsigned int nSets = candidates.
size();
123 for (
unsigned int ic= 0; ic <nSets; ic++) {
126 std::vector<const TrackingRecHit *> trh;
127 for (
unsigned int i= 0, nHits = hits.
size();
i< nHits; ++
i) trh.push_back( hits[
i]->hit() );
131 if (!track)
continue;
133 if (!(*
theFilter)(track) ) {
delete track;
continue; }
138 for (L1MuonSeedsMerger::TracksAndHits::const_iterator it = tracks.begin();
139 it != tracks.end(); ++it) {
151 for (Regions::const_iterator it=regions.begin(); it != regions.end(); ++it)
delete (*it);
154 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)