23 using namespace ctfseeding;
29 : theLayer(detLayer), theSide(side), theIdLayer(idLayer),
31 hasRingSelector(
false), theMinRing(1), theMaxRing(0), hasSimpleRphiHitsCleaner(
true)
52 return stripClusterMask->mask(clus.
key());
57 const SiStripRecHit2D *
hit,
63 replaceMe=proj.
project( *sHit, *ptr->det());
64 if (!replaceMe)
LogDebug(
"HitExtractorSTRP")<<
"projection failed.";
70 const SiStripMatchedRecHit2D *
hit = (SiStripMatchedRecHit2D *) ptr->hit();
72 bool rejectSt =
skipThis(hit->stereoClusterRef(), stripClusterMask);
73 bool rejectMono =
skipThis(hit->monoClusterRef(), stripClusterMask);
75 if (rejectSt&&rejectMono){
81 auto const &
s= hit->stereoHit();
82 auto const &
m= hit->monoHit();
83 if (rejectSt)
project(ptr,&
s,replaceMe);
84 else if (rejectMono)
project(ptr,&
m,replaceMe);
85 if (!replaceMe)
return true;
87 LogDebug(
"HitExtractorSTRP")<<
"a matched hit is partially masked, and the mono hit got projected onto: "<<replaceMe->hit()->geographicalId().rawId()<<
" key: "<<hit->monoClusterRef().key();
89 LogDebug(
"HitExtractorSTRP")<<
"a matched hit is partially masked, and the stereo hit got projected onto: "<<replaceMe->hit()->geographicalId().rawId()<<
" key: "<<hit->stereoClusterRef().key();
98 unsigned int cleanFrom)
const{
99 LogDebug(
"HitExtractorPIX")<<
"getting: "<<hits.size()<<
" in input.";
103 unsigned int skipped=0;
104 unsigned int projected=0;
105 newHits.reserve(hits.size());
107 for (
unsigned int iH=cleanFrom;iH<hits.size();++iH){
108 if (!hits[iH]->isValid())
continue;
110 if (matched &&
skipThis(hits[iH],stripClusterMask,replaceMe)){
111 LogDebug(
"HitExtractorSTRP")<<
"skipping a matched hit on :"<<hits[iH]->hit()->geographicalId().rawId();
116 LogDebug(
"HitExtractorSTRP")<<
"skipping a hit on :"<<hits[iH]->hit()->geographicalId().rawId()<<
" key: ";
120 if (replaceMe!=hits[iH]) projected++;
121 newHits.push_back(replaceMe);
123 LogDebug(
"HitExtractorPIX")<<
"skipped :"<<skipped<<
" strip rechits because of clusters and projected: "<<projected;
132 unsigned int cleanFrom=0;
300 LogDebug(
"HitExtractorSTRP")<<
" giving: "<<result.size()<<
" out";
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
std::pair< DetId, DetIdTIDSameDiskComparator > stripTIDDisk(int side, int disk)
std::pair< DetId, DetIdTIBSameLayerComparator > stripTIBLayer(int layer)
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
std::pair< const_iterator, const_iterator > Range
void range2SeedingHits(DSTV const &dstv, HitExtractor::Hits &v, std::pair< A, B > const &sel, const SeedingLayer &sl, const edm::EventSetup &es)
RecHitPointer project(const TransientTrackingRecHit &hit, const GeomDet &det, const TrajectoryStateOnSurface &ts) const
std::pair< DetId, DetIdTOBSameLayerComparator > stripTOBLayer(int layer)
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
std::pair< DetId, DetIdTECSameDiskComparator > stripTECDisk(int side, int disk)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Detector identifier class for the strip tracker.
const TransientTrackingRecHitBuilder * hitBuilder() const