23 produces<L3MuonTrajectorySeedCollection>();
92 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
93 theSeeds.resize(seedCollections);
94 unsigned seed_size = 0;
97 seed_size += theSeeds[
iseed]->size();
102 unsigned int imuMax=l2muonH->size();
104 for (;imu!=imuMax;++imu){
111 || muRef->innerMomentum().Rho() <
thePtCut
112 || muRef->innerMomentum().R() < 2.5 )
continue;
118 std::vector<TrajectorySeed> tkSeeds;
119 std::set<unsigned> tkIds;
120 tkSeeds.reserve(seed_size);
123 unsigned nSeeds = aSeedCollection->size();
124 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
135 int simTrackId = theFirstSeedingRecHit->
simtrackId();
138 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
139 if( tkId != tkIds.end() )
continue;
141 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
143 if (
clean(muRef,region,aSeed,theSimTrack) ) tkSeeds.push_back(*aSeed);
144 tkIds.insert(simTrackId);
162 unsigned int isMax=tkSeeds.size();
163 for (;is!=isMax;++is){
187 double etaSeed = theSimTrack.
momentum().Eta();
188 double etaLimit = (fabs(fabs(etaRange.
max())-fabs(etaRange.
mean())) <0.05) ?
189 0.05 : fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean())) ;
191 etaSeed >= (etaRange.
mean() - etaLimit) &&
192 etaSeed <= (etaRange.
mean() + etaLimit) ;
193 if ( !inEtaRange )
return false;
197 double phiSeed = theSimTrack.
momentum().Phi();
198 double phiLimit = (phiMargin.
right() < 0.05 ) ? 0.05 : phiMargin.
right();
200 (fabs(
deltaPhi(phiSeed,
double(region->direction().phi()))) < phiLimit );
201 if ( !inPhiRange )
return false;
205 double ptMin = (region->ptMin()>3.5) ? 3.5: region->ptMin();
206 bool inPtRange = ptSeed >= ptMin && ptSeed<= 2*(muRef->pt());
void update(const edm::EventSetup &setup)
update the services each event
RectangularEtaPhiTrackingRegion * region(const reco::TrackRef &) const
define tracking region
T getParameter(std::string const &) const
virtual ~FastTSGFromL2Muon()
MuonServiceProxy * theService
std::vector< edm::InputTag > theSeedCollectionLabels
virtual void produce(edm::Event &ev, const edm::EventSetup &es) override
virtual void setEvent(const edm::Event &)
pass the Event to the algo at each event
std::vector< L3MuonTrajectorySeed > L3MuonTrajectorySeedCollection
edm::InputTag theSimTrackCollectionLabel
MuonTrackingRegionBuilder * theRegionBuilder
edm::ParameterSet theConfig
const int & simtrackId() const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool clean(reco::TrackRef muRef, RectangularEtaPhiTrackingRegion *region, const BasicTrajectorySeed *aSeed, const SimTrack &theSimTrack)
std::pair< const_iterator, const_iterator > range
FastTSGFromL2Muon(const edm::ParameterSet &cfg)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag theL2CollectionLabel
const math::XYZTLorentzVectorD & momentum() const
particle info...
virtual void beginRun(edm::Run const &run, edm::EventSetup const &es) override