CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
ctfseeding::HitExtractorSTRP Class Referencefinal

#include <HitExtractorSTRP.h>

Inheritance diagram for ctfseeding::HitExtractorSTRP:
ctfseeding::HitExtractor

Public Types

typedef SiStripRecHit2D::ClusterRef SiStripClusterRef
 
- Public Types inherited from ctfseeding::HitExtractor
using HitPointer = mayown_ptr< BaseTrackerRecHit >
 
using Hits = std::vector< HitPointer >
 
using TkHit = BaseTrackerRecHit
 
using TkHitRef = BaseTrackerRecHit const &
 

Public Member Functions

void cleanedOfClusters (const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &ev, HitExtractor::Hits &hits, bool matched, unsigned int cleanFrom=0) const
 
HitExtractorSTRPclone () const override
 
std::tuple< int, int > getMinMaxRing () const
 
 HitExtractorSTRP (GeomDetEnumerators::SubDetector subdet, TrackerDetSide side, int idLayer, float iminGoodCharge)
 
HitExtractor::Hits hits (const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &, const edm::EventSetup &) const override
 
void setMinAbsZ (double minZToSet)
 
void setNoProjection ()
 
std::pair< bool, ProjectedSiStripRecHit2D * > skipThis (const TkTransientTrackingRecHitBuilder &ttrhBuilder, TkHitRef matched, edm::Handle< edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > > &stripClusterMask) const
 
bool skipThis (DetId id, OmniClusterRef const &clus, edm::Handle< edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > > &stripClusterMask) const
 
void useMatchedHits (const edm::InputTag &m, edm::ConsumesCollector &iC)
 
void useRingSelector (int minRing, int maxRing)
 
bool useRingSelector () const
 
void useRPhiHits (const edm::InputTag &m, edm::ConsumesCollector &iC)
 
void useSimpleRphiHitsCleaner (bool use)
 
void useStereoHits (const edm::InputTag &m, edm::ConsumesCollector &iC)
 
 ~HitExtractorSTRP () override
 
- Public Member Functions inherited from ctfseeding::HitExtractor
 HitExtractor ()
 
void useSkipClusters (const edm::InputTag &m, edm::ConsumesCollector &iC)
 
virtual ~HitExtractor ()
 

Private Types

typedef edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > SkipClustersCollection
 

Private Member Functions

bool ringRange (int ring) const
 
void useSkipClusters_ (const edm::InputTag &m, edm::ConsumesCollector &iC) override
 

Private Attributes

bool failProjection
 
bool hasMatchedHits
 
bool hasRingSelector
 
bool hasRPhiHits
 
bool hasSimpleRphiHitsCleaner
 
bool hasStereoHits
 
double minAbsZ
 
int theIdLayer
 
const GeomDetEnumerators::SubDetector theLayerSubDet
 
edm::EDGetTokenT< SiStripMatchedRecHit2DCollectiontheMatchedHits
 
int theMaxRing
 
int theMinRing
 
edm::EDGetTokenT< SiStripRecHit2DCollectiontheRPhiHits
 
TrackerDetSide theSide
 
edm::EDGetTokenT< SkipClustersCollectiontheSkipClusters
 
edm::EDGetTokenT< SiStripRecHit2DCollectiontheStereoHits
 

Additional Inherited Members

- Public Attributes inherited from ctfseeding::HitExtractor
bool filterCluster =false
 
bool maskCluster =false
 
float minGoodCharge =0
 
bool skipClusters =false
 

Detailed Description

Definition at line 22 of file HitExtractorSTRP.h.

Member Typedef Documentation

Definition at line 25 of file HitExtractorSTRP.h.

Definition at line 55 of file HitExtractorSTRP.h.

Constructor & Destructor Documentation

HitExtractorSTRP::HitExtractorSTRP ( GeomDetEnumerators::SubDetector  subdet,
TrackerDetSide  side,
int  idLayer,
float  iminGoodCharge 
)

