21 produces<L3MuonTrajectorySeedCollection>();
72 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
73 theSeeds.resize(seedCollections);
74 unsigned seed_size = 0;
77 seed_size += theSeeds[
iseed]->size();
82 unsigned int imuMax = l2muonH->size();
84 for (; imu != imuMax; ++imu) {
89 if (muRef->pt() <
thePtCut || muRef->innerMomentum().Rho() <
thePtCut || muRef->innerMomentum().R() < 2.5)
96 std::vector<TrajectorySeed> tkSeeds;
97 std::set<unsigned> tkIds;
98 tkSeeds.reserve(seed_size);
101 unsigned nSeeds = aSeedCollection->size();
102 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
111 int simTrackId = theFirstSeedingRecHit->
simTrackId(0);
114 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
115 if (tkId != tkIds.end())
118 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
120 if (
clean(muRef, region.
get(), aSeed, theSimTrack))
121 tkSeeds.push_back(*aSeed);
122 tkIds.insert(simTrackId);
136 unsigned int isMax = tkSeeds.size();
137 for (; is != isMax; ++is) {
158 double etaSeed = theSimTrack.
momentum().Eta();
159 double etaLimit = (fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean())) < 0.05)
161 : fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean()));
162 bool inEtaRange = etaSeed >= (etaRange.
mean() - etaLimit) && etaSeed <= (etaRange.
mean() + etaLimit);
168 double phiSeed = theSimTrack.
momentum().Phi();
169 double phiLimit = (phiMargin.
right() < 0.05) ? 0.05 : phiMargin.
right();
177 bool inPtRange = ptSeed >= ptMin && ptSeed <= 2 * (muRef->pt());
T getParameter(std::string const &) const
std::pair< const_iterator, const_iterator > range
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< edm::InputTag > theSeedCollectionLabels
void produce(edm::Event &ev, const edm::EventSetup &es) override
const Margin & phiMargin() const
virtual void setEvent(const edm::Event &)
Pass the Event to the algo at each event.
std::vector< L3MuonTrajectorySeed > L3MuonTrajectorySeedCollection
Geom::Phi< T > phi() const
MuonTrackingRegionBuilder
edm::InputTag theSimTrackCollectionLabel
MuonTrackingRegionBuilder * theRegionBuilder
edm::ParameterSet theConfig
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
GlobalVector const & direction() const
the direction around which region is constructed
~FastTSGFromL2Muon() override
virtual int32_t simTrackId(size_t i) const
bool clean(reco::TrackRef muRef, RectangularEtaPhiTrackingRegion *region, const BasicTrajectorySeed *aSeed, const SimTrack &theSimTrack)
T const * get() const
Returns C++ pointer to the item.
FastTSGFromL2Muon(const edm::ParameterSet &cfg)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
float ptMin() const
minimal pt of interest
edm::InputTag theL2CollectionLabel
const math::XYZTLorentzVectorD & momentum() const
void beginRun(edm::Run const &run, edm::EventSetup const &es) override
const Range & etaRange() const
allowed eta range [eta_min, eta_max] interval