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_DETECTOR_TYPE { MUON_HIT = 0, TRACKER_HIT = 1, MTD_HIT = 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 DetId &id, TrackingRecHit::Type hitType, const TrackerTopology &ttopo)
 
bool appendHit (const TrackingRecHit &hit, const TrackerTopology &ttopo)
 
bool appendHit (const TrackingRecHitRef &ref, const TrackerTopology &ttopo)
 
bool appendHit (const uint16_t pattern, TrackingRecHit::Type hitType)
 
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 numberOfAllHits (HitCategory category) const
 
int numberOfAllTrackerHits (HitCategory category) 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 numberOfInactiveHits () const
 
int numberOfInactiveTimingHits () 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 numberOfLostTimingBTLHits () const
 
int numberOfLostTimingETLHits () const
 
int numberOfLostTimingHits () const
 
int numberOfLostTrackerHits (HitCategory category) const
 
int numberOfMuonHits () const
 
int numberOfTimingHits () 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 () const
 
int numberOfValidStripLayersWithMonoAndStereo (uint16_t stripdet, uint16_t layer) 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 numberOfValidTimingBTLHits () const
 
int numberOfValidTimingETLHits () const
 
int numberOfValidTimingHits () 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 (HitCategory category=TRACK_HITS) const
 
int pixelBarrelLayersWithMeasurement () const
 
int pixelBarrelLayersWithoutMeasurement (HitCategory category) const
 
int pixelEndcapLayersNull () const
 
int pixelEndcapLayersTotallyOffOrBad (HitCategory category=TRACK_HITS) const
 
int pixelEndcapLayersWithMeasurement () const
 
int pixelEndcapLayersWithoutMeasurement (HitCategory category) const
 
int pixelLayersNull () const
 
int pixelLayersTotallyOffOrBad (HitCategory category=TRACK_HITS) 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 (HitCategory category=TRACK_HITS) const
 
int stripLayersWithMeasurement () const
 
int stripLayersWithoutMeasurement (HitCategory category) const
 
int stripTECLayersNull () const
 
int stripTECLayersTotallyOffOrBad (HitCategory category=TRACK_HITS) const
 
int stripTECLayersWithMeasurement () const
 
int stripTECLayersWithoutMeasurement (HitCategory category) const
 
int stripTIBLayersNull () const
 
int stripTIBLayersTotallyOffOrBad (HitCategory category=TRACK_HITS) const
 
int stripTIBLayersWithMeasurement () const
 
int stripTIBLayersWithoutMeasurement (HitCategory category) const
 
int stripTIDLayersNull () const
 
int stripTIDLayersTotallyOffOrBad (HitCategory category=TRACK_HITS) const
 
int stripTIDLayersWithMeasurement () const
 
int stripTIDLayersWithoutMeasurement (HitCategory category) const
 
int stripTOBLayersNull () const
 
int stripTOBLayersTotallyOffOrBad (HitCategory category=TRACK_HITS) const
 
int stripTOBLayersWithMeasurement () const
 
int stripTOBLayersWithoutMeasurement (HitCategory category) const
 
int trackerLayersNull () const
 
int trackerLayersTotallyOffOrBad (HitCategory category=TRACK_HITS) 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 bool fillNewHitPatternWithOldHitPattern_v12 (const uint16_t oldHitPattern[], uint8_t hitCount, uint8_t beginTrackHits, uint8_t endTrackHits, uint8_t beginInner, uint8_t endInner, uint8_t beginOuter, uint8_t endOuter, reco::HitPattern *newObj)
 
static uint16_t getBTLModType (uint16_t pattern)
 BTL Module type: 1,2,3. Only valid for BTL patterns of course. More...
 
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 getETLRing (uint16_t pattern)
 ETL Ring: 1-12. Only valid for ETL 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 timingBTLHitFilter (uint16_t pattern)
 
static bool timingETLHitFilter (uint16_t pattern)
 
static bool timingHitFilter (uint16_t pattern)
 
static bool trackerHitFilter (uint16_t pattern)
 
static bool validHitFilter (uint16_t pattern)
 

Static Public Attributes

const static unsigned short ARRAY_LENGTH = 57
 
static const uint16_t EMPTY_PATTERN = 0x0
 
const static unsigned short HIT_LENGTH = 12
 
const static 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

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)
 
friend int ::test::TestHitPattern::test ()
 

Static Private Member Functions

static uint16_t encode (const DetId &id, TrackingRecHit::Type hitType, const TrackerTopology &ttopo)
 
static uint16_t encode (const TrackingRecHit &hit, 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

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

Friends

template<int N>
struct PatternSet
 

Detailed Description

Definition at line 147 of file HitPattern.h.

Member Typedef Documentation

◆ filterType

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

Definition at line 473 of file HitPattern.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MONO 
STEREO 

Definition at line 149 of file HitPattern.h.

149 { MONO = 1, STEREO = 2 };

◆ HIT_DETECTOR_TYPE

Enumerator
MUON_HIT 
TRACKER_HIT 
MTD_HIT 

Definition at line 151 of file HitPattern.h.

151 { MUON_HIT = 0, TRACKER_HIT = 1, MTD_HIT = 2 };

◆ HIT_TYPE

Enumerator
VALID 
MISSING 
INACTIVE 
BAD 

Definition at line 153 of file HitPattern.h.

153 { VALID = 0, MISSING = 1, INACTIVE = 2, BAD = 3 };

◆ HitCategory

Enumerator
TRACK_HITS 
MISSING_INNER_HITS 
MISSING_OUTER_HITS 

Definition at line 155 of file HitPattern.h.

Constructor & Destructor Documentation

◆ HitPattern() [1/2]

HitPattern::HitPattern ( )

Definition at line 19 of file HitPattern.cc.

22 }

References ARRAY_LENGTH, EMPTY_PATTERN, and hitPattern.

◆ ~HitPattern()

HitPattern::~HitPattern ( )

Definition at line 35 of file HitPattern.cc.

35 { ; }

◆ HitPattern() [2/2]

HitPattern::HitPattern ( const HitPattern other)

Definition at line 24 of file HitPattern.cc.

25  : hitCount(other.hitCount),
26  beginTrackHits(other.beginTrackHits),
27  endTrackHits(other.endTrackHits),
28  beginInner(other.beginInner),
29  endInner(other.endInner),
30  beginOuter(other.beginOuter),
31  endOuter(other.endOuter) {
32  memcpy(this->hitPattern, other.hitPattern, sizeof(uint16_t) * HitPattern::ARRAY_LENGTH);
33 }

References ARRAY_LENGTH, and hitPattern.

Member Function Documentation

◆ appendHit() [1/4]

bool HitPattern::appendHit ( const DetId id,
TrackingRecHit::Type  hitType,
const TrackerTopology ttopo 
)

Definition at line 205 of file HitPattern.cc.

205  {
206  //if HitPattern is full, journey ends no matter what.
208  return false;
209  }
210 
211  uint16_t pattern = HitPattern::encode(id, hitType, ttopo);
212 
213  return appendHit(pattern, hitType);
214 }

References appendHit(), encode(), hitCount, MaxHits, topSingleLeptonDQM_PU_cfi::pattern, and UNLIKELY.

◆ appendHit() [2/4]

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

Definition at line 201 of file HitPattern.cc.

201  {
202  return appendHit(hit.geographicalId(), hit.getType(), ttopo);
203 }

Referenced by appendHit(), reco::TrackBase::appendHitPattern(), appendHits(), appendMuonHit(), appendTrackerHit(), and fillNewHitPatternWithOldHitPattern_v12().

◆ appendHit() [3/4]

bool HitPattern::appendHit ( const TrackingRecHitRef ref,
const TrackerTopology ttopo 
)

Definition at line 70 of file HitPattern.cc.

70  {
71  return appendHit(*ref, ttopo);
72 }

References appendHit().

◆ appendHit() [4/4]

bool HitPattern::appendHit ( const uint16_t  pattern,
TrackingRecHit::Type  hitType 
)

Definition at line 216 of file HitPattern.cc.

216  {
217  //if HitPattern is full, journey ends no matter what.
219  return false;
220  }
221 
222  switch (hitType) {
226  case TrackingRecHit::bad:
227  // hitCount != endT => we are not inserting T type of hits but of T'
228  // 0 != beginT || 0 != endT => we already have hits of T type
229  // so we already have hits of T in the vector and we don't want to
230  // mess them with T' hits.
231  if UNLIKELY (((hitCount != endTrackHits) && (0 != beginTrackHits || 0 != endTrackHits))) {
232  cms::Exception("HitPattern") << "TRACK_HITS"
233  << " were stored on this object before hits of some other category were inserted "
234  << "but hits of the same category should be inserted in a row. "
235  << "Please rework the code so it inserts all "
236  << "TRACK_HITS"
237  << " in a row.";
238  return false;
239  }
240  return insertTrackHit(pattern);
241  break;
244  if UNLIKELY (((hitCount != endInner) && (0 != beginInner || 0 != endInner))) {
245  cms::Exception("HitPattern") << "MISSING_INNER_HITS"
246  << " were stored on this object before hits of some other category were inserted "
247  << "but hits of the same category should be inserted in a row. "
248  << "Please rework the code so it inserts all "
249  << "MISSING_INNER_HITS"
250  << " in a row.";
251  return false;
252  }
254  break;
257  if UNLIKELY (((hitCount != endOuter) && (0 != beginOuter || 0 != endOuter))) {
258  cms::Exception("HitPattern") << "MISSING_OUTER_HITS"
259  << " were stored on this object before hits of some other category were inserted "
260  << "but hits of the same category should be inserted in a row. "
261  << "Please rework the code so it inserts all "
262  << "MISSING_OUTER_HITS"
263  << " in a row.";
264  return false;
265  }
267  break;
268  }
269 
270  return false;
271 }

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

◆ appendHits()

template<typename I >
bool reco::HitPattern::appendHits ( const I &  begin,
const I &  end,
const TrackerTopology ttopo 
)

Definition at line 522 of file HitPattern.h.

522  {
523  for (I hit = begin; hit != end; hit++) {
524  if UNLIKELY ((!appendHit(*hit, ttopo))) {
525  return false;
526  }
527  }
528  return true;
529  }

References appendHit(), mps_fire::end, Exhume::I, and UNLIKELY.

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

◆ appendMuonHit()

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 277 of file HitPattern.cc.

277  {
278  //if HitPattern is full, journey ends no matter what.
280  return false;
281  }
282 
283  if UNLIKELY (id.det() != DetId::Muon) {
284  throw cms::Exception("HitPattern")
285  << "Got DetId from det " << id.det()
286  << " that is not Muon in appendMuonHit(), which should only be used for muon hits in the HitPattern IO rule";
287  }
288 
289  uint16_t subdet = id.subdetId();
290  return appendHit(encode(MUON_HIT, subdet, encodeMuonLayer(id), 0, hitType), hitType);
291 }

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

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

◆ appendTrackerHit()

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 273 of file HitPattern.cc.

273  {
274  return appendHit(encode(TRACKER_HIT, subdet, layer, stereo, hitType), hitType);
275 }

References appendHit(), encode(), phase1PixelTopology::layer, and TRACKER_HIT.

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

◆ badHitFilter()

bool reco::HitPattern::badHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 789 of file HitPattern.h.

789 { return getHitType(pattern) == HitPattern::BAD; }

References BAD, getHitType(), and topSingleLeptonDQM_PU_cfi::pattern.

Referenced by numberOfBadHits().

◆ call()

template<typename F >
void reco::HitPattern::call ( HitCategory  category,
filterType  typeFilter,
F  f 
) const
private

Definition at line 552 of file HitPattern.h.

552  {
553  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
554  for (int i = range.first; i < range.second; i++) {
556  // f() return false to ask to stop looping
557  if (typeFilter(pattern) && !f(pattern)) {
558  break;
559  }
560  }
561  }

References taus_updatedMVAIds_cff::category, f, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), mps_fire::i, topSingleLeptonDQM_PU_cfi::pattern, and FastTimerService_cff::range.

◆ clear()

void HitPattern::clear ( void  )

Definition at line 58 of file HitPattern.cc.

58  {
59  this->hitCount = 0;
60  this->beginTrackHits = 0;
61  this->endTrackHits = 0;
62  this->beginInner = 0;
63  this->endInner = 0;
64  this->beginOuter = 0;
65  this->endOuter = 0;
66 
67  memset(this->hitPattern, EMPTY_PATTERN, sizeof(uint16_t) * HitPattern::ARRAY_LENGTH);
68 }

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

Referenced by fillNewHitPatternWithOldHitPattern_v12(), reco::TrackBase::resetHitPattern(), and BeautifulSoup.Tag::setString().

◆ countHits()

int reco::HitPattern::countHits ( HitCategory  category,
filterType  filter 
) const
inlineprivate

◆ countTypedHits()

int reco::HitPattern::countTypedHits ( HitCategory  category,
filterType  typeFilter,
filterType  filter 
) const
inlineprivate

Definition at line 563 of file HitPattern.h.

563  {
564  int count = 0;
565  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
566  for (int i = range.first; i < range.second; ++i) {
568  if (typeFilter(pattern) && filter(pattern)) {
569  ++count;
570  }
571  }
572  return count;
573  }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, ALCARECOTkAlBeamHalo_cff::filter, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), mps_fire::i, topSingleLeptonDQM_PU_cfi::pattern, and FastTimerService_cff::range.