Definition at line 29 of file HitExtractorSTRP.cc.

References ctfseeding::HitExtractor::minGoodCharge, and ctfseeding::HitExtractor::skipClusters.

29  :
30  theLayerSubDet(subdet), theSide(side), theIdLayer(idLayer),
31  minAbsZ(0), theMinRing(1), theMaxRing(0),
32  hasMatchedHits(false), hasRPhiHits(false), hasStereoHits(false),
34 { minGoodCharge=iminGoodCharge; if (minGoodCharge>0) skipClusters=true; }
const GeomDetEnumerators::SubDetector theLayerSubDet
ctfseeding::HitExtractorSTRP::~HitExtractorSTRP ( )
inlineoverride

Definition at line 28 of file HitExtractorSTRP.h.

References hfClusterShapes_cfi::hits.

28 {}

Member Function Documentation

void HitExtractorSTRP::cleanedOfClusters ( const TkTransientTrackingRecHitBuilder ttrhBuilder,
const edm::Event ev,
HitExtractor::Hits hits,
bool  matched,
unsigned int  cleanFrom = 0 
) const

Definition at line 100 of file HitExtractorSTRP.cc.

References relativeConstraints::empty, edm::Event::getByToken(), plotBeamSpotDB::last, LogDebug, ctfseeding::HitExtractor::maskCluster, AlCaHLTBitMon_ParallelJobs::p, python.rootplot.root2matplotlib::replace(), runEdmFileComparison::skipped, skipThis(), and theSkipClusters.

Referenced by hits().

103  {
104  LogDebug("HitExtractorPIX")<<"getting: "<<hits.size()<<" in input.";
105  edm::Handle<SkipClustersCollection> stripClusterMask;
106  if (maskCluster) ev.getByToken(theSkipClusters,stripClusterMask);
107  unsigned int skipped=0;
108  unsigned int projected=0;
109  for (unsigned int iH=cleanFrom;iH<hits.size();++iH){
110  assert(hits[iH]->isValid());
111  auto id = hits[iH]->geographicalId();
112  if (matched) {
113  bool replace; ProjectedSiStripRecHit2D * replaceMe; std::tie(replace,replaceMe) = skipThis(ttrhBuilder, *hits[iH],stripClusterMask);
114  if (replace) {
115  if (!replaceMe) {
116  LogDebug("HitExtractorSTRP")<<"skipping a matched hit on :"<<hits[iH]->geographicalId().rawId();
117  skipped++;
118  } else projected++;
119  hits[iH].reset(replaceMe);
120  if (replaceMe==nullptr) assert(hits[iH].empty());
121  else assert(hits[iH].isOwn());
122  }
123  }
124  else if (skipThis(id, hits[iH]->firstClusterRef(),stripClusterMask)){
125  LogDebug("HitExtractorSTRP")<<"skipping a hit on :"<<hits[iH]->geographicalId().rawId()<<" key: ";
126  skipped++;
127  hits[iH].reset();
128  }
129  }
130  // remove empty elements...
131  auto last = std::remove_if(hits.begin()+cleanFrom,hits.end(),[]( HitPointer const & p) {return p.empty();});
132  hits.resize(last-hits.begin());
133 
134  // std::cout << "HitExtractorSTRP " <<"skipped :"<<skipped<<" strip rechits because of clusters and projected: "<<projected << std::endl;
135  LogDebug("HitExtractorSTRP")<<"skipped :"<<skipped<<" strip rechits because of clusters and projected: "<<projected;
136 }
#define LogDebug(id)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
def replace(string, replacements)
std::pair< bool, ProjectedSiStripRecHit2D * > skipThis(const TkTransientTrackingRecHitBuilder &ttrhBuilder, TkHitRef matched, edm::Handle< edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > > &stripClusterMask) const
mayown_ptr< BaseTrackerRecHit > HitPointer
Definition: HitExtractor.h:23
HitExtractor::Hits hits(const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &, const edm::EventSetup &) const override
edm::EDGetTokenT< SkipClustersCollection > theSkipClusters
HitExtractorSTRP* ctfseeding::HitExtractorSTRP::clone ( void  ) const
inlineoverridevirtual

