CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
virtual HitExtractorSTRPclone () const
 
std::tuple< int, int > getMinMaxRing () const
 
 HitExtractorSTRP (GeomDetEnumerators::SubDetector subdet, SeedingLayer::Side &side, int idLayer, float iminGoodCharge)
 
virtual HitExtractor::Hits hits (const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &, const edm::EventSetup &) const override
 
void setMinAbsZ (double minZToSet)
 
void setNoProjection () const
 
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)
 
virtual ~HitExtractorSTRP ()
 
- 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
< SiStripMatchedRecHit2DCollection
theMatchedHits
 
int theMaxRing
 
int theMinRing
 
edm::EDGetTokenT
< SiStripRecHit2DCollection
theRPhiHits
 
SeedingLayer::Side theSide
 
edm::EDGetTokenT
< SkipClustersCollection
theSkipClusters
 
const SeedingLayertheSLayer
 
edm::EDGetTokenT
< SiStripRecHit2DCollection
theStereoHits
 

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,
SeedingLayer::Side side,
int  idLayer,
float  iminGoodCharge 
)

Definition at line 28 of file HitExtractorSTRP.cc.

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

Referenced by clone().

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

Definition at line 28 of file HitExtractorSTRP.h.

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 99 of file HitExtractorSTRP.cc.

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

Referenced by hits().

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

Implements ctfseeding::HitExtractor.

Definition at line 31 of file HitExtractorSTRP.h.

References HitExtractorSTRP().

31 { return new HitExtractorSTRP(*this); }
HitExtractorSTRP(GeomDetEnumerators::SubDetector subdet, SeedingLayer::Side &side, int idLayer, float iminGoodCharge)
std::tuple<int, int> ctfseeding::HitExtractorSTRP::getMinMaxRing ( ) const
inline

Definition at line 51 of file HitExtractorSTRP.h.

References theMaxRing, and theMinRing.

Referenced by SeedingLayerSetsBuilder::LayerSpec::print().

HitExtractor::Hits HitExtractorSTRP::hits ( const TkTransientTrackingRecHitBuilder ttrhBuilder,
const edm::Event ev,
const edm::EventSetup es 
) const
overridevirtual

Implements ctfseeding::HitExtractor.

Definition at line 137 of file HitExtractorSTRP.cc.

References cleanedOfClusters(), end, edm::EventSetup::get(), edm::Event::getByToken(), hasMatchedHits, hasRPhiHits, hasSimpleRphiHitsCleaner, hasStereoHits, LogDebug, minAbsZ, edm::ESHandle< class >::product(), ctfseeding::range2SeedingHits(), query::result, relativeConstraints::ring, ringRange(), ctfseeding::HitExtractor::skipClusters, TrackerLayerIdAccessor::stripTECDisk(), TrackerLayerIdAccessor::stripTIBLayer(), TrackerLayerIdAccessor::stripTIDDisk(), TrackerLayerIdAccessor::stripTOBLayer(), GeomDetEnumerators::TEC, TrackerTopology::tecRing(), theIdLayer, theLayerSubDet, theMatchedHits, theRPhiHits, theSide, theStereoHits, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, TrackerTopology::tidRing(), GeomDetEnumerators::TOB, and hit::z.

