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 23 of file HitExtractorSTRP.h.

Member Typedef Documentation

Definition at line 25 of file HitExtractorSTRP.h.

Definition at line 74 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.

33  : theLayerSubDet(subdet),
34  theSide(side),
35  theIdLayer(idLayer),
36  minAbsZ(0),
37  theMinRing(1),
38  theMaxRing(0),
39  hasMatchedHits(false),
40  hasRPhiHits(false),
41  hasStereoHits(false),
42  hasRingSelector(false),
44  minGoodCharge = iminGoodCharge;
45  if (minGoodCharge > 0)
46  skipClusters = true;
47 }
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 114 of file HitExtractorSTRP.cc.

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

Referenced by hits().

118  {
119  LogDebug("HitExtractorPIX") << "getting: " << hits.size() << " in input.";
120  edm::Handle<SkipClustersCollection> stripClusterMask;
121  if (maskCluster)
122  ev.getByToken(theSkipClusters, stripClusterMask);
123  unsigned int skipped = 0;
124  unsigned int projected = 0;
125  for (unsigned int iH = cleanFrom; iH < hits.size(); ++iH) {
126  assert(hits[iH]->isValid());
127  auto id = hits[iH]->geographicalId();
128  if (matched) {
129  bool replace;
130  ProjectedSiStripRecHit2D* replaceMe;
131  std::tie(replace, replaceMe) = skipThis(ttrhBuilder, *hits[iH], stripClusterMask);
132  if (replace) {
133  if (!replaceMe) {
134  LogDebug("HitExtractorSTRP") << "skipping a matched hit on :" << hits[iH]->geographicalId().rawId();
135  skipped++;
136  } else
137  projected++;
138  hits[iH].reset(replaceMe);
139  if (replaceMe == nullptr)
140  assert(hits[iH].empty());
141  else
142  assert(hits[iH].isOwn());
143  }
144  } else if (skipThis(id, hits[iH]->firstClusterRef(), stripClusterMask)) {
145  LogDebug("HitExtractorSTRP") << "skipping a hit on :" << hits[iH]->geographicalId().rawId() << " key: ";
146  skipped++;
147  hits[iH].reset();
148  }
149  }
150  // remove empty elements...
151  auto last = std::remove_if(hits.begin() + cleanFrom, hits.end(), [](HitPointer const& p) { return p.empty(); });
152  hits.resize(last - hits.begin());
153 
154  // std::cout << "HitExtractorSTRP " <<"skipped :"<<skipped<<" strip rechits because of clusters and projected: "<<projected << std::endl;
155  LogDebug("HitExtractorSTRP") << "skipped :" << skipped
156  << " strip rechits because of clusters and projected: " << projected;
157 }
#define LogDebug(id)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
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:27
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 33 of file HitExtractorSTRP.h.

