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.
207  if
208  UNLIKELY((hitCount == HitPattern::MaxHits)) { return false; }
209 
210  uint16_t pattern = HitPattern::encode(id, hitType, ttopo);
211 
212  return appendHit(pattern, hitType);
213 }

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

215  {
216  //if HitPattern is full, journey ends no matter what.
217  if
218  UNLIKELY((hitCount == HitPattern::MaxHits)) { return false; }
219 
220  switch (hitType) {
224  case TrackingRecHit::bad:
225  // hitCount != endT => we are not inserting T type of hits but of T'
226  // 0 != beginT || 0 != endT => we already have hits of T type
227  // so we already have hits of T in the vector and we don't want to
228  // mess them with T' hits.
229  if
230  UNLIKELY(((hitCount != endTrackHits) && (0 != beginTrackHits || 0 != endTrackHits))) {
231  cms::Exception("HitPattern")
232  << "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
245  UNLIKELY(((hitCount != endInner) && (0 != beginInner || 0 != endInner))) {
246  cms::Exception("HitPattern")
247  << "MISSING_INNER_HITS"
248  << " were stored on this object before hits of some other category were inserted "
249  << "but hits of the same category should be inserted in a row. "
250  << "Please rework the code so it inserts all "
251  << "MISSING_INNER_HITS"
252  << " in a row.";
253  return false;
254  }
256  break;
259  if
260  UNLIKELY(((hitCount != endOuter) && (0 != beginOuter || 0 != endOuter))) {
261  cms::Exception("HitPattern")
262  << "MISSING_OUTER_HITS"
263  << " were stored on this object before hits of some other category were inserted "
264  << "but hits of the same category should be inserted in a row. "
265  << "Please rework the code so it inserts all "
266  << "MISSING_OUTER_HITS"
267  << " in a row.";
268  return false;
269  }
271  break;
272  }
273 
274  return false;
275 }

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
525  UNLIKELY((!appendHit(*hit, ttopo))) { return false; }
526  }
527  return true;
528  }

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

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

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

277  {
278  return appendHit(encode(TRACKER_HIT, subdet, layer, stereo, hitType), hitType);
279 }

References appendHit(), encode(), and TRACKER_HIT.

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

◆ badHitFilter()

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

Definition at line 771 of file HitPattern.h.