Referenced by numberOfBadMuonCSCHits(), numberOfBadMuonDTHits(), numberOfBadMuonGEMHits(), numberOfBadMuonHits(), numberOfBadMuonME0Hits(), numberOfBadMuonRPCHits(), numberOfInactiveTrackerHits(), numberOfLostMuonCSCHits(), numberOfLostMuonDTHits(), numberOfLostMuonGEMHits(), numberOfLostMuonHits(), numberOfLostMuonME0Hits(), numberOfLostMuonRPCHits(), numberOfLostPixelBarrelHits(), numberOfLostPixelEndcapHits(), numberOfLostPixelHits(), numberOfLostStripHits(), numberOfLostStripTECHits(), numberOfLostStripTIBHits(), numberOfLostStripTIDHits(), numberOfLostStripTOBHits(), numberOfLostTimingBTLHits(), numberOfLostTimingETLHits(), numberOfLostTimingHits(), numberOfLostTrackerHits(), numberOfValidMuonCSCHits(), numberOfValidMuonDTHits(), numberOfValidMuonGEMHits(), numberOfValidMuonHits(), numberOfValidMuonME0Hits(), numberOfValidMuonRPCHits(), numberOfValidPixelBarrelHits(), numberOfValidPixelEndcapHits(), numberOfValidPixelHits(), numberOfValidStripHits(), numberOfValidStripTECHits(), numberOfValidStripTIBHits(), numberOfValidStripTIDHits(), numberOfValidStripTOBHits(), numberOfValidTimingBTLHits(), numberOfValidTimingETLHits(), numberOfValidTimingHits(), and numberOfValidTrackerHits().

◆ cscStationsWithAnyHits()

int reco::HitPattern::cscStationsWithAnyHits ( ) const
inline

Definition at line 1047 of file HitPattern.h.

1047 { return muonStations(2, -1); }

References muonStations().

◆ cscStationsWithBadHits()

int reco::HitPattern::cscStationsWithBadHits ( ) const
inline

Definition at line 1045 of file HitPattern.h.

1045 { return muonStations(2, 3); }

References muonStations().

◆ cscStationsWithValidHits()

int reco::HitPattern::cscStationsWithValidHits ( ) const
inline

Definition at line 1043 of file HitPattern.h.

1043 { return muonStations(2, 0); }

References muonStations().

◆ dtStationsWithAnyHits()

int reco::HitPattern::dtStationsWithAnyHits ( ) const
inline

Definition at line 1041 of file HitPattern.h.

1041 { return muonStations(1, -1); }

References muonStations().

◆ dtStationsWithBadHits()

int reco::HitPattern::dtStationsWithBadHits ( ) const
inline

Definition at line 1039 of file HitPattern.h.

1039 { return muonStations(1, 3); }

References muonStations().

◆ dtStationsWithValidHits()

int reco::HitPattern::dtStationsWithValidHits ( ) const
inline

Definition at line 1037 of file HitPattern.h.

1037 { return muonStations(1, 0); }

References muonStations().

◆ encode() [1/3]

uint16_t HitPattern::encode ( const DetId id,
TrackingRecHit::Type  hitType,
const TrackerTopology ttopo 
)
staticprivate

Definition at line 139 of file HitPattern.cc.

139  {
140  uint16_t detid = id.det();
141  uint16_t subdet = id.subdetId();
142 
143  // adding layer/disk/wheel bits
144  uint16_t layer = 0x0;
145  if (detid == DetId::Tracker) {
146  layer = ttopo.layer(id);
147  } else if (detid == DetId::Muon) {
148  layer = encodeMuonLayer(id);
149  } else if (detid == DetId::Forward && subdet == FastTime) {
150  layer = encodeTimingLayer(id);
151  }
152 
153  // adding mono/stereo bit
154  uint16_t side = 0x0;
155  if (detid == DetId::Tracker) {
156  side = isStereo(id, ttopo);
157  } else if (detid == DetId::Muon || (detid == DetId::Forward && subdet == FastTime)) {
158  side = 0x0;
159  }
160 
161  // juggle the detid around to deal with the fact the bitwidth is larger
162  // DetId::Muon is 2 and DetId::Forward is 6, must map to 0 and 2 respectively
163  if (detid == DetId::Tracker) {
164  detid = TRACKER_HIT;
165  } else if (detid == DetId::Muon) {
166  detid = MUON_HIT; // DetId::Muon is 2 and needs to be reordered to match old encoding where it got masked
167  } else if (detid == DetId::Forward && subdet == FastTime) {
168  detid = MTD_HIT; // since DetId::Forward is some other number, reorder it here
169  }
170 
171  return encode(detid, subdet, layer, side, hitType);
172 }

References encode(), FastTime, DetId::Forward, isStereo(), phase1PixelTopology::layer, TrackerTopology::layer(), MTD_HIT, DetId::Muon, MUON_HIT, DetId::Tracker, and TRACKER_HIT.

◆ encode() [2/3]

uint16_t HitPattern::encode ( const TrackingRecHit hit,
const TrackerTopology ttopo 
)
staticprivate

Definition at line 74 of file HitPattern.cc.

74  {
75  return encode(hit.geographicalId(), hit.getType(), ttopo);
76 }

Referenced by appendHit(), appendMuonHit(), appendTrackerHit(), and encode().

◆ encode() [3/3]

uint16_t HitPattern::encode ( uint16_t  det,
uint16_t  subdet,
uint16_t  layer,
uint16_t  side,
TrackingRecHit::Type  hitType 
)
staticprivate

Definition at line 174 of file HitPattern.cc.

174  {
176 
177  // adding tracker/muon/mtd detector bits
179 
180  // adding substructure (PXB, PXF, TIB, TID, TOB, TEC, or DT, CSC, RPC,GEM, or BTL, ETL) bits
181  pattern |= (subdet & SubstrMask) << SubstrOffset;
182 
183  // adding layer/disk/wheel/ring/modType bits
185 
186  // adding mono/stereo bit
187  pattern |= (side & SideMask) << SideOffset;
188 
189  TrackingRecHit::Type patternHitType =
194  : hitType);
195 
196  pattern |= (patternHitType & HitTypeMask) << HitTypeOffset;
197 
198  return pattern;
199 }

References EMPTY_PATTERN, HitTypeMask, HitTypeOffset, TrackingRecHit::inactive, TrackingRecHit::inactive_inner, TrackingRecHit::inactive_outer, phase1PixelTopology::layer, LayerMask, LayerOffset, TrackingRecHit::missing, TrackingRecHit::missing_inner, TrackingRecHit::missing_outer, topSingleLeptonDQM_PU_cfi::pattern, SideMask, SideOffset, SubDetectorMask, SubDetectorOffset, SubstrMask, and SubstrOffset.

◆ fillNewHitPatternWithOldHitPattern_v12()

bool reco::HitPattern::fillNewHitPatternWithOldHitPattern_v12 ( const uint16_t  oldHitPattern[],
uint8_t  hitCount,
uint8_t  beginTrackHits,
uint8_t  endTrackHits,
uint8_t  beginInner,
uint8_t  endInner,
uint8_t  beginOuter,
uint8_t  endOuter,
reco::HitPattern newObj 
)
static

Definition at line 60 of file rootio_HitPattern.cc.

68  {
69  newObj->clear();
70  bool ret = true;
71  for (int i = 0; i < MaxHitsV12; i++) {
72  uint16_t pattern = getHitFromOldHitPattern(oldHitPattern, i);
73  if (pattern == 0) {
74  break;
75  }
76  if (!newObj->appendHit(pattern, hitTypeFromOldHitPattern(pattern))) {
77  ret = false;
78  break;
79  }
80  }
81  newObj->hitCount = hitCount;
83  newObj->endTrackHits = endTrackHits;
84  newObj->beginInner = beginInner;
85  newObj->endInner = endInner;
86  newObj->beginOuter = beginOuter;
87  newObj->endOuter = endOuter;
88  return ret;
89 }

References appendHit(), beginInner, beginOuter, beginTrackHits, clear(), endInner, endOuter, endTrackHits, hitCount, mps_fire::i, topSingleLeptonDQM_PU_cfi::pattern, and runTheMatrix::ret.

◆ gemStationsWithAnyHits()

int reco::HitPattern::gemStationsWithAnyHits ( ) const
inline

Definition at line 1059 of file HitPattern.h.

1059 { return muonStations(4, -1); }

References muonStations().

◆ gemStationsWithBadHits()

int reco::HitPattern::gemStationsWithBadHits ( ) const
inline

Definition at line 1057 of file HitPattern.h.

1057 { return muonStations(4, 3); }

References muonStations().

◆ gemStationsWithValidHits()

int reco::HitPattern::gemStationsWithValidHits ( ) const
inline

Definition at line 1055 of file HitPattern.h.

1055 { return muonStations(4, 0); }

References muonStations().

◆ getBTLModType()

uint16_t reco::HitPattern::getBTLModType ( uint16_t  pattern)
inlinestatic

BTL Module type: 1,2,3. Only valid for BTL patterns of course.

MTD.

Definition at line 777 of file HitPattern.h.

777 { return getSubSubStructure(pattern); }

References getSubSubStructure(), and topSingleLeptonDQM_PU_cfi::pattern.

◆ getCategoryIndexRange()

std::pair< uint8_t, uint8_t > reco::HitPattern::getCategoryIndexRange ( HitCategory  category) const
inlineprivate

Definition at line 506 of file HitPattern.h.

506  {
507  switch (category) {
508  case TRACK_HITS:
509  return std::pair<uint8_t, uint8_t>(beginTrackHits, endTrackHits);
510  break;
511  case MISSING_INNER_HITS:
512  return std::pair<uint8_t, uint8_t>(beginInner, endInner);
513  break;
514  case MISSING_OUTER_HITS:
515  return std::pair<uint8_t, uint8_t>(beginOuter, endOuter);
516  break;
517  }
518  return std::pair<uint8_t, uint8_t>(-1, -1);
519  }

References beginInner, beginOuter, beginTrackHits, taus_updatedMVAIds_cff::category, endInner, endOuter, endTrackHits, MISSING_INNER_HITS, MISSING_OUTER_HITS, and TRACK_HITS.

Referenced by call(), countHits(), countTypedHits(), getHitPattern(), getTrackerLayerCase(), getTrackerMonoStereo(), numberOfAllHits(), numberOfValidStripLayersWithMonoAndStereo(), pixelLayersWithMeasurement(), trackerLayersWithMeasurement(), and trackerLayersWithoutMeasurement().

◆ getCSCRing()

uint16_t reco::HitPattern::getCSCRing ( uint16_t  pattern)
inlinestatic

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

Definition at line 753 of file HitPattern.h.

753 { return (getSubSubStructure(pattern) & 3) + 1; }

References getSubSubStructure(), and topSingleLeptonDQM_PU_cfi::pattern.

Referenced by printHitPattern().

◆ getDTSuperLayer()

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 751 of file HitPattern.h.

751 { return (getSubSubStructure(pattern) & 3); }

References getSubSubStructure(), and topSingleLeptonDQM_PU_cfi::pattern.

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

◆ getETLRing()

uint16_t reco::HitPattern::getETLRing ( uint16_t  pattern)
inlinestatic

ETL Ring: 1-12. Only valid for ETL patterns of course.

Definition at line 779 of file HitPattern.h.

779 { return getSubSubStructure(pattern); }

References getSubSubStructure(), and topSingleLeptonDQM_PU_cfi::pattern.

◆ getGEMLayer()

uint16_t reco::HitPattern::getGEMLayer ( uint16_t  pattern)
inlinestatic

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

Definition at line 781 of file HitPattern.h.

781 { return (getSubSubStructure(pattern) & 1) + 1; }

References getSubSubStructure(), and topSingleLeptonDQM_PU_cfi::pattern.

Referenced by printHitPattern().

◆ getGEMStation()

uint16_t reco::HitPattern::getGEMStation ( uint16_t  pattern)
inlinestatic

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

Definition at line 769 of file HitPattern.h.

771  {
772  uint16_t sss = getSubSubStructure(pattern), stat = sss >> 1;
773  return stat + 1;
774  }

References getSubSubStructure(), topSingleLeptonDQM_PU_cfi::pattern, and edm_modernize_messagelogger::stat.

Referenced by printHitPattern().

◆ getHitPattern()

uint16_t reco::HitPattern::getHitPattern ( HitCategory  category,
int  position 
) const
inline

◆ getHitPatternByAbsoluteIndex()

uint16_t HitPattern::getHitPatternByAbsoluteIndex ( int  position) const
private

Definition at line 293 of file HitPattern.cc.