33 { 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 159 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(), FastTimerService_cff::range, 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.

161  {
163  unsigned int cleanFrom = 0;
164 
165  //Retrieve tracker topology from geometry
166  edm::ESHandle<TrackerTopology> tTopoHandle;
167  es.get<TrackerTopologyRcd>().get(tTopoHandle);
168  const TrackerTopology* const tTopo = tTopoHandle.product();
169 
170  //
171  // TIB
172  //
174  if (hasMatchedHits) {
176  ev.getByToken(theMatchedHits, matchedHits);
177  if (skipClusters)
178  cleanFrom = result.size();
179  range2SeedingHits(*matchedHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
180  if (skipClusters)
181  cleanedOfClusters(ttrhBuilder, ev, result, true, cleanFrom);
182  }
183  if (hasRPhiHits) {
185  ev.getByToken(theRPhiHits, rphiHits);
186  if (hasMatchedHits) {
187  if (!hasSimpleRphiHitsCleaner) { // this is a brutal "cleaning". Add something smarter in the future
188  if (skipClusters)
189  cleanFrom = result.size();
190  range2SeedingHits(*rphiHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
191  if (skipClusters)
192  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
193  }
194  } else {
195  if (skipClusters)
196  cleanFrom = result.size();
197  range2SeedingHits(*rphiHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
198  if (skipClusters)
199  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
200  }
201  }
202  if (hasStereoHits) {
204  ev.getByToken(theStereoHits, stereoHits);
205  if (skipClusters)
206  cleanFrom = result.size();
207  range2SeedingHits(*stereoHits, result, tTopo->tibDetIdLayerComparator(theIdLayer));
208  if (skipClusters)
209  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
210  }
211  }
212 
213  //
214  // TID
215  //
217  if (hasMatchedHits) {
219  ev.getByToken(theMatchedHits, matchedHits);
220  if (skipClusters)
221  cleanFrom = result.size();
222  auto getter = tTopo->tidDetIdWheelComparator(static_cast<unsigned int>(theSide), theIdLayer);
223  SiStripMatchedRecHit2DCollection::Range range = matchedHits->equal_range(getter.first, getter.second);
224  for (SiStripMatchedRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
225  int ring = tTopo->tidRing(it->detId());
226  if (!ringRange(ring))
227  continue;
228  for (SiStripMatchedRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end;
229  ++hit) {
230  result.emplace_back(*hit);
231  }
232  }
233  if (skipClusters)
234  cleanedOfClusters(ttrhBuilder, ev, result, true, cleanFrom);
235  }
236  if (hasRPhiHits) {
238  ev.getByToken(theRPhiHits, rphiHits);
239  if (skipClusters)
240  cleanFrom = result.size();
241  auto getter = tTopo->tidDetIdWheelComparator(static_cast<unsigned int>(theSide), theIdLayer);
242  SiStripRecHit2DCollection::Range range = rphiHits->equal_range(getter.first, getter.second);
243  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
244  int ring = tTopo->tidRing(it->detId());
245  if (!ringRange(ring))
246  continue;
247  if ((SiStripDetId(it->detId()).partnerDetId() != 0) && hasSimpleRphiHitsCleaner)
248  continue; // this is a brutal "cleaning". Add something smarter in the future
249  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
250  result.emplace_back(*hit);
251  }
252  }
253  if (skipClusters)
254  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
255  }
256  if (hasStereoHits) {
258  ev.getByToken(theStereoHits, stereoHits);
259  if (skipClusters)
260  cleanFrom = result.size();
261  auto getter = tTopo->tidDetIdWheelComparator(static_cast<unsigned int>(theSide), theIdLayer);
262  SiStripRecHit2DCollection::Range range = stereoHits->equal_range(getter.first, getter.second);
263  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
264  int ring = tTopo->tidRing(it->detId());
265  if (!ringRange(ring))
266  continue;
267  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
268  result.emplace_back(*hit);
269  }
270  }
271  if (skipClusters)
272  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
273  }
274  }
275  //
276  // TOB
277  //
279  if (hasMatchedHits) {
281  ev.getByToken(theMatchedHits, matchedHits);
282  if (skipClusters)
283  cleanFrom = result.size();
284  if (minAbsZ > 0.) {
285  auto getter = tTopo->tobDetIdLayerComparator(theIdLayer);
286  SiStripMatchedRecHit2DCollection::Range range = matchedHits->equal_range(getter.first, getter.second);
287  for (SiStripMatchedRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
288  for (SiStripMatchedRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end;
289  ++hit) {
290  if (fabs(hit->globalPosition().z()) >= minAbsZ)
291  result.emplace_back(*hit);
292  }
293  }
294  } else {
295  range2SeedingHits(*matchedHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
296  }
297  if (skipClusters)
298  cleanedOfClusters(ttrhBuilder, ev, result, true, cleanFrom);
299  }
300  if (hasRPhiHits) {
302  ev.getByToken(theRPhiHits, rphiHits);
303  if (hasMatchedHits) {
304  if (!hasSimpleRphiHitsCleaner) { // this is a brutal "cleaning". Add something smarter in the future
305  if (skipClusters)
306  cleanFrom = result.size();
307  range2SeedingHits(*rphiHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
308  if (skipClusters)
309  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
310  }
311  } else {
312  if (skipClusters)
313  cleanFrom = result.size();
314  range2SeedingHits(*rphiHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
315  if (skipClusters)
316  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
317  }
318  }
319  if (hasStereoHits) {
321  ev.getByToken(theStereoHits, stereoHits);
322  if (skipClusters)
323  cleanFrom = result.size();
324  range2SeedingHits(*stereoHits, result, tTopo->tobDetIdLayerComparator(theIdLayer));
325  if (skipClusters)
326  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
327  }
328  }
329 
330  //
331  // TEC
332  //
334  if (hasMatchedHits) {
336  ev.getByToken(theMatchedHits, matchedHits);
337  if (skipClusters)
338  cleanFrom = result.size();
339  auto getter = tTopo->tecDetIdWheelComparator(static_cast<unsigned int>(theSide), theIdLayer);
340  SiStripMatchedRecHit2DCollection::Range range = matchedHits->equal_range(getter.first, getter.second);
341  for (SiStripMatchedRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
342  int ring = tTopo->tecRing(it->detId());
343  if (!ringRange(ring))
344  continue;
345  for (SiStripMatchedRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end;
346  ++hit) {
347  result.emplace_back(*hit);
348  }
349  }
350  if (skipClusters)
351  cleanedOfClusters(ttrhBuilder, ev, result, true, cleanFrom);
352  }
353  if (hasRPhiHits) {
355  ev.getByToken(theRPhiHits, rphiHits);
356  if (skipClusters)
357  cleanFrom = result.size();
358  auto getter = tTopo->tecDetIdWheelComparator(static_cast<unsigned int>(theSide), theIdLayer);
359  SiStripRecHit2DCollection::Range range = rphiHits->equal_range(getter.first, getter.second);
360  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
361  int ring = tTopo->tecRing(it->detId());
362  if (!ringRange(ring))
363  continue;
364  if ((SiStripDetId(it->detId()).partnerDetId() != 0) && hasSimpleRphiHitsCleaner)
365  continue; // this is a brutal "cleaning". Add something smarter in the future
366  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
367  result.emplace_back(*hit);
368  }
369  }
370  if (skipClusters)
371  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
372  }
373  if (hasStereoHits) {
375  ev.getByToken(theStereoHits, stereoHits);
376  if (skipClusters)
377  cleanFrom = result.size();
378  auto getter = tTopo->tecDetIdWheelComparator(static_cast<unsigned int>(theSide), theIdLayer);
379  SiStripRecHit2DCollection::Range range = stereoHits->equal_range(getter.first, getter.second);
380  for (SiStripRecHit2DCollection::const_iterator it = range.first; it != range.second; ++it) {
381  int ring = tTopo->tecRing(it->detId());
382  if (!ringRange(ring))
383  continue;
384  for (SiStripRecHit2DCollection::DetSet::const_iterator hit = it->begin(), end = it->end(); hit != end; ++hit) {
385  result.emplace_back(*hit);
386  }
387  }
388  if (skipClusters)
389  cleanedOfClusters(ttrhBuilder, ev, result, false, cleanFrom);
390  }
391  }
392 
393  LogDebug("HitExtractorSTRP") << " giving: " << result.size() << " out";
394  // std::cout << "HitExtractorSTRP "<<" giving: "<<result.size() << " for charge cut " << minGoodCharge << std::endl;
395  return result;
396 }
#define LogDebug(id)
void range2SeedingHits(DSTV const &dstv, HitExtractor::Hits &v, std::pair< A, B > const &sel)
Definition: HitExtractor.h:54
unsigned int tidRing(const DetId &id) const
std::vector< HitPointer > Hits
Definition: HitExtractor.h:28
Range equal_range(id_type i, CMP cmp, bool update=false) const
std::pair< const_iterator, const_iterator > Range
bool ringRange(int ring) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
unsigned int tecRing(const DetId &id) const
ring id
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:18
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
edm::EDGetTokenT< SiStripRecHit2DCollection > theRPhiHits
T get() const
Definition: EventSetup.h:73
T const * product() const
Definition: ESHandle.h:86
bool HitExtractorSTRP::ringRange ( int  ring) const
private