771 { 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 550 of file HitPattern.h.

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

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

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

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

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

References muonStations().

◆ cscStationsWithBadHits()

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

Definition at line 1027 of file HitPattern.h.

1027 { return muonStations(2, 3); }

References muonStations().

◆ cscStationsWithValidHits()

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

Definition at line 1025 of file HitPattern.h.

1025 { return muonStations(2, 0); }

References muonStations().

◆ dtStationsWithAnyHits()

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

Definition at line 1023 of file HitPattern.h.

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

References muonStations().

◆ dtStationsWithBadHits()

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

Definition at line 1021 of file HitPattern.h.

1021 { return muonStations(1, 3); }

References muonStations().

◆ dtStationsWithValidHits()

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

Definition at line 1019 of file HitPattern.h.

1019 { 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(), 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
184  pattern |= (layer & LayerMask) << LayerOffset;
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, 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 1041 of file HitPattern.h.

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

References muonStations().

◆ gemStationsWithBadHits()

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

Definition at line 1039 of file HitPattern.h.

1039 { return muonStations(4, 3); }

References muonStations().

◆ gemStationsWithValidHits()

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

Definition at line 1037 of file HitPattern.h.

1037 { 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 759 of file HitPattern.h.

759 { 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 736 of file HitPattern.h.

736 { 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 734 of file HitPattern.h.

734 { 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 761 of file HitPattern.h.

761 { 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 763 of file HitPattern.h.

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

753  {
754  uint16_t sss = getSubSubStructure(pattern), stat = sss >> 1;
755  return stat + 1;
756  }

References getSubSubStructure(), topSingleLeptonDQM_PU_cfi::pattern, and hgcalPlots::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 297 of file HitPattern.cc.

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

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

738  {
739  uint16_t subSubStructure = getSubSubStructure(pattern);
740  uint16_t stat = subSubStructure >> 2;
741 
742  if
743  LIKELY(stat <= 1) { return ((subSubStructure >> 1) & 1) + 1; }
744 
745  return 0;
746  }

References getSubSubStructure(), LIKELY, topSingleLeptonDQM_PU_cfi::pattern, and hgcalPlots::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 748 of file HitPattern.h.

748 { 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 718 of file HitPattern.h.

718  {
719  if
721 
722  return (pattern >> SideOffset) & SideMask;
723  }

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

711  {
712  if
714 
715  return ((pattern >> SubDetectorOffset) & SubDetectorMask);
716  }

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

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

References hcaldqm::constants::BAD, taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), HitTypeMask, HitTypeOffset, mps_fire::i, 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 458 of file HitPattern.cc.

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

References taus_updatedMVAIds_cff::category, getCategoryIndexRange(), getHitPatternByAbsoluteIndex(), getSide(), HitTypeMask, HitTypeOffset, mps_fire::i, 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 1053 of file HitPattern.h.

1053 { return innermostMuonStationWithHits(-1); }

References innermostMuonStationWithHits().

◆ innermostMuonStationWithBadHits()

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

Definition at line 1051 of file HitPattern.h.

1051 { 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 890 of file HitPattern.cc.

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

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

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

◆ innermostMuonStationWithValidHits()

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

Definition at line 1049 of file HitPattern.h.

1049 { return innermostMuonStationWithHits(0); }

References innermostMuonStationWithHits().

◆ insertExpectedInnerHit()

bool HitPattern::insertExpectedInnerHit ( const uint16_t  pattern)
private

Definition at line 985 of file HitPattern.cc.

985  {
986  if
987  UNLIKELY((0 == beginInner && 0 == endInner)) {
990  }
991 
993  endInner++;
994 
995  return true;
996 }

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

998  {
999  if
1000  UNLIKELY((0 == beginOuter && 0 == endOuter)) {
1001  beginOuter = hitCount;
1002  endOuter = beginOuter;
1003  }
1004 
1005  insertHit(pattern);
1006  endOuter++;
1007 
1008  return true;
1009 }

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

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

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

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

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

855  {
856  if (i.det() != DetId::Tracker) {
857  return 0;
858  }
859 
860  switch (i.subdetId()) {
863  return 0;
865  return ttopo.tibIsStereo(i);
867  return ttopo.tidIsStereo(i);
869  return ttopo.tobIsStereo(i);
871  return ttopo.tecIsStereo(i);
872  default:
873  return 0;
874  }
875 }

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

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

References muonStations().

◆ me0StationsWithBadHits()

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

Definition at line 1045 of file HitPattern.h.

1045 { return muonStations(5, 3); }

References muonStations().

◆ me0StationsWithValidHits()

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

Definition at line 1043 of file HitPattern.h.

1043 { 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 632 of file HitPattern.h.

632  {
633  if
634  UNLIKELY(!muonHitFilter(pattern)) { return false; }
635 
636  uint32_t substructure = getSubStructure(pattern);
637  return (substructure == (uint32_t)MuonSubdetId::CSC);
638  }

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

648  {
649  if
650  UNLIKELY(!muonHitFilter(pattern)) { return false; }
651 
652  uint32_t substructure = getSubStructure(pattern);
653  return (substructure == (uint32_t)MuonSubdetId::GEM);
654  }

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

656  {
657  if
658  UNLIKELY(!muonHitFilter(pattern)) return false;
659  uint16_t substructure = getSubStructure(pattern);
660  return (substructure == (uint16_t)MuonSubdetId::ME0);
661  }

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

640  {
641  if
642  UNLIKELY(!muonHitFilter(pattern)) { return false; }
643 
644  uint32_t substructure = getSubStructure(pattern);
645  return (substructure == (uint32_t)MuonSubdetId::RPC);
646  }

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

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

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

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

References muonStations().

◆ muonStationsWithBadHits()

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

Definition at line 1015 of file HitPattern.h.

1015 { return muonStations(0, 3); }

References muonStations().

◆ muonStationsWithValidHits()

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

Definition at line 1013 of file HitPattern.h.

1013 { 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 778 of file HitPattern.h.

778  {
780  }

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

◆ numberOfBadHits()

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

Definition at line 934 of file HitPattern.h.

934 { return countHits(TRACK_HITS, badHitFilter); }

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

◆ numberOfBadMuonCSCHits()

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

Definition at line 944 of file HitPattern.h.

944  {
946  }

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

◆ numberOfBadMuonDTHits()

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

Definition at line 940 of file HitPattern.h.

940  {
942  }

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

◆ numberOfBadMuonGEMHits()

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

Definition at line 952 of file HitPattern.h.

952  {
954  }

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

◆ numberOfBadMuonHits()

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

Definition at line 936 of file HitPattern.h.

936  {
938  }

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

◆ numberOfBadMuonME0Hits()

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

Definition at line 956 of file HitPattern.h.

956  {
958  }

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

◆ numberOfBadMuonRPCHits()

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

Definition at line 948 of file HitPattern.h.

948  {
950  }

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

◆ numberOfDTStationsWithBothViews()

int HitPattern::numberOfDTStationsWithBothViews ( ) const

Definition at line 942 of file HitPattern.cc.

942  {
943  int stations[4][2] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
944  for (int i = beginTrackHits; i < endTrackHits; ++i) {
947  stations[getMuonStation(pattern) - 1][getDTSuperLayer(pattern) == 2] = 1;
948  }
949  }
950 
951  return stations[0][0] * stations[0][1] + stations[1][0] * stations[1][1] + stations[2][0] * stations[2][1] +
952  stations[3][0] * stations[3][1];
953 }

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

◆ numberOfDTStationsWithRPhiView()

int HitPattern::numberOfDTStationsWithRPhiView ( ) const

Definition at line 919 of file HitPattern.cc.

919  {
920  int stations[4] = {0, 0, 0, 0};
921  for (int i = beginTrackHits; i < endTrackHits; ++i) {
923 
925  stations[getMuonStation(pattern) - 1] = 1;
926  }
927  }
928  return stations[0] + stations[1] + stations[2] + stations[3];
929 }

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

◆ numberOfDTStationsWithRZView()

int HitPattern::numberOfDTStationsWithRZView ( ) const

Definition at line 931 of file HitPattern.cc.

931  {
932  int stations[4] = {0, 0, 0, 0};
933  for (int i = beginTrackHits; i < endTrackHits; ++i) {
936  stations[getMuonStation(pattern) - 1] = 1;
937  }
938  }
939  return stations[0] + stations[1] + stations[2] + stations[3];
940 }

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

962  {
964  }

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

918  {
920  }

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

◆ numberOfLostMuonDTHits()

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

Definition at line 914 of file HitPattern.h.

914  {
916  }

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

◆ numberOfLostMuonGEMHits()

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

Definition at line 926 of file HitPattern.h.

926  {
928  }

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

◆ numberOfLostMuonHits()

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

Definition at line 866 of file HitPattern.h.

866  {
868  }

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

◆ numberOfLostMuonME0Hits()

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

Definition at line 930 of file HitPattern.h.

930  {
932  }

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

◆ numberOfLostMuonRPCHits()

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

Definition at line 922 of file HitPattern.h.

922  {
924  }

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

870  {
872  }

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

782 { return countHits(TRACK_HITS, muonHitFilter); }

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

◆ numberOfTimingHits()

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

Definition at line 784 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 836 of file HitPattern.h.

836  {
838  }

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

Referenced by MuonRecoAnalyzer::analyze().

◆ numberOfValidMuonDTHits()

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

Definition at line 832 of file HitPattern.h.

832  {
834  }

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

Referenced by MuonRecoAnalyzer::analyze().

◆ numberOfValidMuonGEMHits()

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

Definition at line 844 of file HitPattern.h.

844  {
846  }

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

848  {
850  }

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

◆ numberOfValidMuonRPCHits()

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

Definition at line 840 of file HitPattern.h.

840  {
842  }

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

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

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

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

References beginTrackHits, submitPVResolutionJobs::count, endTrackHits, getHitPatternByAbsoluteIndex(), getLayer(), getSide(), getSubStructure(), getSubSubStructure(), mps_fire::i, dqmiolumiharvest::j, 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 828 of file HitPattern.h.

828  {
830  }

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

◆ numberOfValidStripTIBHits()

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

Definition at line 816 of file HitPattern.h.

816  {
818  }

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

◆ numberOfValidStripTIDHits()

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

Definition at line 820 of file HitPattern.h.

820  {
822  }

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

◆ numberOfValidStripTOBHits()

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

Definition at line 824 of file HitPattern.h.

824  {
826  }

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

852  {
854  }

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

◆ numberOfValidTimingETLHits()

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

Definition at line 856 of file HitPattern.h.

856  {
858  }

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

◆ numberOfValidTimingHits()

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

Definition at line 796 of file HitPattern.h.

796  {
798  }

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

1059 { return outermostMuonStationWithHits(-1); }

References outermostMuonStationWithHits().

◆ outermostMuonStationWithBadHits()

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

Definition at line 1057 of file HitPattern.h.

1057 { 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 905 of file HitPattern.cc.

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

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

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

◆ outermostMuonStationWithValidHits()

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

Definition at line 1055 of file HitPattern.h.

1055 { return outermostMuonStationWithHits(0); }

References outermostMuonStationWithHits().

◆ pixelBarrelHitFilter()

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

Definition at line 581 of file HitPattern.h.

581  {
582  if
583  UNLIKELY(!trackerHitFilter(pattern)) { return false; }
584 
585  uint32_t substructure = getSubStructure(pattern);
586  return (substructure == PixelSubdetector::PixelBarrel);
587  }

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

741  {
742  int count = 0;
743  uint16_t NPixBarrel = 4;
744  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
746  count++;
747  }
748  }
749  return count;
750 }

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

Referenced by pixelLayersNull().

◆ pixelBarrelLayersTotallyOffOrBad()

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

Definition at line 679 of file HitPattern.cc.

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

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

Referenced by pixelLayersTotallyOffOrBad().

◆ pixelBarrelLayersWithMeasurement()

int HitPattern::pixelBarrelLayersWithMeasurement ( ) const

Definition at line 555 of file HitPattern.cc.

555  {
556  int count = 0;
557  uint16_t NPixBarrel = 4;
558  for (uint16_t layer = 1; layer <= NPixBarrel; layer++) {
559  if (getTrackerLayerCase(TRACK_HITS, PixelSubdetector::PixelBarrel, layer) == HIT_TYPE::VALID) {
560  count++;
561  }
562  }
563  return count;
564 }

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

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

◆ pixelBarrelLayersWithoutMeasurement()

int HitPattern::pixelBarrelLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 617 of file HitPattern.cc.

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

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

Referenced by pixelLayersWithoutMeasurement().

◆ pixelEndcapHitFilter()

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

Definition at line 589 of file HitPattern.h.

589  {
590  if
591  UNLIKELY(!trackerHitFilter(pattern)) { return false; }
592 
593  uint32_t substructure = getSubStructure(pattern);
594  return (substructure == PixelSubdetector::PixelEndcap);
595  }

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

752  {
753  int count = 0;
754  uint16_t NPixForward = 3;
755  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
757  count++;
758  }
759  }
760  return count;
761 }

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

Referenced by pixelLayersNull().

◆ pixelEndcapLayersTotallyOffOrBad()

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

Definition at line 690 of file HitPattern.cc.

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

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

Referenced by pixelLayersTotallyOffOrBad().

◆ pixelEndcapLayersWithMeasurement()

int HitPattern::pixelEndcapLayersWithMeasurement ( ) const

Definition at line 566 of file HitPattern.cc.

566  {
567  int count = 0;
568  uint16_t NPixForward = 3;
569  for (uint16_t layer = 1; layer <= NPixForward; layer++) {
570  if (getTrackerLayerCase(TRACK_HITS, PixelSubdetector::PixelEndcap, layer) == HIT_TYPE::VALID) {
571  count++;
572  }
573  }
574  return count;
575 }

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

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

◆ pixelEndcapLayersWithoutMeasurement()

int HitPattern::pixelEndcapLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 628 of file HitPattern.cc.

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

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), 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 1007 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 492 of file HitPattern.cc.

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

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

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

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

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

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

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

References muonStations().

◆ rpcStationsWithBadHits()

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

Definition at line 1033 of file HitPattern.h.

1033 { return muonStations(3, 3); }

References muonStations().

◆ rpcStationsWithValidHits()

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

Definition at line 1031 of file HitPattern.h.

1031 { 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 601 of file HitPattern.h.

601  {
602  if
603  UNLIKELY(!trackerHitFilter(pattern)) { return false; }
604 
605  return substructure == getSubStructure(pattern);
606  }

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

793  {
794  int count = 0;
795  for (uint16_t layer = 1; layer <= 9; layer++) {
797  count++;
798  }
799  }
800  return count;
801 }

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

Referenced by stripLayersNull().

◆ stripTECLayersTotallyOffOrBad()

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

Definition at line 731 of file HitPattern.cc.

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

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

Referenced by stripLayersTotallyOffOrBad().

◆ stripTECLayersWithMeasurement()

int HitPattern::stripTECLayersWithMeasurement ( ) const

Definition at line 607 of file HitPattern.cc.

607  {
608  int count = 0;
609  for (uint16_t layer = 1; layer <= 9; layer++) {
610  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TEC, layer) == HIT_TYPE::VALID) {
611  count++;
612  }
613  }
614  return count;
615 }

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

Referenced by IsolatedTracksNxN::analyze(), HcalHBHEMuonHighEtaAnalyzer::fillTrackParameters(), spr::goodTrack(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

◆ stripTECLayersWithoutMeasurement()

int HitPattern::stripTECLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 669 of file HitPattern.cc.

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

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), 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 763 of file HitPattern.cc.

763  {
764  int count = 0;
765  for (uint16_t layer = 1; layer <= 4; layer++) {
767  count++;
768  }
769  }
770  return count;
771 }

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