138 {
140  TrackerLayerIdAccessor accessor;
141  unsigned int cleanFrom=0;
142 
143  //Retrieve tracker topology from geometry
144  edm::ESHandle<TrackerTopology> tTopoHandle;
145  es.get<IdealGeometryRecord>().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, accessor.stripTIBLayer(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, accessor.stripTIBLayer(theIdLayer));
166  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
167  }
168  } else {
169  if (skipClusters) cleanFrom=result.size();
170  range2SeedingHits( *rphiHits, result, accessor.stripTIBLayer(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, accessor.stripTIBLayer(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  std::pair<DetId,DetIdTIDSameDiskComparator> getter = accessor.stripTIDDisk(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  std::pair<DetId,DetIdTIDSameDiskComparator> getter = accessor.stripTIDDisk(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  std::pair<DetId,DetIdTIDSameDiskComparator> getter = accessor.stripTIDDisk(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  std::pair<DetId,DetIdTOBSameLayerComparator> getter = accessor.stripTOBLayer(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, accessor.stripTOBLayer(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, accessor.stripTOBLayer(theIdLayer));
259  if (skipClusters) cleanedOfClusters(ttrhBuilder, ev,result,false,cleanFrom);
260  }
261  } else {
262  if (skipClusters) cleanFrom=result.size();
263  range2SeedingHits( *rphiHits, result, accessor.stripTOBLayer(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, accessor.stripTOBLayer(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  std::pair<DetId,DetIdTECSameDiskComparator> getter = accessor.stripTECDisk(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  std::pair<DetId,DetIdTECSameDiskComparator> getter = accessor.stripTECDisk(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  std::pair<DetId,DetIdTECSameDiskComparator> getter = accessor.stripTECDisk(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:49
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
unsigned int tidRing(const DetId &id) const
std::pair< DetId, DetIdTIDSameDiskComparator > stripTIDDisk(int side, int disk)
std::vector< HitPointer > Hits
Definition: HitExtractor.h:25
bool ringRange(int ring) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
unsigned int tecRing(const DetId &id) const
ring id
std::pair< DetId, DetIdTIBSameLayerComparator > stripTIBLayer(int layer)
std::pair< const_iterator, const_iterator > Range
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > theMatchedHits
std::pair< DetId, DetIdTOBSameLayerComparator > stripTOBLayer(int layer)
const GeomDetEnumerators::SubDetector theLayerSubDet
edm::EDGetTokenT< SiStripRecHit2DCollection > theStereoHits
tuple result
Definition: query.py:137
std::pair< DetId, DetIdTECSameDiskComparator > stripTECDisk(int side, int disk)
void cleanedOfClusters(const TkTransientTrackingRecHitBuilder &ttrhBuilder, const edm::Event &ev, HitExtractor::Hits &hits, bool matched, unsigned int cleanFrom=0) const
#define end
Definition: vmac.h:37
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
edm::EDGetTokenT< SiStripRecHit2DCollection > theRPhiHits
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
bool HitExtractorSTRP::ringRange ( int  ring) const
private

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

References minAbsZ.

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

Definition at line 47 of file HitExtractorSTRP.h.

References failProjection.

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

Definition at line 64 of file HitExtractorSTRP.cc.

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

Referenced by cleanedOfClusters().

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

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

53  {
54 
55  if (maskCluster && (stripClusterMask->mask(clus.key())) ) return true;
56 
58  return siStripClusterTools::chargePerCM(id,*clus.cluster_strip()) <= minGoodCharge;
59 }
float chargePerCM(DetId detid, Iter a, Iter b)
return((rh^lh)&mask)
#define unlikely(x)
bool mask(unsigned int iIndex) const
Definition: ContainerMask.h:43
volatile std::atomic< bool > shutdown_flag false
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 50 of file HitExtractorSTRP.h.

References hasRingSelector.

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

Definition at line 37 of file HitExtractorSTRP.h.

References hasSimpleRphiHitsCleaner.

void HitExtractorSTRP::useSkipClusters_ ( const edm::InputTag m,
edm::ConsumesCollector iC 
)
overrideprivatevirtual

Implements ctfseeding::HitExtractor.

Definition at line 35 of file HitExtractorSTRP.cc.

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

35  {
37 }
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
mutableprivate

Definition at line 73 of file HitExtractorSTRP.h.

Referenced by setNoProjection(), and skipThis().

bool ctfseeding::HitExtractorSTRP::hasMatchedHits
private

Definition at line 68 of file HitExtractorSTRP.h.

Referenced by hits(), and useMatchedHits().

bool ctfseeding::HitExtractorSTRP::hasRingSelector
private

Definition at line 71 of file HitExtractorSTRP.h.

Referenced by ringRange(), and useRingSelector().

bool ctfseeding::HitExtractorSTRP::hasRPhiHits
private

Definition at line 69 of file HitExtractorSTRP.h.

Referenced by hits(), and useRPhiHits().

bool ctfseeding::HitExtractorSTRP::hasSimpleRphiHitsCleaner
private

Definition at line 72 of file HitExtractorSTRP.h.

Referenced by hits(), and useSimpleRphiHitsCleaner().

bool ctfseeding::HitExtractorSTRP::hasStereoHits
private

Definition at line 70 of file HitExtractorSTRP.h.

Referenced by hits(), and useStereoHits().

double ctfseeding::HitExtractorSTRP::minAbsZ
private

Definition at line 62 of file HitExtractorSTRP.h.

Referenced by hits(), and setMinAbsZ().

int ctfseeding::HitExtractorSTRP::theIdLayer
private

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

Referenced by hits(), and useMatchedHits().

int ctfseeding::HitExtractorSTRP::theMaxRing
private

Definition at line 63 of file HitExtractorSTRP.h.

Referenced by getMinMaxRing(), ringRange(), and useRingSelector().

int ctfseeding::HitExtractorSTRP::theMinRing
private

Definition at line 63 of file HitExtractorSTRP.h.

Referenced by getMinMaxRing(), ringRange(), and useRingSelector().

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

Definition at line 66 of file HitExtractorSTRP.h.

Referenced by hits(), and useRPhiHits().

SeedingLayer::Side 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 64 of file HitExtractorSTRP.h.

Referenced by cleanedOfClusters(), and useSkipClusters_().

const SeedingLayer* ctfseeding::HitExtractorSTRP::theSLayer
mutableprivate

Definition at line 60 of file HitExtractorSTRP.h.

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

Definition at line 67 of file HitExtractorSTRP.h.

Referenced by hits(), and useStereoHits().