21 theCategory =
"FastSimulation|Muons||FastTSGFromIOHit";
46 std::vector<edm::Handle<edm::View<TrajectorySeed> > > theSeeds;
47 theSeeds.resize(seedCollections);
48 unsigned seed_size = 0;
51 seed_size += theSeeds[
iseed]->size();
59 || muRef->innerMomentum().Rho() <
thePtCut
60 || muRef->innerMomentum().R() < 2.5 ){
64 std::vector<TrajectorySeed> tkSeeds;
65 std::set<unsigned> tkIds;
66 tkSeeds.reserve(seed_size);
69 unsigned nSeeds = aSeedCollection->size();
70 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
81 int simTrackId = theFirstSeedingRecHit->
simTrackId(0);
84 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
85 if( tkId != tkIds.end() )
continue;
87 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
91 if(
clean(muRef,regionRef,aSeed,theSimTrack) ) tkSeeds.push_back(*aSeed);
92 tkIds.insert(simTrackId);
100 unsigned int isMax=tkSeeds.size();
101 for (;is!=isMax;++is){
120 double etaSeed = theSimTrack.
momentum().Eta();
121 double etaLimit = (fabs(fabs(etaRange.
max())-fabs(etaRange.
mean())) <0.05) ?
122 0.05 : fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean())) ;
124 etaSeed >= (etaRange.
mean() - etaLimit) &&
125 etaSeed <= (etaRange.
mean() + etaLimit) ;
126 if ( !inEtaRange )
return false;
130 double phiSeed = theSimTrack.
momentum().Phi();
131 double phiLimit = (phiMargin.
right() < 0.05 ) ? 0.05 : phiMargin.
right();
134 if ( !inPhiRange )
return false;
139 bool inPtRange = ptSeed >= ptMin && ptSeed<= 2*(muRef->pt());
T getParameter(std::string const &) const
FastTSGFromIOHit(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
std::pair< const Trajectory *, reco::TrackRef > TrackCand
const Margin & phiMargin() const
Geom::Phi< T > phi() const
edm::InputTag theSimTrackCollectionLabel
virtual ~FastTSGFromIOHit()
destructor
std::vector< edm::InputTag > theSeedCollectionLabels
GlobalVector const & direction() const
the direction around which region is constructed
void trackerSeeds(const TrackCand &, const TrackingRegion &, std::vector< TrajectorySeed > &)
generate seed(s) for a track
const edm::Event * getEvent() const
virtual int32_t simTrackId(size_t i) const
std::pair< const_iterator, const_iterator > range
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
float ptMin() const
minimal pt of interest
const math::XYZTLorentzVectorD & momentum() const
bool clean(reco::TrackRef muRef, const RectangularEtaPhiTrackingRegion ®ion, const BasicTrajectorySeed *aSeed, const SimTrack &theSimTrack)
const Range & etaRange() const
allowed eta range [eta_min, eta_max] interval