Referenced by stripLayersNull().

◆ stripTIBLayersTotallyOffOrBad()

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

Definition at line 701 of file HitPattern.cc.

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

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

Referenced by stripLayersTotallyOffOrBad().

◆ stripTIBLayersWithMeasurement()

int HitPattern::stripTIBLayersWithMeasurement ( ) const

Definition at line 577 of file HitPattern.cc.

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

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

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

◆ stripTIBLayersWithoutMeasurement()

int HitPattern::stripTIBLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 639 of file HitPattern.cc.

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

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), 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 773 of file HitPattern.cc.

773  {
774  int count = 0;
775  for (uint16_t layer = 1; layer <= 3; layer++) {
777  count++;
778  }
779  }
780  return count;
781 }

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

Referenced by stripLayersNull().

◆ stripTIDLayersTotallyOffOrBad()

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

Definition at line 711 of file HitPattern.cc.

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

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

Referenced by stripLayersTotallyOffOrBad().

◆ stripTIDLayersWithMeasurement()

int HitPattern::stripTIDLayersWithMeasurement ( ) const

Definition at line 587 of file HitPattern.cc.

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

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

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

◆ stripTIDLayersWithoutMeasurement()

int HitPattern::stripTIDLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 649 of file HitPattern.cc.

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

References taus_updatedMVAIds_cff::category, submitPVResolutionJobs::count, getTrackerLayerCase(), 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 783 of file HitPattern.cc.