Definition at line 59 of file HitExtractorSTRP.cc.

References hasRingSelector, theMaxRing, and theMinRing.

Referenced by hits().

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

Definition at line 66 of file HitExtractorSTRP.h.

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

Definition at line 65 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 77 of file HitExtractorSTRP.cc.

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

Referenced by cleanedOfClusters().

80  {
82 
83  assert(dynamic_cast<SiStripMatchedRecHit2D const*>(&matched));
84 
85  auto id = hit.geographicalId();
86  ProjectedSiStripRecHit2D* replaceMe = nullptr;
87  bool rejectSt = skipThis(id, hit.stereoClusterRef(), stripClusterMask);
88  bool rejectMono = skipThis(id, hit.monoClusterRef(), stripClusterMask);
89 
90  if ((!rejectSt) & (!rejectMono)) {
91  // keepit
92  return std::make_pair(false, replaceMe);
93  }
94 
95  if (failProjection || (rejectSt & rejectMono)) {
96  //only skip if both hits are done
97  return std::make_pair(true, replaceMe);
98  }
99 
100  // replace with one
101 
102  auto cloner = ttrhBuilder.cloner();
103  replaceMe = cloner.project(hit, rejectSt, TrajectoryStateOnSurface()).release();
104  if (rejectSt)
105  LogDebug("HitExtractorSTRP") << "a matched hit is partially masked, and the mono hit got projected onto: "
106  << replaceMe->geographicalId().rawId() << " key: " << hit.monoClusterRef().key();
107  else
108  LogDebug("HitExtractorSTRP") << "a matched hit is partially masked, and the stereo hit got projected onto: "
109  << replaceMe->geographicalId().rawId() << " key: " << hit.stereoClusterRef().key();
110 
111  return std::make_pair(true, replaceMe);
112 }
#define LogDebug(id)
OmniClusterRef const & stereoClusterRef() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
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 65 of file HitExtractorSTRP.cc.

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