293  {
294  if UNLIKELY ((position < 0 || position >= hitCount)) {
296  }
297  /*
298  Note: you are not taking a consecutive sequence of HIT_LENGTH bits starting from position * HIT_LENGTH
299  as the bit order in the words are reversed.
300  e.g. if position = 0 you take the lowest 12 bits of the first word.
301 
302  I hope this can clarify what is the memory layout of such thing
303 
304  straight 01234567890123456789012345678901 | 23456789012345678901234567890123 | 4567
305  (global) 0 1 2 3 | 3 4 5 6 | 6
306  words [--------------0---------------] | [--------------1---------------] | [---
307  word 01234567890123456789012345678901 | 01234567890123456789012345678901 | 0123
308  (str) 0 1 2 3 | 0 1 2 3 | 0
309  [--------------0---------------] | [--------------1---------------] | [---
310  word 10987654321098765432109876543210 | 10987654321098765432109876543210 | 1098
311  (rev) 32 21 10 0 | 32 21 10 0 | 32
312  reverse 10987654321098765432109876543210 | 32109876543210987654321098765432 | 5432
313  32 21 10 0 | 6 65 54 43 3 9
314 
315  ugly enough, but it's not my fault, I was not even in CMS at that time [gpetrucc]
316  */
317 
318  uint16_t bitEndOffset = (position + 1) * HIT_LENGTH;
319  uint8_t secondWord = (bitEndOffset >> 4);
320  uint8_t secondWordBits = bitEndOffset & (16 - 1); // that is, bitEndOffset % 16
321  if (secondWordBits >= HIT_LENGTH) { // full block is in this word
322  uint8_t lowBitsToTrash = secondWordBits - HIT_LENGTH;
323  uint16_t myResult = (hitPattern[secondWord] >> lowBitsToTrash) & ((1 << HIT_LENGTH) - 1);
324  return myResult;
325  } else {
326  uint8_t firstWordBits = HIT_LENGTH - secondWordBits;
327  uint16_t firstWordBlock = hitPattern[secondWord - 1] >> (16 - firstWordBits);
328  uint16_t secondWordBlock = hitPattern[secondWord] & ((1 << secondWordBits) - 1);
329  uint16_t myResult = firstWordBlock + (secondWordBlock << firstWordBits);
330  return myResult;
331  }
332 }

References EMPTY_PATTERN, HIT_LENGTH, hitCount, hitPattern, position, and UNLIKELY.

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

◆ getHitType()

uint32_t reco::HitPattern::getHitType ( uint16_t  pattern)
inlinestatic

◆ getLayer()

uint32_t reco::HitPattern::getLayer ( uint16_t  pattern)
inlinestatic

◆ getMuonStation()

uint16_t reco::HitPattern::getMuonStation ( uint16_t  pattern)
inlinestatic

◆ getRPCLayer()

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 755 of file HitPattern.h.

755  {
756  uint16_t subSubStructure = getSubSubStructure(pattern);
757  uint16_t stat = subSubStructure >> 2;
758 
759  if LIKELY (stat <= 1) {
760  return ((subSubStructure >> 1) & 1) + 1;
761  }
762 
763  return 0;
764  }

References getSubSubStructure(), LIKELY, topSingleLeptonDQM_PU_cfi::pattern, and edm_modernize_messagelogger::stat.

Referenced by printHitPattern().

◆ getRPCregion()

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 766 of file HitPattern.h.

766 { return getSubSubStructure(pattern) & 1; }

References getSubSubStructure(), and topSingleLeptonDQM_PU_cfi::pattern.

Referenced by printHitPattern().

◆ getSide()

uint32_t reco::HitPattern::getSide ( uint16_t  pattern)
inlinestatic

Definition at line 733 of file HitPattern.h.

733  {
735  return NULL_RETURN;
736  }
737 
738  return (pattern >> SideOffset) & SideMask;
739  }

References EMPTY_PATTERN, NULL_RETURN, topSingleLeptonDQM_PU_cfi::pattern, SideMask, SideOffset, and UNLIKELY.

Referenced by getTrackerMonoStereo(), and numberOfValidStripLayersWithMonoAndStereo().

◆ getSubDetector()

uint32_t reco::HitPattern::getSubDetector ( uint16_t  pattern)
inlinestatic

Definition at line 725 of file HitPattern.h.

725  {
727  return NULL_RETURN;
728  }
729 
730  return ((pattern >> SubDetectorOffset) & SubDetectorMask);
731  }

References EMPTY_PATTERN, NULL_RETURN, topSingleLeptonDQM_PU_cfi::pattern, SubDetectorMask, SubDetectorOffset, and UNLIKELY.

◆ getSubStructure()

uint32_t reco::HitPattern::getSubStructure ( uint16_t  pattern)
inlinestatic

◆ getSubSubStructure()

uint32_t reco::HitPattern::getSubSubStructure ( uint16_t  pattern)
inlinestatic

◆ getTrackerLayerCase()

uint32_t HitPattern::getTrackerLayerCase ( HitCategory  category,
uint16_t  substr,
uint16_t  layer 
) const

Definition at line 427 of file HitPattern.cc.

427  {
428  uint16_t tk_substr_layer =
429  (0x1 << SubDetectorOffset) + ((substr & SubstrMask) << SubstrOffset) + ((layer & LayerMask) << LayerOffset);
430 
432 
433  // layer case 0: valid + (missing, off, bad) ==> with measurement
434  // layer case 1: missing + (off, bad) ==> without measurement
435  // layer case 2: off, bad ==> totally off or bad, cannot say much
436  // layer case NULL_RETURN: track outside acceptance or in gap ==> null
437  uint32_t layerCase = NULL_RETURN;
438  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
439  for (int i = range.first; i < range.second; ++i) {
441  if ((pattern & mask) == tk_substr_layer) {
442  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
443  if (hitType < layerCase) {
444  // BAD and INACTIVE as the same type (as INACTIVE)
445  layerCase = (hitType == HIT_TYPE::BAD ? (uint32_t)HIT_TYPE::INACTIVE : hitType);
446  if (layerCase == HIT_TYPE::VALID) {
447  break;
448  }
449  }
450  }
451  }
452  return layerCase;
453 }

References hcaldqm::constants::BAD, taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, phase1PixelTopology::layer, LayerMask, LayerOffset, NULL_RETURN, topSingleLeptonDQM_PU_cfi::pattern, FastTimerService_cff::range, 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().

◆ getTrackerMonoStereo()

uint16_t HitPattern::getTrackerMonoStereo ( HitCategory  category,
uint16_t  substr,
uint16_t  layer 
) const

Definition at line 455 of file HitPattern.cc.

455  {
456  uint16_t tk_substr_layer =
457  (0x1 << SubDetectorOffset) + ((substr & SubstrMask) << SubstrOffset) + ((layer & LayerMask) << LayerOffset);
459 
460  // 0: neither a valid mono nor a valid stereo hit
461  // MONO: valid mono hit
462  // STEREO: valid stereo hit
463  // MONO | STEREO: both
464  uint16_t monoStereo = 0x0;
465  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
466  for (int i = range.first; i < range.second; ++i) {
468  if ((pattern & mask) == tk_substr_layer) {
469  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
470  if (hitType == HIT_TYPE::VALID) {
471  switch (getSide(pattern)) {
472  case 0: // mono
473  monoStereo |= MONO;
474  break;
475  case 1: // stereo
476  monoStereo |= STEREO;
477  break;
478  }
479  }
480 
481  if (monoStereo == (MONO | STEREO)) {
482  break;
483  }
484  }
485  }
486  return monoStereo;
487 }

References taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), getSide(), HitTypeMask, HitTypeOffset, mps_fire::i, phase1PixelTopology::layer, LayerMask, LayerOffset, MONO, topSingleLeptonDQM_PU_cfi::pattern, FastTimerService_cff::range, STEREO, SubDetectorMask, SubDetectorOffset, SubstrMask, and SubstrOffset.

Referenced by OniaPhotonConversionProducer::foundCompatibleInnerHits().

◆ hasValidHitInPixelLayer()

bool HitPattern::hasValidHitInPixelLayer ( enum PixelSubdetector::SubDetector  det,
uint16_t  layer 
) const

◆ inactiveHitFilter()

bool reco::HitPattern::inactiveHitFilter ( uint16_t  pattern)
inlinestatic

◆ innermostMuonStationWithAnyHits()

int reco::HitPattern::innermostMuonStationWithAnyHits ( ) const
inline

Definition at line 1071 of file HitPattern.h.

1071 { return innermostMuonStationWithHits(-1); }

References innermostMuonStationWithHits().

◆ innermostMuonStationWithBadHits()

int reco::HitPattern::innermostMuonStationWithBadHits ( ) const
inline

Definition at line 1069 of file HitPattern.h.

1069 { return innermostMuonStationWithHits(3); }

References innermostMuonStationWithHits().

◆ innermostMuonStationWithHits()

int HitPattern::innermostMuonStationWithHits ( int  hitType) const

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

Definition at line 887 of file HitPattern.cc.

887  {
888  int ret = 0;
889  for (int i = beginTrackHits; i < endTrackHits; ++i) {
891  if (muonHitFilter(pattern) && (hitType == -1 || int(getHitType(pattern)) == hitType)) {
892  int stat = getMuonStation(pattern);
893  if (ret == 0 || stat < ret) {
894  ret = stat;
895  }
896  }
897  }
898 
899  return ret;
900 }

References beginTrackHits, endTrackHits, getHitPatternByAbsoluteIndex(), getHitType(), getMuonStation(), mps_fire::i, muonHitFilter(), topSingleLeptonDQM_PU_cfi::pattern, runTheMatrix::ret, and edm_modernize_messagelogger::stat.

Referenced by innermostMuonStationWithAnyHits(), innermostMuonStationWithBadHits(), and innermostMuonStationWithValidHits().

◆ innermostMuonStationWithValidHits()

int reco::HitPattern::innermostMuonStationWithValidHits ( ) const
inline

Definition at line 1067 of file HitPattern.h.

1067 { return innermostMuonStationWithHits(0); }

References innermostMuonStationWithHits().

◆ insertExpectedInnerHit()

bool HitPattern::insertExpectedInnerHit ( const uint16_t  pattern)
private

Definition at line 981 of file HitPattern.cc.

981  {
982  if UNLIKELY ((0 == beginInner && 0 == endInner)) {
985  }
986 
988  endInner++;
989 
990  return true;
991 }

References beginInner, endInner, hitCount, insertHit(), topSingleLeptonDQM_PU_cfi::pattern, and UNLIKELY.

Referenced by appendHit().

◆ insertExpectedOuterHit()

bool HitPattern::insertExpectedOuterHit ( const uint16_t  pattern)
private

Definition at line 993 of file HitPattern.cc.

993  {
994  if UNLIKELY ((0 == beginOuter && 0 == endOuter)) {
997  }
998 
1000  endOuter++;
1001 
1002  return true;
1003 }

References beginOuter, endOuter, hitCount, insertHit(), topSingleLeptonDQM_PU_cfi::pattern, and UNLIKELY.

Referenced by appendHit().

◆ insertHit()

void HitPattern::insertHit ( const uint16_t  pattern)
private

Definition at line 952 of file HitPattern.cc.

952  {
953  int offset = hitCount * HIT_LENGTH;
954  for (int i = 0; i < HIT_LENGTH; i++) {
955  int pos = offset + i;
956  uint16_t bit = (pattern >> i) & 0x1;
957  //equivalent to hitPattern[pos / 16] += bit << ((offset + i) % 16);
958  hitPattern[pos >> 4] += bit << ((offset + i) & (16 - 1));
959  }
960  hitCount++;
961 }

References HIT_LENGTH, hitCount, hitPattern, mps_fire::i, hltrates_dqm_sourceclient-live_cfg::offset, topSingleLeptonDQM_PU_cfi::pattern, and testProducerWithPsetDescEmpty_cfi::x1.

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

◆ insertTrackHit()

bool HitPattern::insertTrackHit ( const uint16_t  pattern)
private

Definition at line 963 of file HitPattern.cc.

963  {
964  // if begin is 0, this is the first hit of this type being inserted, so
965  // we need to update begin so it points to the correct index, the first
966  // empty index.
967  // unlikely, because it will happen only when inserting
968  // the first hit of this type
969  if UNLIKELY ((0 == beginTrackHits && 0 == endTrackHits)) {
971  // before the first hit of this type is inserted, there are no hits
973  }
974 
976  endTrackHits++;
977 
978  return true;
979 }

References beginTrackHits, endTrackHits, hitCount, insertHit(), topSingleLeptonDQM_PU_cfi::pattern, and UNLIKELY.

Referenced by appendHit().

◆ int ::test::TestHitPattern::test()

reco::HitPattern::int ::test::TestHitPattern::test ( )
private

◆ isStereo()

uint16_t HitPattern::isStereo ( DetId  i,
const TrackerTopology ttopo 
)
staticprivate

Definition at line 852 of file HitPattern.cc.

852  {
853  if (i.det() != DetId::Tracker) {
854  return 0;
855  }
856 
857  switch (i.subdetId()) {
860  return 0;
862  return ttopo.tibIsStereo(i);
864  return ttopo.tidIsStereo(i);
866  return ttopo.tobIsStereo(i);
868  return ttopo.tecIsStereo(i);
869  default:
870  return 0;
871  }
872 }

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

Referenced by encode().

◆ me0StationsWithAnyHits()

int reco::HitPattern::me0StationsWithAnyHits ( ) const
inline

Definition at line 1065 of file HitPattern.h.

1065 { return muonStations(5, -1); }

References muonStations().

◆ me0StationsWithBadHits()

int reco::HitPattern::me0StationsWithBadHits ( ) const
inline

