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 )
return;
63 std::vector<TrajectorySeed> tkSeeds;
64 std::set<unsigned> tkIds;
65 tkSeeds.reserve(seed_size);
68 unsigned nSeeds = aSeedCollection->size();
69 for (
unsigned seednr = 0; seednr < nSeeds; ++seednr) {
80 int simTrackId = theFirstSeedingRecHit->
simtrackId();
83 std::set<unsigned>::iterator tkId = tkIds.find(simTrackId);
84 if( tkId != tkIds.end() )
continue;
86 const SimTrack& theSimTrack = (*theSimTracks)[simTrackId];
90 if(
clean(muRef,regionRef,aSeed,theSimTrack) ) tkSeeds.push_back(*aSeed);
91 tkIds.insert(simTrackId);
99 unsigned int isMax=tkSeeds.size();
100 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();
133 (fabs(
deltaPhi(phiSeed,
double(region.direction().phi()))) < phiLimit );
134 if ( !inPhiRange )
return false;
138 double ptMin = (region.ptMin()>3.5) ? 3.5: region.ptMin();
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
edm::InputTag theSimTrackCollectionLabel
virtual ~FastTSGFromIOHit()
destructor
std::vector< edm::InputTag > theSeedCollectionLabels
const int & simtrackId() const
void trackerSeeds(const TrackCand &, const TrackingRegion &, std::vector< TrajectorySeed > &)
generate seed(s) for a track
const edm::Event * getEvent() const
std::pair< const_iterator, const_iterator > range
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const math::XYZTLorentzVectorD & momentum() const
particle info...
bool clean(reco::TrackRef muRef, const RectangularEtaPhiTrackingRegion ®ion, const BasicTrajectorySeed *aSeed, const SimTrack &theSimTrack)