21 produces<L3MuonTrajectorySeedCollection>();
32 theRegionBuilder = std::make_unique<MuonTrackingRegionBuilder>(regionBuilderPSet, consumesCollector());
71 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
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)
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();
165 bool inPhiRange = (fabs(
deltaPhi(phiSeed,
double(
region->direction().phi()))) < phiLimit);
172 bool inPtRange = ptSeed >=
ptMin && ptSeed <= 2 * (muRef->pt());
std::vector< edm::InputTag > theSeedCollectionLabels
void produce(edm::Event &ev, const edm::EventSetup &es) override
RecHitRange recHits() const
std::vector< L3MuonTrajectorySeed > L3MuonTrajectorySeedCollection
edm::InputTag theSimTrackCollectionLabel
const math::XYZTLorentzVectorD & momentum() const
~FastTSGFromL2Muon() override
std::unique_ptr< MuonTrackingRegionBuilder > theRegionBuilder
bool clean(reco::TrackRef muRef, RectangularEtaPhiTrackingRegion *region, const BasicTrajectorySeed *aSeed, const SimTrack &theSimTrack)
FastTSGFromL2Muon(const edm::ParameterSet &cfg)
edm::InputTag theL2CollectionLabel
void beginRun(edm::Run const &run, edm::EventSetup const &es) override