17 : thePtCut(
cfg.getParameter<double>(
"PtCut")),
18 theL2CollectionLabel(
cfg.getParameter<
edm::
InputTag>(
"MuonCollectionLabel")),
20 theSimTrackCollectionLabel(
cfg.getParameter<
edm::
InputTag>(
"SimTrackCollectionLabel")),
23 produces<L3MuonTrajectorySeedCollection>();
29 theRegionBuilder = std::make_unique<MuonTrackingRegionBuilder>(regionBuilderPSet, consumesCollector());
51 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
53 unsigned seed_size = 0;
56 seed_size += theSeeds[
iseed]->size();
61 unsigned int imuMax = l2muonH->size();
63 for (; imu != imuMax; ++imu) {
68 if (muRef->pt() <
thePtCut || muRef->innerMomentum().Rho() <
thePtCut || muRef->innerMomentum().R() < 2.5)
75 std::vector<TrajectorySeed> tkSeeds;
76 std::set<unsigned> tkIds;
77 tkSeeds.reserve(seed_size);
80 unsigned nSeeds = aSeedCollection->size();
81 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
89 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
90 if (tkId != tkIds.end())
93 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
96 tkSeeds.push_back(*aSeed);
97 tkIds.insert(simTrackId);
105 unsigned int isMax = tkSeeds.size();
106 for (; is != isMax; ++is) {
124 double etaSeed = theSimTrack.
momentum().Eta();
125 double etaLimit = (fabs(fabs(
etaRange.max()) - fabs(
etaRange.mean())) < 0.05)
128 bool inEtaRange = etaSeed >= (
etaRange.mean() - etaLimit) && etaSeed <= (
etaRange.mean() + etaLimit);
134 double phiSeed = theSimTrack.
momentum().Phi();
135 double phiLimit = (phiMargin.
right() < 0.05) ? 0.05 : phiMargin.
right();
136 bool inPhiRange = (fabs(
deltaPhi(phiSeed,
double(
region->direction().phi()))) < phiLimit);
143 bool inPtRange = ptSeed >=
ptMin && ptSeed <= 2 * (muRef->pt());
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_
void produce(edm::Event &ev, const edm::EventSetup &es) override
RecHitRange recHits() const
std::vector< L3MuonTrajectorySeed > L3MuonTrajectorySeedCollection
std::vector< Track > TrackCollection
collection of Tracks
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > seedToken_
const math::XYZTLorentzVectorD & momentum() const
const edm::EDGetTokenT< reco::TrackCollection > l2TrackToken_
std::unique_ptr< MuonTrackingRegionBuilder > theRegionBuilder
bool clean(reco::TrackRef muRef, RectangularEtaPhiTrackingRegion *region, const BasicTrajectorySeed *aSeed, const SimTrack &theSimTrack)
FastTSGFromL2Muon(const edm::ParameterSet &cfg)
const std::vector< edm::InputTag > theSeedCollectionLabels
void beginRun(edm::Run const &run, edm::EventSetup const &es) override
std::vector< SimTrack > SimTrackContainer