Definition at line 1063 of file HitPattern.h.

1063 { return muonStations(5, 3); }

References muonStations().

◆ me0StationsWithValidHits()

int reco::HitPattern::me0StationsWithValidHits ( ) const
inline

Definition at line 1061 of file HitPattern.h.

1061 { return muonStations(5, 0); }

References muonStations().

◆ missingHitFilter()

bool reco::HitPattern::missingHitFilter ( uint16_t  pattern)
inlinestatic

◆ muonCSCHitFilter()

bool reco::HitPattern::muonCSCHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 639 of file HitPattern.h.

639  {
641  return false;
642  }
643 
644  uint32_t substructure = getSubStructure(pattern);
645  return (substructure == (uint32_t)MuonSubdetId::CSC);
646  }

References MuonSubdetId::CSC, getSubStructure(), muonHitFilter(), topSingleLeptonDQM_PU_cfi::pattern, and UNLIKELY.

Referenced by pat::SoftMuonMvaEstimator::computeMva(), reco::tau::countHits(), numberOfBadMuonCSCHits(), numberOfLostMuonCSCHits(), numberOfValidMuonCSCHits(), and printHitPattern().

◆ muonDTHitFilter()

bool reco::HitPattern::muonDTHitFilter ( uint16_t  pattern)
inlinestatic

◆ muonGEMHitFilter()

bool reco::HitPattern::muonGEMHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 657 of file HitPattern.h.

657  {
659  return false;
660  }
661 
662  uint32_t substructure = getSubStructure(pattern);
663  return (substructure == (uint32_t)MuonSubdetId::GEM);
664  }

References MuonSubdetId::GEM, getSubStructure(), muonHitFilter(), topSingleLeptonDQM_PU_cfi::pattern, and UNLIKELY.

Referenced by numberOfBadMuonGEMHits(), numberOfLostMuonGEMHits(), numberOfValidMuonGEMHits(), and printHitPattern().

◆ muonHitFilter()

bool reco::HitPattern::muonHitFilter ( uint16_t  pattern)
inlinestatic

◆ muonME0HitFilter()

bool reco::HitPattern::muonME0HitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 666 of file HitPattern.h.

666  {
668  return false;
669  uint16_t substructure = getSubStructure(pattern);
670  return (substructure == (uint16_t)MuonSubdetId::ME0);
671  }

References getSubStructure(), MuonSubdetId::ME0, muonHitFilter(), topSingleLeptonDQM_PU_cfi::pattern, and UNLIKELY.

Referenced by numberOfBadMuonME0Hits(), numberOfLostMuonME0Hits(), numberOfValidMuonME0Hits(), and printHitPattern().

◆ muonRPCHitFilter()

bool reco::HitPattern::muonRPCHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 648 of file HitPattern.h.

648  {
650  return false;
651  }
652 
653  uint32_t substructure = getSubStructure(pattern);
654  return (substructure == (uint32_t)MuonSubdetId::RPC);
655  }

References getSubStructure(), muonHitFilter(), topSingleLeptonDQM_PU_cfi::pattern, MuonSubdetId::RPC, and UNLIKELY.

Referenced by pat::SoftMuonMvaEstimator::computeMva(), reco::tau::countHits(), numberOfBadMuonRPCHits(), numberOfLostMuonRPCHits(), numberOfValidMuonRPCHits(), and printHitPattern().

◆ muonStations()

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 874 of file HitPattern.cc.

874  {
875  int stations[4] = {0, 0, 0, 0};
876  for (int i = beginTrackHits; i < endTrackHits; ++i) {
878  if (muonHitFilter(pattern) && (subdet == 0 || int(getSubStructure(pattern)) == subdet) &&
879  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
880  stations[getMuonStation(pattern) - 1] = 1;
881  }
882  }
883 
884  return stations[0] + stations[1] + stations[2] + stations[3];
885 }

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

Referenced by cscStationsWithAnyHits(), cscStationsWithBadHits(), cscStationsWithValidHits(), dtStationsWithAnyHits(), dtStationsWithBadHits(), dtStationsWithValidHits(), gemStationsWithAnyHits(), gemStationsWithBadHits(), gemStationsWithValidHits(), me0StationsWithAnyHits(), me0StationsWithBadHits(), me0StationsWithValidHits(), muonStationsWithAnyHits(), muonStationsWithBadHits(), muonStationsWithValidHits(), rpcStationsWithAnyHits(), rpcStationsWithBadHits(), and rpcStationsWithValidHits().

◆ muonStationsWithAnyHits()

int reco::HitPattern::muonStationsWithAnyHits ( ) const
inline

Definition at line 1035 of file HitPattern.h.

1035 { return muonStations(0, -1); }

References muonStations().

◆ muonStationsWithBadHits()

int reco::HitPattern::muonStationsWithBadHits ( ) const
inline

Definition at line 1033 of file HitPattern.h.

1033 { return muonStations(0, 3); }

References muonStations().

◆ muonStationsWithValidHits()

int reco::HitPattern::muonStationsWithValidHits ( ) const
inline

Definition at line 1031 of file HitPattern.h.

1031 { return muonStations(0, 0); }

References muonStations().

◆ numberOfAllHits()

int reco::HitPattern::numberOfAllHits ( HitCategory  category) const
inline

◆ numberOfAllTrackerHits()

int reco::HitPattern::numberOfAllTrackerHits ( HitCategory  category) const
inline

Definition at line 796 of file HitPattern.h.

796  {
798  }

References taus_updatedMVAIds_cff::category, countHits(), and trackerHitFilter().

◆ numberOfBadHits()

int reco::HitPattern::numberOfBadHits ( ) const
inline

Definition at line 952 of file HitPattern.h.

952 { return countHits(TRACK_HITS, badHitFilter); }

References badHitFilter(), countHits(), and TRACK_HITS.

◆ numberOfBadMuonCSCHits()

int reco::HitPattern::numberOfBadMuonCSCHits ( ) const
inline

Definition at line 962 of file HitPattern.h.

962  {
964  }

References countTypedHits(), inactiveHitFilter(), muonCSCHitFilter(), and TRACK_HITS.

◆ numberOfBadMuonDTHits()

int reco::HitPattern::numberOfBadMuonDTHits ( ) const
inline

Definition at line 958 of file HitPattern.h.

958  {
960  }

References countTypedHits(), inactiveHitFilter(), muonDTHitFilter(), and TRACK_HITS.

◆ numberOfBadMuonGEMHits()

int reco::HitPattern::numberOfBadMuonGEMHits ( ) const
inline

Definition at line 970 of file HitPattern.h.

970  {
972  }

References countTypedHits(), inactiveHitFilter(), muonGEMHitFilter(), and TRACK_HITS.

◆ numberOfBadMuonHits()

int reco::HitPattern::numberOfBadMuonHits ( ) const
inline

Definition at line 954 of file HitPattern.h.

954  {
956  }

References countTypedHits(), inactiveHitFilter(), muonHitFilter(), and TRACK_HITS.

◆ numberOfBadMuonME0Hits()

int reco::HitPattern::numberOfBadMuonME0Hits ( ) const
inline

Definition at line 974 of file HitPattern.h.

974  {
976  }

References countTypedHits(), inactiveHitFilter(), muonME0HitFilter(), and TRACK_HITS.

◆ numberOfBadMuonRPCHits()

int reco::HitPattern::numberOfBadMuonRPCHits ( ) const
inline

Definition at line 966 of file HitPattern.h.

966  {
968  }

References countTypedHits(), inactiveHitFilter(), muonRPCHitFilter(), and TRACK_HITS.

◆ numberOfDTStationsWithBothViews()

int HitPattern::numberOfDTStationsWithBothViews ( ) const

Definition at line 939 of file HitPattern.cc.

939  {
940  int stations[4][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
941  for (int i = beginTrackHits; i < endTrackHits; ++i) {
944  stations[getMuonStation(pattern) - 1][getDTSuperLayer(pattern) == 2] = 1;
945  }
946  }
947 
948  return stations[0][0] * stations[0][1] + stations[1][0] * stations[1][1] + stations[2][0] * stations[2][1] +
949  stations[3][0] * stations[3][1];
950 }

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

◆ numberOfDTStationsWithRPhiView()

int HitPattern::numberOfDTStationsWithRPhiView ( ) const

Definition at line 916 of file HitPattern.cc.

916  {
917  int stations[4] = {0, 0, 0, 0};
918  for (int i = beginTrackHits; i < endTrackHits; ++i) {
920 
922  stations[getMuonStation(pattern) - 1] = 1;
923  }
924  }
925  return stations[0] + stations[1] + stations[2] + stations[3];
926 }

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

◆ numberOfDTStationsWithRZView()

int HitPattern::numberOfDTStationsWithRZView ( ) const

Definition at line 928 of file HitPattern.cc.

928  {
929  int stations[4] = {0, 0, 0, 0};
930  for (int i = beginTrackHits; i < endTrackHits; ++i) {
933  stations[getMuonStation(pattern) - 1] = 1;
934  }
935  }
936  return stations[0] + stations[1] + stations[2] + stations[3];
937 }

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

◆ numberOfInactiveHits()

int reco::HitPattern::numberOfInactiveHits ( ) const
inline

Definition at line 978 of file HitPattern.h.

References countHits(), inactiveHitFilter(), and TRACK_HITS.

◆ numberOfInactiveTimingHits()

int reco::HitPattern::numberOfInactiveTimingHits ( ) const

◆ numberOfInactiveTrackerHits()

int reco::HitPattern::numberOfInactiveTrackerHits ( ) const
inline

Definition at line 980 of file HitPattern.h.

980  {
982  }

References countTypedHits(), inactiveHitFilter(), TRACK_HITS, and trackerHitFilter().

◆ numberOfLostHits()

int reco::HitPattern::numberOfLostHits ( HitCategory  category) const
inline

◆ numberOfLostMuonCSCHits()

int reco::HitPattern::numberOfLostMuonCSCHits ( ) const
inline

Definition at line 936 of file HitPattern.h.

936  {
938  }

References countTypedHits(), missingHitFilter(), muonCSCHitFilter(), and TRACK_HITS.

◆ numberOfLostMuonDTHits()

int reco::HitPattern::numberOfLostMuonDTHits ( ) const
inline

Definition at line 932 of file HitPattern.h.

932  {
934  }

References countTypedHits(), missingHitFilter(), muonDTHitFilter(), and TRACK_HITS.

◆ numberOfLostMuonGEMHits()

int reco::HitPattern::numberOfLostMuonGEMHits ( ) const
inline

Definition at line 944 of file HitPattern.h.

944  {
946  }

References countTypedHits(), missingHitFilter(), muonGEMHitFilter(), and TRACK_HITS.

◆ numberOfLostMuonHits()

int reco::HitPattern::numberOfLostMuonHits ( ) const
inline

Definition at line 884 of file HitPattern.h.

884  {
886  }

References countTypedHits(), missingHitFilter(), muonHitFilter(), and TRACK_HITS.

◆ numberOfLostMuonME0Hits()

int reco::HitPattern::numberOfLostMuonME0Hits ( ) const
inline

Definition at line 948 of file HitPattern.h.

948  {
950  }

References countTypedHits(), missingHitFilter(), muonME0HitFilter(), and TRACK_HITS.

◆ numberOfLostMuonRPCHits()

int reco::HitPattern::numberOfLostMuonRPCHits ( ) const
inline

Definition at line 940 of file HitPattern.h.

940  {
942  }

References countTypedHits(), missingHitFilter(), muonRPCHitFilter(), and TRACK_HITS.

◆ numberOfLostPixelBarrelHits()

int reco::HitPattern::numberOfLostPixelBarrelHits ( HitCategory  category) const
inline

◆ numberOfLostPixelEndcapHits()

int reco::HitPattern::numberOfLostPixelEndcapHits ( HitCategory  category) const
inline

◆ numberOfLostPixelHits()

int reco::HitPattern::numberOfLostPixelHits ( HitCategory  category) const
inline

◆ numberOfLostStripHits()

int reco::HitPattern::numberOfLostStripHits ( HitCategory  category) const
inline

◆ numberOfLostStripTECHits()

int reco::HitPattern::numberOfLostStripTECHits ( HitCategory  category) const
inline

◆ numberOfLostStripTIBHits()

int reco::HitPattern::numberOfLostStripTIBHits ( HitCategory  category) const
inline

◆ numberOfLostStripTIDHits()

int reco::HitPattern::numberOfLostStripTIDHits ( HitCategory  category) const
inline

◆ numberOfLostStripTOBHits()

int reco::HitPattern::numberOfLostStripTOBHits ( HitCategory  category) const
inline

◆ numberOfLostTimingBTLHits()

int reco::HitPattern::numberOfLostTimingBTLHits ( ) const
inline

◆ numberOfLostTimingETLHits()

int reco::HitPattern::numberOfLostTimingETLHits ( ) const
inline

◆ numberOfLostTimingHits()

int reco::HitPattern::numberOfLostTimingHits ( ) const
inline

Definition at line 888 of file HitPattern.h.

888  {
890  }

References countTypedHits(), missingHitFilter(), timingHitFilter(), and TRACK_HITS.

◆ numberOfLostTrackerHits()

int reco::HitPattern::numberOfLostTrackerHits ( HitCategory  category) const
inline