783  {
784  int count = 0;
785  for (uint16_t layer = 1; layer <= 6; layer++) {
787  count++;
788  }
789  }
790  return count;
791 }

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

Referenced by stripLayersNull().

◆ stripTOBLayersTotallyOffOrBad()

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

Definition at line 721 of file HitPattern.cc.

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

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

Referenced by stripLayersTotallyOffOrBad().

◆ stripTOBLayersWithMeasurement()

int HitPattern::stripTOBLayersWithMeasurement ( ) const

Definition at line 597 of file HitPattern.cc.

597  {
598  int count = 0;
599  for (uint16_t layer = 1; layer <= 6; layer++) {
600  if (getTrackerLayerCase(TRACK_HITS, StripSubdetector::TOB, layer) == HIT_TYPE::VALID) {
601  count++;
602  }
603  }
604  return count;
605 }

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

Referenced by IsolatedTracksNxN::analyze(), HcalHBHEMuonHighEtaAnalyzer::fillTrackParameters(), spr::goodTrack(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

◆ stripTOBLayersWithoutMeasurement()

int HitPattern::stripTOBLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 659 of file HitPattern.cc.

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

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

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

◆ timingBTLHitFilter()

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

Definition at line 674 of file HitPattern.h.

674  {
675  if
676  UNLIKELY(!timingHitFilter(pattern)) return false;
677  uint16_t substructure = getSubStructure(pattern);
678  return (substructure == (uint16_t)MTDDetId::BTL);
679  }

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

681  {
682  if
683  UNLIKELY(!timingHitFilter(pattern)) return false;
684  uint16_t substructure = getSubStructure(pattern);
685  return (substructure == (uint16_t)MTDDetId::ETL);
686  }

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

1005 { 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 513 of file HitPattern.cc.

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

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

966  {
968  }

References pixelLayersWithMeasurement(), and stripLayersWithMeasurement().

◆ trackerLayersWithoutMeasurement()

int HitPattern::trackerLayersWithoutMeasurement ( HitCategory  category) const

Definition at line 532 of file HitPattern.cc.

532  {
533  std::bitset<128> layerOk;
534  std::bitset<128> layerMissed;
535  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
536  for (int i = range.first; i < range.second; ++i) {
538  if
539  UNLIKELY(!trackerHitFilter(pattern)) continue;
540  uint16_t hitType = (pattern >> HitTypeOffset) & HitTypeMask;
542  // assert(pattern<128);
543  if (hitType == HIT_TYPE::VALID)
544  layerOk.set(pattern);
545  if (hitType == HIT_TYPE::MISSING)
546  layerMissed.set(pattern);
547  }
548  layerMissed &= ~layerOk;
549 
550  // assert(trackerLayersWithoutMeasurementOld(category)==int(layerMissed.count()));
551 
552  return layerMissed.count();
553 }

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:373
reco::HitPattern::STEREO
Definition: HitPattern.h:149
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:530
reco::HitPattern::getSubStructure
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:695
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:769
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:566
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
reco::HitPattern::stripTOBLayersWithMeasurement
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:597
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:639
reco::HitPattern::beginInner
uint8_t beginInner
Definition: HitPattern.h:495
reco::HitPattern::muonRPCHitFilter
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:640
reco::HitPattern::SideMask
const static unsigned short SideMask
Definition: HitPattern.h:445
reco::HitPattern::validHitFilter
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:765
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
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:667
reco::HitPattern::trackerHitFilter
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:663
TrackerTopology::tecIsStereo
bool tecIsStereo(const DetId &id) const
Definition: TrackerTopology.h:265
reco::HitPattern::stripTIBLayersNull
int stripTIBLayersNull() const
Definition: HitPattern.cc:763
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:763
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:648
reco::HitPattern::stripLayersWithoutMeasurement
int stripLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:987
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:736
reco::HitPattern::muonCSCHitFilter
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:632
reco::HitPattern::stripTOBHitFilter
static bool stripTOBHitFilter(uint16_t pattern)
Definition: HitPattern.h:616
reco::HitPattern::insertExpectedInnerHit
bool insertExpectedInnerHit(const uint16_t pattern)
Definition: HitPattern.cc:985
reco::HitPattern::stripTIBHitFilter
static bool stripTIBHitFilter(uint16_t pattern)
Definition: HitPattern.h:608
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:738
reco::HitPattern::getHitType
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:725
reco::HitPattern::getSide
static uint32_t getSide(uint16_t pattern)
Definition: HitPattern.h:718
reco::HitPattern::pixelLayersWithMeasurement
int pixelLayersWithMeasurement() const
Definition: HitPattern.cc:492
reco::HitPattern::stripTOBLayersWithoutMeasurement
int stripTOBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:659
TrackerTopology::tidIsStereo
bool tidIsStereo(const DetId &id) const
Definition: TrackerTopology.h:267
reco::HitPattern::pixelBarrelLayersWithMeasurement
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:555
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:1007
reco::HitPattern::pixelBarrelLayersNull
int pixelBarrelLayersNull() const
Definition: HitPattern.cc:741
reco::HitPattern::stripLayersWithMeasurement
int stripLayersWithMeasurement() const
Definition: HitPattern.h:974
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
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
Exhume::I
const std::complex< double > I
Definition: I.h:8
reco::HitPattern::stripTIDHitFilter
static bool stripTIDHitFilter(uint16_t pattern)
Definition: HitPattern.h:612
reco::HitPattern::getTrackerLayerCase
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:430
reco::HitPattern::timingETLHitFilter
static bool timingETLHitFilter(uint16_t pattern)
Definition: HitPattern.h:681
reco::HitPattern::getSubSubStructure
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:704
TrackingRecHit::Type
Type
Definition: TrackingRecHit.h:45
reco::HitPattern::stripTIDLayersTotallyOffOrBad
int stripTIDLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:711
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:690
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:751
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:1467
reco::HitPattern::missingHitFilter
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:767
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
reco::HitPattern::pixelBarrelLayersWithoutMeasurement
int pixelBarrelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:617
reco::HitPattern::insertHit
void insertHit(const uint16_t pattern)
Definition: HitPattern.cc:955
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:748
reco::HitPattern::VALID
Definition: HitPattern.h:153
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:573
reco::HitPattern::stripTIBLayersWithMeasurement
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:577
reco::HitPattern::getLayer
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:702
reco::HitPattern::printHitPattern
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
Definition: HitPattern.cc:803
reco::HitPattern::MONO
Definition: HitPattern.h:149
DetId::Tracker
Definition: DetId.h:25
reco::HitPattern::pixelEndcapHitFilter
static bool pixelEndcapHitFilter(uint16_t pattern)
Definition: HitPattern.h:589
reco::HitPattern::stripTECLayersTotallyOffOrBad
int stripTECLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:731
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:996
reco::HitPattern::timingHitFilter
static bool timingHitFilter(uint16_t pattern)
Definition: HitPattern.h:688
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:649
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:732
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:561
reco::HitPattern::getHitPatternByAbsoluteIndex
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:297
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:855
TrackingRecHit::valid
Definition: TrackingRecHit.h:46
reco::HitPattern::timingBTLHitFilter
static bool timingBTLHitFilter(uint16_t pattern)
Definition: HitPattern.h:674
reco::HitPattern::badHitFilter
static bool badHitFilter(uint16_t pattern)
Definition: HitPattern.h:771
reco::HitPattern::pixelBarrelLayersTotallyOffOrBad
int pixelBarrelLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:679
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:752
reco::HitPattern::stripTOBLayersTotallyOffOrBad
int stripTOBLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:721
MTDDetId::BTL
Definition: MTDDetId.h:27
reco::HitPattern::stripTIDLayersWithMeasurement
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:587
reco::HitPattern::numberOfAllHits
int numberOfAllHits(HitCategory category) const
Definition: HitPattern.h:773
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:877
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:1009
reco::HitPattern::innermostMuonStationWithHits
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:890
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:601
Exception
Definition: hltDiff.cc:246
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
reco::HitPattern::stripLayersTotallyOffOrBad
int stripLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.h:1000
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:620
reco::HitPattern::countHits
int countHits(HitCategory category, filterType filter) const
Definition: HitPattern.h:538
reco::HitPattern::hitCount
uint8_t hitCount
Definition: HitPattern.h:491
reco::HitPattern::pixelEndcapLayersWithoutMeasurement
int pixelEndcapLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:628
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::pixelBarrelHitFilter
static bool pixelBarrelHitFilter(uint16_t pattern)
Definition: HitPattern.h:581
DetId::Muon
Definition: DetId.h:26
reco::HitPattern::pixelLayersWithoutMeasurement
int pixelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:983
reco::HitPattern::numberOfValidStripLayersWithMonoAndStereo
int numberOfValidStripLayersWithMonoAndStereo() const
Definition: HitPattern.cc:393
reco::HitPattern::stripTECLayersWithMeasurement
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:607
reco::HitPattern::outermostMuonStationWithHits
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:905
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:998
reco::HitPattern::stripTIBLayersTotallyOffOrBad
int stripTIBLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
Definition: HitPattern.cc:701
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:13150
reco::HitPattern::SubDetectorOffset
const static unsigned short SubDetectorOffset
Definition: HitPattern.h:456
reco::HitPattern::stripHitFilter
static bool stripHitFilter(uint16_t pattern)
Definition: HitPattern.h:597
reco::HitPattern::MaxHits
const static unsigned short MaxHits
Definition: HitPattern.h:158
reco::HitPattern::muonDTHitFilter
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:624
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:734
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:656
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
reco::HitPattern::stripTECLayersNull
int stripTECLayersNull() const
Definition: HitPattern.cc:793
hit
Definition: SiStripHitEffFromCalibTree.cc:88
reco::HitPattern::stripTECLayersWithoutMeasurement
int stripTECLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:669
reco::HitPattern::insertTrackHit
bool insertTrackHit(const uint16_t pattern)
Definition: HitPattern.cc:966
reco::HitPattern::stripTOBLayersNull
int stripTOBLayersNull() const
Definition: HitPattern.cc:783
reco::HitPattern::stripTIDLayersNull
int stripTIDLayersNull() const
Definition: HitPattern.cc:773