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();
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){
121 double etaSeed = theSimTrack.
momentum().Eta();
122 double etaLimit = (fabs(fabs(etaRange.
max())-fabs(etaRange.
mean())) <0.05) ?
123 0.05 : fabs(fabs(etaRange.
max()) - fabs(etaRange.
mean())) ;
125 etaSeed >= (etaRange.
mean() - etaLimit) &&
126 etaSeed <= (etaRange.
mean() + etaLimit) ;
127 if ( !inEtaRange )
return false;
131 double phiSeed = theSimTrack.
momentum().Phi();
132 double phiLimit = (phiMargin.
right() < 0.05 ) ? 0.05 : phiMargin.
right();
135 if ( !inPhiRange )
return false;
140 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
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
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