Implements ctfseeding::HitExtractor.

Definition at line 31 of file HitExtractorSTRP.h.

31 { return new HitExtractorSTRP(*this); }
HitExtractorSTRP(GeomDetEnumerators::SubDetector subdet, TrackerDetSide side, int idLayer, float iminGoodCharge)
std::tuple<int, int> ctfseeding::HitExtractorSTRP::getMinMaxRing ( ) const
inline
HitExtractor::Hits HitExtractorSTRP::hits ( const TkTransientTrackingRecHitBuilder ttrhBuilder,
const edm::Event ev,
const edm::EventSetup es 
) const
overridevirtual

Implements ctfseeding::HitExtractor.

Definition at line 138 of file HitExtractorSTRP.cc.

References cleanedOfClusters(), end, edmNew::DetSetVector< T >::equal_range(), edm::EventSetup::get(), edm::Event::getByToken(), hasMatchedHits, hasRPhiHits, hasSimpleRphiHitsCleaner, hasStereoHits, LogDebug, minAbsZ, edm::ESHandle< T >::product(), ctfseeding::range2SeedingHits(), mps_fire::result, relativeConstraints::ring, ringRange(), ctfseeding::HitExtractor::skipClusters, GeomDetEnumerators::TEC, TrackerTopology::tecDetIdWheelComparator(), TrackerTopology::tecRing(), theIdLayer, theLayerSubDet, theMatchedHits, theRPhiHits, theSide, theStereoHits, GeomDetEnumerators::TIB, TrackerTopology::tibDetIdLayerComparator(), GeomDetEnumerators::TID, TrackerTopology::tidDetIdWheelComparator(), TrackerTopology::tidRing(), GeomDetEnumerators::TOB, TrackerTopology::tobDetIdLayerComparator(), and hit::z.