68  {
69  if (maskCluster && (stripClusterMask->mask(clus.key())))
70  return true;
71 
72  if
74  return siStripClusterTools::chargePerCM(id, *clus.cluster_strip()) <= minGoodCharge;
75 }
float chargePerCM(DetId detid, Iter a, Iter b)
return((rh^lh)&mask)
#define UNLIKELY(x)
Definition: Likely.h:21
void ctfseeding::HitExtractorSTRP::useMatchedHits ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
inline
void HitExtractorSTRP::useRingSelector ( int  minRing,
int  maxRing 
)
bool ctfseeding::HitExtractorSTRP::useRingSelector ( ) const
inline

Definition at line 68 of file HitExtractorSTRP.h.

void ctfseeding::HitExtractorSTRP::useRPhiHits ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
inline
void ctfseeding::HitExtractorSTRP::useSimpleRphiHitsCleaner ( bool  use)
inline
void HitExtractorSTRP::useSkipClusters_ ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
overrideprivatevirtual

Implements ctfseeding::HitExtractor.

Definition at line 49 of file HitExtractorSTRP.cc.

References edm::ConsumesCollector::consumes(), visualization-live-secondInstance_cfg::m, and theSkipClusters.

49  {
51 }
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

Member Data Documentation

bool ctfseeding::HitExtractorSTRP::failProjection
private

Definition at line 92 of file HitExtractorSTRP.h.

Referenced by skipThis().

bool ctfseeding::HitExtractorSTRP::hasMatchedHits
private

Definition at line 87 of file HitExtractorSTRP.h.

Referenced by hits().

bool ctfseeding::HitExtractorSTRP::hasRingSelector
private

Definition at line 90 of file HitExtractorSTRP.h.

Referenced by ringRange(), and useRingSelector().

bool ctfseeding::HitExtractorSTRP::hasRPhiHits
private

Definition at line 88 of file HitExtractorSTRP.h.

Referenced by hits().

bool ctfseeding::HitExtractorSTRP::hasSimpleRphiHitsCleaner
private

Definition at line 91 of file HitExtractorSTRP.h.

Referenced by hits().

bool ctfseeding::HitExtractorSTRP::hasStereoHits
private

Definition at line 89 of file HitExtractorSTRP.h.

Referenced by hits().

double ctfseeding::HitExtractorSTRP::minAbsZ
private

Definition at line 81 of file HitExtractorSTRP.h.

Referenced by hits().

int ctfseeding::HitExtractorSTRP::theIdLayer
private

Definition at line 80 of file HitExtractorSTRP.h.

Referenced by hits().

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

Definition at line 78 of file HitExtractorSTRP.h.

Referenced by hits().

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

Definition at line 84 of file HitExtractorSTRP.h.

Referenced by hits().

int ctfseeding::HitExtractorSTRP::theMaxRing
private

Definition at line 82 of file HitExtractorSTRP.h.

Referenced by ringRange(), and useRingSelector().

int ctfseeding::HitExtractorSTRP::theMinRing
private

Definition at line 82 of file HitExtractorSTRP.h.

Referenced by ringRange(), and useRingSelector().

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

Definition at line 85 of file HitExtractorSTRP.h.

Referenced by hits().

TrackerDetSide ctfseeding::HitExtractorSTRP::theSide
private

Definition at line 79 of file HitExtractorSTRP.h.

Referenced by hits().

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

Definition at line 83 of file HitExtractorSTRP.h.

Referenced by cleanedOfClusters(), and useSkipClusters_().

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

Definition at line 86 of file HitExtractorSTRP.h.

Referenced by hits().