Skip to content

Commit

Permalink
Merge pull request cms-sw#7798 from makortel/phase1_fwd_variousSimple
Browse files Browse the repository at this point in the history
Forward-port three simple tracking PRs from 620_SLHC
  • Loading branch information
cmsbuild committed Mar 5, 2015
2 parents d560bac + 2b24634 commit 4253a6b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class PixelTrackCleanerWrapper {
const std::vector<const TrackingRecHit *> & trhs = it->second;
assert(!(trhs.size()<2));
if (trhs.size()<2) continue;
SeedingHitSet ttrhs( hitMap[trhs[0]], hitMap[trhs[1]], trhs.size()>2 ? hitMap[trhs[2]] : SeedingHitSet::nullPtr());
SeedingHitSet ttrhs( hitMap[trhs[0]], hitMap[trhs[1]],
trhs.size()>2 ? hitMap[trhs[2]] : SeedingHitSet::nullPtr(),
trhs.size()>3 ? hitMap[trhs[3]] : SeedingHitSet::nullPtr() );

finalT_TTRHs.push_back( pixeltrackfitting::TrackWithTTRHs(it->first, ttrhs));
}
return finalT_TTRHs;
Expand Down
2 changes: 1 addition & 1 deletion RecoTracker/TkDetLayers/src/BladeShapeBuilderFromDet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace {
float rmed = (rmin+rmax)/2.;
if ( phiWin < 0. ) {
if ( (phimin < Geom::pi() / 2.) || (phimax > -Geom::pi()/2.) ){
edm::LogError("TkDetLayers") << " something strange going on, please check " ;
edm::LogError("TkDetLayers") << " something strange going on, please check " << phimin << " " << phimax << " " << phiWin ;
}
//edm::LogInfo(TkDetLayers) << " Wedge at pi: phi " << phimin << " " << phimax << " " << phiWin
// << " " << 2.*Geom::pi()+phiWin << " " ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <vector>
#include <cassert>
using namespace edm;
using namespace reco;

Expand Down Expand Up @@ -123,7 +122,6 @@ void SeedGeneratorFromProtoTracksEDProducer::produce(edm::Event& ev, const edm::
if(refHit->isValid()) hits.push_back((Hit)&(*refHit));
}
sort(hits.begin(), hits.end(), HitLessByRadius());
assert(hits.size()<4);
if (hits.size() > 1) {
double mom_perp = sqrt(proto.momentum().x()*proto.momentum().x()+proto.momentum().y()*proto.momentum().y());
GlobalTrackingRegion region(mom_perp, vtx, 0.2, 0.2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ void SeedGeneratorFromRegionHits::run(TrajectorySeedCollection & seedCollection,
const OrderedSeedingHits & hitss = theHitsGenerator->run(region, ev, es);

unsigned int nHitss = hitss.size();
if (seedCollection.empty()) seedCollection.reserve(nHitss); // don't do multiple reserves in the case of multiple regions: it would make things even worse
// as it will cause N re-allocations instead of the normal log(N)/log(2)
// Modified 10/Jun/2014 Mark Grimes - At 140 pileup this reserve massively overestimates
// the amount of memory required. Removing it doesn't appear to slow down the algorithm
// noticeably.
//if (seedCollection.empty()) seedCollection.reserve(nHitss); // don't do multiple reserves in the case of multiple regions: it would make things even worse
// // as it will cause N re-allocations instead of the normal log(N)/log(2)
for (unsigned int iHits = 0; iHits < nHitss; ++iHits) {
const SeedingHitSet & hits = hitss[iHits];
if (!theComparitor || theComparitor->compatible(hits, region) ) {
Expand Down

0 comments on commit 4253a6b

Please sign in to comment.