21 produces<L3MuonTrajectorySeedCollection>();
32 theRegionBuilder = std::make_unique<MuonTrackingRegionBuilder>(regionBuilderPSet, consumesCollector());
71 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
72 theSeeds.resize(seedCollections);
73 unsigned seed_size = 0;
76 seed_size += theSeeds[
iseed]->size();
81 unsigned int imuMax = l2muonH->size();
83 for (; imu != imuMax; ++imu) {
88 if (muRef->pt() <
thePtCut || muRef->innerMomentum().Rho() <
thePtCut || muRef->innerMomentum().R() < 2.5)
95 std::vector<TrajectorySeed> tkSeeds;
96 std::set<unsigned> tkIds;
97 tkSeeds.reserve(seed_size);
100 unsigned nSeeds = aSeedCollection->size();
101 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
109 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
110 if (tkId != tkIds.end())
113 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
115 if (
clean(muRef, region.
get(), aSeed, theSimTrack))
116 tkSeeds.push_back(*aSeed);
117 tkIds.insert(simTrackId);
131 unsigned int isMax = tkSeeds.size();
132 for (; is != isMax; ++is) {
153 double etaSeed = theSimTrack.
momentum().Eta();
154 double etaLimit = (fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean())) < 0.05)
156 : fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean()));
157 bool inEtaRange = etaSeed >= (etaRange.
mean() - etaLimit) && etaSeed <= (etaRange.
mean() + etaLimit);
163 double phiSeed = theSimTrack.
momentum().Phi();
164 double phiLimit = (phiMargin.
right() < 0.05) ? 0.05 : phiMargin.
right();
172 bool inPtRange = ptSeed >= ptMin && ptSeed <= 2 * (muRef->pt());
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
std::vector< L3MuonTrajectorySeed > L3MuonTrajectorySeedCollection
Geom::Phi< T > phi() const
edm::InputTag theSimTrackCollectionLabel
GlobalVector const & direction() const
the direction around which region is constructed
~FastTSGFromL2Muon() override
std::unique_ptr< MuonTrackingRegionBuilder > theRegionBuilder
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
RecHitRange recHits() const
T getParameter(std::string const &) 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