◆ numberOfMuonHits()

int reco::HitPattern::numberOfMuonHits ( ) const
inline

Definition at line 800 of file HitPattern.h.

800 { return countHits(TRACK_HITS, muonHitFilter); }

References countHits(), muonHitFilter(), and TRACK_HITS.

◆ numberOfTimingHits()

int reco::HitPattern::numberOfTimingHits ( ) const
inline

Definition at line 802 of file HitPattern.h.

References countHits(), timingHitFilter(), and TRACK_HITS.

◆ numberOfValidHits()

int reco::HitPattern::numberOfValidHits ( ) const
inline

◆ numberOfValidMuonCSCHits()

int reco::HitPattern::numberOfValidMuonCSCHits ( ) const
inline

Definition at line 854 of file HitPattern.h.

854  {
856  }

References countTypedHits(), muonCSCHitFilter(), TRACK_HITS, and validHitFilter().

Referenced by MuonRecoAnalyzer::analyze().

◆ numberOfValidMuonDTHits()

int reco::HitPattern::numberOfValidMuonDTHits ( ) const
inline

Definition at line 850 of file HitPattern.h.

850  {
852  }

References countTypedHits(), muonDTHitFilter(), TRACK_HITS, and validHitFilter().

Referenced by MuonRecoAnalyzer::analyze().

◆ numberOfValidMuonGEMHits()

int reco::HitPattern::numberOfValidMuonGEMHits ( ) const
inline

Definition at line 862 of file HitPattern.h.

862  {
864  }

References countTypedHits(), muonGEMHitFilter(), TRACK_HITS, and validHitFilter().

Referenced by MuonRecoAnalyzer::analyze().

◆ numberOfValidMuonHits()

int reco::HitPattern::numberOfValidMuonHits ( ) const
inline

◆ numberOfValidMuonME0Hits()

int reco::HitPattern::numberOfValidMuonME0Hits ( ) const
inline

Definition at line 866 of file HitPattern.h.

866  {
868  }

References countTypedHits(), muonME0HitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidMuonRPCHits()

int reco::HitPattern::numberOfValidMuonRPCHits ( ) const
inline

Definition at line 858 of file HitPattern.h.

858  {
860  }

References countTypedHits(), muonRPCHitFilter(), TRACK_HITS, and validHitFilter().

Referenced by MuonRecoAnalyzer::analyze().

◆ numberOfValidPixelBarrelHits()

int reco::HitPattern::numberOfValidPixelBarrelHits ( ) const
inline

◆ numberOfValidPixelEndcapHits()

int reco::HitPattern::numberOfValidPixelEndcapHits ( ) const
inline

◆ numberOfValidPixelHits()

int reco::HitPattern::numberOfValidPixelHits ( ) const
inline

◆ numberOfValidStripHits()

int reco::HitPattern::numberOfValidStripHits ( ) const
inline

◆ numberOfValidStripLayersWithMonoAndStereo() [1/2]

int HitPattern::numberOfValidStripLayersWithMonoAndStereo ( ) const

Definition at line 390 of file HitPattern.cc.

390  {
391  auto category = TRACK_HITS;
392  std::bitset<128> side[2];
393  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
394  for (int i = range.first; i < range.second; ++i) {
396  if (pattern > maxTrackerWord)
397  continue;
398  if (pattern < minStripWord)
399  continue;
400  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
401  if (hitType != HIT_TYPE::VALID)
402  continue;
403  auto apattern = (pattern - minTrackerWord) >> LayerOffset;
404  // assert(apattern<128);
405  side[getSide(pattern)].set(apattern);
406  }
407  // assert(numberOfValidStripLayersWithMonoAndStereo(0, 0)==int((side[0]&side[1]).count()));
408  return (side[0] & side[1]).count();
409 }

References taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), getSide(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, maxTrackerWord, minStripWord, minTrackerWord, topSingleLeptonDQM_PU_cfi::pattern, FastTimerService_cff::range, and TRACK_HITS.

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

◆ numberOfValidStripLayersWithMonoAndStereo() [2/2]

int HitPattern::numberOfValidStripLayersWithMonoAndStereo ( uint16_t  stripdet,
uint16_t  layer 
) const

Definition at line 345 of file HitPattern.cc.

345  {
346  bool hasMono[SubstrMask + 1][LayerMask + 1];
347  bool hasStereo[SubstrMask + 1][LayerMask + 1];
348  memset(hasMono, 0, sizeof(hasMono));
349  memset(hasStereo, 0, sizeof(hasStereo));
350 
351  // mark which layers have mono/stereo hits
352  for (int i = beginTrackHits; i < endTrackHits; ++i) {
354  uint16_t subStructure = getSubStructure(pattern);
355 
357  if (stripdet != 0 && subStructure != stripdet) {
358  continue;
359  }
360 
361  if (layer != 0 && getSubSubStructure(pattern) != layer) {
362  continue;
363  }
364 
365  switch (getSide(pattern)) {
366  case 0: // mono
367  hasMono[subStructure][getLayer(pattern)] = true;
368  break;
369  case 1: // stereo
370  hasStereo[subStructure][getLayer(pattern)] = true;
371  break;
372  default:;
373  break;
374  }
375  }
376  }
377 
378  // count how many layers have mono and stereo hits
379  int count = 0;
380  for (int i = 0; i < SubstrMask + 1; ++i) {
381  for (int j = 0; j < LayerMask + 1; ++j) {
382  if (hasMono[i][j] && hasStereo[i][j]) {
383  count++;
384  }
385  }
386  }
387  return count;
388 }

References beginTrackHits, submitPVResolutionJobs::count, endTrackHits, getHitPatternByAbsoluteIndex(), getLayer(), getSide(), getSubStructure(), getSubSubStructure(), mps_fire::i, dqmiolumiharvest::j, phase1PixelTopology::layer, LayerMask, topSingleLeptonDQM_PU_cfi::pattern, stripHitFilter(), SubstrMask, and validHitFilter().

Referenced by MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), CosmicTrackSelector::select(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), and QcdUeDQM::trackSelection().

◆ numberOfValidStripTECHits()

int reco::HitPattern::numberOfValidStripTECHits ( ) const
inline

Definition at line 846 of file HitPattern.h.

846  {
848  }

References countTypedHits(), stripTECHitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidStripTIBHits()

int reco::HitPattern::numberOfValidStripTIBHits ( ) const
inline

Definition at line 834 of file HitPattern.h.

834  {
836  }

References countTypedHits(), stripTIBHitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidStripTIDHits()

int reco::HitPattern::numberOfValidStripTIDHits ( ) const
inline

Definition at line 838 of file HitPattern.h.

838  {
840  }

References countTypedHits(), stripTIDHitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidStripTOBHits()

int reco::HitPattern::numberOfValidStripTOBHits ( ) const
inline

Definition at line 842 of file HitPattern.h.

842  {
844  }

References countTypedHits(), stripTOBHitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidTECLayersWithMonoAndStereo()

int HitPattern::numberOfValidTECLayersWithMonoAndStereo ( uint32_t  layer = 0) const

◆ numberOfValidTIBLayersWithMonoAndStereo()

int HitPattern::numberOfValidTIBLayersWithMonoAndStereo ( uint32_t  layer = 0) const

◆ numberOfValidTIDLayersWithMonoAndStereo()

int HitPattern::numberOfValidTIDLayersWithMonoAndStereo ( uint32_t  layer = 0) const

◆ numberOfValidTimingBTLHits()

int reco::HitPattern::numberOfValidTimingBTLHits ( ) const
inline

Definition at line 870 of file HitPattern.h.

870  {
872  }

References countTypedHits(), timingBTLHitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidTimingETLHits()

int reco::HitPattern::numberOfValidTimingETLHits ( ) const
inline

Definition at line 874 of file HitPattern.h.

874  {
876  }

References countTypedHits(), timingETLHitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidTimingHits()

int reco::HitPattern::numberOfValidTimingHits ( ) const
inline

Definition at line 814 of file HitPattern.h.

814  {
816  }

References countTypedHits(), timingHitFilter(), TRACK_HITS, and validHitFilter().

◆ numberOfValidTOBLayersWithMonoAndStereo()

int HitPattern::numberOfValidTOBLayersWithMonoAndStereo ( uint32_t  layer = 0) const

◆ numberOfValidTrackerHits()

int reco::HitPattern::numberOfValidTrackerHits ( ) const
inline

◆ operator=()

HitPattern & HitPattern::operator= ( const HitPattern other)

Definition at line 37 of file HitPattern.cc.

37  {
38  if (this == &other) {
39  return *this;
40  }
41 
42  this->hitCount = other.hitCount;
43 
44  this->beginTrackHits = other.beginTrackHits;
45  this->endTrackHits = other.endTrackHits;
46 
47  this->beginInner = other.beginInner;
48  this->endInner = other.endInner;
49 
50  this->beginOuter = other.beginOuter;
51  this->endOuter = other.endOuter;
52 
53  memcpy(this->hitPattern, other.hitPattern, sizeof(uint16_t) * HitPattern::ARRAY_LENGTH);
54 
55  return *this;
56 }

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

◆ outermostMuonStationWithAnyHits()

int reco::HitPattern::outermostMuonStationWithAnyHits ( ) const
inline

Definition at line 1077 of file HitPattern.h.

1077 { return outermostMuonStationWithHits(-1); }

References outermostMuonStationWithHits().

◆ outermostMuonStationWithBadHits()

int reco::HitPattern::outermostMuonStationWithBadHits ( ) const
inline

Definition at line 1075 of file HitPattern.h.

1075 { return outermostMuonStationWithHits(3); }

References outermostMuonStationWithHits().

◆ outermostMuonStationWithHits()

int HitPattern::outermostMuonStationWithHits ( int  hitType) const

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

Definition at line 902 of file HitPattern.cc.

902  {
903  int ret = 0;
904  for (int i = beginTrackHits; i < endTrackHits; ++i) {
906  if (muonHitFilter(pattern) && (hitType == -1 || int(getHitType(pattern)) == hitType)) {
907  int stat = getMuonStation(pattern);
908  if (ret == 0 || stat > ret) {
909  ret = stat;
910  }
911  }
912  }
913  return ret;
914 }

References beginTrackHits, endTrackHits, getHitPatternByAbsoluteIndex(), getHitType(), getMuonStation(), mps_fire::i, muonHitFilter(), topSingleLeptonDQM_PU_cfi::pattern, runTheMatrix::ret, and edm_modernize_messagelogger::stat.

Referenced by outermostMuonStationWithAnyHits(), outermostMuonStationWithBadHits(), and outermostMuonStationWithValidHits().

◆ outermostMuonStationWithValidHits()

int reco::HitPattern::outermostMuonStationWithValidHits ( ) const
inline

Definition at line 1073 of file HitPattern.h.

1073 { return outermostMuonStationWithHits(0); }

References outermostMuonStationWithHits().

◆ pixelBarrelHitFilter()

bool reco::HitPattern::pixelBarrelHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 584 of file HitPattern.h.

584  {
586  return false;
587  }
588 
589  uint32_t substructure = getSubStructure(pattern);
590  return (substructure == PixelSubdetector::PixelBarrel);
591  }

References getSubStructure(), topSingleLeptonDQM_PU_cfi::pattern, PixelSubdetector::PixelBarrel, trackerHitFilter(), and UNLIKELY.

Referenced by hasValidHitInPixelLayer(), numberOfLostPixelBarrelHits(), and numberOfValidPixelBarrelHits().

◆ pixelBarrelLayersNull()

int HitPattern::pixelBarrelLayersNull ( ) const

Definition at line 738 of file HitPattern.cc.

738  {
739  int count = 0;
740  uint16_t NPixBarrel = 4;
741  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
743  count++;
744  }
745  }
746  return count;
747 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, NULL_RETURN, PixelSubdetector::PixelBarrel, and TRACK_HITS.

Referenced by pixelLayersNull().

◆ pixelBarrelLayersTotallyOffOrBad()

int HitPattern::pixelBarrelLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const

Definition at line 676 of file HitPattern.cc.

676  {
677  int count = 0;
678  uint16_t NPixBarrel = 4;
679  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
680  if (getTrackerLayerCase(category, PixelSubdetector::PixelBarrel, layer) == HIT_TYPE::INACTIVE) {
681  count++;
682  }
683  }
684  return count;
685 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and PixelSubdetector::PixelBarrel.

Referenced by pixelLayersTotallyOffOrBad().

◆ pixelBarrelLayersWithMeasurement()

int HitPattern::pixelBarrelLayersWithMeasurement ( ) const

Definition at line 552 of file HitPattern.cc.

552  {
553  int count = 0;
554  uint16_t NPixBarrel = 4;
555  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
557  count++;
558  }
559  }
560  return count;
561 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, PixelSubdetector::PixelBarrel, and TRACK_HITS.

Referenced by pixelLayersWithMeasurementOld(), and BeamFitter::readEvent().

◆ pixelBarrelLayersWithoutMeasurement()

int HitPattern::pixelBarrelLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 614 of file HitPattern.cc.

614  {
615  int count = 0;
616  uint16_t NPixBarrel = 4;
617  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
618  if (getTrackerLayerCase(category, PixelSubdetector::PixelBarrel, layer) == HIT_TYPE::MISSING) {
619  count++;
620  }
621  }
622  return count;
623 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and PixelSubdetector::PixelBarrel.