139 {
141  unsigned int cleanFrom=0;
142 
143  //Retrieve tracker topology from geometry
144  edm::ESHandle<TrackerTopology> tTopoHandle;
145  es.get<TrackerTopologyRcd>().get(tTopoHandle);
146  const TrackerTopology* const tTopo = tTopoHandle.product();
147 
148  //
149  // TIB
150  //
152  if (hasMatchedHits) {
154  ev.getByToken( theMatchedHits, matchedHits);
155  if (skipClusters) cleanFrom=result.size();
156  range2SeedingHits( *matchedHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
157  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,true,cleanFrom);
158  }
159  if (hasRPhiHits) {
161  ev.getByToken( theRPhiHits, rphiHits);
162  if (hasMatchedHits){
163  if (!hasSimpleRphiHitsCleaner){ // this is a brutal "cleaning". Add something smarter in the future
164  if (skipClusters) cleanFrom=result.size();
165  range2SeedingHits( *rphiHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
166  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
167  }
168  } else {
169  if (skipClusters) cleanFrom=result.size();
170  range2SeedingHits( *rphiHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
171  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
172  }
173  }
174  if (hasStereoHits) {
176  ev.getByToken( theStereoHits, stereoHits);
177  if (skipClusters) cleanFrom=result.size();
178  range2SeedingHits( *stereoHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
179  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
180  }
181  }
182 
183  //
184  // TID
185  //
187  if (hasMatchedHits) {
189  ev.getByToken( theMatchedHits, matchedHits);
190  if (skipClusters) cleanFrom=result.size();
191  auto getter = tTopo->tidDetIdWheelComparator(static_cast<unsigned int>(theSide),theIdLayer);
192  SiStripMatchedRecHit2DCollection::Range range = matchedHits->equal_range(getter.first, getter.second);
193  for (SiStripMatchedRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
194  int ring = tTopo->tidRing( it->detId() ); if (!ringRange(ring)) continue;
195  for (SiStripMatchedRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
196  result.emplace_back(*hit);
197  }
198  }
199  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,true,cleanFrom);
200  }
201  if (hasRPhiHits) {
203  ev.getByToken( theRPhiHits, rphiHits);
204  if (skipClusters) cleanFrom=result.size();
205  auto getter = tTopo->tidDetIdWheelComparator(static_cast<unsigned int>(theSide),theIdLayer);
206  SiStripRecHit2DCollection::Range range = rphiHits->equal_range(getter.first, getter.second);
207  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
208  int ring = tTopo->tidRing( it->detId() ); if (!ringRange(ring)) continue;
209  if ((SiStripDetId(it->detId()).partnerDetId() != 0) && hasSimpleRphiHitsCleaner) continue; // this is a brutal "cleaning". Add something smarter in the future
210  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
211  result.emplace_back(*hit);
212  }
213  }
214  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
215  }
216  if (hasStereoHits) {
218  ev.getByToken( theStereoHits, stereoHits);
219  if (skipClusters) cleanFrom=result.size();
220  auto getter = tTopo->tidDetIdWheelComparator(static_cast<unsigned int>(theSide),theIdLayer);
221  SiStripRecHit2DCollection::Range range = stereoHits->equal_range(getter.first, getter.second);
222  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
223  int ring = tTopo->tidRing( it->detId() ); if (!ringRange(ring)) continue;
224  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
225  result.emplace_back(*hit);
226  }
227  }
228  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
229  }
230  }
231  //
232  // TOB
233  //
235  if (hasMatchedHits) {
237  ev.getByToken( theMatchedHits, matchedHits);
238  if (skipClusters) cleanFrom=result.size();
239  if (minAbsZ>0.) {
240  auto getter = tTopo->tobDetIdLayerComparator(theIdLayer);
241  SiStripMatchedRecHit2DCollection::Range range = matchedHits->equal_range(getter.first, getter.second);
242  for (SiStripMatchedRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
243  for (SiStripMatchedRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
244  if (fabs(hit->globalPosition().z())>=minAbsZ) result.emplace_back(*hit);
245  }
246  }
247  } else {
248  range2SeedingHits( *matchedHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
249  }
250  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,true,cleanFrom);
251  }
252  if (hasRPhiHits) {
254  ev.getByToken( theRPhiHits, rphiHits);
255  if (hasMatchedHits){
256  if (!hasSimpleRphiHitsCleaner){ // this is a brutal "cleaning". Add something smarter in the future
257  if (skipClusters) cleanFrom=result.size();
258  range2SeedingHits( *rphiHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
259  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
260  }
261  } else {
262  if (skipClusters) cleanFrom=result.size();
263  range2SeedingHits( *rphiHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
264  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
265  }
266  }
267  if (hasStereoHits) {
269  ev.getByToken( theStereoHits, stereoHits);
270  if (skipClusters) cleanFrom=result.size();
271  range2SeedingHits( *stereoHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
272  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
273  }
274  }
275 
276  //
277  // TEC
278  //
280  if (hasMatchedHits) {
282  ev.getByToken( theMatchedHits, matchedHits);
283  if (skipClusters) cleanFrom=result.size();
284  auto getter = tTopo->tecDetIdWheelComparator(static_cast<unsigned int>(theSide),theIdLayer);
285  SiStripMatchedRecHit2DCollection::Range range = matchedHits->equal_range(getter.first, getter.second);
286  for (SiStripMatchedRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
287  int ring = tTopo->tecRing( it->detId() ); if (!ringRange(ring)) continue;
288  for (SiStripMatchedRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
289  result.emplace_back(*hit);
290  }
291  }
292  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,true,cleanFrom);
293  }
294  if (hasRPhiHits) {
296  ev.getByToken( theRPhiHits, rphiHits);
297  if (skipClusters) cleanFrom=result.size();
298  auto getter = tTopo->tecDetIdWheelComparator(static_cast<unsigned int>(theSide),theIdLayer);
299  SiStripRecHit2DCollection::Range range = rphiHits->equal_range(getter.first, getter.second);
300  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
301  int ring = tTopo->tecRing( it->detId() ); if (!ringRange(ring)) continue;
302  if ((SiStripDetId(it->detId()).partnerDetId() != 0) && hasSimpleRphiHitsCleaner) continue; // this is a brutal "cleaning". Add something smarter in the future
303  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
304  result.emplace_back(*hit);
305  }
306  }
307  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
308 
309  }
310  if (hasStereoHits) {
312  ev.getByToken( theStereoHits, stereoHits);
313  if (skipClusters) cleanFrom=result.size();
314  auto getter = tTopo->tecDetIdWheelComparator(static_cast<unsigned int>(theSide),theIdLayer);
315  SiStripRecHit2DCollection::Range range = stereoHits->equal_range(getter.first, getter.second);
316  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
317  int ring = tTopo->tecRing( it->detId() ); if (!ringRange(ring)) continue;
318  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
319  result.emplace_back(*hit);
320  }
321  }
322  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
323  }
324  }
325 
326  LogDebug("HitExtractorSTRP")<<" giving: "<<result.size()<<" out";
327  // std::cout << "HitExtractorSTRP "<<" giving: "<<result.size() << " for charge cut " << minGoodCharge << std::endl;
328  return result;
329 }
#define LogDebug(id)
void range2SeedingHits(DSTV const &dstv, HitExtractor::Hits &v, std::pair< A, B > const &sel)
Definition: HitExtractor.h:48
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
unsigned int tidRing(const DetId &id) const
std::vector< HitPointer > Hits
Definition: HitExtractor.h:24
Range equal_range(id_type i, CMP cmp, bool update=false) const
bool ringRange(int ring) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
unsigned int tecRing(const DetId &id) const
ring id
std::pair< const_iterator, const_iterator > Range
std::pair< DetId, SameLayerComparator > tidDetIdWheelComparator(uint32_t side, uint32_t wheel) const
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > theMatchedHits
std::pair< DetId, SameLayerComparator > tobDetIdLayerComparator(uint32_t layer) const
const GeomDetEnumerators::SubDetector theLayerSubDet
edm::EDGetTokenT< SiStripRecHit2DCollection > theStereoHits
std::pair< DetId, SameLayerComparator > tibDetIdLayerComparator(uint32_t layer) const
void cleanedOfClusters(const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &ev, HitExtractor::Hits &hits, bool matched, unsigned int cleanFrom=0) const
#define end
Definition: vmac.h:39
std::pair< DetId, SameLayerComparator > tecDetIdWheelComparator(uint32_t side, uint32_t wheel) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
edm::EDGetTokenT< SiStripRecHit2DCollection > theRPhiHits
T get() const
Definition: EventSetup.h:63
T const * product() const
Definition: ESHandle.h:86
bool HitExtractorSTRP::ringRange ( int  ring) const
private

