CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
reco::HitPattern Class Reference

#include <HitPattern.h>

Public Types

enum  { MONO = 1, STEREO = 2 }
 
enum  HIT_TYPE { VALID = 0, MISSING = 1, INACTIVE = 2, BAD = 3 }
 
enum  HitCategory { TRACK_HITS = 0, MISSING_INNER_HITS = 1, MISSING_OUTER_HITS = 2 }
 

Public Member Functions

bool appendHit (const TrackingRecHit &hit, const TrackerTopology &ttopo)
 
bool appendHit (const TrackingRecHitRef &ref, const TrackerTopology &ttopo)
 
bool appendHit (const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology &ttopo)
 
template<typename I >
bool appendHits (const I &begin, const I &end, const TrackerTopology &ttopo)
 
bool appendMuonHit (const DetId &id, TrackingRecHit::Type hitType)
 
bool appendTrackerHit (uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
 
void clear ()
 
int cscStationsWithAnyHits () const
 
int cscStationsWithBadHits () const
 
int cscStationsWithValidHits () const
 
int dtStationsWithAnyHits () const
 
int dtStationsWithBadHits () const
 
int dtStationsWithValidHits () const
 
int gemStationsWithAnyHits () const
 
int gemStationsWithBadHits () const
 
int gemStationsWithValidHits () const
 
uint16_t getHitPattern (HitCategory category, int position) const
 
uint32_t getTrackerLayerCase (HitCategory category, uint16_t substr, uint16_t layer) const
 
uint16_t getTrackerMonoStereo (HitCategory category, uint16_t substr, uint16_t layer) const
 
bool hasValidHitInPixelLayer (enum PixelSubdetector::SubDetector, uint16_t layer) const
 
 HitPattern ()
 
 HitPattern (const HitPattern &other)
 
int innermostMuonStationWithAnyHits () const
 
int innermostMuonStationWithBadHits () const
 
int innermostMuonStationWithHits (int hitType) const
 hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all More...
 
int innermostMuonStationWithValidHits () const
 
int me0StationsWithAnyHits () const
 
int me0StationsWithBadHits () const
 
int me0StationsWithValidHits () const
 
int muonStations (int subdet, int hitType) const
 subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad More...
 
int muonStationsWithAnyHits () const
 
int muonStationsWithBadHits () const
 
int muonStationsWithValidHits () const
 
int numberOfBadHits () const
 
int numberOfBadMuonCSCHits () const
 
int numberOfBadMuonDTHits () const
 
int numberOfBadMuonGEMHits () const
 
int numberOfBadMuonHits () const
 
int numberOfBadMuonME0Hits () const
 
int numberOfBadMuonRPCHits () const
 
int numberOfDTStationsWithBothViews () const
 
int numberOfDTStationsWithRPhiView () const
 
int numberOfDTStationsWithRZView () const
 
int numberOfHits (HitCategory category) const
 
int numberOfInactiveHits () const
 
int numberOfInactiveTrackerHits () const
 
int numberOfLostHits (HitCategory category) const
 
int numberOfLostMuonCSCHits () const
 
int numberOfLostMuonDTHits () const
 
int numberOfLostMuonGEMHits () const
 
int numberOfLostMuonHits () const
 
int numberOfLostMuonME0Hits () const
 
int numberOfLostMuonRPCHits () const
 
int numberOfLostPixelBarrelHits (HitCategory category) const
 
int numberOfLostPixelEndcapHits (HitCategory category) const
 
int numberOfLostPixelHits (HitCategory category) const
 
int numberOfLostStripHits (HitCategory category) const
 
int numberOfLostStripTECHits (HitCategory category) const
 
int numberOfLostStripTIBHits (HitCategory category) const
 
int numberOfLostStripTIDHits (HitCategory category) const
 
int numberOfLostStripTOBHits (HitCategory category) const
 
int numberOfLostTrackerHits (HitCategory category) const
 
int numberOfMuonHits () const
 
int numberOfTrackerHits (HitCategory category) const
 
int numberOfValidHits () const
 
int numberOfValidMuonCSCHits () const
 
int numberOfValidMuonDTHits () const
 
int numberOfValidMuonGEMHits () const
 
int numberOfValidMuonHits () const
 
int numberOfValidMuonME0Hits () const
 
int numberOfValidMuonRPCHits () const
 
int numberOfValidPixelBarrelHits () const
 
int numberOfValidPixelEndcapHits () const
 
int numberOfValidPixelHits () const
 
int numberOfValidStripHits () const
 
int numberOfValidStripLayersWithMonoAndStereo (uint16_t stripdet, uint16_t layer) const
 
int numberOfValidStripLayersWithMonoAndStereo () const
 
int numberOfValidStripTECHits () const
 
int numberOfValidStripTIBHits () const
 
int numberOfValidStripTIDHits () const
 
int numberOfValidStripTOBHits () const
 
int numberOfValidTECLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTIBLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTIDLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTOBLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTrackerHits () const
 
HitPatternoperator= (const HitPattern &other)
 
int outermostMuonStationWithAnyHits () const
 
int outermostMuonStationWithBadHits () const
 
int outermostMuonStationWithHits (int hitType) const
 hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all More...
 
int outermostMuonStationWithValidHits () const
 
int pixelBarrelLayersNull () const
 
int pixelBarrelLayersTotallyOffOrBad () const
 
int pixelBarrelLayersWithMeasurement () const
 
int pixelBarrelLayersWithoutMeasurement (HitCategory category) const
 
int pixelEndcapLayersNull () const
 
int pixelEndcapLayersTotallyOffOrBad () const
 
int pixelEndcapLayersWithMeasurement () const
 
int pixelEndcapLayersWithoutMeasurement (HitCategory category) const
 
int pixelLayersNull () const
 
int pixelLayersTotallyOffOrBad () const
 
int pixelLayersWithMeasurement () const
 
int pixelLayersWithMeasurementOld () const
 
int pixelLayersWithoutMeasurement (HitCategory category) const
 
void print (HitCategory category, std::ostream &stream=std::cout) const
 
void printHitPattern (HitCategory category, int position, std::ostream &stream) const
 
int rpcStationsWithAnyHits () const
 
int rpcStationsWithBadHits () const
 
int rpcStationsWithValidHits () const
 
int stripLayersNull () const
 
int stripLayersTotallyOffOrBad () const
 
int stripLayersWithMeasurement () const
 
int stripLayersWithoutMeasurement (HitCategory category) const
 
int stripTECLayersNull () const
 
int stripTECLayersTotallyOffOrBad () const
 
int stripTECLayersWithMeasurement () const
 
int stripTECLayersWithoutMeasurement (HitCategory category) const
 
int stripTIBLayersNull () const
 
int stripTIBLayersTotallyOffOrBad () const
 
int stripTIBLayersWithMeasurement () const
 
int stripTIBLayersWithoutMeasurement (HitCategory category) const
 
int stripTIDLayersNull () const
 
int stripTIDLayersTotallyOffOrBad () const
 
int stripTIDLayersWithMeasurement () const
 
int stripTIDLayersWithoutMeasurement (HitCategory category) const
 
int stripTOBLayersNull () const
 
int stripTOBLayersTotallyOffOrBad () const
 
int stripTOBLayersWithMeasurement () const
 
int stripTOBLayersWithoutMeasurement (HitCategory category) const
 
int trackerLayersNull () const
 
int trackerLayersTotallyOffOrBad () const
 
int trackerLayersWithMeasurement () const
 
int trackerLayersWithMeasurementOld () const
 
int trackerLayersWithoutMeasurement (HitCategory category) const
 
int trackerLayersWithoutMeasurementOld (HitCategory category) const
 
 ~HitPattern ()
 

Static Public Member Functions

static bool badHitFilter (uint16_t pattern)
 
static uint16_t getCSCRing (uint16_t pattern)
 CSC ring (1-4). Only valid for muon CSC patterns, of course. More...
 
static uint16_t getDTSuperLayer (uint16_t pattern)
 DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patterns, of course. More...
 
static uint16_t getGEMLayer (uint16_t pattern)
 GEM layer: 1,2. Only valid for muon GEM patterns, of course. More...
 
static uint16_t getGEMStation (uint16_t pattern)
 GEM station: 1,2. Only valid for muon GEM patterns, of course. More...
 
static uint32_t getHitType (uint16_t pattern)
 
static uint32_t getLayer (uint16_t pattern)
 
static uint16_t getMuonStation (uint16_t pattern)
 Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon, of course. More...
 
static uint16_t getRPCLayer (uint16_t pattern)
 RPC layer: for station 1 and 2, layer = 1(inner) or 2(outer); for station 3, 4 layer is always 0. Only valid for muon RPC patterns, of course. More...
 
static uint16_t getRPCregion (uint16_t pattern)
 RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course. More...
 
static uint32_t getSide (uint16_t pattern)
 
static uint32_t getSubDetector (uint16_t pattern)
 
static uint32_t getSubStructure (uint16_t pattern)
 
static uint32_t getSubSubStructure (uint16_t pattern)
 
static bool inactiveHitFilter (uint16_t pattern)
 
static bool missingHitFilter (uint16_t pattern)
 
static bool muonCSCHitFilter (uint16_t pattern)
 
static bool muonDTHitFilter (uint16_t pattern)
 
static bool muonGEMHitFilter (uint16_t pattern)
 
static bool muonHitFilter (uint16_t pattern)
 
static bool muonME0HitFilter (uint16_t pattern)
 
static bool muonRPCHitFilter (uint16_t pattern)
 
static bool pixelBarrelHitFilter (uint16_t pattern)
 
static bool pixelEndcapHitFilter (uint16_t pattern)
 
static bool pixelHitFilter (uint16_t pattern)
 
static bool stripHitFilter (uint16_t pattern)
 
static bool stripTECHitFilter (uint16_t pattern)
 
static bool stripTIBHitFilter (uint16_t pattern)
 
static bool stripTIDHitFilter (uint16_t pattern)
 
static bool stripTOBHitFilter (uint16_t pattern)
 
static bool trackerHitFilter (uint16_t pattern)
 
static bool validHitFilter (uint16_t pattern)
 

Static Public Attributes

static const unsigned short ARRAY_LENGTH = 50
 
static const uint16_t EMPTY_PATTERN = 0x0
 
static const unsigned short HIT_LENGTH = 11
 
static const unsigned short MaxHits = (8 * sizeof(uint16_t) * ARRAY_LENGTH) / HIT_LENGTH
 
static const uint32_t NULL_RETURN = 999999
 

Private Types

typedef bool filterType(uint16_t)
 

Private Member Functions

bool appendHit (const uint16_t pattern, TrackingRecHit::Type hitType)
 
template<typename F >
void call (HitCategory category, filterType typeFilter, F f) const
 
int countHits (HitCategory category, filterType filter) const
 
int countTypedHits (HitCategory category, filterType typeFilter, filterType filter) const
 
std::pair< uint8_t, uint8_t > getCategoryIndexRange (HitCategory category) const
 
uint16_t getHitPatternByAbsoluteIndex (int position) const
 
bool insertExpectedInnerHit (const uint16_t pattern)
 
bool insertExpectedOuterHit (const uint16_t pattern)
 
void insertHit (const uint16_t pattern)
 
bool insertTrackHit (const uint16_t pattern)
 

Static Private Member Functions

static uint16_t encode (const TrackingRecHit &hit, const TrackerTopology &ttopo)
 
static uint16_t encode (const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology &ttopo)
 
static uint16_t encode (uint16_t det, uint16_t subdet, uint16_t layer, uint16_t side, TrackingRecHit::Type hitType)
 
static uint16_t isStereo (DetId i, const TrackerTopology &ttopo)
 
static bool stripSubdetectorHitFilter (uint16_t pattern, StripSubdetector::SubDetector substructure)
 

Private Attributes

uint8_t beginInner
 
uint8_t beginOuter
 
uint8_t beginTrackHits
 
uint8_t endInner
 
uint8_t endOuter
 
uint8_t endTrackHits
 
uint8_t hitCount
 
uint16_t hitPattern [ARRAY_LENGTH]
 

Static Private Attributes

static const unsigned short HitTypeMask = 0x3
 
static const unsigned short HitTypeOffset = 0
 
static const unsigned short LayerMask = 0xF
 
static const unsigned short LayerOffset = 3
 
static const unsigned short minPixelWord = minTrackerWord | (1<<SubstrOffset)
 
static const unsigned short minStripWord = minTrackerWord | (3<<SubstrOffset)
 
static const unsigned short minTrackerWord = 1<< SubDetectorOffset
 
static const unsigned short SideMask = 0x1
 
static const unsigned short SideOffset = 2
 
static const unsigned short SubDetectorMask = 0x1
 
static const unsigned short SubDetectorOffset = 10
 
static const unsigned short SubstrMask = 0x7
 
static const unsigned short SubstrOffset = 7
 

Friends

template<int N>
struct PatternSet
 
int test::TestHitPattern::test ()
 

Detailed Description

Definition at line 145 of file HitPattern.h.

Member Typedef Documentation

typedef bool reco::HitPattern::filterType(uint16_t)
private

Definition at line 454 of file HitPattern.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MONO 
STEREO 

Definition at line 149 of file HitPattern.h.

149  {
150  MONO = 1,
151  STEREO = 2
152  };
Enumerator
VALID 
MISSING 
INACTIVE 
BAD 

Definition at line 154 of file HitPattern.h.

Enumerator
TRACK_HITS 
MISSING_INNER_HITS 
MISSING_OUTER_HITS 

Definition at line 161 of file HitPattern.h.

Constructor & Destructor Documentation

HitPattern::HitPattern ( )

Definition at line 16 of file HitPattern.cc.

References ARRAY_LENGTH, EMPTY_PATTERN, and hitPattern.

16  :
17  hitCount(0),
18  beginTrackHits(0),
19  endTrackHits(0),
20  beginInner(0),
21  endInner(0),
22  beginOuter(0),
23  endOuter(0)
24 {
26 }
static const unsigned short ARRAY_LENGTH
Definition: HitPattern.h:166
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
uint8_t endInner
Definition: HitPattern.h:478
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:472
uint8_t beginInner
Definition: HitPattern.h:477
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint8_t hitCount
Definition: HitPattern.h:473
uint8_t beginOuter
Definition: HitPattern.h:479
uint8_t endOuter
Definition: HitPattern.h:480
HitPattern::~HitPattern ( )

Definition at line 40 of file HitPattern.cc.

41 {
42  ;
43 }
HitPattern::HitPattern ( const HitPattern other)

Definition at line 28 of file HitPattern.cc.

References ARRAY_LENGTH, and hitPattern.

28  :
29  hitCount(other.hitCount),
32  beginInner(other.beginInner),
33  endInner(other.endInner),
34  beginOuter(other.beginOuter),
35  endOuter(other.endOuter)
36 {
37  memcpy(this->hitPattern, other.hitPattern, sizeof(uint16_t) * HitPattern::ARRAY_LENGTH);
38 }
static const unsigned short ARRAY_LENGTH
Definition: HitPattern.h:166
uint8_t endInner
Definition: HitPattern.h:478
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:472
uint8_t beginInner
Definition: HitPattern.h:477
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint8_t hitCount
Definition: HitPattern.h:473
uint8_t beginOuter
Definition: HitPattern.h:479
uint8_t endOuter
Definition: HitPattern.h:480

Member Function Documentation

bool HitPattern::appendHit ( const TrackingRecHit hit,
const TrackerTopology ttopo 
)

Definition at line 183 of file HitPattern.cc.

References TrackingRecHit::geographicalId(), and TrackingRecHit::getType().

Referenced by FixTrackHitPattern::analyze(), appendHit(), reco::TrackBase::appendHitPattern(), appendMuonHit(), and appendTrackerHit().

184 {
185  return appendHit(hit.geographicalId(), hit.getType(), ttopo);
186 }
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:183
Type getType() const
DetId geographicalId() const
bool HitPattern::appendHit ( const TrackingRecHitRef ref,
const TrackerTopology ttopo 
)

Definition at line 80 of file HitPattern.cc.

References appendHit().

81 {
82  return appendHit(*ref, ttopo);
83 }
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:183
bool HitPattern::appendHit ( const DetId id,
TrackingRecHit::Type  hitType,
const TrackerTopology ttopo 
)

Definition at line 188 of file HitPattern.cc.

References appendHit(), encode(), hitCount, MaxHits, listBenchmarks::pattern, and unlikely.

189 {
190  //if HitPattern is full, journey ends no matter what.
192  return false;
193  }
194 
195  uint16_t pattern = HitPattern::encode(id, hitType, ttopo);
196 
197  return appendHit(pattern, hitType);
198 }
static const unsigned short MaxHits
Definition: HitPattern.h:168
#define unlikely(x)
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:183
uint8_t hitCount
Definition: HitPattern.h:473
static uint16_t encode(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:85
bool HitPattern::appendHit ( const uint16_t  pattern,
TrackingRecHit::Type  hitType 
)
private

Definition at line 200 of file HitPattern.cc.

References TrackingRecHit::bad, beginInner, beginOuter, beginTrackHits, endInner, endOuter, endTrackHits, Exception, hitCount, TrackingRecHit::inactive, insertExpectedInnerHit(), insertExpectedOuterHit(), insertTrackHit(), MaxHits, TrackingRecHit::missing, TrackingRecHit::missing_inner, TrackingRecHit::missing_outer, unlikely, and TrackingRecHit::valid.

201 {
202  //if HitPattern is full, journey ends no matter what.
204  return false;
205  }
206 
207  switch (hitType) {
211  case TrackingRecHit::bad:
212  // hitCount != endT => we are not inserting T type of hits but of T'
213  // 0 != beginT || 0 != endT => we already have hits of T type
214  // so we already have hits of T in the vector and we don't want to
215  // mess them with T' hits.
216  if unlikely(((hitCount != endTrackHits) && (0 != beginTrackHits || 0 != endTrackHits))) {
217  cms::Exception("HitPattern")
218  << "TRACK_HITS"
219  << " were stored on this object before hits of some other category were inserted "
220  << "but hits of the same category should be inserted in a row. "
221  << "Please rework the code so it inserts all "
222  << "TRACK_HITS"
223  << " in a row.";
224  return false;
225  }
226  return insertTrackHit(pattern);
227  break;
229  if unlikely(((hitCount != endInner) && (0 != beginInner || 0 != endInner))) {
230  cms::Exception("HitPattern")
231  << "MISSING_INNER_HITS"
232  << " were stored on this object before hits of some other category were inserted "
233  << "but hits of the same category should be inserted in a row. "
234  << "Please rework the code so it inserts all "
235  << "MISSING_INNER_HITS"
236  << " in a row.";
237  return false;
238  }
240  break;
242  if unlikely(((hitCount != endOuter) && (0 != beginOuter || 0 != endOuter))) {
243  cms::Exception("HitPattern")
244  << "MISSING_OUTER_HITS"
245  << " were stored on this object before hits of some other category were inserted "
246  << "but hits of the same category should be inserted in a row. "
247  << "Please rework the code so it inserts all "
248  << "MISSING_OUTER_HITS"
249  << " in a row.";
250  return false;
251  }
253  break;
254  }
255 
256  return false;
257 }
static const unsigned short MaxHits
Definition: HitPattern.h:168
bool insertExpectedOuterHit(const uint16_t pattern)
Definition: HitPattern.cc:1037
#define unlikely(x)
uint8_t endInner
Definition: HitPattern.h:478
uint8_t beginInner
Definition: HitPattern.h:477
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint8_t hitCount
Definition: HitPattern.h:473
uint8_t beginOuter
Definition: HitPattern.h:479
bool insertExpectedInnerHit(const uint16_t pattern)
Definition: HitPattern.cc:1024
bool insertTrackHit(const uint16_t pattern)
Definition: HitPattern.cc:1005
uint8_t endOuter
Definition: HitPattern.h:480
template<typename I >
bool reco::HitPattern::appendHits ( const I &  begin,
const I &  end,
const TrackerTopology ttopo 
)

