22 produces<L3MuonTrajectorySeedCollection>();
87 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
88 theSeeds.resize(seedCollections);
89 unsigned seed_size = 0;
92 seed_size += theSeeds[
iseed]->size();
97 unsigned int imuMax=l2muonH->size();
99 for (;imu!=imuMax;++imu){
106 || muRef->innerMomentum().Rho() <
thePtCut
107 || muRef->innerMomentum().R() < 2.5 )
continue;
113 std::vector<TrajectorySeed> tkSeeds;
114 std::set<unsigned> tkIds;
115 tkSeeds.reserve(seed_size);
118 unsigned nSeeds = aSeedCollection->size();
119 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
130 int simTrackId = theFirstSeedingRecHit->
simTrackId(0);
133 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
134 if( tkId != tkIds.end() )
continue;
136 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
138 if (
clean(muRef,region.
get(),aSeed,theSimTrack) ) tkSeeds.push_back(*aSeed);
139 tkIds.insert(simTrackId);
154 unsigned int isMax=tkSeeds.size();
155 for (;is!=isMax;++is){
179 double etaSeed = theSimTrack.
momentum().Eta();
180 double etaLimit = (fabs(fabs(etaRange.
max())-fabs(etaRange.
mean())) <0.05) ?
181 0.05 : fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean())) ;
183 etaSeed >= (etaRange.
mean() - etaLimit) &&
184 etaSeed <= (etaRange.
mean() + etaLimit) ;
185 if ( !inEtaRange )
return false;
189 double phiSeed = theSimTrack.
momentum().Phi();
190 double phiLimit = (phiMargin.
right() < 0.05 ) ? 0.05 : phiMargin.
right();
193 if ( !inPhiRange )
return false;
198 bool inPtRange = ptSeed >= ptMin && ptSeed<= 2*(muRef->pt());
T getParameter(std::string const &) const
virtual ~FastTSGFromL2Muon()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< edm::InputTag > theSeedCollectionLabels
virtual 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
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
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
virtual int32_t simTrackId(size_t i) const
bool clean(reco::TrackRef muRef, RectangularEtaPhiTrackingRegion *region, const BasicTrajectorySeed *aSeed, const SimTrack &theSimTrack)
std::pair< const_iterator, const_iterator > range
tuple MuonTrackingRegionBuilder
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
virtual void beginRun(edm::Run const &run, edm::EventSetup const &es) override
const Range & etaRange() const
allowed eta range [eta_min, eta_max] interval