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());
47 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
49 unsigned seed_size = 0;
52 seed_size += theSeeds[
iseed]->size();
57 unsigned int imuMax = l2muonH->size();
59 for (; imu != imuMax; ++imu) {
64 if (muRef->pt() <
thePtCut || muRef->innerMomentum().Rho() <
thePtCut || muRef->innerMomentum().R() < 2.5)
71 std::vector<TrajectorySeed> tkSeeds;
72 std::set<unsigned> tkIds;
73 tkSeeds.reserve(seed_size);
76 unsigned nSeeds = aSeedCollection->size();
77 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
85 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
86 if (tkId != tkIds.end())
89 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
92 tkSeeds.push_back(*aSeed);
93 tkIds.insert(simTrackId);
101 unsigned int isMax = tkSeeds.size();
102 for (; is != isMax; ++is) {
120 double etaSeed = theSimTrack.
momentum().Eta();
121 double etaLimit = (fabs(fabs(
etaRange.max()) - fabs(
etaRange.mean())) < 0.05)
124 bool inEtaRange = etaSeed >= (
etaRange.mean() - etaLimit) && etaSeed <= (
etaRange.mean() + etaLimit);
130 double phiSeed = theSimTrack.
momentum().Phi();
131 double phiLimit = (phiMargin.
right() < 0.05) ? 0.05 : phiMargin.
right();
132 bool inPhiRange = (fabs(
deltaPhi(phiSeed,
double(
region->direction().phi()))) < phiLimit);
139 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
std::vector< SimTrack > SimTrackContainer