Definition at line 505 of file HitPattern.h.

References end, Exhume::I, and unlikely.

Referenced by reco::TrackBase::appendHits().

506 {
507  for (I hit = begin; hit != end; hit++) {
508  if unlikely((!appendHit(*hit, ttopo))) {
509  return false;
510  }
511  }
512  return true;
513 }
#define unlikely(x)
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:183
const std::complex< double > I
Definition: I.h:8
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
bool HitPattern::appendMuonHit ( const DetId id,
TrackingRecHit::Type  hitType 
)

This is meant to be used only in cases where the an already-packed hit information is re-interpreted in terms of HitPattern (i.e. the IO rule for reading old versions of HitPattern)

Definition at line 263 of file HitPattern.cc.

References appendHit(), encode(), Exception, hitCount, MaxHits, DetId::Muon, and unlikely.

Referenced by reco::TrackBase::appendMuonHitPattern().

263  {
264  //if HitPattern is full, journey ends no matter what.
266  return false;
267  }
268 
269  if unlikely(id.det() != DetId::Muon) {
270  throw cms::Exception("HitPattern") << "Got DetId from det " << id.det() << " that is not Muon in appendMuonHit(), which should only be used for muon hits in the HitPattern IO rule";
271  }
272 
273  uint16_t detid = id.det();
274  uint16_t subdet = id.subdetId();
275  return appendHit(encode(detid, subdet, encodeMuonLayer(id), 0, hitType), hitType);
276 }
static const unsigned short MaxHits
Definition: HitPattern.h:168
#define unlikely(x)
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:183
uint8_t hitCount
Definition: HitPattern.h:473
static uint16_t encode(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:85
bool HitPattern::appendTrackerHit ( uint16_t  subdet,
uint16_t  layer,
uint16_t  stereo,
TrackingRecHit::Type  hitType 
)

This is meant to be used only in cases where the an already-packed hit information is re-interpreted in terms of HitPattern (i.e. MiniAOD PackedCandidate, and the IO rule for reading old versions of HitPattern)

Definition at line 259 of file HitPattern.cc.

References appendHit(), encode(), and DetId::Tracker.

Referenced by reco::TrackBase::appendTrackerHitPattern().

259  {
260  return appendHit(encode(DetId::Tracker, subdet, layer, stereo, hitType), hitType);
261 }
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:183
static uint16_t encode(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:85
bool reco::HitPattern::badHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 802 of file HitPattern.h.

References hcaldqm::constants::BAD.

803 {
805 }
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:733
template<typename F >
void reco::HitPattern::call ( HitCategory  category,
filterType  typeFilter,
F  f 
) const
private

Definition at line 539 of file HitPattern.h.

References f, mps_fire::i, and listBenchmarks::pattern.

Referenced by reco::PatternSet< N >::fill().

540 {
541  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
542  for (int i = range.first; i < range.second; i++) {
544  // f() return false to ask to stop looping
545  if (typeFilter(pattern) && !f(pattern)) {
546  break;
547  }
548  }
549 }
double f[11][100]
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
void HitPattern::clear ( void  )

Definition at line 67 of file HitPattern.cc.

References ARRAY_LENGTH, beginInner, beginOuter, beginTrackHits, EMPTY_PATTERN, endInner, endOuter, endTrackHits, hitCount, and hitPattern.

Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), reco::TrackBase::resetHitPattern(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), BeautifulSoup.Tag::setString(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().

68 {
69  this->hitCount = 0;
70  this->beginTrackHits = 0;
71  this->endTrackHits = 0;
72  this->beginInner = 0;
73  this->endInner = 0;
74  this->beginOuter = 0;
75  this->endOuter = 0;
76 
77  memset(this->hitPattern, EMPTY_PATTERN, sizeof(uint16_t) * HitPattern::ARRAY_LENGTH);
78 }
static const unsigned short ARRAY_LENGTH
Definition: HitPattern.h:166
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
uint8_t endInner
Definition: HitPattern.h:478
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:472
uint8_t beginInner
Definition: HitPattern.h:477
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint8_t hitCount
Definition: HitPattern.h:473
uint8_t beginOuter
Definition: HitPattern.h:479
uint8_t endOuter
Definition: HitPattern.h:480
int reco::HitPattern::countHits ( HitCategory  category,
filterType  filter 
) const
inlineprivate

Definition at line 525 of file HitPattern.h.

References KineDebug3::count(), ALCARECOTkAlBeamHalo_cff::filter, and mps_fire::i.

526 {
527  int count = 0;
528  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
529  for (int i = range.first; i < range.second; ++i) {
531  ++count;
532  }
533  }
534  return count;
535 }
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
int reco::HitPattern::countTypedHits ( HitCategory  category,
filterType  typeFilter,
filterType  filter 
) const
inlineprivate

Definition at line 551 of file HitPattern.h.

References KineDebug3::count(), ALCARECOTkAlBeamHalo_cff::filter, mps_fire::i, and listBenchmarks::pattern.

552 {
553  int count = 0;
554  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
555  for (int i = range.first; i < range.second; ++i) {
557  if (typeFilter(pattern) && filter(pattern)) {
558  ++count;
559  }
560  }
561  return count;
562 }
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
int reco::HitPattern::cscStationsWithAnyHits ( ) const
inline

Definition at line 1141 of file HitPattern.h.

1142 {
1143  return muonStations(2, -1);
1144 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::cscStationsWithBadHits ( ) const
inline

Definition at line 1136 of file HitPattern.h.

1137 {
1138  return muonStations(2, 3);
1139 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::cscStationsWithValidHits ( ) const
inline

Definition at line 1131 of file HitPattern.h.

1132 {
1133  return muonStations(2, 0);
1134 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::dtStationsWithAnyHits ( ) const
inline

Definition at line 1126 of file HitPattern.h.

1127 {
1128  return muonStations(1, -1);
1129 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::dtStationsWithBadHits ( ) const
inline

Definition at line 1121 of file HitPattern.h.

1122 {
1123  return muonStations(1, 3);
1124 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::dtStationsWithValidHits ( ) const
inline

Definition at line 1116 of file HitPattern.h.

1117 {
1118  return muonStations(1, 0);
1119 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
uint16_t HitPattern::encode ( const TrackingRecHit hit,
const TrackerTopology ttopo 
)
staticprivate
uint16_t HitPattern::encode ( const DetId id,
TrackingRecHit::Type  hitType,
const TrackerTopology ttopo 
)
staticprivate

Definition at line 136 of file HitPattern.cc.

References encode(), isStereo(), TrackerTopology::layer(), DetId::Muon, and DetId::Tracker.

137 {
138  uint16_t detid = id.det();
139  uint16_t subdet = id.subdetId();
140 
141  // adding layer/disk/wheel bits
142  uint16_t layer = 0x0;
143  if (detid == DetId::Tracker) {
144  layer = ttopo.layer(id);
145  } else if (detid == DetId::Muon) {
146  layer = encodeMuonLayer(id);
147  }
148 
149  // adding mono/stereo bit
150  uint16_t side = 0x0;
151  if (detid == DetId::Tracker) {
152  side = isStereo(id, ttopo);
153  } else if (detid == DetId::Muon) {
154  side = 0x0;
155  }
156 
157  return encode(detid, subdet, layer, side, hitType);
158 }
static uint16_t isStereo(DetId i, const TrackerTopology &ttopo)
Definition: HitPattern.cc:879
unsigned int layer(const DetId &id) const
static uint16_t encode(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:85
uint16_t HitPattern::encode ( uint16_t  det,
uint16_t  subdet,
uint16_t  layer,
uint16_t  side,
TrackingRecHit::Type  hitType 
)
staticprivate

Definition at line 160 of file HitPattern.cc.

References EMPTY_PATTERN, HitTypeMask, HitTypeOffset, LayerMask, LayerOffset, TrackingRecHit::missing, TrackingRecHit::missing_inner, TrackingRecHit::missing_outer, listBenchmarks::pattern, SideMask, SideOffset, SubDetectorMask, SubDetectorOffset, SubstrMask, and SubstrOffset.

160  {
162 
163  // adding tracker/muon detector bit
164  pattern |= (det & SubDetectorMask) << SubDetectorOffset;
165 
166  // adding substructure (PXB, PXF, TIB, TID, TOB, TEC, or DT, CSC, RPC,GEM) bits
167  pattern |= (subdet & SubstrMask) << SubstrOffset;
168 
169  // adding layer/disk/wheel bits
170  pattern |= (layer & LayerMask) << LayerOffset;
171 
172  // adding mono/stereo bit
173  pattern |= (side & SideMask) << SideOffset;
174 
175  TrackingRecHit::Type patternHitType = (hitType == TrackingRecHit::missing_inner ||
177 
178  pattern |= (patternHitType & HitTypeMask) << HitTypeOffset;
179 
180  return pattern;
181 }
static const unsigned short SideOffset
Definition: HitPattern.h:425
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
static const unsigned short SubstrOffset
Definition: HitPattern.h:433
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
static const unsigned short SubDetectorMask
Definition: HitPattern.h:438
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
static const unsigned short SideMask
Definition: HitPattern.h:426
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:437
static const unsigned short SubstrMask
Definition: HitPattern.h:434
static const unsigned short LayerOffset
Definition: HitPattern.h:429
static const unsigned short LayerMask
Definition: HitPattern.h:430
int reco::HitPattern::gemStationsWithAnyHits ( ) const
inline

Definition at line 1171 of file HitPattern.h.

1172 {
1173  return muonStations(4,-1);
1174 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::gemStationsWithBadHits ( ) const
inline

Definition at line 1166 of file HitPattern.h.

1167 {
1168  return muonStations(4, 3);
1169 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::gemStationsWithValidHits ( ) const
inline

Definition at line 1161 of file HitPattern.h.

1162 {
1163  return muonStations(4, 0);
1164 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
std::pair< uint8_t, uint8_t > reco::HitPattern::getCategoryIndexRange ( HitCategory  category) const
inlineprivate

Definition at line 488 of file HitPattern.h.

Referenced by getTrackerLayerCase(), getTrackerMonoStereo(), numberOfValidStripLayersWithMonoAndStereo(), pixelLayersWithMeasurement(), trackerLayersWithMeasurement(), and trackerLayersWithoutMeasurement().

489 {
490  switch (category) {
491  case TRACK_HITS:
492  return std::pair<uint8_t, uint8_t>(beginTrackHits, endTrackHits);
493  break;
494  case MISSING_INNER_HITS:
495  return std::pair<uint8_t, uint8_t>(beginInner, endInner);
496  break;
497  case MISSING_OUTER_HITS:
498  return std::pair<uint8_t, uint8_t>(beginOuter, endOuter);
499  break;
500  }
501  return std::pair<uint8_t, uint8_t>(-1, -1);
502 }
uint8_t endInner
Definition: HitPattern.h:478
uint8_t beginInner
Definition: HitPattern.h:477
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint8_t beginOuter
Definition: HitPattern.h:479
uint8_t endOuter
Definition: HitPattern.h:480
uint16_t reco::HitPattern::getCSCRing ( uint16_t  pattern)
inlinestatic

CSC ring (1-4). Only valid for muon CSC patterns, of course.

Definition at line 752 of file HitPattern.h.

Referenced by printHitPattern().

753 {
754  return (getSubSubStructure(pattern) & 3) + 1;
755 }
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
uint16_t reco::HitPattern::getDTSuperLayer ( uint16_t  pattern)
inlinestatic

DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patterns, of course.

Definition at line 747 of file HitPattern.h.

Referenced by numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), and printHitPattern().

748 {
749  return (getSubSubStructure(pattern) & 3);
750 }
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
uint16_t reco::HitPattern::getGEMLayer ( uint16_t  pattern)
inlinestatic

GEM layer: 1,2. Only valid for muon GEM patterns, of course.

Definition at line 782 of file HitPattern.h.

Referenced by printHitPattern().

783 {
784  return (getSubSubStructure(pattern) & 1) + 1;
785 }
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
uint16_t reco::HitPattern::getGEMStation ( uint16_t  pattern)
inlinestatic

GEM station: 1,2. Only valid for muon GEM patterns, of course.

Definition at line 775 of file HitPattern.h.

Referenced by printHitPattern().

777 {
778  uint16_t sss = getSubSubStructure(pattern), stat = sss >> 1;
779  return stat + 1;
780 }
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
uint16_t reco::HitPattern::getHitPattern ( HitCategory  category,
int  position 
) const
inline

Definition at line 515 of file HitPattern.h.

References unlikely.

Referenced by CheckHitPattern::analyze(), PFCheckHitPattern::analyze(), FixTrackHitPattern::analyze(), GetTrackTrajInfo::analyze(), GsfElectronAlgo::ElectronData::checkCtfTrack(), OniaPhotonConversionProducer::foundCompatibleInnerHits(), GsfElectronCoreBaseProducer::getCtfTrackRef(), PrimaryVertexValidation::hasFirstLayerPixelHits(), SoftPFElectronTagInfoProducer::isElecClean(), PFElecTkProducer::isInnerMost(), FWTrackResidualDetailView::prepareData(), CheckHitPattern::print(), PFCheckHitPattern::print(), print(), printHitPattern(), FWConvTrackHitsDetailView::setTextInfo(), EgAmbiguityTools::sharedDets(), EgAmbiguityTools::sharedHits(), and QcdUeDQM::trackSelection().

516 {
517  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
518  if unlikely((position < 0 || (position + range.first) >= range.second)) {
520  }
521 
522  return getHitPatternByAbsoluteIndex(range.first + position);
523 }
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
#define unlikely(x)
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static int position[264][3]
Definition: ReadPGInfo.cc:509
uint16_t HitPattern::getHitPatternByAbsoluteIndex ( int  position) const
private

Definition at line 278 of file HitPattern.cc.

References EMPTY_PATTERN, HIT_LENGTH, hitCount, hitPattern, and unlikely.

Referenced by getTrackerLayerCase(), getTrackerMonoStereo(), hasValidHitInPixelLayer(), innermostMuonStationWithHits(), muonStations(), numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), numberOfValidStripLayersWithMonoAndStereo(), outermostMuonStationWithHits(), pixelLayersWithMeasurement(), trackerLayersWithMeasurement(), and trackerLayersWithoutMeasurement().

279 {
280  if unlikely((position < 0 || position >= hitCount)) {
282  }
283  /*
284  Note: you are not taking a consecutive sequence of HIT_LENGTH bits starting from position * HIT_LENGTH
285  as the bit order in the words are reversed.
286  e.g. if position = 0 you take the lowest 10 bits of the first word.
287 
288  I hope this can clarify what is the memory layout of such thing
289 
290  straight 01234567890123456789012345678901 | 23456789012345678901234567890123 | 4567
291  (global) 0 1 2 3 | 3 4 5 6 | 6
292  words [--------------0---------------] | [--------------1---------------] | [---
293  word 01234567890123456789012345678901 | 01234567890123456789012345678901 | 0123
294  (str) 0 1 2 3 | 0 1 2 3 | 0
295  [--------------0---------------] | [--------------1---------------] | [---
296  word 10987654321098765432109876543210 | 10987654321098765432109876543210 | 1098
297  (rev) 32 21 10 0 | 32 21 10 0 | 32
298  reverse 10987654321098765432109876543210 | 32109876543210987654321098765432 | 5432
299  32 21 10 0 | 6 65 54 43 3 9
300 
301  ugly enough, but it's not my fault, I was not even in CMS at that time [gpetrucc]
302  */
303 
304  uint16_t bitEndOffset = (position + 1) * HIT_LENGTH;
305  uint8_t secondWord = (bitEndOffset >> 4);
306  uint8_t secondWordBits = bitEndOffset & (16 - 1); // that is, bitEndOffset % 16
307  if (secondWordBits >= HIT_LENGTH) { // full block is in this word
308  uint8_t lowBitsToTrash = secondWordBits - HIT_LENGTH;
309  uint16_t myResult = (hitPattern[secondWord] >> lowBitsToTrash) & ((1 << HIT_LENGTH) - 1);
310  return myResult;
311  } else {
312  uint8_t firstWordBits = HIT_LENGTH - secondWordBits;
313  uint16_t firstWordBlock = hitPattern[secondWord - 1] >> (16 - firstWordBits);
314  uint16_t secondWordBlock = hitPattern[secondWord] & ((1 << secondWordBits) - 1);
315  uint16_t myResult = firstWordBlock + (secondWordBlock << firstWordBits);
316  return myResult;
317  }
318 }
static const unsigned short HIT_LENGTH
Definition: HitPattern.h:167
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
#define unlikely(x)
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:472
uint8_t hitCount
Definition: HitPattern.h:473
static int position[264][3]
Definition: ReadPGInfo.cc:509
uint32_t reco::HitPattern::getHitType ( uint16_t  pattern)
inlinestatic

Definition at line 733 of file HitPattern.h.

References unlikely.

Referenced by FixTrackHitPattern::analyze(), innermostMuonStationWithHits(), muonStations(), outermostMuonStationWithHits(), CheckHitPattern::print(), PFCheckHitPattern::print(), and printHitPattern().

734 {
736  return NULL_RETURN;
737  }
738 
739  return ((pattern >> HitTypeOffset) & HitTypeMask);
740 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
#define unlikely(x)
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
uint32_t reco::HitPattern::getLayer ( uint16_t  pattern)
inlinestatic
uint16_t reco::HitPattern::getMuonStation ( uint16_t  pattern)
inlinestatic

Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon, of course.

Definition at line 742 of file HitPattern.h.

Referenced by innermostMuonStationWithHits(), muonStations(), numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), outermostMuonStationWithHits(), and printHitPattern().

743 {
744  return (getSubSubStructure(pattern) >> 2) + 1;
745 }
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
uint16_t reco::HitPattern::getRPCLayer ( uint16_t  pattern)
inlinestatic

RPC layer: for station 1 and 2, layer = 1(inner) or 2(outer); for station 3, 4 layer is always 0. Only valid for muon RPC patterns, of course.

Definition at line 757 of file HitPattern.h.

References likely.

Referenced by printHitPattern().

758 {
759  uint16_t subSubStructure = getSubSubStructure(pattern);
760  uint16_t stat = subSubStructure >> 2;
761 
762  if likely(stat <= 1) {
763  return ((subSubStructure >> 1) & 1) + 1;
764  }
765 
766  return 0;
767 }
#define likely(x)
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
uint16_t reco::HitPattern::getRPCregion ( uint16_t  pattern)
inlinestatic

RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.

Definition at line 769 of file HitPattern.h.

Referenced by printHitPattern().

770 {
771  return getSubSubStructure(pattern) & 1;
772 }
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
uint32_t reco::HitPattern::getSide ( uint16_t  pattern)
inlinestatic

Definition at line 724 of file HitPattern.h.

References unlikely.

Referenced by getTrackerMonoStereo(), and numberOfValidStripLayersWithMonoAndStereo().

725 {
727  return NULL_RETURN;
728  }
729 
730  return (pattern >> SideOffset) & SideMask;
731 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
static const unsigned short SideOffset
Definition: HitPattern.h:425
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
#define unlikely(x)
static const unsigned short SideMask
Definition: HitPattern.h:426
uint32_t reco::HitPattern::getSubDetector ( uint16_t  pattern)
inlinestatic

Definition at line 714 of file HitPattern.h.

References unlikely.

715 {
717  return NULL_RETURN;
718  }
719 
720  return ((pattern >> SubDetectorOffset) & SubDetectorMask);
721 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
#define unlikely(x)
static const unsigned short SubDetectorMask
Definition: HitPattern.h:438
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:437
uint32_t reco::HitPattern::getSubStructure ( uint16_t  pattern)
inlinestatic
uint32_t reco::HitPattern::getSubSubStructure ( uint16_t  pattern)
inlinestatic

Definition at line 705 of file HitPattern.h.

References unlikely.

Referenced by numberOfValidStripLayersWithMonoAndStereo().

706 {
708  return NULL_RETURN;
709  }
710 
711  return ((pattern >> LayerOffset) & LayerMask);
712 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
#define unlikely(x)
static const unsigned short LayerOffset
Definition: HitPattern.h:429
static const unsigned short LayerMask
Definition: HitPattern.h:430
uint32_t HitPattern::getTrackerLayerCase ( HitCategory  category,
uint16_t  substr,
uint16_t  layer 
) const

Definition at line 422 of file HitPattern.cc.

References hcaldqm::constants::BAD, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerMask, LayerOffset, RecoTauDiscriminantConfiguration::mask, NULL_RETURN, listBenchmarks::pattern, SubDetectorMask, SubDetectorOffset, SubstrMask, and SubstrOffset.

Referenced by pixelBarrelLayersNull(), pixelBarrelLayersTotallyOffOrBad(), pixelBarrelLayersWithMeasurement(), pixelBarrelLayersWithoutMeasurement(), pixelEndcapLayersNull(), pixelEndcapLayersTotallyOffOrBad(), pixelEndcapLayersWithMeasurement(), pixelEndcapLayersWithoutMeasurement(), stripTECLayersNull(), stripTECLayersTotallyOffOrBad(), stripTECLayersWithMeasurement(), stripTECLayersWithoutMeasurement(), stripTIBLayersNull(), stripTIBLayersTotallyOffOrBad(), stripTIBLayersWithMeasurement(), stripTIBLayersWithoutMeasurement(), stripTIDLayersNull(), stripTIDLayersTotallyOffOrBad(), stripTIDLayersWithMeasurement(), stripTIDLayersWithoutMeasurement(), stripTOBLayersNull(), stripTOBLayersTotallyOffOrBad(), stripTOBLayersWithMeasurement(), and stripTOBLayersWithoutMeasurement().

423 {
424  uint16_t tk_substr_layer = (0x1 << SubDetectorOffset)
425  + ((substr & SubstrMask) << SubstrOffset)
426  + ((layer & LayerMask) << LayerOffset);
427 
428  uint16_t mask = (SubDetectorMask << SubDetectorOffset)
429  + (SubstrMask << SubstrOffset)
430  + (LayerMask << LayerOffset);
431 
432  // layer case 0: valid + (missing, off, bad) ==> with measurement
433  // layer case 1: missing + (off, bad) ==> without measurement
434  // layer case 2: off, bad ==> totally off or bad, cannot say much
435  // layer case NULL_RETURN: track outside acceptance or in gap ==> null
436  uint32_t layerCase = NULL_RETURN;
437  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
438  for (int i = range.first; i < range.second; ++i) {
440  if ((pattern & mask) == tk_substr_layer) {
441  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
442  if (hitType < layerCase) {
443  // BAD and INACTIVE as the same type (as INACTIVE)
444  layerCase = (hitType == HIT_TYPE::BAD ? HIT_TYPE::INACTIVE : hitType);
445  if (layerCase == HIT_TYPE::VALID) {
446  break;
447  }
448  }
449  }
450  }
451  return layerCase;
452 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
static const unsigned short SubstrOffset
Definition: HitPattern.h:433
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
static const unsigned short SubDetectorMask
Definition: HitPattern.h:438
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
double const BAD
Definition: Constants.h:17
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:437
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static const unsigned short SubstrMask
Definition: HitPattern.h:434
static const unsigned short LayerOffset
Definition: HitPattern.h:429
static const unsigned short LayerMask
Definition: HitPattern.h:430
uint16_t HitPattern::getTrackerMonoStereo ( HitCategory  category,
uint16_t  substr,
uint16_t  layer 
) const

Definition at line 454 of file HitPattern.cc.

References getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), getSide(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerMask, LayerOffset, RecoTauDiscriminantConfiguration::mask, MONO, listBenchmarks::pattern, STEREO, SubDetectorMask, SubDetectorOffset, SubstrMask, and SubstrOffset.

Referenced by OniaPhotonConversionProducer::foundCompatibleInnerHits().

455 {
456  uint16_t tk_substr_layer = (0x1 << SubDetectorOffset)
457  + ((substr & SubstrMask) << SubstrOffset)
458  + ((layer & LayerMask) << LayerOffset);
459  uint16_t mask = (SubDetectorMask << SubDetectorOffset)
460  + (SubstrMask << SubstrOffset)
461  + (LayerMask << LayerOffset);
462 
463  // 0: neither a valid mono nor a valid stereo hit
464  // MONO: valid mono hit
465  // STEREO: valid stereo hit
466  // MONO | STEREO: both
467  uint16_t monoStereo = 0x0;
468  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
469  for (int i = range.first; i < range.second; ++i) {
471  if ((pattern & mask) == tk_substr_layer) {
472  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
473  if (hitType == HIT_TYPE::VALID) {
474  switch (getSide(pattern)) {
475  case 0: // mono
476  monoStereo |= MONO;
477  break;
478  case 1: // stereo
479  monoStereo |= STEREO;
480  break;
481  }
482  }
483 
484  if (monoStereo == (MONO | STEREO)) {
485  break;
486  }
487  }
488  }
489  return monoStereo;
490 }
static const unsigned short SubstrOffset
Definition: HitPattern.h:433
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
static const unsigned short SubDetectorMask
Definition: HitPattern.h:438
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:437
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static uint32_t getSide(uint16_t pattern)
Definition: HitPattern.h:724
static const unsigned short SubstrMask
Definition: HitPattern.h:434
static const unsigned short LayerOffset
Definition: HitPattern.h:429
static const unsigned short LayerMask
Definition: HitPattern.h:430
bool HitPattern::hasValidHitInPixelLayer ( enum PixelSubdetector::SubDetector  det,
uint16_t  layer 
) const

Definition at line 321 of file HitPattern.cc.

References beginTrackHits, endTrackHits, getHitPatternByAbsoluteIndex(), getLayer(), mps_fire::i, listBenchmarks::pattern, pixelBarrelHitFilter(), pixelEndcapHitFilter(), pixelHitFilter(), and validHitFilter().

Referenced by PackedCandidateTrackValidator::analyze(), TrackClassFilter::operator()(), and pat::PATPackedCandidateProducer::produce().

322 {
323  for (int i = beginTrackHits; i < endTrackHits; ++i) {
325  bool pixelHitFilter = ( (det==1 && pixelBarrelHitFilter(pattern)) ||
326  (det==2 && pixelEndcapHitFilter(pattern)) );
327  if (pixelHitFilter && (getLayer(pattern) == layer) && validHitFilter(pattern)) {
328  return true;
329  }
330  }
331  return false;
332 }
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:700
static bool pixelHitFilter(uint16_t pattern)
Definition: HitPattern.h:564
static bool pixelBarrelHitFilter(uint16_t pattern)
Definition: HitPattern.h:575
static bool pixelEndcapHitFilter(uint16_t pattern)
Definition: HitPattern.h:585
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
bool reco::HitPattern::inactiveHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 797 of file HitPattern.h.

798 {
800 }
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:733
int reco::HitPattern::innermostMuonStationWithAnyHits ( ) const
inline

Definition at line 1201 of file HitPattern.h.

1202 {
1203  return innermostMuonStationWithHits(-1);
1204 }
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:917
int reco::HitPattern::innermostMuonStationWithBadHits ( ) const
inline

Definition at line 1196 of file HitPattern.h.

1197 {
1198  return innermostMuonStationWithHits(3);
1199 }
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:917
int HitPattern::innermostMuonStationWithHits ( int  hitType) const

hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all

Definition at line 917 of file HitPattern.cc.

References beginTrackHits, endTrackHits, getHitPatternByAbsoluteIndex(), getHitType(), getMuonStation(), mps_fire::i, muonHitFilter(), listBenchmarks::pattern, and trackingPlots::stat.

918 {
919  int ret = 0;
920  for (int i = beginTrackHits; i < endTrackHits; ++i) {
922  if (muonHitFilter(pattern)
923  && (hitType == -1 || int(getHitType(pattern)) == hitType)) {
924  int stat = getMuonStation(pattern);
925  if (ret == 0 || stat < ret) {
926  ret = stat;
927  }
928  }
929  }
930 
931  return ret;
932 }
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:733
uint8_t beginTrackHits
Definition: HitPattern.h:475
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
Definition: HitPattern.h:742
int reco::HitPattern::innermostMuonStationWithValidHits ( ) const
inline

Definition at line 1191 of file HitPattern.h.

1192 {
1193  return innermostMuonStationWithHits(0);
1194 }
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:917
bool HitPattern::insertExpectedInnerHit ( const uint16_t  pattern)
private

Definition at line 1024 of file HitPattern.cc.

References beginInner, endInner, hitCount, insertHit(), and unlikely.

Referenced by appendHit().

1025 {
1026  if unlikely((0 == beginInner && 0 == endInner)) {
1027  beginInner = hitCount;
1028  endInner = beginInner;
1029  }
1030 
1031  insertHit(pattern);
1032  endInner++;
1033 
1034  return true;
1035 }
void insertHit(const uint16_t pattern)
Definition: HitPattern.cc:993
#define unlikely(x)
uint8_t endInner
Definition: HitPattern.h:478
uint8_t beginInner
Definition: HitPattern.h:477
uint8_t hitCount
Definition: HitPattern.h:473
bool HitPattern::insertExpectedOuterHit ( const uint16_t  pattern)
private

Definition at line 1037 of file HitPattern.cc.

References beginOuter, endOuter, hitCount, insertHit(), and unlikely.

Referenced by appendHit().

1038 {
1039  if unlikely((0 == beginOuter && 0 == endOuter)) {
1040  beginOuter = hitCount;
1041  endOuter = beginOuter;
1042  }
1043 
1044  insertHit(pattern);
1045  endOuter++;
1046 
1047  return true;
1048 }
void insertHit(const uint16_t pattern)
Definition: HitPattern.cc:993
#define unlikely(x)
uint8_t hitCount
Definition: HitPattern.h:473
uint8_t beginOuter
Definition: HitPattern.h:479
uint8_t endOuter
Definition: HitPattern.h:480
void HitPattern::insertHit ( const uint16_t  pattern)
private

Definition at line 993 of file HitPattern.cc.

References HIT_LENGTH, hitCount, hitPattern, mps_fire::i, and PFRecoTauDiscriminationByIsolation_cfi::offset.

Referenced by insertExpectedInnerHit(), insertExpectedOuterHit(), and insertTrackHit().

994 {
995  int offset = hitCount * HIT_LENGTH;
996  for (int i = 0; i < HIT_LENGTH; i++) {
997  int pos = offset + i;
998  uint16_t bit = (pattern >> i) & 0x1;
999  //equivalent to hitPattern[pos / 16] += bit << ((offset + i) % 16);
1000  hitPattern[pos >> 4] += bit << ((offset + i) & (16 - 1));
1001  }
1002  hitCount++;
1003 }
static const unsigned short HIT_LENGTH
Definition: HitPattern.h:167
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:472
uint8_t hitCount
Definition: HitPattern.h:473
bool HitPattern::insertTrackHit ( const uint16_t  pattern)
private

Definition at line 1005 of file HitPattern.cc.

References beginTrackHits, endTrackHits, hitCount, insertHit(), and unlikely.

Referenced by appendHit().

1006 {
1007  // if begin is 0, this is the first hit of this type being inserted, so
1008  // we need to update begin so it points to the correct index, the first
1009  // empty index.
1010  // unlikely, because it will happen only when inserting
1011  // the first hit of this type
1012  if unlikely((0 == beginTrackHits && 0 == endTrackHits)) {
1014  // before the first hit of this type is inserted, there are no hits
1016  }
1017 
1018  insertHit(pattern);
1019  endTrackHits++;
1020 
1021  return true;
1022 }
void insertHit(const uint16_t pattern)
Definition: HitPattern.cc:993
#define unlikely(x)
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint8_t hitCount
Definition: HitPattern.h:473
uint16_t HitPattern::isStereo ( DetId  i,
const TrackerTopology ttopo 
)
staticprivate

Definition at line 879 of file HitPattern.cc.

References DetId::det(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecIsStereo(), StripSubdetector::TIB, TrackerTopology::tibIsStereo(), StripSubdetector::TID, TrackerTopology::tidIsStereo(), StripSubdetector::TOB, TrackerTopology::tobIsStereo(), and DetId::Tracker.

Referenced by encode().

880 {
881  if (i.det() != DetId::Tracker) {
882  return 0;
883  }
884 
885  switch (i.subdetId()) {
888  return 0;
890  return ttopo.tibIsStereo(i);
892  return ttopo.tidIsStereo(i);
894  return ttopo.tobIsStereo(i);
896  return ttopo.tecIsStereo(i);
897  default:
898  return 0;
899  }
900 }
bool tobIsStereo(const DetId &id) const
bool tidIsStereo(const DetId &id) const
bool tecIsStereo(const DetId &id) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
bool tibIsStereo(const DetId &id) const
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
int reco::HitPattern::me0StationsWithAnyHits ( ) const
inline

Definition at line 1186 of file HitPattern.h.

1187 {
1188  return muonStations(5,-1);
1189 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::me0StationsWithBadHits ( ) const
inline

Definition at line 1181 of file HitPattern.h.

1182 {
1183  return muonStations(5, 3);
1184 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::me0StationsWithValidHits ( ) const
inline

Definition at line 1176 of file HitPattern.h.

1177 {
1178  return muonStations(5, 0);
1179 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
bool reco::HitPattern::missingHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 792 of file HitPattern.h.

Referenced by CheckHitPattern::analyze().

793 {
795 }
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:733
bool reco::HitPattern::muonCSCHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 640 of file HitPattern.h.

References MuonSubdetId::CSC, and unlikely.

Referenced by printHitPattern().

641 {
643  return false;
644  }
645 
646  uint32_t substructure = getSubStructure(pattern);
647  return (substructure == (uint32_t) MuonSubdetId::CSC);
648 }
#define unlikely(x)
static const int CSC
Definition: MuonSubdetId.h:13
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
bool reco::HitPattern::muonDTHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 630 of file HitPattern.h.

References MuonSubdetId::DT, and unlikely.

Referenced by numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), and printHitPattern().

631 {
633  return false;
634  }
635 
636  uint32_t substructure = getSubStructure(pattern);
637  return (substructure == (uint32_t) MuonSubdetId::DT);
638 }
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
static const int DT
Definition: MuonSubdetId.h:12
bool reco::HitPattern::muonGEMHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 660 of file HitPattern.h.

References MuonSubdetId::GEM, and unlikely.

Referenced by printHitPattern().

661 {
663  return false;
664  }
665 
666  uint32_t substructure = getSubStructure(pattern);
667  return (substructure == (uint32_t) MuonSubdetId::GEM);
668 }
static const int GEM
Definition: MuonSubdetId.h:15
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
bool reco::HitPattern::muonHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 682 of file HitPattern.h.

References unlikely.

Referenced by innermostMuonStationWithHits(), muonStations(), outermostMuonStationWithHits(), and printHitPattern().

683 {
685  return false;
686  }
687 
688  return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 0);
689 }
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:171
#define unlikely(x)
static const unsigned short SubDetectorMask
Definition: HitPattern.h:438
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:437
bool reco::HitPattern::muonME0HitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 670 of file HitPattern.h.

References MuonSubdetId::ME0, and unlikely.

Referenced by printHitPattern().

670  {
672  uint16_t substructure = getSubStructure(pattern);
673  return (substructure == (uint16_t) MuonSubdetId::ME0);
674 }
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
return(e1-e2)*(e1-e2)+dp *dp
bool reco::HitPattern::muonRPCHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 650 of file HitPattern.h.

References MuonSubdetId::RPC, and unlikely.

Referenced by printHitPattern().

651 {
653  return false;
654  }
655 
656  uint32_t substructure = getSubStructure(pattern);
657  return (substructure == (uint32_t) MuonSubdetId::RPC);
658 }
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
static const int RPC
Definition: MuonSubdetId.h:14
int HitPattern::muonStations ( int  subdet,
int  hitType 
) const

subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad

Definition at line 902 of file HitPattern.cc.

References beginTrackHits, endTrackHits, getHitPatternByAbsoluteIndex(), getHitType(), getMuonStation(), getSubStructure(), mps_fire::i, muonHitFilter(), and listBenchmarks::pattern.

903 {
904  int stations[4] = {0, 0, 0, 0};
905  for (int i = beginTrackHits; i < endTrackHits; ++i) {
907  if (muonHitFilter(pattern)
908  && (subdet == 0 || int(getSubStructure(pattern)) == subdet)
909  && (hitType == -1 || int(getHitType(pattern)) == hitType)) {
910  stations[getMuonStation(pattern) - 1] = 1;
911  }
912  }
913 
914  return stations[0] + stations[1] + stations[2] + stations[3];
915 }
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:733
uint8_t beginTrackHits
Definition: HitPattern.h:475
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
Definition: HitPattern.h:742
int reco::HitPattern::muonStationsWithAnyHits ( ) const
inline

Definition at line 1111 of file HitPattern.h.

1112 {
1113  return muonStations(0, -1);
1114 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::muonStationsWithBadHits ( ) const
inline

Definition at line 1106 of file HitPattern.h.

1107 {
1108  return muonStations(0, 3);
1109 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::muonStationsWithValidHits ( ) const
inline

Definition at line 1101 of file HitPattern.h.

1102 {
1103  return muonStations(0, 0);
1104 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::numberOfBadHits ( ) const
inline

Definition at line 981 of file HitPattern.h.

982 {
984 }
static bool badHitFilter(uint16_t pattern)
Definition: HitPattern.h:802
int countHits(HitCategory category, filterType filter) const
Definition: HitPattern.h:525
int reco::HitPattern::numberOfBadMuonCSCHits ( ) const
inline

Definition at line 996 of file HitPattern.h.

997 {
999 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:640
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
int reco::HitPattern::numberOfBadMuonDTHits ( ) const
inline

Definition at line 991 of file HitPattern.h.

992 {
994 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
int reco::HitPattern::numberOfBadMuonGEMHits ( ) const
inline

Definition at line 1006 of file HitPattern.h.

1007 {
1009 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
static bool muonGEMHitFilter(uint16_t pattern)
Definition: HitPattern.h:660
int reco::HitPattern::numberOfBadMuonHits ( ) const
inline

Definition at line 986 of file HitPattern.h.

987 {
989 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
int reco::HitPattern::numberOfBadMuonME0Hits ( ) const
inline

Definition at line 1011 of file HitPattern.h.

1011  {
1013 }
static bool muonME0HitFilter(uint16_t pattern)
Definition: HitPattern.h:670
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
int reco::HitPattern::numberOfBadMuonRPCHits ( ) const
inline

Definition at line 1001 of file HitPattern.h.

1002 {
1004 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:650
int HitPattern::numberOfDTStationsWithBothViews ( ) const

Definition at line 977 of file HitPattern.cc.

References beginTrackHits, endTrackHits, getDTSuperLayer(), getHitPatternByAbsoluteIndex(), getMuonStation(), mps_fire::i, muonDTHitFilter(), listBenchmarks::pattern, and validHitFilter().

978 {
979  int stations[4][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
980  for (int i = beginTrackHits; i < endTrackHits; ++i) {
982  if (muonDTHitFilter(pattern) && validHitFilter(pattern)) {
983  stations[getMuonStation(pattern) - 1][getDTSuperLayer(pattern) == 2] = 1;
984  }
985  }
986 
987  return stations[0][0] * stations[0][1]
988  + stations[1][0] * stations[1][1]
989  + stations[2][0] * stations[2][1]
990  + stations[3][0] * stations[3][1];
991 }
static uint16_t getDTSuperLayer(uint16_t pattern)
DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:747
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
Definition: HitPattern.h:742
int HitPattern::numberOfDTStationsWithRPhiView ( ) const

Definition at line 950 of file HitPattern.cc.

References beginTrackHits, endTrackHits, getDTSuperLayer(), getHitPatternByAbsoluteIndex(), getMuonStation(), mps_fire::i, muonDTHitFilter(), listBenchmarks::pattern, and validHitFilter().

951 {
952  int stations[4] = {0, 0, 0, 0};
953  for (int i = beginTrackHits; i < endTrackHits; ++i) {
955 
956  if (muonDTHitFilter(pattern) && validHitFilter(pattern)
957  && getDTSuperLayer(pattern) != 2) {
958  stations[getMuonStation(pattern) - 1] = 1;
959  }
960  }
961  return stations[0] + stations[1] + stations[2] + stations[3];
962 }
static uint16_t getDTSuperLayer(uint16_t pattern)
DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:747
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
Definition: HitPattern.h:742
int HitPattern::numberOfDTStationsWithRZView ( ) const

Definition at line 964 of file HitPattern.cc.

References beginTrackHits, endTrackHits, getDTSuperLayer(), getHitPatternByAbsoluteIndex(), getMuonStation(), mps_fire::i, muonDTHitFilter(), listBenchmarks::pattern, and validHitFilter().

965 {
966  int stations[4] = {0, 0, 0, 0};
967  for (int i = beginTrackHits; i < endTrackHits; ++i) {
969  if (muonDTHitFilter(pattern) && validHitFilter(pattern)
970  && getDTSuperLayer(pattern) == 2) {
971  stations[getMuonStation(pattern) - 1] = 1;
972  }
973  }
974  return stations[0] + stations[1] + stations[2] + stations[3];
975 }
static uint16_t getDTSuperLayer(uint16_t pattern)
DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:747
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
Definition: HitPattern.h:742
int reco::HitPattern::numberOfHits ( HitCategory  category) const
inline
int reco::HitPattern::numberOfInactiveHits ( ) const
inline

Definition at line 1015 of file HitPattern.h.

1016 {
1018 }
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
int countHits(HitCategory category, filterType filter) const
Definition: HitPattern.h:525
int reco::HitPattern::numberOfInactiveTrackerHits ( ) const
inline

Definition at line 1020 of file HitPattern.h.

1021 {
1023 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:797
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
int reco::HitPattern::numberOfLostHits ( HitCategory  category) const
inline
int reco::HitPattern::numberOfLostMuonCSCHits ( ) const
inline

Definition at line 962 of file HitPattern.h.

Referenced by MuonBadTrackFilter::trackInfo().

963 {
965 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:640
int reco::HitPattern::numberOfLostMuonDTHits ( ) const
inline

Definition at line 957 of file HitPattern.h.

Referenced by MuonBadTrackFilter::trackInfo().

958 {
960 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
int reco::HitPattern::numberOfLostMuonGEMHits ( ) const
inline

Definition at line 972 of file HitPattern.h.

973 {
975 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool muonGEMHitFilter(uint16_t pattern)
Definition: HitPattern.h:660
int reco::HitPattern::numberOfLostMuonHits ( ) const
inline

Definition at line 912 of file HitPattern.h.

Referenced by MuonBadTrackFilter::trackInfo().

913 {
915 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
int reco::HitPattern::numberOfLostMuonME0Hits ( ) const
inline

Definition at line 977 of file HitPattern.h.

977  {
979 }
static bool muonME0HitFilter(uint16_t pattern)
Definition: HitPattern.h:670
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
int reco::HitPattern::numberOfLostMuonRPCHits ( ) const
inline

Definition at line 967 of file HitPattern.h.

Referenced by MuonBadTrackFilter::trackInfo().

968 {
970 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:650
int reco::HitPattern::numberOfLostPixelBarrelHits ( HitCategory  category) const
inline

Definition at line 922 of file HitPattern.h.

923 {
925 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool pixelBarrelHitFilter(uint16_t pattern)
Definition: HitPattern.h:575
int reco::HitPattern::numberOfLostPixelEndcapHits ( HitCategory  category) const
inline

Definition at line 927 of file HitPattern.h.

928 {
930 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool pixelEndcapHitFilter(uint16_t pattern)
Definition: HitPattern.h:585
int reco::HitPattern::numberOfLostPixelHits ( HitCategory  category) const
inline

Definition at line 917 of file HitPattern.h.

918 {
920 }
static bool pixelHitFilter(uint16_t pattern)
Definition: HitPattern.h:564
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
int reco::HitPattern::numberOfLostStripHits ( HitCategory  category) const
inline

Definition at line 932 of file HitPattern.h.

933 {
935 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool stripHitFilter(uint16_t pattern)
Definition: HitPattern.h:595
int reco::HitPattern::numberOfLostStripTECHits ( HitCategory  category) const
inline

Definition at line 952 of file HitPattern.h.

953 {
955 }
static bool stripTECHitFilter(uint16_t pattern)
Definition: HitPattern.h:625
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
int reco::HitPattern::numberOfLostStripTIBHits ( HitCategory  category) const
inline

Definition at line 937 of file HitPattern.h.

938 {
940 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool stripTIBHitFilter(uint16_t pattern)
Definition: HitPattern.h:610
int reco::HitPattern::numberOfLostStripTIDHits ( HitCategory  category) const
inline

Definition at line 942 of file HitPattern.h.

943 {
945 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool stripTIDHitFilter(uint16_t pattern)
Definition: HitPattern.h:615
int reco::HitPattern::numberOfLostStripTOBHits ( HitCategory  category) const
inline

Definition at line 947 of file HitPattern.h.

948 {
950 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:792
static bool stripTOBHitFilter(uint16_t pattern)
Definition: HitPattern.h:620
int reco::HitPattern::numberOfLostTrackerHits ( HitCategory  category) const
inline
int reco::HitPattern::numberOfMuonHits ( ) const
inline

Definition at line 818 of file HitPattern.h.

819 {
821 }
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
int countHits(HitCategory category, filterType filter) const
Definition: HitPattern.h:525
int reco::HitPattern::numberOfTrackerHits ( HitCategory  category) const
inline

Definition at line 813 of file HitPattern.h.

814 {
816 }
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
int countHits(HitCategory category, filterType filter) const
Definition: HitPattern.h:525
int reco::HitPattern::numberOfValidHits ( ) const
inline
int reco::HitPattern::numberOfValidMuonCSCHits ( ) const
inline

Definition at line 883 of file HitPattern.h.

Referenced by NewMuonTrackValidator::analyze(), MuonTrackValidator::analyze(), and MuonBadTrackFilter::trackInfo().

884 {
886 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:640
int reco::HitPattern::numberOfValidMuonDTHits ( ) const
inline

Definition at line 878 of file HitPattern.h.

Referenced by NewMuonTrackValidator::analyze(), MuonTrackValidator::analyze(), and MuonBadTrackFilter::trackInfo().

879 {
881 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
int reco::HitPattern::numberOfValidMuonGEMHits ( ) const
inline

Definition at line 893 of file HitPattern.h.

Referenced by NewMuonTrackValidator::analyze(), and MuonTrackValidator::analyze().

894 {
896 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
static bool muonGEMHitFilter(uint16_t pattern)
Definition: HitPattern.h:660
int reco::HitPattern::numberOfValidMuonHits ( ) const
inline

Definition at line 833 of file HitPattern.h.

Referenced by HLTMuonL3PreFilter::applySelection(), HLTMuonL2SelectorForL3IO::produce(), BPhysicsOniaDQM::selGlobalMuon(), MuScleFitMuonSelector::selGlobalMuon(), MuScleFit::selGlobalMuon(), and MuonBadTrackFilter::trackInfo().

834 {
836 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
int reco::HitPattern::numberOfValidMuonME0Hits ( ) const
inline

Definition at line 898 of file HitPattern.h.

Referenced by NewMuonTrackValidator::analyze(), and MuonTrackValidator::analyze().

898  {
900 }
static bool muonME0HitFilter(uint16_t pattern)
Definition: HitPattern.h:670
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
int reco::HitPattern::numberOfValidMuonRPCHits ( ) const
inline

Definition at line 888 of file HitPattern.h.

Referenced by NewMuonTrackValidator::analyze(), MuonTrackValidator::analyze(), and MuonBadTrackFilter::trackInfo().

889 {
891 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:650
int reco::HitPattern::numberOfValidPixelBarrelHits ( ) const
inline
int reco::HitPattern::numberOfValidPixelEndcapHits ( ) const
inline
int reco::HitPattern::numberOfValidPixelHits ( ) const
inline

Definition at line 838 of file HitPattern.h.

Referenced by TrackTypeMonitor::analyze(), StandaloneTrackMonitor::analyze(), CheckHitPattern::analyze(), BDHadronTrackMonitoringAnalyzer::analyze(), PackedCandidateTrackValidator::analyze(), IPTagPlotter< Container, Base >::analyzeTag(), PFRecoTauDiscriminationByHPSSelection::discriminate(), TrackingNtuple::fillTracks(), ZtoMMEventSelector::filter(), ZtoEEEventSelector::filter(), WtoLNuSelector::filter(), reco::tau::RecoTauQualityCuts::filterTrack_(), HLTTrackWithHits::hltFilter(), TrackClassFilter::operator()(), reco::tau::RecoTauPiZeroStripPlugin2::operator()(), RecoTrackSelectorBase::operator()(), reco::tau::RecoTauPiZeroStripPlugin3::operator()(), pat::PATLostTracks::passTrkCuts(), EleTkIsolFromCands::passTrkSel(), TrackListMerger::produce(), pat::PATPackedCandidateProducer::produce(), IPProducer< Container, Base, Helper >::produce(), pat::PackedCandidate::setHits(), reco::IPTagInfo< Container, Base >::taggingVariables(), TrackWithVertexSelector::testTrack(), TrackVertexArbitration< VTX >::trackFilterArbitrator(), MuonBadTrackFilter::trackInfo(), reco::TrackSelector::trackSelection(), reco::tau::qcuts::trkPixelHits(), and QuickTrackAssociatorByHitsImpl::weightedNumberOfTrackHits().

839 {
841 }
static bool pixelHitFilter(uint16_t pattern)
Definition: HitPattern.h:564
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
int reco::HitPattern::numberOfValidStripHits ( ) const
inline
int HitPattern::numberOfValidStripLayersWithMonoAndStereo ( uint16_t  stripdet,
uint16_t  layer 
) const

Definition at line 335 of file HitPattern.cc.

References beginTrackHits, KineDebug3::count(), endTrackHits, getHitPatternByAbsoluteIndex(), getLayer(), getSide(), getSubStructure(), getSubSubStructure(), mps_fire::i, LayerMask, listBenchmarks::pattern, stripHitFilter(), SubstrMask, and validHitFilter().

Referenced by dqm::TrackAnalyzer::analyze(), MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), TrackingNtuple::fillTracks(), RecoTrackSelectorBase::operator()(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), CosmicTrackSelector::select(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), and QcdUeDQM::trackSelection().

336 {
337  bool hasMono[SubstrMask + 1][LayerMask + 1];
338  bool hasStereo[SubstrMask + 1][LayerMask + 1];
339  memset(hasMono, 0, sizeof(hasMono));
340  memset(hasStereo, 0, sizeof(hasStereo));
341 
342  // mark which layers have mono/stereo hits
343  for (int i = beginTrackHits; i < endTrackHits; ++i) {
345  uint16_t subStructure = getSubStructure(pattern);
346 
347  if (validHitFilter(pattern) && stripHitFilter(pattern)) {
348  if (stripdet != 0 && subStructure != stripdet) {
349  continue;
350  }
351 
352  if (layer != 0 && getSubSubStructure(pattern) != layer) {
353  continue;
354  }
355 
356  switch (getSide(pattern)) {
357  case 0: // mono
358  hasMono[subStructure][getLayer(pattern)] = true;
359  break;
360  case 1: // stereo
361  hasStereo[subStructure][getLayer(pattern)] = true;
362  break;
363  default:
364  ;
365  break;
366  }
367  }
368  }
369 
370  // count how many layers have mono and stereo hits
371  int count = 0;
372  for (int i = 0; i < SubstrMask + 1; ++i) {
373  for (int j = 0; j < LayerMask + 1; ++j) {
374  if (hasMono[i][j] && hasStereo[i][j]) {
375  count++;
376  }
377  }
378  }
379  return count;
380 }
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:700
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
static bool stripHitFilter(uint16_t pattern)
Definition: HitPattern.h:595
uint8_t beginTrackHits
Definition: HitPattern.h:475
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static uint32_t getSide(uint16_t pattern)
Definition: HitPattern.h:724
static const unsigned short SubstrMask
Definition: HitPattern.h:434
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:705
static const unsigned short LayerMask
Definition: HitPattern.h:430
int HitPattern::numberOfValidStripLayersWithMonoAndStereo ( ) const

Definition at line 382 of file HitPattern.cc.

References python.rootplot.argparse::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), getSide(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, minStripWord, minTrackerWord, listBenchmarks::pattern, and TRACK_HITS.

Referenced by numberOfValidTECLayersWithMonoAndStereo(), numberOfValidTIBLayersWithMonoAndStereo(), numberOfValidTIDLayersWithMonoAndStereo(), and numberOfValidTOBLayersWithMonoAndStereo().

383 {
384  auto category = TRACK_HITS;
385  std::bitset<128> side[2];
386  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
387  for (int i = range.first; i < range.second; ++i) {
389  if (pattern<minStripWord) continue;
390  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
391  if (hitType != HIT_TYPE::VALID) continue;
392  auto apattern = (pattern-minTrackerWord) >> LayerOffset;
393  // assert(apattern<128);
394  side[getSide(pattern)].set(apattern);
395  }
396  // assert(numberOfValidStripLayersWithMonoAndStereo(0, 0)==int((side[0]&side[1]).count()));
397  return (side[0]&side[1]).count();
398 
399 
400 }
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
static const unsigned short minTrackerWord
Definition: HitPattern.h:440
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
static const unsigned short minStripWord
Definition: HitPattern.h:442
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static uint32_t getSide(uint16_t pattern)
Definition: HitPattern.h:724
static const unsigned short LayerOffset
Definition: HitPattern.h:429
int reco::HitPattern::numberOfValidStripTECHits ( ) const
inline

Definition at line 873 of file HitPattern.h.

Referenced by PatTrackAnalyzer::analyze(), PrimaryVertexValidation::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), and HIPAlignmentAlgorithm::run().

874 {
876 }
static bool stripTECHitFilter(uint16_t pattern)
Definition: HitPattern.h:625
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
int reco::HitPattern::numberOfValidStripTIBHits ( ) const
inline
int reco::HitPattern::numberOfValidStripTIDHits ( ) const
inline

Definition at line 863 of file HitPattern.h.

Referenced by PatTrackAnalyzer::analyze(), PrimaryVertexValidation::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), and HIPAlignmentAlgorithm::run().

864 {
866 }
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:551
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
static bool stripTIDHitFilter(uint16_t pattern)
Definition: HitPattern.h:615
int reco::HitPattern::numberOfValidStripTOBHits ( ) const
inline
int HitPattern::numberOfValidTECLayersWithMonoAndStereo ( uint32_t  layer = 0) const
int HitPattern::numberOfValidTIBLayersWithMonoAndStereo ( uint32_t  layer = 0) const
int HitPattern::numberOfValidTIDLayersWithMonoAndStereo ( uint32_t  layer = 0) const
int HitPattern::numberOfValidTOBLayersWithMonoAndStereo ( uint32_t  layer = 0) const
int reco::HitPattern::numberOfValidTrackerHits ( ) const
inline
HitPattern & HitPattern::operator= ( const HitPattern other)

Definition at line 45 of file HitPattern.cc.

References ARRAY_LENGTH, beginInner, beginOuter, beginTrackHits, endInner, endOuter, endTrackHits, hitCount, and hitPattern.

46 {
47  if (this == &other) {
48  return *this;
49  }
50 
51  this->hitCount = other.hitCount;
52 
53  this->beginTrackHits = other.beginTrackHits;
54  this->endTrackHits = other.endTrackHits;
55 
56  this->beginInner = other.beginInner;
57  this->endInner = other.endInner;
58 
59  this->beginOuter = other.beginOuter;
60  this->endOuter = other.endOuter;
61 
62  memcpy(this->hitPattern, other.hitPattern, sizeof(uint16_t) * HitPattern::ARRAY_LENGTH);
63 
64  return *this;
65 }
static const unsigned short ARRAY_LENGTH
Definition: HitPattern.h:166
uint8_t endInner
Definition: HitPattern.h:478
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:472
uint8_t beginInner
Definition: HitPattern.h:477
uint8_t beginTrackHits
Definition: HitPattern.h:475
uint8_t endTrackHits
Definition: HitPattern.h:476
uint8_t hitCount
Definition: HitPattern.h:473
uint8_t beginOuter
Definition: HitPattern.h:479
uint8_t endOuter
Definition: HitPattern.h:480
int reco::HitPattern::outermostMuonStationWithAnyHits ( ) const
inline

Definition at line 1216 of file HitPattern.h.

1217 {
1218  return outermostMuonStationWithHits(-1);
1219 }
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:934
int reco::HitPattern::outermostMuonStationWithBadHits ( ) const
inline

Definition at line 1211 of file HitPattern.h.

1212 {
1213  return outermostMuonStationWithHits(3);
1214 }
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:934
int HitPattern::outermostMuonStationWithHits ( int  hitType) const

hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all

Definition at line 934 of file HitPattern.cc.

References beginTrackHits, endTrackHits, getHitPatternByAbsoluteIndex(), getHitType(), getMuonStation(), mps_fire::i, muonHitFilter(), listBenchmarks::pattern, and trackingPlots::stat.

935 {
936  int ret = 0;
937  for (int i = beginTrackHits; i < endTrackHits; ++i) {
939  if (muonHitFilter(pattern) &&
940  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
941  int stat = getMuonStation(pattern);
942  if (ret == 0 || stat > ret) {
943  ret = stat;
944  }
945  }
946  }
947  return ret;
948 }
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:733
uint8_t beginTrackHits
Definition: HitPattern.h:475
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
uint8_t endTrackHits
Definition: HitPattern.h:476
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
Definition: HitPattern.h:742
int reco::HitPattern::outermostMuonStationWithValidHits ( ) const
inline

Definition at line 1206 of file HitPattern.h.

1207 {
1208  return outermostMuonStationWithHits(0);
1209 }
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:934
bool reco::HitPattern::pixelBarrelHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 575 of file HitPattern.h.

References PixelSubdetector::PixelBarrel, and unlikely.

Referenced by PrimaryVertexValidation::hasFirstLayerPixelHits(), and hasValidHitInPixelLayer().

576 {
578  return false;
579  }
580 
581  uint32_t substructure = getSubStructure(pattern);
582  return (substructure == PixelSubdetector::PixelBarrel);
583 }
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
int HitPattern::pixelBarrelLayersNull ( ) const

Definition at line 758 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), NULL_RETURN, PixelSubdetector::PixelBarrel, and TRACK_HITS.

759 {
760  int count = 0;
761  uint16_t NPixBarrel = 4;
762  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
764  count++;
765  }
766  }
767  return count;
768 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::pixelBarrelLayersTotallyOffOrBad ( ) const

Definition at line 689 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), PixelSubdetector::PixelBarrel, and TRACK_HITS.

690 {
691  int count = 0;
692  uint16_t NPixBarrel = 4;
693  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
694  if (getTrackerLayerCase(TRACK_HITS, PixelSubdetector::PixelBarrel, layer) == HIT_TYPE::INACTIVE) {
695  count++;
696  }
697  }
698  return count;
699 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::pixelBarrelLayersWithMeasurement ( ) const

Definition at line 552 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), PixelSubdetector::PixelBarrel, and TRACK_HITS.

Referenced by dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), PrimaryVertexValidation::fillTrackHistos(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

553 {
554  int count = 0;
555  uint16_t NPixBarrel = 4;
556  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
557  if (getTrackerLayerCase(TRACK_HITS, PixelSubdetector::PixelBarrel, layer) == HIT_TYPE::VALID) {
558  count++;
559  }
560  }
561  return count;
562 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::pixelBarrelLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 620 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), and PixelSubdetector::PixelBarrel.

621 {
622  int count = 0;
623  uint16_t NPixBarrel = 4;
624  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
625  if (getTrackerLayerCase(category, PixelSubdetector::PixelBarrel, layer) == HIT_TYPE::MISSING) {
626  count++;
627  }
628  }
629  return count;
630 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
bool reco::HitPattern::pixelEndcapHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 585 of file HitPattern.h.

References PixelSubdetector::PixelEndcap, and unlikely.

Referenced by PrimaryVertexValidation::hasFirstLayerPixelHits(), and hasValidHitInPixelLayer().

586 {
588  return false;
589  }
590 
591  uint32_t substructure = getSubStructure(pattern);
592  return (substructure == PixelSubdetector::PixelEndcap);
593 }
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
int HitPattern::pixelEndcapLayersNull ( ) const

Definition at line 770 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), NULL_RETURN, PixelSubdetector::PixelEndcap, and TRACK_HITS.

771 {
772  int count = 0;
773  uint16_t NPixForward = 3;
774  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
776  count++;
777  }
778  }
779  return count;
780 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::pixelEndcapLayersTotallyOffOrBad ( ) const

Definition at line 701 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), PixelSubdetector::PixelEndcap, and TRACK_HITS.

702 {
703  int count = 0;
704  uint16_t NPixForward = 3;
705  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
706  if (getTrackerLayerCase(TRACK_HITS, PixelSubdetector::PixelEndcap, layer) == HIT_TYPE::INACTIVE) {
707  count++;
708  }
709  }
710  return count;
711 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::pixelEndcapLayersWithMeasurement ( ) const

Definition at line 564 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), PixelSubdetector::PixelEndcap, and TRACK_HITS.

Referenced by dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

565 {
566  int count = 0;
567  uint16_t NPixForward = 3;
568  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
569  if (getTrackerLayerCase(TRACK_HITS, PixelSubdetector::PixelEndcap, layer) == HIT_TYPE::VALID) {
570  count++;
571  }
572  }
573  return count;
574 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::pixelEndcapLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 632 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), and PixelSubdetector::PixelEndcap.

633 {
634  int count = 0;
635  uint16_t NPixForward = 3;
636  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
637  if (getTrackerLayerCase(category, PixelSubdetector::PixelEndcap, layer) == HIT_TYPE::MISSING) {
638  count++;
639  }
640  }
641  return count;
642 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
bool reco::HitPattern::pixelHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 564 of file HitPattern.h.

References PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, and unlikely.

Referenced by GsfElectronCoreBaseProducer::getCtfTrackRef(), hasValidHitInPixelLayer(), FWConvTrackHitsDetailView::setTextInfo(), and QcdUeDQM::trackSelection().

565 {
567  return false;
568  }
569 
570  uint32_t substructure = getSubStructure(pattern);
571  return (substructure == PixelSubdetector::PixelBarrel ||
572  substructure == PixelSubdetector::PixelEndcap);
573 }
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
int reco::HitPattern::pixelLayersNull ( ) const
inline

Definition at line 1087 of file HitPattern.h.

1088 {
1089  return pixelBarrelLayersNull() +
1091 }
int pixelBarrelLayersNull() const
Definition: HitPattern.cc:758
int pixelEndcapLayersNull() const
Definition: HitPattern.cc:770
int reco::HitPattern::pixelLayersTotallyOffOrBad ( ) const
inline

Definition at line 1067 of file HitPattern.h.

1068 {
1071 }
int pixelBarrelLayersTotallyOffOrBad() const
Definition: HitPattern.cc:689
int pixelEndcapLayersTotallyOffOrBad() const
Definition: HitPattern.cc:701
int HitPattern::pixelLayersWithMeasurement ( ) const

Definition at line 493 of file HitPattern.cc.

References python.rootplot.argparse::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, minStripWord, minTrackerWord, listBenchmarks::pattern, TRACK_HITS, trackerHitFilter(), and unlikely.

Referenced by StandaloneTrackMonitor::analyze(), dqm::TrackAnalyzer::analyze(), NewMuonTrackValidator::analyze(), PackedCandidateTrackValidator::analyze(), MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), PrimaryVertexValidation::fillTrackHistos(), TrackingNtuple::fillTracks(), TrackFilterForPVFinding::operator()(), GhostTrackComputer::operator()(), RecoTrackSelectorBase::operator()(), IsolatedTracksNxN::printTrack(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), BeamFitter::readEvent(), CosmicTrackSelector::select(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), BPhysicsOniaDQM::selGlobalMuon(), MuScleFitMuonSelector::selGlobalMuon(), MuScleFit::selGlobalMuon(), BPhysicsOniaDQM::selTrackerMuon(), MuScleFitMuonSelector::selTrackerMuon(), MuScleFit::selTrackerMuon(), pat::PackedCandidate::setHits(), and QcdUeDQM::trackSelection().

493  {
494  auto category = TRACK_HITS;
495  std::bitset<128> layerOk;
496  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
497  for (int i = range.first; i < range.second; ++i) {
499  if unlikely(!trackerHitFilter(pattern)) continue;
500  if (pattern>minStripWord) continue;
501  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
502  if (hitType != HIT_TYPE::VALID) continue;
504  // assert(pattern<128);
505  layerOk.set(pattern);
506  }
507  // assert(pixelLayersWithMeasurementOld()==int(layerOk.count()));
508  return layerOk.count();
509 }
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
#define unlikely(x)
static const unsigned short minTrackerWord
Definition: HitPattern.h:440
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
static const unsigned short minStripWord
Definition: HitPattern.h:442
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
return(e1-e2)*(e1-e2)+dp *dp
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
if(dp >Float(M_PI)) dp-
static const unsigned short LayerOffset
Definition: HitPattern.h:429
int reco::HitPattern::pixelLayersWithMeasurementOld ( ) const
inline

Definition at line 1030 of file HitPattern.h.

1031 {
1033 }
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:564
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:552
int reco::HitPattern::pixelLayersWithoutMeasurement ( HitCategory  category) const
inline

Definition at line 1047 of file HitPattern.h.

1048 {
1051 }
int pixelBarrelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:620
int pixelEndcapLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:632
void HitPattern::print ( HitCategory  category,
std::ostream &  stream = std::cout 
) const

Definition at line 862 of file HitPattern.cc.

References flags, getHitPattern(), mps_fire::i, numberOfHits(), and printHitPattern().

863 {
864  stream << "HitPattern" << std::endl;
865  for (int i = 0; i < numberOfHits(category); ++i) {
866  printHitPattern(category, i, stream);
867  }
868  std::ios_base::fmtflags flags = stream.flags();
869  stream.setf(std::ios_base::hex, std::ios_base::basefield);
870  stream.setf(std::ios_base::showbase);
871 
872  for (int i = 0; i < this->numberOfHits(category); ++i) {
873  stream << getHitPattern(category, i) << std::endl;
874  }
875 
876  stream.flags(flags);
877 }
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
Definition: HitPattern.cc:826
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:515
int numberOfHits(HitCategory category) const
Definition: HitPattern.h:807
void HitPattern::printHitPattern ( HitCategory  category,
int  position,
std::ostream &  stream 
) const

Definition at line 826 of file HitPattern.cc.

References getCSCRing(), getDTSuperLayer(), getGEMLayer(), getGEMStation(), getHitPattern(), getHitType(), getLayer(), getMuonStation(), getRPCLayer(), getRPCregion(), getSubStructure(), muonCSCHitFilter(), muonDTHitFilter(), muonGEMHitFilter(), muonHitFilter(), muonME0HitFilter(), muonRPCHitFilter(), listBenchmarks::pattern, and trackerHitFilter().

Referenced by spr::goodTrack(), print(), IsolatedTracksCone::printTrack(), and IsolatedTracksNxN::printTrack().

827 {
828  uint16_t pattern = getHitPattern(category, position);
829  stream << "\t";
830  if (muonHitFilter(pattern)) {
831  stream << "muon";
832  } else if (trackerHitFilter(pattern)) {
833  stream << "tracker";
834  }
835 
836  stream << "\tsubstructure " << getSubStructure(pattern);
837  if (muonHitFilter(pattern)) {
838  stream << "\tstation " << getMuonStation(pattern);
839  if (muonDTHitFilter(pattern)) {
840  stream << "\tdt superlayer " << getDTSuperLayer(pattern);
841  } else if (muonCSCHitFilter(pattern)) {
842  stream << "\tcsc ring " << getCSCRing(pattern);
843  } else if (muonRPCHitFilter(pattern)) {
844  stream << "\trpc " << (getRPCregion(pattern) ? "endcaps" : "barrel")
845  << ", layer " << getRPCLayer(pattern);
846  } else if (muonGEMHitFilter(pattern)) {
847  stream << "\tgem " << (getGEMLayer(pattern) ? "layer1" : "layer2")
848  << ", station " << getGEMStation(pattern);
849  } else if (muonME0HitFilter(pattern)) {
850  stream << "\tme0 ";
851  } else {
852  stream << "(UNKNOWN Muon SubStructure!) \tsubsubstructure "
853  << getSubStructure(pattern);
854  }
855  } else {
856  stream << "\tlayer " << getLayer(pattern);
857  }
858  stream << "\thit type " << getHitType(pattern);
859  stream << std::endl;
860 }
static uint16_t getCSCRing(uint16_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
Definition: HitPattern.h:752
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:700
static uint16_t getDTSuperLayer(uint16_t pattern)
DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:747
static bool muonME0HitFilter(uint16_t pattern)
Definition: HitPattern.h:670
static uint16_t getGEMLayer(uint16_t pattern)
GEM layer: 1,2. Only valid for muon GEM patterns, of course.
Definition: HitPattern.h:782
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:640
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:733
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static uint16_t getRPCregion(uint16_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
Definition: HitPattern.h:769
static bool muonGEMHitFilter(uint16_t pattern)
Definition: HitPattern.h:660
static uint16_t getGEMStation(uint16_t pattern)
GEM station: 1,2. Only valid for muon GEM patterns, of course.
Definition: HitPattern.h:775
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:682
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
static int position[264][3]
Definition: ReadPGInfo.cc:509
static uint16_t getRPCLayer(uint16_t pattern)
RPC layer: for station 1 and 2, layer = 1(inner) or 2(outer); for station 3, 4 layer is always 0...
Definition: HitPattern.h:757
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
Definition: HitPattern.h:742
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:515
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:650
int reco::HitPattern::rpcStationsWithAnyHits ( ) const
inline

Definition at line 1156 of file HitPattern.h.

1157 {
1158  return muonStations(3, -1);
1159 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::rpcStationsWithBadHits ( ) const
inline

Definition at line 1151 of file HitPattern.h.

1152 {
1153  return muonStations(3, 3);
1154 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
int reco::HitPattern::rpcStationsWithValidHits ( ) const
inline

Definition at line 1146 of file HitPattern.h.

1147 {
1148  return muonStations(3, 0);
1149 }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:902
bool reco::HitPattern::stripHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 595 of file HitPattern.h.

Referenced by numberOfValidStripLayersWithMonoAndStereo(), and FWConvTrackHitsDetailView::setTextInfo().

596 {
597  return pattern > minStripWord;
598 }
static const unsigned short minStripWord
Definition: HitPattern.h:442
int reco::HitPattern::stripLayersNull ( ) const
inline

Definition at line 1093 of file HitPattern.h.

1094 {
1095  return stripTIBLayersNull() +
1096  stripTIDLayersNull() +
1097  stripTOBLayersNull() +
1099 }
int stripTIBLayersNull() const
Definition: HitPattern.cc:782
int stripTECLayersNull() const
Definition: HitPattern.cc:815
int stripTIDLayersNull() const
Definition: HitPattern.cc:793
int stripTOBLayersNull() const
Definition: HitPattern.cc:804
int reco::HitPattern::stripLayersTotallyOffOrBad ( ) const
inline

Definition at line 1073 of file HitPattern.h.

1074 {
1079 }
int stripTOBLayersTotallyOffOrBad() const
Definition: HitPattern.cc:735
int stripTIDLayersTotallyOffOrBad() const
Definition: HitPattern.cc:724
int stripTECLayersTotallyOffOrBad() const
Definition: HitPattern.cc:747
int stripTIBLayersTotallyOffOrBad() const
Definition: HitPattern.cc:713
int reco::HitPattern::stripLayersWithMeasurement ( ) const
inline
int reco::HitPattern::stripLayersWithoutMeasurement ( HitCategory  category) const
inline

Definition at line 1053 of file HitPattern.h.

1054 {
1059 }
int stripTOBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:666
int stripTIDLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:655
int stripTECLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:677
int stripTIBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:644
bool reco::HitPattern::stripSubdetectorHitFilter ( uint16_t  pattern,
StripSubdetector::SubDetector  substructure 
)
inlinestaticprivate

Definition at line 601 of file HitPattern.h.

References unlikely.

602 {
604  return false;
605  }
606 
607  return substructure == getSubStructure(pattern);
608 }
#define unlikely(x)
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
bool reco::HitPattern::stripTECHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 625 of file HitPattern.h.

References StripSubdetector::TEC.

626 {
628 }
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
Definition: HitPattern.h:601
int HitPattern::stripTECLayersNull ( ) const

Definition at line 815 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), NULL_RETURN, StripSubdetector::TEC, and TRACK_HITS.

816 {
817  int count = 0;
818  for (uint16_t layer = 1; layer <= 9; layer++) {
820  count++;
821  }
822  }
823  return count;
824 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTECLayersTotallyOffOrBad ( ) const

Definition at line 747 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TEC, and TRACK_HITS.

748 {
749  int count = 0;
750  for (uint16_t layer = 1; layer <= 9; layer++) {
751  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TEC, layer) == HIT_TYPE::INACTIVE) {
752  count++;
753  }
754  }
755  return count;
756 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTECLayersWithMeasurement ( ) const

Definition at line 609 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TEC, and TRACK_HITS.

Referenced by IsolatedTracksNxN::analyze(), dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), spr::goodTrack(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

610 {
611  int count = 0;
612  for (uint16_t layer = 1; layer <= 9; layer++) {
613  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TEC, layer) == HIT_TYPE::VALID) {
614  count++;
615  }
616  }
617  return count;
618 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTECLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 677 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), and StripSubdetector::TEC.

Referenced by IsolatedTracksNxN::analyze().

678 {
679  int count = 0;
680  for (uint16_t layer = 1; layer <= 9; layer++) {
681  if (getTrackerLayerCase(category, StripSubdetector::TEC, layer) == HIT_TYPE::MISSING) {
682  count++;
683  }
684  }
685  return count;
686 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
bool reco::HitPattern::stripTIBHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 610 of file HitPattern.h.

References StripSubdetector::TIB.

Referenced by GsfElectronCoreBaseProducer::getCtfTrackRef().

611 {
613 }
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
Definition: HitPattern.h:601
int HitPattern::stripTIBLayersNull ( ) const

Definition at line 782 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), NULL_RETURN, StripSubdetector::TIB, and TRACK_HITS.

783 {
784  int count = 0;
785  for (uint16_t layer = 1; layer <= 4; layer++) {
787  count++;
788  }
789  }
790  return count;
791 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTIBLayersTotallyOffOrBad ( ) const

Definition at line 713 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TIB, and TRACK_HITS.

714 {
715  int count = 0;
716  for (uint16_t layer = 1; layer <= 4; layer++) {
717  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TIB, layer) == HIT_TYPE::INACTIVE) {
718  count++;
719  }
720  }
721  return count;
722 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTIBLayersWithMeasurement ( ) const

Definition at line 576 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TIB, and TRACK_HITS.

Referenced by IsolatedTracksNxN::analyze(), dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

577 {
578  int count = 0;
579  for (uint16_t layer = 1; layer <= 4; layer++) {
580  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TIB, layer) == HIT_TYPE::VALID) {
581  count++;
582  }
583  }
584  return count;
585 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTIBLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 644 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), and StripSubdetector::TIB.

Referenced by IsolatedTracksNxN::analyze().

645 {
646  int count = 0;
647  for (uint16_t layer = 1; layer <= 4; layer++) {
648  if (getTrackerLayerCase(category, StripSubdetector::TIB, layer) == HIT_TYPE::MISSING) {
649  count++;
650  }
651  }
652  return count;
653 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
bool reco::HitPattern::stripTIDHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 615 of file HitPattern.h.

References StripSubdetector::TID.

Referenced by GsfElectronCoreBaseProducer::getCtfTrackRef().

616 {
618 }
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
Definition: HitPattern.h:601
int HitPattern::stripTIDLayersNull ( ) const

Definition at line 793 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), NULL_RETURN, StripSubdetector::TID, and TRACK_HITS.

794 {
795  int count = 0;
796  for (uint16_t layer = 1; layer <= 3; layer++) {
798  count++;
799  }
800  }
801  return count;
802 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTIDLayersTotallyOffOrBad ( ) const

Definition at line 724 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TID, and TRACK_HITS.

725 {
726  int count = 0;
727  for (uint16_t layer = 1; layer <= 3; layer++) {
728  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TID, layer) == HIT_TYPE::INACTIVE) {
729  count++;
730  }
731  }
732  return count;
733 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTIDLayersWithMeasurement ( ) const

Definition at line 587 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TID, and TRACK_HITS.

Referenced by IsolatedTracksNxN::analyze(), dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

588 {
589  int count = 0;
590  for (uint16_t layer = 1; layer <= 3; layer++) {
591  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TID, layer) == HIT_TYPE::VALID) {
592  count++;
593  }
594  }
595  return count;
596 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTIDLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 655 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), and StripSubdetector::TID.

Referenced by IsolatedTracksNxN::analyze().

656 {
657  int count = 0;
658  for (uint16_t layer = 1; layer <= 3; layer++) {
659  if (getTrackerLayerCase(category, StripSubdetector::TID, layer) == HIT_TYPE::MISSING) {
660  count++;
661  }
662  }
663  return count;
664 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
bool reco::HitPattern::stripTOBHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 620 of file HitPattern.h.

References StripSubdetector::TOB.

621 {
623 }
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
Definition: HitPattern.h:601
int HitPattern::stripTOBLayersNull ( ) const

Definition at line 804 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), NULL_RETURN, StripSubdetector::TOB, and TRACK_HITS.

805 {
806  int count = 0;
807  for (uint16_t layer = 1; layer <= 6; layer++) {
809  count++;
810  }
811  }
812  return count;
813 }
static const uint32_t NULL_RETURN
Definition: HitPattern.h:170
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTOBLayersTotallyOffOrBad ( ) const

Definition at line 735 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TOB, and TRACK_HITS.

736 {
737  int count = 0;
738  for (uint16_t layer = 1; layer <= 6; layer++) {
739 
740  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TOB, layer) == HIT_TYPE::INACTIVE) {
741  count++;
742  }
743  }
744  return count;
745 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTOBLayersWithMeasurement ( ) const

Definition at line 598 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), StripSubdetector::TOB, and TRACK_HITS.

Referenced by IsolatedTracksNxN::analyze(), dqm::TrackAnalyzer::fillHistosForTrackerSpecific(), spr::goodTrack(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

599 {
600  int count = 0;
601  for (uint16_t layer = 1; layer <= 6; layer++) {
602  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TOB, layer) == HIT_TYPE::VALID) {
603  count++;
604  }
605  }
606  return count;
607 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
int HitPattern::stripTOBLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 666 of file HitPattern.cc.

References KineDebug3::count(), getTrackerLayerCase(), and StripSubdetector::TOB.

Referenced by IsolatedTracksNxN::analyze().

667 {
668  int count = 0;
669  for (uint16_t layer = 1; layer <= 6; layer++) {
670  if (getTrackerLayerCase(category, StripSubdetector::TOB, layer) == HIT_TYPE::MISSING) {
671  count++;
672  }
673  }
674  return count;
675 }
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:422
bool reco::HitPattern::trackerHitFilter ( uint16_t  pattern)
inlinestatic
int reco::HitPattern::trackerLayersNull ( ) const
inline

Definition at line 1081 of file HitPattern.h.

1082 {
1083  return pixelLayersNull() +
1084  stripLayersNull();
1085 }
int pixelLayersNull() const
Definition: HitPattern.h:1087
int stripLayersNull() const
Definition: HitPattern.h:1093
int reco::HitPattern::trackerLayersTotallyOffOrBad ( ) const
inline

Definition at line 1061 of file HitPattern.h.

Referenced by dqm::TrackAnalyzer::analyze().

1062 {
1063  return pixelLayersTotallyOffOrBad() +
1065 }
int pixelLayersTotallyOffOrBad() const
Definition: HitPattern.h:1067
int stripLayersTotallyOffOrBad() const
Definition: HitPattern.h:1073
int HitPattern::trackerLayersWithMeasurement ( ) const

Definition at line 512 of file HitPattern.cc.

References python.rootplot.argparse::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, minTrackerWord, listBenchmarks::pattern, TRACK_HITS, trackerHitFilter(), and unlikely.

Referenced by StandaloneTrackMonitor::analyze(), dqm::TrackAnalyzer::analyze(), IsolatedTracksCone::analyze(), IsolatedTracksNxN::analyze(), NewMuonTrackValidator::analyze(), PackedCandidateTrackValidator::analyze(), spr::coneChargeIsolation(), MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), dqm::TrackAnalyzer::fillHistosForState(), PrimaryVertexValidation::fillTrackHistos(), spr::goodTrack(), cms::MuonTCMETValueMapProducer::nLayers(), TrackFilterForPVFinding::operator()(), GhostTrackComputer::operator()(), RecoTrackSelectorBase::operator()(), IsolatedTracksNxN::printTrack(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), FastTrackerRecHitMaskProducer::produce(), BeamFitter::readEvent(), CosmicTrackSelector::select(), TrackMultiSelector::select(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), TrackVertexArbitration< VTX >::trackFilterArbitrator(), and QcdUeDQM::trackSelection().

512  {
513  auto category = TRACK_HITS;
514  std::bitset<128> layerOk;
515  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
516  for (int i = range.first; i < range.second; ++i) {
518  if unlikely(!trackerHitFilter(pattern)) continue;
519  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
520  if (hitType != HIT_TYPE::VALID) continue;
522  // assert(pattern<128);
523  layerOk.set(pattern);
524  }
525  // assert(trackerLayersWithMeasurementOld()==int(layerOk.count()));
526  return layerOk.count();
527 }
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
#define unlikely(x)
static const unsigned short minTrackerWord
Definition: HitPattern.h:440
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
return(e1-e2)*(e1-e2)+dp *dp
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
if(dp >Float(M_PI)) dp-
static const unsigned short LayerOffset
Definition: HitPattern.h:429
int reco::HitPattern::trackerLayersWithMeasurementOld ( ) const
inline

Definition at line 1025 of file HitPattern.h.

1026 {
1028 }
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:493
int stripLayersWithMeasurement() const
Definition: HitPattern.h:1035
int HitPattern::trackerLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 529 of file HitPattern.cc.

References getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, minTrackerWord, listBenchmarks::pattern, trackerHitFilter(), and unlikely.

Referenced by dqm::TrackAnalyzer::analyze(), spr::goodTrack(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), CosmicTrackSelector::select(), MultiTrackSelector::select(), and HIMultiTrackSelector::select().

529  {
530  std::bitset<128> layerOk;
531  std::bitset<128> layerMissed;
532  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
533  for (int i = range.first; i < range.second; ++i) {
535  if unlikely(!trackerHitFilter(pattern)) continue;
536  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
538  // assert(pattern<128);
539  if (hitType == HIT_TYPE::VALID) layerOk.set(pattern);
540  if (hitType == HIT_TYPE::MISSING) layerMissed.set(pattern);
541  }
542  layerMissed &= ~layerOk;
543 
544  // assert(trackerLayersWithoutMeasurementOld(category)==int(layerMissed.count()));
545 
546  return layerMissed.count();
547 
548 
549 }
static const unsigned short HitTypeMask
Definition: HitPattern.h:422
#define unlikely(x)
static const unsigned short minTrackerWord
Definition: HitPattern.h:440
static const unsigned short HitTypeOffset
Definition: HitPattern.h:421
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:488
return(e1-e2)*(e1-e2)+dp *dp
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:278
if(dp >Float(M_PI)) dp-
static const unsigned short LayerOffset
Definition: HitPattern.h:429
int reco::HitPattern::trackerLayersWithoutMeasurementOld ( HitCategory  category) const
inline

Definition at line 1041 of file HitPattern.h.

1042 {
1045 }
int pixelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:1047
int stripLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:1053
bool reco::HitPattern::validHitFilter ( uint16_t  pattern)
inlinestatic

Friends And Related Function Documentation

template<int N>
friend struct PatternSet
friend

Definition at line 485 of file HitPattern.h.

Member Data Documentation

const unsigned short reco::HitPattern::ARRAY_LENGTH = 50
static

Definition at line 166 of file HitPattern.h.

Referenced by clear(), HitPattern(), and operator=().

uint8_t reco::HitPattern::beginInner
private

Definition at line 477 of file HitPattern.h.

Referenced by appendHit(), clear(), insertExpectedInnerHit(), and operator=().

uint8_t reco::HitPattern::beginOuter
private

Definition at line 479 of file HitPattern.h.

Referenced by appendHit(), clear(), insertExpectedOuterHit(), and operator=().

uint8_t reco::HitPattern::beginTrackHits
private
const uint16_t reco::HitPattern::EMPTY_PATTERN = 0x0
static

Definition at line 171 of file HitPattern.h.

Referenced by clear(), encode(), getHitPatternByAbsoluteIndex(), and HitPattern().

uint8_t reco::HitPattern::endInner
private

Definition at line 478 of file HitPattern.h.

Referenced by appendHit(), clear(), insertExpectedInnerHit(), and operator=().

uint8_t reco::HitPattern::endOuter
private

Definition at line 480 of file HitPattern.h.

Referenced by appendHit(), clear(), insertExpectedOuterHit(), and operator=().

uint8_t reco::HitPattern::endTrackHits
private
const unsigned short reco::HitPattern::HIT_LENGTH = 11
static

Definition at line 167 of file HitPattern.h.

Referenced by getHitPatternByAbsoluteIndex(), and insertHit().

uint8_t reco::HitPattern::hitCount
private
uint16_t reco::HitPattern::hitPattern[ARRAY_LENGTH]
private
const unsigned short reco::HitPattern::HitTypeMask = 0x3
staticprivate
const unsigned short reco::HitPattern::HitTypeOffset = 0
staticprivate
const unsigned short reco::HitPattern::LayerMask = 0xF
staticprivate
const unsigned short reco::HitPattern::LayerOffset = 3
staticprivate
const unsigned short reco::HitPattern::MaxHits = (8 * sizeof(uint16_t) * ARRAY_LENGTH) / HIT_LENGTH
static

Definition at line 168 of file HitPattern.h.

Referenced by appendHit(), and appendMuonHit().

const unsigned short reco::HitPattern::minPixelWord = minTrackerWord | (1<<SubstrOffset)
staticprivate

Definition at line 441 of file HitPattern.h.

const unsigned short reco::HitPattern::minStripWord = minTrackerWord | (3<<SubstrOffset)
staticprivate
const unsigned short reco::HitPattern::minTrackerWord = 1<< SubDetectorOffset
staticprivate
const uint32_t reco::HitPattern::NULL_RETURN = 999999
static
const unsigned short reco::HitPattern::SideMask = 0x1
staticprivate

Definition at line 426 of file HitPattern.h.

Referenced by encode().

const unsigned short reco::HitPattern::SideOffset = 2
staticprivate

Definition at line 425 of file HitPattern.h.

Referenced by encode().

const unsigned short reco::HitPattern::SubDetectorMask = 0x1
staticprivate

Definition at line 438 of file HitPattern.h.

Referenced by encode(), getTrackerLayerCase(), and getTrackerMonoStereo().

const unsigned short reco::HitPattern::SubDetectorOffset = 10
staticprivate

Definition at line 437 of file HitPattern.h.

Referenced by encode(), getTrackerLayerCase(), and getTrackerMonoStereo().

const unsigned short reco::HitPattern::SubstrMask = 0x7
staticprivate
const unsigned short reco::HitPattern::SubstrOffset = 7
staticprivate

Definition at line 433 of file HitPattern.h.

Referenced by encode(), getTrackerLayerCase(), and getTrackerMonoStereo().