Definition at line 47 of file HitExtractorSTRP.cc.

References hasRingSelector, theMaxRing, and theMinRing.

Referenced by hits().

void ctfseeding::HitExtractorSTRP::setMinAbsZ ( double  minZToSet)
inline

Definition at line 48 of file HitExtractorSTRP.h.

48 {minAbsZ=minZToSet;}
void ctfseeding::HitExtractorSTRP::setNoProjection ( )
inline

Definition at line 47 of file HitExtractorSTRP.h.

std::pair< bool, ProjectedSiStripRecHit2D * > HitExtractorSTRP::skipThis ( const TkTransientTrackingRecHitBuilder ttrhBuilder,
TkHitRef  matched,
edm::Handle< edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > > &  stripClusterMask 
) const

Definition at line 65 of file HitExtractorSTRP.cc.

References TkTransientTrackingRecHitBuilder::cloner(), failProjection, TrackingRecHit::geographicalId(), OmniClusterRef::key(), LogDebug, SiStripMatchedRecHit2D::monoClusterRef(), DetId::rawId(), and SiStripMatchedRecHit2D::stereoClusterRef().

Referenced by cleanedOfClusters().

67  {
69 
70  assert(dynamic_cast<SiStripMatchedRecHit2D const*>(&matched));
71 
72  auto id = hit.geographicalId();
73  ProjectedSiStripRecHit2D * replaceMe = nullptr;
74  bool rejectSt = skipThis(id,hit.stereoClusterRef(), stripClusterMask);
75  bool rejectMono = skipThis(id, hit.monoClusterRef(), stripClusterMask);
76 
77  if ((!rejectSt)&(!rejectMono)){
78  // keepit
79  return std::make_pair(false,replaceMe);
80  }
81 
82  if (failProjection || (rejectSt&rejectMono) ){
83  //only skip if both hits are done
84  return std::make_pair(true,replaceMe);
85  }
86 
87  // replace with one
88 
89  auto cloner = ttrhBuilder.cloner();
90  replaceMe = cloner.project(hit, rejectSt, TrajectoryStateOnSurface()).release();
91  if (rejectSt)
92  LogDebug("HitExtractorSTRP")<<"a matched hit is partially masked, and the mono hit got projected onto: "<<replaceMe->geographicalId().rawId()<<" key: "<<hit.monoClusterRef().key();
93  else
94  LogDebug("HitExtractorSTRP")<<"a matched hit is partially masked, and the stereo hit got projected onto: "<<replaceMe->geographicalId().rawId()<<" key: "<<hit.stereoClusterRef().key();
95 
96  return std::make_pair(true,replaceMe);
97 }
#define LogDebug(id)
OmniClusterRef const & stereoClusterRef() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
std::pair< bool, ProjectedSiStripRecHit2D * > skipThis(const TkTransientTrackingRecHitBuilder &ttrhBuilder, TkHitRef matched, edm::Handle< edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > > &stripClusterMask) const
OmniClusterRef const & monoClusterRef() const
DetId geographicalId() const
unsigned int key() const
bool HitExtractorSTRP::skipThis ( DetId  id,
OmniClusterRef const &  clus,
edm::Handle< edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > > &  stripClusterMask 
) const

