CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HitPattern.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 #ifndef TrackReco_HitPattern_h
4 #define TrackReco_HitPattern_h
5 
6 //
7 // File: DataFormats/TrackReco/interface/HitPattern.h
8 //
9 // Marcel Vos, INFN Pisa
10 // v1.10 2007/05/08 bellan
11 // Zongru Wan, Kansas State University
12 // Jean-Roch Vlimant
13 // Kevin Burkett
14 // Boris Mangano
15 //
16 // Hit pattern is the summary information of the hits associated to track in
17 // AOD. When RecHits are no longer available, the compact hit pattern should
18 // allow basic track selection based on the hits in various subdetectors.
19 // The hits of a track are saved in unit16_t hitPattern[MaxHits].
20 //
21 // uint16_t
22 // +--------+---------------+---------------------------+-----------------+----------------+
23 // | tk/mu | sub-structure | sub-sub-structure | stereo | hit type |
24 // +--------+---------------+---------------------------+-----------------+----------------+
25 // | 10 | 9 8 7 | 6 5 4 3 | 2 | 1 0 | bit
26 // +--------+---------------+---------------------------+-----------------+----------------|
27 // | tk = 1 | PXB = 1 | layer = 1-3 | | hit type = 0-3 |
28 // | tk = 1 | PXF = 2 | disk = 1-2 | | hit type = 0-3 |
29 // | tk = 1 | TIB = 3 | layer = 1-4 | 0=rphi,1=stereo | hit type = 0-3 |
30 // | tk = 1 | TID = 4 | wheel = 1-3 | 0=rphi,1=stereo | hit type = 0-3 |
31 // | tk = 1 | TOB = 5 | layer = 1-6 | 0=rphi,1=stereo | hit type = 0-3 |
32 // | tk = 1 | TEC = 6 | wheel = 1-9 | 0=rphi,1=stereo | hit type = 0-3 |
33 // | mu = 0 | DT = 1 | 4*(stat-1)+superlayer | | hit type = 0-3 |
34 // | mu = 0 | CSC = 2 | 4*(stat-1)+(ring-1) | | hit type = 0-3 |
35 // | mu = 0 | RPC = 3 | 4*(stat-1)+2*layer+region | | hit type = 0-3 |
36 // +--------+---------------+---------------------------+-----------------+----------------+
37 //
38 // hit type, see DataFormats/TrackingRecHit/interface/TrackingRecHit.h
39 // VALID = valid hit = 0
40 // MISSING = detector is good, but no rec hit found = 1
41 // INACTIVE = detector is off, so there was no hope = 2
42 // BAD = there were many bad strips within the ellipse = 3
43 //
44 // It had been shown by Zongru using a 100 GeV muon sample with 5000 events
45 // uniform in eta and phi, the average (maximum) number of tracker hits is
46 // 13 (17) and the average (maximum) number of muon detector hits is about
47 // 26 (50). If the number of hits of a track is larger than 80 then the extra
48 // hits are ignored by hit pattern. The static hit pattern array might be
49 // improved to a dynamic one in the future.
50 //
51 // Because of tracking with/without overlaps and with/without hit-splitting,
52 // the final number of hits per track is pretty "variable". Compared with the
53 // number of valid hits, the number of crossed layers with measurement should
54 // be more robust to discriminate between good and fake track.
55 //
56 // Since 4-bit for sub-sub-structure is not enough to specify a muon layer,
57 // the layer case counting methods are implemented for tracker only. This is
58 // different from the hit counting methods which are implemented for both
59 // tracker and muon detector.
60 //
61 // Given a tracker layer, specified by sub-structure and layer, the method
62 // getTrackerLayerCase(substr, layer) groups all of the hits in the hit pattern
63 // array for the layer together and returns one of the four cases
64 //
65 // crossed
66 // layer case 0: VALID + (MISSING, OFF, BAD) ==> with measurement
67 // layer case 1: MISSING + (OFF, BAD) ==> without measurement
68 // layer case 2: OFF, BAD ==> totally off or bad, cannot say much
69 // not crossed
70 // layer case NULL_RETURN: track outside acceptance or in gap ==> null
71 //
72 // Given a tracker layer, specified by sub-structure and layer, the method
73 // getTrackerMonoStereo(substr, layer) groups all of the valid hits in the hit
74 // pattern array for the layer together and returns
75 //
76 // 0: neither a valid mono nor a valid stereo hit
77 // MONO: valid mono hit
78 // STEREO: valid stereo hit
79 // MONO | STEREO: both
80 //
81 //
82 // Given a track, here is an example usage of hit pattern
83 //
84 // // hit pattern of the track
85 // const reco::HitPattern &p = track->hitPattern();
86 //
87 // // loop over the hits of the track.
88 // for (int i = 0; i < p.numberOfHits(HitPattern::TRACK_HITS); i++) {
89 // uint32_t hit = p.getHitPattern(HitPattern::TRACK_HITS, i);
90 //
91 // // if the hit is valid and in pixel barrel, print out the layer
92 // if (p.validHitFilter(hit) && p.pixelBarrelHitFilter(hit)){
93 // cout << "valid hit found in pixel barrel layer "
94 // << p.getLayer(hit)
95 // << endl;
96 // }
97 //
98 // // expert level: printout the hit in 11-bit binary format
99 // cout << "hit in 11-bit binary format = ";
100 // for (int j = 10; j >= 0; j--){
101 // int bit = (hit >> j) & 0x1;
102 // cout << bit;
103 // }
104 // cout << endl;
105 // }
106 //
107 // //count the number of valid pixel barrel *** hits ***
108 // cout << "number of of valid pixel barrel hits is "
109 // << p.numberOfValidPixelBarrelHits()
110 // << endl;
111 //
112 // //count the number of pixel barrel *** layers *** with measurement
113 // cout << "number of of pixel barrel layers with measurement is "
114 // << p.pixelBarrelLayersWithMeasurement()
115 // << endl;
116 //
117 
125 
126 #include <utility>
127 #include <algorithm>
128 #include <iostream>
129 #include <ostream>
130 #include <memory>
131 
132 namespace reco
133 {
134 
136 {
137 
138 public:
139  enum {
140  MONO = 1,
141  STEREO = 2
142  };
143 
144  enum HIT_TYPE {
145  VALID = 0,
146  MISSING = 1,
147  INACTIVE = 2,
148  BAD = 3
149  };
150 
151  enum HitCategory {
155  };
156  const static unsigned short ARRAY_LENGTH = 50;
157  const static unsigned short HIT_LENGTH = 11;
158  const static unsigned short MaxHits = (8 * sizeof(uint16_t) * ARRAY_LENGTH) / HIT_LENGTH;
159 
160  static const uint32_t NULL_RETURN = 999999;
161  static const uint16_t EMPTY_PATTERN = 0x0;
162 
163  static bool trackerHitFilter(uint16_t pattern);
164  static bool muonHitFilter(uint16_t pattern);
165 
166  static bool validHitFilter(uint16_t pattern);
167  static bool missingHitFilter(uint16_t pattern);
168  static bool inactiveHitFilter(uint16_t pattern);
169  static bool badHitFilter(uint16_t pattern);
170 
171  static bool pixelHitFilter(uint16_t pattern);
172  static bool pixelBarrelHitFilter(uint16_t pattern);
173  static bool pixelEndcapHitFilter(uint16_t pattern);
174  static bool stripHitFilter(uint16_t pattern);
175  static bool stripTIBHitFilter(uint16_t pattern);
176  static bool stripTIDHitFilter(uint16_t pattern);
177  static bool stripTOBHitFilter(uint16_t pattern);
178  static bool stripTECHitFilter(uint16_t pattern);
179 
180  static bool muonDTHitFilter(uint16_t pattern);
181  static bool muonCSCHitFilter(uint16_t pattern);
182  static bool muonRPCHitFilter(uint16_t pattern);
183 
184  static uint32_t getHitType(uint16_t pattern);
185 
186  // mono (0) or stereo (1)
187  static uint32_t getSide(uint16_t pattern);
188  static uint32_t getLayer(uint16_t pattern);
189  static uint32_t getSubSubStructure(uint16_t pattern);
190  static uint32_t getSubStructure(uint16_t pattern);
191  static uint32_t getSubDetector(uint16_t pattern);
192 
194  static uint16_t getMuonStation(uint16_t pattern);
195 
197  static uint16_t getDTSuperLayer(uint16_t pattern); // only for DT patterns
198 
200  static uint16_t getCSCRing(uint16_t pattern) ;
201 
203  static uint16_t getRPCLayer(uint16_t pattern) ;
204 
206  static uint16_t getRPCregion(uint16_t pattern);
207 
208  HitPattern();
209 
210  ~HitPattern();
211 
212  HitPattern(const HitPattern &other);
213 
214  HitPattern &operator=(const HitPattern &other);
215 
216  template<typename I>
217  bool appendHits(const I &begin, const I &end);
218  bool appendHit(const TrackingRecHit &hit);
219  bool appendHit(const TrackingRecHitRef &ref);
220  bool appendHit(const DetId &id, TrackingRecHit::Type hitType);
221 
222  // get the pattern of the position-th hit
223  uint16_t getHitPattern(HitCategory category, int position) const;
224 
225  void clear();
226 
227  // print the pattern of the position-th hit
228  void printHitPattern(HitCategory category, int position, std::ostream &stream) const;
229  void print(HitCategory category, std::ostream &stream = std::cout) const;
230 
231  bool hasValidHitInFirstPixelBarrel() const; // has valid hit in PXB layer 1
232  bool hasValidHitInFirstPixelEndcap() const; // has valid hit in PXF layer 1
233 
234  int numberOfHits(HitCategory category) const; // not-null
235  int numberOfValidHits() const; // not-null, valid
236 
237  int numberOfTrackerHits(HitCategory category) const; // not-null, tracker
238  int numberOfValidTrackerHits() const; // not-null, valid, tracker
239  int numberOfValidPixelHits() const; // not-null, valid, pixel
240  int numberOfValidPixelBarrelHits() const; // not-null, valid, pixel PXB
241  int numberOfValidPixelEndcapHits() const; // not-null, valid, pixel PXF
242  int numberOfValidStripHits() const; // not-null, valid, strip
243  int numberOfValidStripTIBHits() const; // not-null, valid, strip TIB
244  int numberOfValidStripTIDHits() const; // not-null, valid, strip TID
245  int numberOfValidStripTOBHits() const; // not-null, valid, strip TOB
246  int numberOfValidStripTECHits() const; // not-null, valid, strip TEC
247 
248  int numberOfLostHits(HitCategory category) const; // not-null, not valid
249  int numberOfLostTrackerHits(HitCategory category) const; // not-null, not valid, tracker
250  int numberOfLostPixelHits(HitCategory category) const; // not-null, not valid, pixel
251  int numberOfLostPixelBarrelHits(HitCategory category) const; // not-null, not valid, pixel PXB
252  int numberOfLostPixelEndcapHits(HitCategory category) const; // not-null, not valid, pixel PXF
253  int numberOfLostStripHits(HitCategory category) const; // not-null, not valid, strip
254  int numberOfLostStripTIBHits(HitCategory category) const; // not-null, not valid, strip TIB
255  int numberOfLostStripTIDHits(HitCategory category) const; // not-null, not valid, strip TID
256  int numberOfLostStripTOBHits(HitCategory category) const; // not-null, not valid, strip TOB
257  int numberOfLostStripTECHits(HitCategory category) const; // not-null, not valid, strip TEC
258 
259  int numberOfMuonHits() const; // not-null, muon
260  int numberOfValidMuonHits() const; // not-null, valid, muon
261  int numberOfValidMuonDTHits() const; // not-null, valid, muon DT
262  int numberOfValidMuonCSCHits() const; // not-null, valid, muon CSC
263  int numberOfValidMuonRPCHits() const; // not-null, valid, muon RPC
264  int numberOfLostMuonHits() const; // not-null, not valid, muon
265  int numberOfLostMuonDTHits() const; // not-null, not valid, muon DT
266  int numberOfLostMuonCSCHits() const; // not-null, not valid, muon CSC
267  int numberOfLostMuonRPCHits() const; // not-null, not valid, muon RPC
268  int numberOfBadHits() const; // not-null, bad (only used in Muon Ch.)
269  int numberOfBadMuonHits() const; // not-null, bad, muon
270  int numberOfBadMuonDTHits() const; // not-null, bad, muon DT
271  int numberOfBadMuonCSCHits() const; // not-null, bad, muon CSC
272  int numberOfBadMuonRPCHits() const; // not-null, bad, muon RPC
273 
274  int numberOfInactiveHits() const; // not-null, inactive
275  int numberOfInactiveTrackerHits() const; // not-null, inactive, tracker
276 
277  // count strip layers that have non-null, valid mono and stereo hits
278  int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const;
280  int numberOfValidTOBLayersWithMonoAndStereo(uint32_t layer = 0) const;
281  int numberOfValidTIBLayersWithMonoAndStereo(uint32_t layer = 0) const;
282  int numberOfValidTIDLayersWithMonoAndStereo(uint32_t layer = 0) const;
283  int numberOfValidTECLayersWithMonoAndStereo(uint32_t layer = 0) const;
284 
285  uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const;
286  uint16_t getTrackerMonoStereo(HitCategory category, uint16_t substr, uint16_t layer) const;
287 
288  int trackerLayersWithMeasurement() const; // case 0: tracker
289  int pixelLayersWithMeasurement() const; // case 0: pixel
290  int stripLayersWithMeasurement() const; // case 0: strip
291  int pixelBarrelLayersWithMeasurement() const; // case 0: pixel PXB
292  int pixelEndcapLayersWithMeasurement() const; // case 0: pixel PXF
293  int stripTIBLayersWithMeasurement() const; // case 0: strip TIB
294  int stripTIDLayersWithMeasurement() const; // case 0: strip TID
295  int stripTOBLayersWithMeasurement() const; // case 0: strip TOB
296  int stripTECLayersWithMeasurement() const; // case 0: strip TEC
297 
298  int trackerLayersWithoutMeasurement(HitCategory category) const; // case 1: tracker
299  int pixelLayersWithoutMeasurement(HitCategory category) const; // case 1: pixel
300  int stripLayersWithoutMeasurement(HitCategory category) const; // case 1: strip
301  int pixelBarrelLayersWithoutMeasurement(HitCategory category) const; // case 1: pixel PXB
302  int pixelEndcapLayersWithoutMeasurement(HitCategory category) const; // case 1: pixel PXF
303  int stripTIBLayersWithoutMeasurement(HitCategory category) const; // case 1: strip TIB
304  int stripTIDLayersWithoutMeasurement(HitCategory category) const; // case 1: strip TID
305  int stripTOBLayersWithoutMeasurement(HitCategory category) const; // case 1: strip TOB
306  int stripTECLayersWithoutMeasurement(HitCategory category) const; // case 1: strip TEC
307 
308  int trackerLayersTotallyOffOrBad() const; // case 2: tracker
309  int pixelLayersTotallyOffOrBad() const; // case 2: pixel
310  int stripLayersTotallyOffOrBad() const; // case 2: strip
311  int pixelBarrelLayersTotallyOffOrBad() const; // case 2: pixel PXB
312  int pixelEndcapLayersTotallyOffOrBad() const; // case 2: pixel PXF
313  int stripTIBLayersTotallyOffOrBad() const; // case 2: strip TIB
314  int stripTIDLayersTotallyOffOrBad() const; // case 2: strip TID
315  int stripTOBLayersTotallyOffOrBad() const; // case 2: strip TOB
316  int stripTECLayersTotallyOffOrBad() const; // case 2: strip TEC
317 
318  int trackerLayersNull() const; // case NULL_RETURN: tracker
319  int pixelLayersNull() const; // case NULL_RETURN: pixel
320  int stripLayersNull() const; // case NULL_RETURN: strip
321  int pixelBarrelLayersNull() const; // case NULL_RETURN: pixel PXB
322  int pixelEndcapLayersNull() const; // case NULL_RETURN: pixel PXF
323  int stripTIBLayersNull() const; // case NULL_RETURN: strip TIB
324  int stripTIDLayersNull() const; // case NULL_RETURN: strip TID
325  int stripTOBLayersNull() const; // case NULL_RETURN: strip TOB
326  int stripTECLayersNull() const; // case NULL_RETURN: strip TEC
327 
329  int muonStations(int subdet, int hitType) const ;
330 
331  int muonStationsWithValidHits() const;
332  int muonStationsWithBadHits() const;
333  int muonStationsWithAnyHits() const;
334 
335  int dtStationsWithValidHits() const;
336  int dtStationsWithBadHits() const;
337  int dtStationsWithAnyHits() const;
338 
339  int cscStationsWithValidHits() const;
340  int cscStationsWithBadHits() const;
341  int cscStationsWithAnyHits() const;
342 
343  int rpcStationsWithValidHits() const;
344  int rpcStationsWithBadHits() const;
345  int rpcStationsWithAnyHits() const;
346 
348  int innermostMuonStationWithHits(int hitType) const;
352 
354  int outermostMuonStationWithHits(int hitType) const;
358 
359  int numberOfDTStationsWithRPhiView() const;
360  int numberOfDTStationsWithRZView() const;
362 
363 private:
364 
365  // 3 bits for hit type
366  const static unsigned short HitTypeOffset = 0;
367  const static unsigned short HitTypeMask = 0x3;
368 
369  // 1 bit to identify the side in double-sided detectors
370  const static unsigned short SideOffset = 2;
371  const static unsigned short SideMask = 0x1;
372 
373  // 4 bits to identify the layer/disk/wheel within the substructure
374  const static unsigned short LayerOffset = 3;
375  const static unsigned short LayerMask = 0xF;
376 
377  // 3 bits to identify the tracker/muon detector substructure
378  const static unsigned short SubstrOffset = 7;
379  const static unsigned short SubstrMask = 0x7;
380 
381  // 1 bit to distinguish tracker and muon subsystems
382  const static unsigned short SubDetectorOffset = 10;
383  const static unsigned short SubDetectorMask = 0x1;
384 
385  // detector side for tracker modules (mono/stereo)
386  static uint16_t isStereo(DetId i);
387  static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure);
388 
389  static uint16_t encode(const TrackingRecHit &hit);
390  static uint16_t encode(const DetId &id, TrackingRecHit::Type hitType);
391 
392  // generic count methods
393  typedef bool filterType(uint16_t);
394 
395  template<typename F>
396  void call(HitCategory category, filterType typeFilter, F f) const;
397 
400 
401  bool insertTrackHit(const uint16_t pattern);
402  bool insertExpectedInnerHit(const uint16_t pattern);
403  bool insertExpectedOuterHit(const uint16_t pattern);
404  void insertHit(const uint16_t pattern);
405 
406  uint16_t getHitPatternByAbsoluteIndex(int position) const;
407 
408  std::pair<uint8_t, uint8_t> getCategoryIndexRange(HitCategory category) const;
409 
411  uint8_t hitCount;
412 
413  uint8_t beginTrackHits;
414  uint8_t endTrackHits;
415  uint8_t beginInner;
416  uint8_t endInner;
417  uint8_t beginOuter;
418  uint8_t endOuter;
419 };
420 
421 inline std::pair<uint8_t, uint8_t> HitPattern::getCategoryIndexRange(HitCategory category) const
422 {
423  switch (category) {
424  case TRACK_HITS:
425  return std::pair<uint8_t, uint8_t>(beginTrackHits, endTrackHits);
426  break;
427  case MISSING_INNER_HITS:
428  return std::pair<uint8_t, uint8_t>(beginInner, endInner);
429  break;
430  case MISSING_OUTER_HITS:
431  return std::pair<uint8_t, uint8_t>(beginOuter, endOuter);
432  break;
433  }
434  return std::pair<uint8_t, uint8_t>(-1, -1);
435 }
436 
437 template<typename I>
438 bool HitPattern::appendHits(const I &begin, const I &end)
439 {
440  for (I hit = begin; hit != end; hit++) {
441  if unlikely((!appendHit(*hit))) {
442  return false;
443  }
444  }
445  return true;
446 }
447 
449 {
450  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
451  if unlikely((position < 0 || (position + range.first) >= range.second)) {
453  }
454 
455  return getHitPatternByAbsoluteIndex(range.first + position);
456 }
457 
458 inline int HitPattern::countHits(HitCategory category, filterType filter) const
459 {
460  int count = 0;
461  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
462  for (int i = range.first; i < range.second; ++i) {
464  ++count;
465  }
466  }
467  return count;
468 }
469 
470 
471 template<typename F>
472 void HitPattern::call(HitCategory category, filterType typeFilter, F f) const
473 {
474  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
475  for (int i = range.first; i < range.second; i++) {
477  // f() return false to ask to stop looping
478  if (typeFilter(pattern) && !f(pattern)) {
479  break;
480  }
481  }
482 }
483 
484 inline int HitPattern::countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
485 {
486  int count = 0;
487  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
488  for (int i = range.first; i < range.second; ++i) {
490  if (typeFilter(pattern) && filter(pattern)) {
491  ++count;
492  }
493  }
494  return count;
495 }
496 
497 inline bool HitPattern::pixelHitFilter(uint16_t pattern)
498 {
499  if unlikely(!trackerHitFilter(pattern)) {
500  return false;
501  }
502 
503  uint32_t substructure = getSubStructure(pattern);
504  return (substructure == PixelSubdetector::PixelBarrel ||
505  substructure == PixelSubdetector::PixelEndcap);
506 }
507 
509 {
510  if unlikely(!trackerHitFilter(pattern)) {
511  return false;
512  }
513 
514  uint32_t substructure = getSubStructure(pattern);
515  return (substructure == PixelSubdetector::PixelBarrel);
516 }
517 
519 {
520  if unlikely(!trackerHitFilter(pattern)) {
521  return false;
522  }
523 
524  uint32_t substructure = getSubStructure(pattern);
525  return (substructure == PixelSubdetector::PixelEndcap);
526 }
527 
528 inline bool HitPattern::stripHitFilter(uint16_t pattern)
529 {
530  if unlikely(!trackerHitFilter(pattern)) {
531  return false;
532  }
533 
534  uint32_t substructure = getSubStructure(pattern);
535  return (substructure == StripSubdetector::TIB ||
536  substructure == StripSubdetector::TID ||
537  substructure == StripSubdetector::TOB ||
538  substructure == StripSubdetector::TEC);
539 }
540 
542 {
543  if unlikely(!trackerHitFilter(pattern)) {
544  return false;
545  }
546 
547  return substructure == getSubStructure(pattern);
548 }
549 
551 {
553 }
554 
556 {
558 }
559 
561 {
563 }
564 
566 {
568 }
569 
571 {
572  if unlikely(!muonHitFilter(pattern)) {
573  return false;
574  }
575 
576  uint32_t substructure = getSubStructure(pattern);
577  return (substructure == (uint32_t) MuonSubdetId::DT);
578 }
579 
581 {
582  if unlikely(!muonHitFilter(pattern)) {
583  return false;
584  }
585 
586  uint32_t substructure = getSubStructure(pattern);
587  return (substructure == (uint32_t) MuonSubdetId::CSC);
588 }
589 
591 {
592  if unlikely(!muonHitFilter(pattern)) {
593  return false;
594  }
595 
596  uint32_t substructure = getSubStructure(pattern);
597  return (substructure == (uint32_t) MuonSubdetId::RPC);
598 }
599 
601 {
602  if unlikely(pattern == HitPattern::EMPTY_PATTERN) {
603  return false;
604  }
605 
606  return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 1);
607 }
608 
609 inline bool HitPattern::muonHitFilter(uint16_t pattern)
610 {
611  if unlikely(pattern == HitPattern::EMPTY_PATTERN) {
612  return false;
613  }
614 
615  return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 0);
616 }
617 
618 inline uint32_t HitPattern::getSubStructure(uint16_t pattern)
619 {
620  if unlikely(pattern == HitPattern::EMPTY_PATTERN) {
621  return NULL_RETURN;
622  }
623 
624  return ((pattern >> SubstrOffset) & SubstrMask);
625 }
626 
627 inline uint32_t HitPattern::getLayer(uint16_t pattern)
628 {
629  return HitPattern::getSubSubStructure(pattern);
630 }
631 
632 inline uint32_t HitPattern::getSubSubStructure(uint16_t pattern)
633 {
634  if unlikely(pattern == HitPattern::EMPTY_PATTERN) {
635  return NULL_RETURN;
636  }
637 
638  return ((pattern >> LayerOffset) & LayerMask);
639 }
640 
641 inline uint32_t HitPattern::getSubDetector(uint16_t pattern)
642 {
643  if unlikely(pattern == HitPattern::EMPTY_PATTERN) {
644  return NULL_RETURN;
645  }
646 
647  return ((pattern >> SubDetectorOffset) & SubDetectorMask);
648 }
649 
650 
651 inline uint32_t HitPattern::getSide(uint16_t pattern)
652 {
653  if unlikely(pattern == HitPattern::EMPTY_PATTERN) {
654  return NULL_RETURN;
655  }
656 
657  return (pattern >> SideOffset) & SideMask;
658 }
659 
660 inline uint32_t HitPattern::getHitType(uint16_t pattern)
661 {
662  if unlikely(pattern == HitPattern::EMPTY_PATTERN) {
663  return NULL_RETURN;
664  }
665 
666  return ((pattern >> HitTypeOffset) & HitTypeMask);
667 }
668 
669 inline uint16_t HitPattern::getMuonStation(uint16_t pattern)
670 {
671  return (getSubSubStructure(pattern) >> 2) + 1;
672 }
673 
674 inline uint16_t HitPattern::getDTSuperLayer(uint16_t pattern)
675 {
676  return (getSubSubStructure(pattern) & 3);
677 }
678 
679 inline uint16_t HitPattern::getCSCRing(uint16_t pattern)
680 {
681  return (getSubSubStructure(pattern) & 3) + 1;
682 }
683 
684 inline uint16_t HitPattern::getRPCLayer(uint16_t pattern)
685 {
686  uint16_t subSubStructure = getSubSubStructure(pattern);
687  uint16_t stat = subSubStructure >> 2;
688 
689  if likely(stat <= 1) {
690  return ((subSubStructure >> 1) & 1) + 1;
691  }
692 
693  return 0;
694 }
695 
696 inline uint16_t HitPattern::getRPCregion(uint16_t pattern)
697 {
698  return getSubSubStructure(pattern) & 1;
699 }
700 
701 inline bool HitPattern::validHitFilter(uint16_t pattern)
702 {
703  return getHitType(pattern) == HitPattern::VALID;
704 }
705 
707 {
708  return getHitType(pattern) == HitPattern::MISSING;
709 }
710 
712 {
713  return getHitType(pattern) == HitPattern::INACTIVE;
714 }
715 
716 inline bool HitPattern::badHitFilter(uint16_t pattern)
717 {
718  return getHitType(pattern) == HitPattern::BAD;
719 }
720 
722 {
723  std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
724  return range.second - range.first;
725 }
726 
728 {
729  return countHits(category, trackerHitFilter);
730 }
731 
733 {
735 }
736 
738 {
740 }
741 
743 {
745 }
746 
748 {
750 }
751 
753 {
755 }
756 
758 {
760 }
761 
763 {
765 }
766 
768 {
770 }
771 
773 {
775 }
776 
778 {
780 }
781 
783 {
785 }
786 
788 {
790 }
791 
793 {
795 }
796 
798 {
800 }
801 
803 {
805 }
806 
808 {
809  return countHits(category, missingHitFilter);
810 }
811 
813 {
815 }
816 
818 {
820 }
821 
823 {
825 }
826 
828 {
830 }
831 
833 {
835 }
836 
838 {
840 }
841 
843 {
845 }
846 
848 {
850 }
851 
853 {
855 }
856 
858 {
860 }
861 
863 {
865 }
866 
868 {
870 }
871 
873 {
875 }
876 
877 inline int HitPattern::numberOfBadHits() const
878 {
880 }
881 
883 {
885 }
886 
888 {
890 }
891 
893 {
895 }
896 
898 {
900 }
901 
903 {
905 }
906 
908 {
910 }
911 
913 {
915 }
916 
918 {
920 }
921 
923 {
926 }
927 
929 {
930  return pixelLayersWithoutMeasurement(category) +
932 }
933 
935 {
936  return pixelBarrelLayersWithoutMeasurement(category) +
938 }
939 
941 {
942  return stripTIBLayersWithoutMeasurement(category) +
946 }
947 
949 {
950  return pixelLayersTotallyOffOrBad() +
952 }
953 
955 {
958 }
959 
961 {
966 }
967 
969 {
970  return pixelLayersNull() +
971  stripLayersNull();
972 }
973 
974 inline int HitPattern::pixelLayersNull() const
975 {
976  return pixelBarrelLayersNull() +
978 }
979 
980 inline int HitPattern::stripLayersNull() const
981 {
982  return stripTIBLayersNull() +
986 }
987 
989 {
990  return muonStations(0, 0);
991 }
992 
994 {
995  return muonStations(0, 3);
996 }
997 
999 {
1000  return muonStations(0, -1);
1001 }
1002 
1004 {
1005  return muonStations(1, 0);
1006 }
1007 
1009 {
1010  return muonStations(1, 3);
1011 }
1012 
1014 {
1015  return muonStations(1, -1);
1016 }
1017 
1019 {
1020  return muonStations(2, 0);
1021 }
1022 
1024 {
1025  return muonStations(2, 3);
1026 }
1027 
1029 {
1030  return muonStations(2, -1);
1031 }
1032 
1034 {
1035  return muonStations(3, 0);
1036 }
1037 
1039 {
1040  return muonStations(3, 3);
1041 }
1042 
1044 {
1045  return muonStations(3, -1);
1046 }
1047 
1049 {
1050  return innermostMuonStationWithHits(0);
1051 }
1052 
1054 {
1055  return innermostMuonStationWithHits(3);
1056 }
1057 
1059 {
1060  return innermostMuonStationWithHits(-1);
1061 }
1062 
1064 {
1065  return outermostMuonStationWithHits(0);
1066 }
1067 
1069 {
1070  return outermostMuonStationWithHits(3);
1071 }
1072 
1074 {
1075  return outermostMuonStationWithHits(-1);
1076 }
1077 
1078 #ifndef CMS_NOCXX11 // cint....
1079 
1080 template<int N = HitPattern::MaxHits>
1081 struct PatternSet {
1082  static constexpr int MaxHits = N;
1083  unsigned char hit[N];
1084  unsigned char nhit;
1085 
1086  unsigned char const *begin() const
1087  {
1088  return hit;
1089  }
1090 
1091  unsigned char const *end() const
1092  {
1093  return hit + nhit;
1094  }
1095 
1096  unsigned char *begin()
1097  {
1098  return hit;
1099  }
1100 
1101  unsigned char *end()
1102  {
1103  return hit + nhit;
1104  }
1105 
1106  int size() const
1107  {
1108  return nhit;
1109  }
1110 
1111  unsigned char operator[](int i) const
1112  {
1113  return hit[i];
1114  }
1115 
1116  PatternSet() : nhit(0) {}
1117 
1119  {
1120  fill(category, hp);
1121  }
1122 
1124  {
1125  int lhit = 0;
1126  auto unpack = [&lhit, this](uint16_t pattern) -> bool {
1127  unsigned char p = 255 & (pattern >> 3);
1128  hit[lhit++] = p;
1129 
1130  // bouble sort
1131  if (lhit > 1) {
1132  for (auto h = hit + lhit - 1; h != hit; --h) {
1133  if ((*(h - 1)) <= p) {
1134  break;
1135  }
1136  (*h) = *(h - 1);
1137  *(h - 1) = p;
1138  }
1139  }
1140  return lhit < MaxHits;
1141  };
1142 
1143  hp.call(category, HitPattern::validHitFilter, unpack);
1144  nhit = lhit;
1145  }
1146 };
1147 
1148 template<int N>
1150 {
1151  PatternSet<N> comm;
1152  comm.nhit = std::set_intersection(p1.begin(), p1.end(), p2.begin(), p2.end(), comm.begin()) - comm.begin();
1153  return comm;
1154 }
1155 #endif // gcc11
1156 
1157 } // namespace reco
1158 
1159 #endif
1160 
unsigned char const * begin() const
Definition: HitPattern.h:1086
int stripTOBLayersWithMeasurement() const
Definition: HitPattern.cc:486
static uint16_t getCSCRing(uint16_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
Definition: HitPattern.h:679
unsigned char const * end() const
Definition: HitPattern.h:1091
static bool stripTECHitFilter(uint16_t pattern)
Definition: HitPattern.h:565
int pixelBarrelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:508
int i
Definition: DBlmapReader.cc:9
int cscStationsWithAnyHits() const
Definition: HitPattern.h:1028
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:627
void insertHit(const uint16_t pattern)
Definition: HitPattern.cc:884
int numberOfLostStripTIBHits(HitCategory category) const
Definition: HitPattern.h:842
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:825
static const unsigned short HIT_LENGTH
Definition: HitPattern.h:157
int outermostMuonStationWithValidHits() const
Definition: HitPattern.h:1063
static const unsigned short ARRAY_LENGTH
Definition: HitPattern.h:156
static const uint32_t NULL_RETURN
Definition: HitPattern.h:160
int pixelBarrelLayersNull() const
Definition: HitPattern.cc:646
int numberOfLostStripTOBHits(HitCategory category) const
Definition: HitPattern.h:852
static bool pixelHitFilter(uint16_t pattern)
Definition: HitPattern.h:497
int stripTIBLayersNull() const
Definition: HitPattern.cc:670
PatternSet< N > commonHits(PatternSet< N > const &p1, PatternSet< N > const &p2)
Definition: HitPattern.h:1149
int numberOfInactiveHits() const
Definition: HitPattern.h:902
int stripTIBLayersWithMeasurement() const
Definition: HitPattern.cc:464
static bool badHitFilter(uint16_t pattern)
Definition: HitPattern.h:716
int stripTECLayersNull() const
Definition: HitPattern.cc:703
static const unsigned short SideOffset
Definition: HitPattern.h:370
static const uint16_t EMPTY_PATTERN
Definition: HitPattern.h:161
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:793
static uint16_t getDTSuperLayer(uint16_t pattern)
DT superlayer (1-3). Where the &quot;hit&quot; was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:674
static const unsigned short SubstrOffset
Definition: HitPattern.h:378
int stripTOBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:554
int numberOfValidHits() const
Definition: HitPattern.h:737
int numberOfLostPixelHits(HitCategory category) const
Definition: HitPattern.h:822
int numberOfDTStationsWithRPhiView() const
Definition: HitPattern.cc:841
int numberOfBadHits() const
Definition: HitPattern.h:877
int cscStationsWithValidHits() const
Definition: HitPattern.h:1018
int pixelLayersNull() const
Definition: HitPattern.h:974
void call(HitCategory category, filterType typeFilter, F f) const
Definition: HitPattern.h:472
HitPattern & operator=(const HitPattern &other)
Definition: HitPattern.cc:44
unsigned char nhit
Definition: HitPattern.h:1084
int pixelLayersWithMeasurement() const
Definition: HitPattern.h:917
uint16_t getTrackerMonoStereo(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:402
static const unsigned short MaxHits
Definition: HitPattern.h:158
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
Definition: HitPattern.cc:370
int numberOfValidStripHits() const
Definition: HitPattern.h:767
int trackerLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:928
int rpcStationsWithValidHits() const
Definition: HitPattern.h:1033
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
Definition: HitPattern.h:484
int numberOfValidStripLayersWithMonoAndStereo() const
Definition: HitPattern.cc:345
bool filterType(uint16_t)
Definition: HitPattern.h:393
int pixelEndcapLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:520
int numberOfLostMuonHits() const
Definition: HitPattern.h:817
static bool missingHitFilter(uint16_t pattern)
Definition: HitPattern.h:706
Float p2
Definition: deltaR.h:21
static const unsigned short HitTypeMask
Definition: HitPattern.h:367
static bool pixelBarrelHitFilter(uint16_t pattern)
Definition: HitPattern.h:508
int pixelEndcapLayersWithMeasurement() const
Definition: HitPattern.cc:452
static uint16_t encode(const TrackingRecHit &hit)
Definition: HitPattern.cc:84
int numberOfValidStripTOBHits() const
Definition: HitPattern.h:782
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
int numberOfValidMuonCSCHits() const
Definition: HitPattern.h:797
int numberOfMuonHits() const
Definition: HitPattern.h:732
bool insertExpectedOuterHit(const uint16_t pattern)
Definition: HitPattern.cc:928
static bool pixelEndcapHitFilter(uint16_t pattern)
Definition: HitPattern.h:518
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:812
int numberOfLostStripHits(HitCategory category) const
Definition: HitPattern.h:837
int numberOfValidMuonRPCHits() const
Definition: HitPattern.h:802
bool hasValidHitInFirstPixelEndcap() const
Definition: HitPattern.cc:286
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:701
int muonStationsWithBadHits() const
Definition: HitPattern.h:993
#define unlikely(x)
Definition: Likely.h:21
uint8_t endInner
Definition: HitPattern.h:416
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
Definition: HitPattern.cc:714
int stripLayersNull() const
Definition: HitPattern.h:980
unsigned char * begin()
Definition: HitPattern.h:1096
int numberOfLostStripTIDHits(HitCategory category) const
Definition: HitPattern.h:847
int muonStationsWithValidHits() const
Definition: HitPattern.h:988
static const int CSC
Definition: MuonSubdetId.h:13
static constexpr int MaxHits
Definition: HitPattern.h:1082
int pixelLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:934
int stripTOBLayersTotallyOffOrBad() const
Definition: HitPattern.cc:623
int rpcStationsWithBadHits() const
Definition: HitPattern.h:1038
int innermostMuonStationWithAnyHits() const
Definition: HitPattern.h:1058
int trackerLayersTotallyOffOrBad() const
Definition: HitPattern.h:948
uint16_t hitPattern[ARRAY_LENGTH]
Definition: HitPattern.h:410
int numberOfValidPixelBarrelHits() const
Definition: HitPattern.h:757
int stripTIDLayersTotallyOffOrBad() const
Definition: HitPattern.cc:612
static bool muonCSCHitFilter(uint16_t pattern)
Definition: HitPattern.h:580
static uint32_t getHitType(uint16_t pattern)
Definition: HitPattern.h:660
int numberOfValidTECLayersWithMonoAndStereo(uint32_t layer=0) const
Definition: HitPattern.cc:365
int stripTIDLayersWithMeasurement() const
Definition: HitPattern.cc:475
int trackerLayersWithMeasurement() const
Definition: HitPattern.h:912
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
Float p1
Definition: deltaR.h:20
static const unsigned short SubDetectorMask
Definition: HitPattern.h:383
int numberOfTrackerHits(HitCategory category) const
Definition: HitPattern.h:727
int muonStationsWithAnyHits() const
Definition: HitPattern.h:998
static bool stripHitFilter(uint16_t pattern)
Definition: HitPattern.h:528
int pixelLayersTotallyOffOrBad() const
Definition: HitPattern.h:954
int stripTECLayersTotallyOffOrBad() const
Definition: HitPattern.cc:635
int stripLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.h:940
int numberOfBadMuonHits() const
Definition: HitPattern.h:882
int numberOfValidStripTIDHits() const
Definition: HitPattern.h:777
int size() const
Definition: HitPattern.h:1106
const std::complex< double > I
Definition: I.h:8
int numberOfDTStationsWithRZView() const
Definition: HitPattern.cc:855
double f[11][100]
bool appendHits(const I &begin, const I &end)
Definition: HitPattern.h:438
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
int numberOfValidStripTECHits() const
Definition: HitPattern.h:787
uint8_t beginInner
Definition: HitPattern.h:415
#define end
Definition: vmac.h:37
int stripTIDLayersNull() const
Definition: HitPattern.cc:681
int numberOfLostMuonRPCHits() const
Definition: HitPattern.h:872
static const unsigned short HitTypeOffset
Definition: HitPattern.h:366
int numberOfBadMuonRPCHits() const
Definition: HitPattern.h:897
int numberOfValidTIDLayersWithMonoAndStereo(uint32_t layer=0) const
Definition: HitPattern.cc:360
int dtStationsWithValidHits() const
Definition: HitPattern.h:1003
int stripLayersTotallyOffOrBad() const
Definition: HitPattern.h:960
int cscStationsWithBadHits() const
Definition: HitPattern.h:1023
uint8_t beginTrackHits
Definition: HitPattern.h:413
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:618
unsigned char * end()
Definition: HitPattern.h:1101
int numberOfDTStationsWithBothViews() const
Definition: HitPattern.cc:868
static bool inactiveHitFilter(uint16_t pattern)
Definition: HitPattern.h:711
int numberOfValidTIBLayersWithMonoAndStereo(uint32_t layer=0) const
Definition: HitPattern.cc:355
static uint16_t getRPCregion(uint16_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
Definition: HitPattern.h:696
static uint32_t getSubDetector(uint16_t pattern)
Definition: HitPattern.h:641
int dtStationsWithAnyHits() const
Definition: HitPattern.h:1013
int stripTIDLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:543
Definition: DetId.h:18
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:808
int numberOfInactiveTrackerHits() const
Definition: HitPattern.h:907
static bool muonHitFilter(uint16_t pattern)
Definition: HitPattern.h:609
static bool trackerHitFilter(uint16_t pattern)
Definition: HitPattern.h:600
uint8_t endTrackHits
Definition: HitPattern.h:414
int numberOfLostPixelEndcapHits(HitCategory category) const
Definition: HitPattern.h:832
static const unsigned short SideMask
Definition: HitPattern.h:371
#define N
Definition: blowfish.cc:9
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
Definition: HitPattern.h:421
uint8_t hitCount
Definition: HitPattern.h:411
int innermostMuonStationWithBadHits() const
Definition: HitPattern.h:1053
uint8_t beginOuter
Definition: HitPattern.h:417
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:382
int trackerLayersNull() const
Definition: HitPattern.h:968
int stripLayersWithMeasurement() const
Definition: HitPattern.h:922
int pixelBarrelLayersWithMeasurement() const
Definition: HitPattern.cc:440
int numberOfBadMuonDTHits() const
Definition: HitPattern.h:887
int outermostMuonStationWithBadHits() const
Definition: HitPattern.h:1068
int dtStationsWithBadHits() const
Definition: HitPattern.h:1008
int numberOfValidStripTIBHits() const
Definition: HitPattern.h:772
static bool stripTOBHitFilter(uint16_t pattern)
Definition: HitPattern.h:560
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:807
int numberOfValidTrackerHits() const
Definition: HitPattern.h:742
int numberOfValidPixelEndcapHits() const
Definition: HitPattern.h:762
uint16_t getHitPatternByAbsoluteIndex(int position) const
Definition: HitPattern.cc:232
static uint32_t getSide(uint16_t pattern)
Definition: HitPattern.h:651
int numberOfLostPixelBarrelHits(HitCategory category) const
Definition: HitPattern.h:827
int stripTOBLayersNull() const
Definition: HitPattern.cc:692
static bool muonDTHitFilter(uint16_t pattern)
Definition: HitPattern.h:570
bool insertExpectedInnerHit(const uint16_t pattern)
Definition: HitPattern.cc:915
int numberOfLostStripTECHits(HitCategory category) const
Definition: HitPattern.h:857
static bool stripTIBHitFilter(uint16_t pattern)
Definition: HitPattern.h:550
int pixelBarrelLayersTotallyOffOrBad() const
Definition: HitPattern.cc:577
#define likely(x)
Definition: Likely.h:20
int numberOfLostMuonDTHits() const
Definition: HitPattern.h:862
#define begin
Definition: vmac.h:30
static const unsigned short SubstrMask
Definition: HitPattern.h:379
int numberOfBadMuonCSCHits() const
Definition: HitPattern.h:892
unsigned char hit[N]
Definition: HitPattern.h:1083
static const int RPC
Definition: MuonSubdetId.h:14
static uint16_t isStereo(DetId i)
Definition: HitPattern.cc:762
static const unsigned short LayerOffset
Definition: HitPattern.h:374
void fill(HitPattern::HitCategory category, HitPattern const &hp)
Definition: HitPattern.h:1123
int numberOfValidMuonDTHits() const
Definition: HitPattern.h:792
bool insertTrackHit(const uint16_t pattern)
Definition: HitPattern.cc:896
int stripTECLayersWithMeasurement() const
Definition: HitPattern.cc:497
int stripTECLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:565
int pixelEndcapLayersTotallyOffOrBad() const
Definition: HitPattern.cc:589
int numberOfValidPixelHits() const
Definition: HitPattern.h:752
bool appendHit(const TrackingRecHit &hit)
Definition: HitPattern.cc:166
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:684
tuple cout
Definition: gather_cfg.py:121
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:669
static const int DT
Definition: MuonSubdetId.h:12
void print(HitCategory category, std::ostream &stream=std::cout) const
Definition: HitPattern.cc:745
int numberOfValidTOBLayersWithMonoAndStereo(uint32_t layer=0) const
Definition: HitPattern.cc:350
bool hasValidHitInFirstPixelBarrel() const
Definition: HitPattern.cc:274
int countHits(HitCategory category, filterType filter) const
Definition: HitPattern.h:458
int numberOfValidMuonHits() const
Definition: HitPattern.h:747
static uint32_t getSubSubStructure(uint16_t pattern)
Definition: HitPattern.h:632
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:448
int stripTIBLayersTotallyOffOrBad() const
Definition: HitPattern.cc:601
static const unsigned short LayerMask
Definition: HitPattern.h:375
static bool stripTIDHitFilter(uint16_t pattern)
Definition: HitPattern.h:555
static bool muonRPCHitFilter(uint16_t pattern)
Definition: HitPattern.h:590
int rpcStationsWithAnyHits() const
Definition: HitPattern.h:1043
PatternSet(HitPattern::HitCategory category, HitPattern const &hp)
Definition: HitPattern.h:1118
uint8_t endOuter
Definition: HitPattern.h:418
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
Definition: HitPattern.h:541
unsigned char operator[](int i) const
Definition: HitPattern.h:1111
#define constexpr
int innermostMuonStationWithValidHits() const
Definition: HitPattern.h:1048
int numberOfHits(HitCategory category) const
Definition: HitPattern.h:721
int numberOfLostMuonCSCHits() const
Definition: HitPattern.h:867
int outermostMuonStationWithAnyHits() const
Definition: HitPattern.h:1073
int stripTIBLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:532
int pixelEndcapLayersNull() const
Definition: HitPattern.cc:658