Referenced by pixelLayersWithoutMeasurement().

◆ pixelEndcapHitFilter()

bool reco::HitPattern::pixelEndcapHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 593 of file HitPattern.h.

593  {
595  return false;
596  }
597 
598  uint32_t substructure = getSubStructure(pattern);
599  return (substructure == PixelSubdetector::PixelEndcap);
600  }

References getSubStructure(), topSingleLeptonDQM_PU_cfi::pattern, PixelSubdetector::PixelEndcap, trackerHitFilter(), and UNLIKELY.

Referenced by hasValidHitInPixelLayer(), numberOfLostPixelEndcapHits(), and numberOfValidPixelEndcapHits().

◆ pixelEndcapLayersNull()

int HitPattern::pixelEndcapLayersNull ( ) const

Definition at line 749 of file HitPattern.cc.

749  {
750  int count = 0;
751  uint16_t NPixForward = 3;
752  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
754  count++;
755  }
756  }
757  return count;
758 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, NULL_RETURN, PixelSubdetector::PixelEndcap, and TRACK_HITS.

Referenced by pixelLayersNull().

◆ pixelEndcapLayersTotallyOffOrBad()

int HitPattern::pixelEndcapLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const

Definition at line 687 of file HitPattern.cc.

687  {
688  int count = 0;
689  uint16_t NPixForward = 3;
690  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
691  if (getTrackerLayerCase(category, PixelSubdetector::PixelEndcap, layer) == HIT_TYPE::INACTIVE) {
692  count++;
693  }
694  }
695  return count;
696 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and PixelSubdetector::PixelEndcap.

Referenced by pixelLayersTotallyOffOrBad().

◆ pixelEndcapLayersWithMeasurement()

int HitPattern::pixelEndcapLayersWithMeasurement ( ) const

Definition at line 563 of file HitPattern.cc.

563  {
564  int count = 0;
565  uint16_t NPixForward = 3;
566  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
568  count++;
569  }
570  }
571  return count;
572 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, PixelSubdetector::PixelEndcap, and TRACK_HITS.

Referenced by pixelLayersWithMeasurementOld(), and BeamFitter::readEvent().

◆ pixelEndcapLayersWithoutMeasurement()

int HitPattern::pixelEndcapLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 625 of file HitPattern.cc.

625  {
626  int count = 0;
627  uint16_t NPixForward = 3;
628  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
629  if (getTrackerLayerCase(category, PixelSubdetector::PixelEndcap, layer) == HIT_TYPE::MISSING) {
630  count++;
631  }
632  }
633  return count;
634 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and PixelSubdetector::PixelEndcap.

Referenced by pixelLayersWithoutMeasurement().

◆ pixelHitFilter()

bool reco::HitPattern::pixelHitFilter ( uint16_t  pattern)
inlinestatic

◆ pixelLayersNull()

int reco::HitPattern::pixelLayersNull ( ) const
inline

Definition at line 1025 of file HitPattern.h.

References pixelBarrelLayersNull(), and pixelEndcapLayersNull().

Referenced by trackerLayersNull().

◆ pixelLayersTotallyOffOrBad()

int reco::HitPattern::pixelLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const
inline

◆ pixelLayersWithMeasurement()

int HitPattern::pixelLayersWithMeasurement ( ) const

Definition at line 489 of file HitPattern.cc.

489  {
490  auto category = TRACK_HITS;
491  std::bitset<128> layerOk;
492  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
493  for (int i = range.first; i < range.second; ++i) {
496  continue;
497  if (pattern > minStripWord)
498  continue;
499  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
500  if (hitType != HIT_TYPE::VALID)
501  continue;
503  // assert(pattern<128);
504  layerOk.set(pattern);
505  }
506  // assert(pixelLayersWithMeasurementOld()==int(layerOk.count()));
507  return layerOk.count();
508 }

References taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, minStripWord, minTrackerWord, topSingleLeptonDQM_PU_cfi::pattern, FastTimerService_cff::range, TRACK_HITS, trackerHitFilter(), and UNLIKELY.

Referenced by StandaloneTrackMonitor::analyze(), PackedCandidateTrackValidator::analyze(), TrackFilterForPVFinding::operator()(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), BeamFitter::readEvent(), CosmicTrackSelector::select(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), pat::PackedCandidate::setHits(), trackerLayersWithMeasurementOld(), and QcdUeDQM::trackSelection().

◆ pixelLayersWithMeasurementOld()

int reco::HitPattern::pixelLayersWithMeasurementOld ( ) const
inline

◆ pixelLayersWithoutMeasurement()

int reco::HitPattern::pixelLayersWithoutMeasurement ( HitCategory  category) const
inline

◆ print()

void HitPattern::print ( HitCategory  category,
std::ostream &  stream = std::cout 
) const

Definition at line 836 of file HitPattern.cc.

836  {
837  stream << "HitPattern" << std::endl;
838  for (int i = 0; i < numberOfAllHits(category); ++i) {
840  }
841  std::ios_base::fmtflags flags = stream.flags();
842  stream.setf(std::ios_base::hex, std::ios_base::basefield);
843  stream.setf(std::ios_base::showbase);
844 
845  for (int i = 0; i < this->numberOfAllHits(category); ++i) {
846  stream << getHitPattern(category, i) << std::endl;
847  }
848 
849  stream.flags(flags);
850 }

References taus_updatedMVAIds_cff::category, HLT_FULL_cff::flags, getHitPattern(), mps_fire::i, numberOfAllHits(), printHitPattern(), and cms::cuda::stream.

◆ printHitPattern()

void HitPattern::printHitPattern ( HitCategory  category,
int  position,
std::ostream &  stream 
) const

Definition at line 800 of file HitPattern.cc.

800  {
801  uint16_t pattern = getHitPattern(category, position);
802  stream << "\t";
803  if (muonHitFilter(pattern)) {
804  stream << "muon";
805  } else if (trackerHitFilter(pattern)) {
806  stream << "tracker";
807  } else if (timingHitFilter(pattern)) {
808  stream << "timing";
809  }
810 
811  stream << "\tsubstructure " << getSubStructure(pattern);
812  if (muonHitFilter(pattern)) {
813  stream << "\tstation " << getMuonStation(pattern);
814  if (muonDTHitFilter(pattern)) {
815  stream << "\tdt superlayer " << getDTSuperLayer(pattern);
816  } else if (muonCSCHitFilter(pattern)) {
817  stream << "\tcsc ring " << getCSCRing(pattern);
818  } else if (muonRPCHitFilter(pattern)) {
819  stream << "\trpc " << (getRPCregion(pattern) ? "endcaps" : "barrel") << ", layer " << getRPCLayer(pattern);
820  } else if (muonGEMHitFilter(pattern)) {
821  stream << "\tgem " << (getGEMLayer(pattern) ? "layer1" : "layer2") << ", station " << getGEMStation(pattern);
822  } else if (muonME0HitFilter(pattern)) {
823  stream << "\tme0 ";
824  } else {
825  stream << "(UNKNOWN Muon SubStructure!) \tsubsubstructure " << getSubStructure(pattern);
826  }
827  } else if (timingHitFilter(pattern)) {
828  stream << "\tdetector " << getSubStructure(pattern);
829  } else {
830  stream << "\tlayer " << getLayer(pattern);
831  }
832  stream << "\thit type " << getHitType(pattern);
833  stream << std::endl;
834 }

References taus_updatedMVAIds_cff::category, getCSCRing(), getDTSuperLayer(), getGEMLayer(), getGEMStation(), getHitPattern(), getHitType(), getLayer(), getMuonStation(), getRPCLayer(), getRPCregion(), getSubStructure(), muonCSCHitFilter(), muonDTHitFilter(), muonGEMHitFilter(), muonHitFilter(), muonME0HitFilter(), muonRPCHitFilter(), topSingleLeptonDQM_PU_cfi::pattern, position, cms::cuda::stream, timingHitFilter(), and trackerHitFilter().

Referenced by spr::goodTrack(), and print().

◆ rpcStationsWithAnyHits()

int reco::HitPattern::rpcStationsWithAnyHits ( ) const
inline

Definition at line 1053 of file HitPattern.h.

1053 { return muonStations(3, -1); }

References muonStations().

◆ rpcStationsWithBadHits()

int reco::HitPattern::rpcStationsWithBadHits ( ) const
inline

Definition at line 1051 of file HitPattern.h.

1051 { return muonStations(3, 3); }

References muonStations().

◆ rpcStationsWithValidHits()

int reco::HitPattern::rpcStationsWithValidHits ( ) const
inline

Definition at line 1049 of file HitPattern.h.

1049 { return muonStations(3, 0); }

References muonStations().

◆ stripHitFilter()

bool reco::HitPattern::stripHitFilter ( uint16_t  pattern)
inlinestatic

◆ stripLayersNull()

int reco::HitPattern::stripLayersNull ( ) const
inline

◆ stripLayersTotallyOffOrBad()

int reco::HitPattern::stripLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const
inline

◆ stripLayersWithMeasurement()

int reco::HitPattern::stripLayersWithMeasurement ( ) const
inline

◆ stripLayersWithoutMeasurement()

int reco::HitPattern::stripLayersWithoutMeasurement ( HitCategory  category) const
inline

◆ stripSubdetectorHitFilter()

bool reco::HitPattern::stripSubdetectorHitFilter ( uint16_t  pattern,
StripSubdetector::SubDetector  substructure 
)
inlinestaticprivate

Definition at line 606 of file HitPattern.h.

606  {
608  return false;
609  }
610 
611  return substructure == getSubStructure(pattern);
612  }

References getSubStructure(), topSingleLeptonDQM_PU_cfi::pattern, trackerHitFilter(), and UNLIKELY.

Referenced by stripTECHitFilter(), stripTIBHitFilter(), stripTIDHitFilter(), and stripTOBHitFilter().

◆ stripTECHitFilter()

bool reco::HitPattern::stripTECHitFilter ( uint16_t  pattern)
inlinestatic

◆ stripTECLayersNull()

int HitPattern::stripTECLayersNull ( ) const

Definition at line 790 of file HitPattern.cc.

790  {
791  int count = 0;
792  for (uint16_t layer = 1; layer <= 9; layer++) {
794  count++;
795  }
796  }
797  return count;
798 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, NULL_RETURN, StripSubdetector::TEC, and TRACK_HITS.

Referenced by stripLayersNull().

◆ stripTECLayersTotallyOffOrBad()

int HitPattern::stripTECLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const

Definition at line 728 of file HitPattern.cc.