Definition at line 53 of file HitExtractorSTRP.cc.

References siStripClusterTools::chargePerCM(), OmniClusterRef::cluster_strip(), OmniClusterRef::key(), ctfseeding::HitExtractor::maskCluster, ctfseeding::HitExtractor::minGoodCharge, and UNLIKELY.

54  {
55 
56  if (maskCluster && (stripClusterMask->mask(clus.key())) ) return true;
57 
59  return siStripClusterTools::chargePerCM(id,*clus.cluster_strip()) <= minGoodCharge;
60 }
float chargePerCM(DetId detid, Iter a, Iter b)
return((rh^lh)&mask)
bool mask(unsigned int iIndex) const
Definition: ContainerMask.h:44
#define UNLIKELY(x)
void ctfseeding::HitExtractorSTRP::useMatchedHits ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
inline

Definition at line 33 of file HitExtractorSTRP.h.

References edm::ConsumesCollector::consumes(), and funct::m.

EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > theMatchedHits
void HitExtractorSTRP::useRingSelector ( int  minRing,
int  maxRing 
)
bool ctfseeding::HitExtractorSTRP::useRingSelector ( ) const
inline

Definition at line 50 of file HitExtractorSTRP.h.

void ctfseeding::HitExtractorSTRP::useRPhiHits ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
inline

Definition at line 34 of file HitExtractorSTRP.h.

References edm::ConsumesCollector::consumes(), and funct::m.

EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< SiStripRecHit2DCollection > theRPhiHits
void ctfseeding::HitExtractorSTRP::useSimpleRphiHitsCleaner ( bool  use)
inline
void HitExtractorSTRP::useSkipClusters_ ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
overrideprivatevirtual

Implements ctfseeding::HitExtractor.

Definition at line 36 of file HitExtractorSTRP.cc.

References edm::ConsumesCollector::consumes(), funct::m, and theSkipClusters.

36  {
38 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > SkipClustersCollection
edm::EDGetTokenT< SkipClustersCollection > theSkipClusters
void ctfseeding::HitExtractorSTRP::useStereoHits ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
inline

Definition at line 35 of file HitExtractorSTRP.h.

References edm::ConsumesCollector::consumes(), funct::m, ConversionStep2_cff::maxRing, and ConversionStep2_cff::minRing.

EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< SiStripRecHit2DCollection > theStereoHits

Member Data Documentation

bool ctfseeding::HitExtractorSTRP::failProjection
private

Definition at line 72 of file HitExtractorSTRP.h.

Referenced by skipThis().

bool ctfseeding::HitExtractorSTRP::hasMatchedHits
private

Definition at line 67 of file HitExtractorSTRP.h.

Referenced by hits().

bool ctfseeding::HitExtractorSTRP::hasRingSelector
private

Definition at line 70 of file HitExtractorSTRP.h.

Referenced by ringRange(), and useRingSelector().

bool ctfseeding::HitExtractorSTRP::hasRPhiHits
private

Definition at line 68 of file HitExtractorSTRP.h.

Referenced by hits().

bool ctfseeding::HitExtractorSTRP::hasSimpleRphiHitsCleaner
private

Definition at line 71 of file HitExtractorSTRP.h.

Referenced by hits().

bool ctfseeding::HitExtractorSTRP::hasStereoHits
private

Definition at line 69 of file HitExtractorSTRP.h.

Referenced by hits().

double ctfseeding::HitExtractorSTRP::minAbsZ
private

Definition at line 61 of file HitExtractorSTRP.h.

Referenced by hits().

int ctfseeding::HitExtractorSTRP::theIdLayer
private

Definition at line 60 of file HitExtractorSTRP.h.

Referenced by hits().

const GeomDetEnumerators::SubDetector ctfseeding::HitExtractorSTRP::theLayerSubDet
private

Definition at line 58 of file HitExtractorSTRP.h.

Referenced by hits().

edm::EDGetTokenT<SiStripMatchedRecHit2DCollection> ctfseeding::HitExtractorSTRP::theMatchedHits
private

Definition at line 64 of file HitExtractorSTRP.h.

Referenced by hits().

int ctfseeding::HitExtractorSTRP::theMaxRing
private

Definition at line 62 of file HitExtractorSTRP.h.

Referenced by ringRange(), and useRingSelector().

int ctfseeding::HitExtractorSTRP::theMinRing
private

Definition at line 62 of file HitExtractorSTRP.h.

Referenced by ringRange(), and useRingSelector().

edm::EDGetTokenT<SiStripRecHit2DCollection> ctfseeding::HitExtractorSTRP::theRPhiHits
private

Definition at line 65 of file HitExtractorSTRP.h.

Referenced by hits().

TrackerDetSide ctfseeding::HitExtractorSTRP::theSide
private

Definition at line 59 of file HitExtractorSTRP.h.

Referenced by hits().

edm::EDGetTokenT<SkipClustersCollection> ctfseeding::HitExtractorSTRP::theSkipClusters
private

Definition at line 63 of file HitExtractorSTRP.h.

Referenced by cleanedOfClusters(), and useSkipClusters_().

edm::EDGetTokenT<SiStripRecHit2DCollection> ctfseeding::HitExtractorSTRP::theStereoHits
private

Definition at line 66 of file HitExtractorSTRP.h.

Referenced by hits().