728  {
729  int count = 0;
730  for (uint16_t layer = 1; layer <= 9; layer++) {
731  if (getTrackerLayerCase(category, StripSubdetector::TEC, layer) == HIT_TYPE::INACTIVE) {
732  count++;
733  }
734  }
735  return count;
736 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TEC.

Referenced by stripLayersTotallyOffOrBad().

◆ stripTECLayersWithMeasurement()

int HitPattern::stripTECLayersWithMeasurement ( ) const

◆ stripTECLayersWithoutMeasurement()

int HitPattern::stripTECLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 666 of file HitPattern.cc.

666  {
667  int count = 0;
668  for (uint16_t layer = 1; layer <= 9; layer++) {
669  if (getTrackerLayerCase(category, StripSubdetector::TEC, layer) == HIT_TYPE::MISSING) {
670  count++;
671  }
672  }
673  return count;
674 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TEC.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

◆ stripTIBHitFilter()

bool reco::HitPattern::stripTIBHitFilter ( uint16_t  pattern)
inlinestatic

◆ stripTIBLayersNull()

int HitPattern::stripTIBLayersNull ( ) const

Definition at line 760 of file HitPattern.cc.

760  {
761  int count = 0;
762  for (uint16_t layer = 1; layer <= 4; layer++) {
764  count++;
765  }
766  }
767  return count;
768 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, NULL_RETURN, StripSubdetector::TIB, and TRACK_HITS.

Referenced by stripLayersNull().

◆ stripTIBLayersTotallyOffOrBad()

int HitPattern::stripTIBLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const

Definition at line 698 of file HitPattern.cc.

698  {
699  int count = 0;
700  for (uint16_t layer = 1; layer <= 4; layer++) {
701  if (getTrackerLayerCase(category, StripSubdetector::TIB, layer) == HIT_TYPE::INACTIVE) {
702  count++;
703  }
704  }
705  return count;
706 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TIB.

Referenced by stripLayersTotallyOffOrBad().

◆ stripTIBLayersWithMeasurement()

int HitPattern::stripTIBLayersWithMeasurement ( ) const

Definition at line 574 of file HitPattern.cc.

574  {
575  int count = 0;
576  for (uint16_t layer = 1; layer <= 4; layer++) {
577  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TIB, layer) == HIT_TYPE::VALID) {
578  count++;
579  }
580  }
581  return count;
582 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, StripSubdetector::TIB, and TRACK_HITS.

Referenced by IsolatedTracksNxN::analyze(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

◆ stripTIBLayersWithoutMeasurement()

int HitPattern::stripTIBLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 636 of file HitPattern.cc.

636  {
637  int count = 0;
638  for (uint16_t layer = 1; layer <= 4; layer++) {
639  if (getTrackerLayerCase(category, StripSubdetector::TIB, layer) == HIT_TYPE::MISSING) {
640  count++;
641  }
642  }
643  return count;
644 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TIB.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

◆ stripTIDHitFilter()

bool reco::HitPattern::stripTIDHitFilter ( uint16_t  pattern)
inlinestatic

◆ stripTIDLayersNull()

int HitPattern::stripTIDLayersNull ( ) const

Definition at line 770 of file HitPattern.cc.

770  {
771  int count = 0;
772  for (uint16_t layer = 1; layer <= 3; layer++) {
774  count++;
775  }
776  }
777  return count;
778 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, NULL_RETURN, StripSubdetector::TID, and TRACK_HITS.

Referenced by stripLayersNull().

◆ stripTIDLayersTotallyOffOrBad()

int HitPattern::stripTIDLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const

Definition at line 708 of file HitPattern.cc.

708  {
709  int count = 0;
710  for (uint16_t layer = 1; layer <= 3; layer++) {
711  if (getTrackerLayerCase(category, StripSubdetector::TID, layer) == HIT_TYPE::INACTIVE) {
712  count++;
713  }
714  }
715  return count;
716 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TID.

Referenced by stripLayersTotallyOffOrBad().

◆ stripTIDLayersWithMeasurement()

int HitPattern::stripTIDLayersWithMeasurement ( ) const

Definition at line 584 of file HitPattern.cc.

584  {
585  int count = 0;
586  for (uint16_t layer = 1; layer <= 3; layer++) {
587  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TID, layer) == HIT_TYPE::VALID) {
588  count++;
589  }
590  }
591  return count;
592 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, StripSubdetector::TID, and TRACK_HITS.

Referenced by IsolatedTracksNxN::analyze(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

◆ stripTIDLayersWithoutMeasurement()

int HitPattern::stripTIDLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 646 of file HitPattern.cc.

646  {
647  int count = 0;
648  for (uint16_t layer = 1; layer <= 3; layer++) {
649  if (getTrackerLayerCase(category, StripSubdetector::TID, layer) == HIT_TYPE::MISSING) {
650  count++;
651  }
652  }
653  return count;
654 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TID.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

◆ stripTOBHitFilter()

bool reco::HitPattern::stripTOBHitFilter ( uint16_t  pattern)
inlinestatic

◆ stripTOBLayersNull()

int HitPattern::stripTOBLayersNull ( ) const

Definition at line 780 of file HitPattern.cc.

780  {
781  int count = 0;
782  for (uint16_t layer = 1; layer <= 6; layer++) {
784  count++;
785  }
786  }
787  return count;
788 }

References submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, NULL_RETURN, StripSubdetector::TOB, and TRACK_HITS.

Referenced by stripLayersNull().

◆ stripTOBLayersTotallyOffOrBad()

int HitPattern::stripTOBLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const

Definition at line 718 of file HitPattern.cc.

718  {
719  int count = 0;
720  for (uint16_t layer = 1; layer <= 6; layer++) {
721  if (getTrackerLayerCase(category, StripSubdetector::TOB, layer) == HIT_TYPE::INACTIVE) {
722  count++;
723  }
724  }
725  return count;
726 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TOB.

Referenced by stripLayersTotallyOffOrBad().

◆ stripTOBLayersWithMeasurement()

int HitPattern::stripTOBLayersWithMeasurement ( ) const

◆ stripTOBLayersWithoutMeasurement()

int HitPattern::stripTOBLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 656 of file HitPattern.cc.

656  {
657  int count = 0;
658  for (uint16_t layer = 1; layer <= 6; layer++) {
659  if (getTrackerLayerCase(category, StripSubdetector::TOB, layer) == HIT_TYPE::MISSING) {
660  count++;
661  }
662  }
663  return count;
664 }

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), phase1PixelTopology::layer, and StripSubdetector::TOB.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

◆ timingBTLHitFilter()

bool reco::HitPattern::timingBTLHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 685 of file HitPattern.h.

685  {
687  return false;
688  uint16_t substructure = getSubStructure(pattern);
689  return (substructure == (uint16_t)MTDDetId::BTL);
690  }

References MTDDetId::BTL, getSubStructure(), topSingleLeptonDQM_PU_cfi::pattern, timingHitFilter(), and UNLIKELY.

Referenced by numberOfLostTimingBTLHits(), and numberOfValidTimingBTLHits().

◆ timingETLHitFilter()

bool reco::HitPattern::timingETLHitFilter ( uint16_t  pattern)
inlinestatic

Definition at line 692 of file HitPattern.h.

692  {
694  return false;
695  uint16_t substructure = getSubStructure(pattern);
696  return (substructure == (uint16_t)MTDDetId::ETL);
697  }

References MTDDetId::ETL, getSubStructure(), topSingleLeptonDQM_PU_cfi::pattern, timingHitFilter(), and UNLIKELY.

Referenced by numberOfLostTimingETLHits(), and numberOfValidTimingETLHits().

◆ timingHitFilter()

bool reco::HitPattern::timingHitFilter ( uint16_t  pattern)
inlinestatic

◆ trackerHitFilter()

bool reco::HitPattern::trackerHitFilter ( uint16_t  pattern)
inlinestatic

◆ trackerLayersNull()

int reco::HitPattern::trackerLayersNull ( ) const
inline

Definition at line 1023 of file HitPattern.h.

1023 { return pixelLayersNull() + stripLayersNull(); }

References pixelLayersNull(), and stripLayersNull().

◆ trackerLayersTotallyOffOrBad()

int reco::HitPattern::trackerLayersTotallyOffOrBad ( HitCategory  category = TRACK_HITS) const
inline

◆ trackerLayersWithMeasurement()

int HitPattern::trackerLayersWithMeasurement ( ) const

Definition at line 510 of file HitPattern.cc.

510  {
511  auto category = TRACK_HITS;
512  std::bitset<128> layerOk;
513  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
514  for (int i = range.first; i < range.second; ++i) {
517  continue;
518  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
519  if (hitType != HIT_TYPE::VALID)
520  continue;
522  // assert(pattern<128);
523  layerOk.set(pattern);
524  }
525  // assert(trackerLayersWithMeasurementOld()==int(layerOk.count()));
526  return layerOk.count();
527 }

References taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, minTrackerWord, topSingleLeptonDQM_PU_cfi::pattern, FastTimerService_cff::range, TRACK_HITS, trackerHitFilter(), and UNLIKELY.

Referenced by MuonRecoAnalyzer::analyze(), StandaloneTrackMonitor::analyze(), IsolatedTracksCone::analyze(), IsolatedTracksNxN::analyze(), PackedCandidateTrackValidator::analyze(), spr::coneChargeIsolation(), HcalHBHEMuonHighEtaAnalyzer::fillTrackParameters(), spr::goodTrack(), TrackFilterForPVFinding::operator()(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), EvtPlaneProducer::produce(), BeamFitter::readEvent(), CosmicTrackSelector::select(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), and QcdUeDQM::trackSelection().

◆ trackerLayersWithMeasurementOld()

int reco::HitPattern::trackerLayersWithMeasurementOld ( ) const
inline

Definition at line 984 of file HitPattern.h.

984  {
986  }

References pixelLayersWithMeasurement(), and stripLayersWithMeasurement().

◆ trackerLayersWithoutMeasurement()

int HitPattern::trackerLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 529 of file HitPattern.cc.

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) {
536  continue;
537  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
539  // assert(pattern<128);
540  if (hitType == HIT_TYPE::VALID)
541  layerOk.set(pattern);
542  if (hitType == HIT_TYPE::MISSING)
543  layerMissed.set(pattern);
544  }
545  layerMissed &= ~layerOk;
546 
547  // assert(trackerLayersWithoutMeasurementOld(category)==int(layerMissed.count()));
548 
549  return layerMissed.count();
550 }

References taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, LayerOffset, minTrackerWord, topSingleLeptonDQM_PU_cfi::pattern, FastTimerService_cff::range, trackerHitFilter(), and UNLIKELY.

Referenced by HcalHBHEMuonHighEtaAnalyzer::fillTrackParameters(), spr::goodTrack(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), CosmicTrackSelector::select(), MultiTrackSelector::select(), and HIMultiTrackSelector::select().

◆ trackerLayersWithoutMeasurementOld()

int reco::HitPattern::trackerLayersWithoutMeasurementOld ( HitCategory  category) const
inline

◆ validHitFilter()

bool reco::HitPattern::validHitFilter ( uint16_t  pattern)
inlinestatic

Friends And Related Function Documentation

◆ PatternSet

template<int N>
friend struct PatternSet
friend

Definition at line 503 of file HitPattern.h.

Member Data Documentation

◆ ARRAY_LENGTH

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

Definition at line 156 of file HitPattern.h.

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

◆ beginInner

uint8_t reco::HitPattern::beginInner
private

◆ beginOuter

uint8_t reco::HitPattern::beginOuter
private

◆ beginTrackHits

uint8_t reco::HitPattern::beginTrackHits
private

◆ EMPTY_PATTERN

const uint16_t reco::HitPattern::EMPTY_PATTERN = 0x0
static

◆ endInner

uint8_t reco::HitPattern::endInner
private

◆ endOuter

uint8_t reco::HitPattern::endOuter
private

◆ endTrackHits

uint8_t reco::HitPattern::endTrackHits
private

◆ HIT_LENGTH

const static unsigned short reco::HitPattern::HIT_LENGTH = 12
static

Definition at line 157 of file HitPattern.h.

Referenced by getHitPatternByAbsoluteIndex(), and insertHit().

◆ hitCount

uint8_t reco::HitPattern::hitCount
private

◆ hitPattern

uint16_t reco::HitPattern::hitPattern[ARRAY_LENGTH]
private

◆ HitTypeMask

const static unsigned short reco::HitPattern::HitTypeMask = 0x3
staticprivate

◆ HitTypeOffset

const static unsigned short reco::HitPattern::HitTypeOffset = 0
staticprivate

◆ LayerMask

const static unsigned short reco::HitPattern::LayerMask = 0xF
staticprivate

◆ LayerOffset

const static unsigned short reco::HitPattern::LayerOffset = 3
staticprivate

◆ MaxHits

const static unsigned short reco::HitPattern::MaxHits = (8 * sizeof(uint16_t) * ARRAY_LENGTH) / HIT_LENGTH
static

Definition at line 158 of file HitPattern.h.

Referenced by appendHit(), and appendMuonHit().

◆ maxTrackerWord

const static unsigned short reco::HitPattern::maxTrackerWord = (2 << SubDetectorOffset) - 1
staticprivate

◆ minPixelWord

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

Definition at line 461 of file HitPattern.h.

◆ minStripWord

const static unsigned short reco::HitPattern::minStripWord = minTrackerWord | (3 << SubstrOffset)
staticprivate

◆ minTrackerWord

const static unsigned short reco::HitPattern::minTrackerWord = 1 << SubDetectorOffset
staticprivate

◆ NULL_RETURN

const uint32_t reco::HitPattern::NULL_RETURN = 999999
static

◆ SideMask

const static unsigned short reco::HitPattern::SideMask = 0x1
staticprivate

Definition at line 445 of file HitPattern.h.

Referenced by encode(), and getSide().

◆ SideOffset

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

Definition at line 444 of file HitPattern.h.

Referenced by encode(), and getSide().

◆ SubDetectorMask

const static unsigned short reco::HitPattern::SubDetectorMask = 0x3
staticprivate

◆ SubDetectorOffset

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

◆ SubstrMask

const static unsigned short reco::HitPattern::SubstrMask = 0x7
staticprivate

◆ SubstrOffset

const static unsigned short reco::HitPattern::SubstrOffset = 7
staticprivate

Definition at line 452 of file HitPattern.h.

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

reco::HitPattern::appendHit
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:201
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
MuonSubdetId::GEM
static constexpr int GEM
Definition: MuonSubdetId.h:14
reco::HitPattern::MISSING_OUTER_HITS
Definition: HitPattern.h:155
reco::HitPattern::getHitPattern
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:531
reco::HitPattern::getSubStructure
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:707
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
reco::HitPattern::inactiveHitFilter
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
reco::HitPattern::HIT_LENGTH
const static unsigned short HIT_LENGTH
Definition: HitPattern.h:157
mps_fire.i
i
Definition: mps_fire.py:428
reco::HitPattern::LayerOffset
const static unsigned short LayerOffset
Definition: HitPattern.h:448
TrackingRecHit::missing_inner
Definition: TrackingRecHit.h:50
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
reco::HitPattern::beginTrackHits
uint8_t beginTrackHits
Definition: HitPattern.h:493
reco::HitPattern::pixelEndcapLayersWithMeasurement
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:563
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
reco::HitPattern::stripTOBLayersWithMeasurement
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:594
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
TrackerTopology::tobIsStereo
bool tobIsStereo(const DetId &id) const
Definition: TrackerTopology.h:264
reco::HitPattern::stripTIBLayersWithoutMeasurement
int stripTIBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:636
reco::HitPattern::beginInner
uint8_t beginInner
Definition: HitPattern.h:495
reco::HitPattern::muonRPCHitFilter
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:648
reco::HitPattern::SideMask
const static unsigned short SideMask
Definition: HitPattern.h:445
reco::HitPattern::validHitFilter
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:783
pos
Definition: PixelAliasList.h:18
reco::HitPattern::HitTypeOffset
const static unsigned short HitTypeOffset
Definition: HitPattern.h:440
reco::HitPattern::clear
void clear()
Definition: HitPattern.cc:58
reco::HitPattern::muonHitFilter
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:677
reco::HitPattern::trackerHitFilter
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:673
TrackerTopology::tecIsStereo
bool tecIsStereo(const DetId &id) const
Definition: TrackerTopology.h:265
cms::cuda::stream
uint32_t const T *__restrict__ const uint32_t *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Definition: HistoContainer.h:51
reco::HitPattern::stripTIBLayersNull
int stripTIBLayersNull() const
Definition: HitPattern.cc:760
reco::HitPattern::getGEMLayer
static uint16_t getGEMLayer(uint16_t pattern)
GEM layer: 1,2. Only valid for muon GEM patterns, of course.
Definition: HitPattern.h:781
reco::HitPattern::MUON_HIT
Definition: HitPattern.h:151
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
reco::HitPattern::muonGEMHitFilter
static bool muonGEMHitFilter(uint16_t pattern)
Definition: HitPattern.h:657
reco::HitPattern::stripLayersWithoutMeasurement
int stripLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:1005
reco::HitPattern::beginOuter
uint8_t beginOuter
Definition: HitPattern.h:497
reco::HitPattern::getCSCRing
static uint16_t getCSCRing(uint16_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
Definition: HitPattern.h:753
reco::HitPattern::muonCSCHitFilter
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:639
reco::HitPattern::stripTOBHitFilter
static bool stripTOBHitFilter(uint16_t pattern)
Definition: HitPattern.h:622
reco::HitPattern::insertExpectedInnerHit
bool insertExpectedInnerHit(const uint16_t pattern)
Definition: HitPattern.cc:981
reco::HitPattern::stripTIBHitFilter
static bool stripTIBHitFilter(uint16_t pattern)
Definition: HitPattern.h:614
reco::HitPattern::maxTrackerWord
const static unsigned short maxTrackerWord
Definition: HitPattern.h:460
reco::HitPattern::getRPCLayer
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:755
reco::HitPattern::getHitType
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:741
reco::HitPattern::getSide
static uint32_t getSide(uint16_t pattern)
Definition: HitPattern.h:733
reco::HitPattern::pixelLayersWithMeasurement
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:489
reco::HitPattern::stripTOBLayersWithoutMeasurement
int stripTOBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:656
reco::HitPattern::STEREO
Definition: HitPattern.h:149
TrackerTopology::tidIsStereo
bool tidIsStereo(const DetId &id) const
Definition: TrackerTopology.h:267
reco::HitPattern::pixelBarrelLayersWithMeasurement
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:552
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
reco::HitPattern::minTrackerWord
const static unsigned short minTrackerWord
Definition: HitPattern.h:459
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
reco::HitPattern::pixelLayersNull
int pixelLayersNull() const
Definition: HitPattern.h:1025
reco::HitPattern::pixelBarrelLayersNull
int pixelBarrelLayersNull() const
Definition: HitPattern.cc:738
reco::HitPattern::stripLayersWithMeasurement
int stripLayersWithMeasurement() const
Definition: HitPattern.h:992
reco::HitPattern::TRACKER_HIT
Definition: HitPattern.h:151
reco::HitPattern::endOuter
uint8_t endOuter
Definition: HitPattern.h:498
reco::HitPattern::encode
static uint16_t encode(const TrackingRecHit &hit, const TrackerTopology &ttopo)
Definition: HitPattern.cc:74
Exhume::I
const std::complex< double > I
Definition: I.h:8
reco::HitPattern::stripTIDHitFilter
static bool stripTIDHitFilter(uint16_t pattern)
Definition: HitPattern.h:618
reco::HitPattern::getTrackerLayerCase
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:427
reco::HitPattern::timingETLHitFilter
static bool timingETLHitFilter(uint16_t pattern)
Definition: HitPattern.h:692
reco::HitPattern::getSubSubStructure
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:717
TrackingRecHit::Type
Type
Definition: TrackingRecHit.h:45
reco::HitPattern::stripTIDLayersTotallyOffOrBad
int stripTIDLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:708
mps_fire.end
end
Definition: mps_fire.py:242
reco::HitPattern::minStripWord
const static unsigned short minStripWord
Definition: HitPattern.h:462
reco::HitPattern::pixelEndcapLayersTotallyOffOrBad
int pixelEndcapLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:687
reco::HitPattern::getGEMStation
static uint16_t getGEMStation(uint16_t pattern)
GEM station: 1,2. Only valid for muon GEM patterns, of course.
Definition: HitPattern.h:769
TrackerTopology::tibIsStereo
bool tibIsStereo(const DetId &id) const
Definition: TrackerTopology.h:266
reco::HitPattern::getCategoryIndexRange
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:506
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
trackingPlots.other
other
Definition: trackingPlots.py:1464
reco::HitPattern::missingHitFilter
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:785
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
reco::HitPattern::pixelBarrelLayersWithoutMeasurement
int pixelBarrelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:614
reco::HitPattern::insertHit
void insertHit(const uint16_t pattern)
Definition: HitPattern.cc:952
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
reco::HitPattern::getRPCregion
static uint16_t getRPCregion(uint16_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
Definition: HitPattern.h:766
reco::HitPattern::VALID
Definition: HitPattern.h:153
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
reco::HitPattern::SideOffset
const static unsigned short SideOffset
Definition: HitPattern.h:444
TrackingRecHit::inactive_inner
Definition: TrackingRecHit.h:52
TrackingRecHit::bad
Definition: TrackingRecHit.h:49
reco::HitPattern::pixelHitFilter
static bool pixelHitFilter(uint16_t pattern)
Definition: HitPattern.h:575
reco::HitPattern::stripTIBLayersWithMeasurement
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:574
reco::HitPattern::getLayer
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:715
reco::HitPattern::printHitPattern
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
Definition: HitPattern.cc:800
DetId::Tracker
Definition: DetId.h:25
reco::HitPattern::pixelEndcapHitFilter
static bool pixelEndcapHitFilter(uint16_t pattern)
Definition: HitPattern.h:593
reco::HitPattern::stripTECLayersTotallyOffOrBad
int stripTECLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:728
TrackingRecHit::missing
Definition: TrackingRecHit.h:47
reco::HitPattern::SubstrMask
const static unsigned short SubstrMask
Definition: HitPattern.h:453
FastTime
Definition: ForwardSubdetector.h:6
reco::HitPattern::pixelLayersTotallyOffOrBad
int pixelLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.h:1014
reco::HitPattern::timingHitFilter
static bool timingHitFilter(uint16_t pattern)
Definition: HitPattern.h:699
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
TrackingRecHit::inactive_outer
Definition: TrackingRecHit.h:53
reco::HitPattern::EMPTY_PATTERN
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:161
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
reco::HitPattern::stripTIDLayersWithoutMeasurement
int stripTIDLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:646
TrackingRecHit::missing_outer
Definition: TrackingRecHit.h:51
reco::HitPattern::getMuonStation
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:749
MuonSubdetId::ME0
static constexpr int ME0
Definition: MuonSubdetId.h:15
reco::HitPattern::countTypedHits
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:563
reco::HitPattern::getHitPatternByAbsoluteIndex
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:293
reco::HitPattern::SubDetectorMask
const static unsigned short SubDetectorMask
Definition: HitPattern.h:457
reco::HitPattern::LayerMask
const static unsigned short LayerMask
Definition: HitPattern.h:449
reco::HitPattern::isStereo
static uint16_t isStereo(DetId i, const TrackerTopology &ttopo)
Definition: HitPattern.cc:852
TrackingRecHit::valid
Definition: TrackingRecHit.h:46
reco::HitPattern::timingBTLHitFilter
static bool timingBTLHitFilter(uint16_t pattern)
Definition: HitPattern.h:685
reco::HitPattern::badHitFilter
static bool badHitFilter(uint16_t pattern)
Definition: HitPattern.h:789
reco::HitPattern::pixelBarrelLayersTotallyOffOrBad
int pixelBarrelLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:676
reco::HitPattern::TRACK_HITS
Definition: HitPattern.h:155
reco::HitPattern::ARRAY_LENGTH
const static unsigned short ARRAY_LENGTH
Definition: HitPattern.h:156
reco::HitPattern::pixelEndcapLayersNull
int pixelEndcapLayersNull() const
Definition: HitPattern.cc:749
reco::HitPattern::stripTOBLayersTotallyOffOrBad
int stripTOBLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:718
MTDDetId::BTL
Definition: MTDDetId.h:27
reco::HitPattern::stripTIDLayersWithMeasurement
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:584
reco::HitPattern::numberOfAllHits
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:791
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
reco::HitPattern::muonStations
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:874
reco::HitPattern::INACTIVE
Definition: HitPattern.h:153
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
reco::HitPattern::stripLayersNull
int stripLayersNull() const
Definition: HitPattern.h:1027
reco::HitPattern::innermostMuonStationWithHits
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:887
LIKELY
#define LIKELY(x)
Definition: Likely.h:20
MTDDetId::ETL
Definition: MTDDetId.h:27
reco::HitPattern::stripSubdetectorHitFilter
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
Definition: HitPattern.h:606
Exception
Definition: hltDiff.cc:245
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
reco::HitPattern::stripLayersTotallyOffOrBad
int stripLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.h:1018
reco::HitPattern::BAD
Definition: HitPattern.h:153
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
reco::HitPattern::HitTypeMask
const static unsigned short HitTypeMask
Definition: HitPattern.h:441
reco::HitPattern::stripTECHitFilter
static bool stripTECHitFilter(uint16_t pattern)
Definition: HitPattern.h:626
reco::HitPattern::countHits
int countHits(HitCategory category, filterType filter) const
Definition: HitPattern.h:540
reco::HitPattern::hitCount
uint8_t hitCount
Definition: HitPattern.h:491
reco::HitPattern::pixelEndcapLayersWithoutMeasurement
int pixelEndcapLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:625
reco::HitPattern::MTD_HIT
Definition: HitPattern.h:151
reco::HitPattern::NULL_RETURN
static const uint32_t NULL_RETURN
Definition: HitPattern.h:160
reco::HitPattern::endTrackHits
uint8_t endTrackHits
Definition: HitPattern.h:494
TrackingRecHit::inactive
Definition: TrackingRecHit.h:48
reco::HitPattern::SubstrOffset
const static unsigned short SubstrOffset
Definition: HitPattern.h:452
hcaldqm::constants::BAD
const double BAD
Definition: Constants.h:15
reco::HitPattern::MONO
Definition: HitPattern.h:149
reco::HitPattern::pixelBarrelHitFilter
static bool pixelBarrelHitFilter(uint16_t pattern)
Definition: HitPattern.h:584
DetId::Muon
Definition: DetId.h:26
reco::HitPattern::pixelLayersWithoutMeasurement
int pixelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:1001
reco::HitPattern::numberOfValidStripLayersWithMonoAndStereo
int numberOfValidStripLayersWithMonoAndStereo() const
Definition: HitPattern.cc:390
reco::HitPattern::stripTECLayersWithMeasurement
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:604
reco::HitPattern::outermostMuonStationWithHits
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:902
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DetId::Forward
Definition: DetId.h:30
reco::HitPattern::insertExpectedOuterHit
bool insertExpectedOuterHit(const uint16_t pattern)
Definition: HitPattern.cc:993
edm_modernize_messagelogger.stat
stat
Definition: edm_modernize_messagelogger.py:27
reco::HitPattern::stripTIBLayersTotallyOffOrBad
int stripTIBLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:698
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
HLT_FULL_cff.flags
flags
Definition: HLT_FULL_cff.py:13168
reco::HitPattern::SubDetectorOffset
const static unsigned short SubDetectorOffset
Definition: HitPattern.h:456
reco::HitPattern::stripHitFilter
static bool stripHitFilter(uint16_t pattern)
Definition: HitPattern.h:602
reco::HitPattern::MaxHits
const static unsigned short MaxHits
Definition: HitPattern.h:158
reco::HitPattern::muonDTHitFilter
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:630
reco::HitPattern::getDTSuperLayer
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:751
reco::HitPattern::MISSING
Definition: HitPattern.h:153
reco::HitPattern::endInner
uint8_t endInner
Definition: HitPattern.h:496
reco::HitPattern::hitPattern
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:490
reco::HitPattern::muonME0HitFilter
static bool muonME0HitFilter(uint16_t pattern)
Definition: HitPattern.h:666
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
reco::HitPattern::stripTECLayersNull
int stripTECLayersNull() const
Definition: HitPattern.cc:790
hit
Definition: SiStripHitEffFromCalibTree.cc:88
reco::HitPattern::stripTECLayersWithoutMeasurement
int stripTECLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:666
reco::HitPattern::insertTrackHit
bool insertTrackHit(const uint16_t pattern)
Definition: HitPattern.cc:963
reco::HitPattern::stripTOBLayersNull
int stripTOBLayersNull() const
Definition: HitPattern.cc:780
reco::HitPattern::stripTIDLayersNull
int stripTIDLayersNull() const
Definition: HitPattern.cc:770