3 #ifndef TrackReco_HitPattern_h 4 #define TrackReco_HitPattern_h 141 namespace TestHitPattern {
173 MISSING_INNER_HITS = 1,
174 MISSING_OUTER_HITS = 2
176 const static unsigned short ARRAY_LENGTH = 57;
177 const static unsigned short HIT_LENGTH = 12;
178 const static unsigned short MaxHits = (8 *
sizeof(uint16_t) * ARRAY_LENGTH) / HIT_LENGTH;
180 static const uint32_t NULL_RETURN = 999999;
181 static const uint16_t EMPTY_PATTERN = 0x0;
183 static bool trackerHitFilter(uint16_t
pattern);
184 static bool muonHitFilter(uint16_t
pattern);
185 static bool timingHitFilter(uint16_t
pattern);
187 static bool validHitFilter(uint16_t
pattern);
188 static bool missingHitFilter(uint16_t
pattern);
189 static bool inactiveHitFilter(uint16_t
pattern);
190 static bool badHitFilter(uint16_t
pattern);
192 static bool pixelHitFilter(uint16_t
pattern);
193 static bool pixelBarrelHitFilter(uint16_t
pattern);
194 static bool pixelEndcapHitFilter(uint16_t
pattern);
195 static bool stripHitFilter(uint16_t
pattern);
196 static bool stripTIBHitFilter(uint16_t
pattern);
197 static bool stripTIDHitFilter(uint16_t
pattern);
198 static bool stripTOBHitFilter(uint16_t
pattern);
199 static bool stripTECHitFilter(uint16_t
pattern);
201 static bool muonDTHitFilter(uint16_t
pattern);
202 static bool muonCSCHitFilter(uint16_t
pattern);
203 static bool muonRPCHitFilter(uint16_t
pattern);
204 static bool muonGEMHitFilter(uint16_t
pattern);
205 static bool muonME0HitFilter(uint16_t
pattern);
207 static bool timingBTLHitFilter(uint16_t
pattern);
208 static bool timingETLHitFilter(uint16_t
pattern);
210 static uint32_t getHitType(uint16_t
pattern);
213 static uint32_t getSide(uint16_t
pattern);
214 static uint32_t getLayer(uint16_t
pattern);
215 static uint32_t getSubSubStructure(uint16_t
pattern);
216 static uint32_t getSubStructure(uint16_t
pattern);
217 static uint32_t getSubDetector(uint16_t
pattern);
220 static uint16_t getMuonStation(uint16_t
pattern);
223 static uint16_t getDTSuperLayer(uint16_t
pattern);
226 static uint16_t getCSCRing(uint16_t
pattern) ;
229 static uint16_t getRPCLayer(uint16_t
pattern) ;
232 static uint16_t getRPCregion(uint16_t
pattern);
235 static uint16_t getGEMStation(uint16_t
pattern);
238 static uint16_t getGEMLayer(uint16_t
pattern);
241 static uint16_t getBTLModType(uint16_t
pattern);
244 static uint16_t getETLRing(uint16_t
pattern);
267 bool appendTrackerHit(uint16_t subdet, uint16_t layer, uint16_t stereo,
TrackingRecHit::Type hitType);
290 int numberOfValidHits()
const;
293 int numberOfValidTrackerHits()
const;
294 int numberOfValidPixelHits()
const;
295 int numberOfValidPixelBarrelHits()
const;
296 int numberOfValidPixelEndcapHits()
const;
297 int numberOfValidStripHits()
const;
298 int numberOfValidStripTIBHits()
const;
299 int numberOfValidStripTIDHits()
const;
300 int numberOfValidStripTOBHits()
const;
301 int numberOfValidStripTECHits()
const;
314 int numberOfTimingHits()
const;
315 int numberOfValidTimingHits()
const;
316 int numberOfValidTimingBTLHits()
const;
317 int numberOfValidTimingETLHits()
const;
319 int numberOfLostTimingHits()
const;
320 int numberOfLostTimingBTLHits()
const;
321 int numberOfLostTimingETLHits()
const;
323 int numberOfMuonHits()
const;
324 int numberOfValidMuonHits()
const;
325 int numberOfValidMuonDTHits()
const;
326 int numberOfValidMuonCSCHits()
const;
327 int numberOfValidMuonRPCHits()
const;
328 int numberOfValidMuonGEMHits()
const;
329 int numberOfValidMuonME0Hits()
const;
331 int numberOfLostMuonHits()
const;
332 int numberOfLostMuonDTHits()
const;
333 int numberOfLostMuonCSCHits()
const;
334 int numberOfLostMuonRPCHits()
const;
335 int numberOfLostMuonGEMHits()
const;
336 int numberOfLostMuonME0Hits()
const;
338 int numberOfBadHits()
const;
339 int numberOfBadMuonHits()
const;
340 int numberOfBadMuonDTHits()
const;
341 int numberOfBadMuonCSCHits()
const;
342 int numberOfBadMuonRPCHits()
const;
343 int numberOfBadMuonGEMHits()
const;
344 int numberOfBadMuonME0Hits()
const;
346 int numberOfInactiveHits()
const;
347 int numberOfInactiveTrackerHits()
const;
348 int numberOfInactiveTimingHits()
const;
351 int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer)
const;
352 int numberOfValidStripLayersWithMonoAndStereo()
const;
353 int numberOfValidTOBLayersWithMonoAndStereo(uint32_t layer = 0)
const;
354 int numberOfValidTIBLayersWithMonoAndStereo(uint32_t layer = 0)
const;
355 int numberOfValidTIDLayersWithMonoAndStereo(uint32_t layer = 0)
const;
356 int numberOfValidTECLayersWithMonoAndStereo(uint32_t layer = 0)
const;
359 uint16_t getTrackerMonoStereo(
HitCategory category, uint16_t substr, uint16_t layer)
const;
361 int trackerLayersWithMeasurementOld()
const;
362 int trackerLayersWithMeasurement()
const;
363 int pixelLayersWithMeasurementOld()
const;
364 int pixelLayersWithMeasurement()
const;
365 int stripLayersWithMeasurement()
const;
366 int pixelBarrelLayersWithMeasurement()
const;
367 int pixelEndcapLayersWithMeasurement()
const;
368 int stripTIBLayersWithMeasurement()
const;
369 int stripTIDLayersWithMeasurement()
const;
370 int stripTOBLayersWithMeasurement()
const;
371 int stripTECLayersWithMeasurement()
const;
394 int trackerLayersNull()
const;
395 int pixelLayersNull()
const;
396 int stripLayersNull()
const;
397 int pixelBarrelLayersNull()
const;
398 int pixelEndcapLayersNull()
const;
399 int stripTIBLayersNull()
const;
400 int stripTIDLayersNull()
const;
401 int stripTOBLayersNull()
const;
402 int stripTECLayersNull()
const;
405 int muonStations(
int subdet,
int hitType)
const ;
407 int muonStationsWithValidHits()
const;
408 int muonStationsWithBadHits()
const;
409 int muonStationsWithAnyHits()
const;
411 int dtStationsWithValidHits()
const;
412 int dtStationsWithBadHits()
const;
413 int dtStationsWithAnyHits()
const;
415 int cscStationsWithValidHits()
const;
416 int cscStationsWithBadHits()
const;
417 int cscStationsWithAnyHits()
const;
419 int rpcStationsWithValidHits()
const;
420 int rpcStationsWithBadHits()
const;
421 int rpcStationsWithAnyHits()
const;
423 int gemStationsWithValidHits()
const ;
424 int gemStationsWithBadHits()
const ;
425 int gemStationsWithAnyHits()
const ;
427 int me0StationsWithValidHits()
const ;
428 int me0StationsWithBadHits()
const ;
429 int me0StationsWithAnyHits()
const ;
433 int innermostMuonStationWithHits(
int hitType)
const;
434 int innermostMuonStationWithValidHits()
const;
435 int innermostMuonStationWithBadHits()
const;
436 int innermostMuonStationWithAnyHits()
const;
439 int outermostMuonStationWithHits(
int hitType)
const;
440 int outermostMuonStationWithValidHits()
const;
441 int outermostMuonStationWithBadHits()
const;
442 int outermostMuonStationWithAnyHits()
const;
444 int numberOfDTStationsWithRPhiView()
const;
445 int numberOfDTStationsWithRZView()
const;
446 int numberOfDTStationsWithBothViews()
const;
451 const static unsigned short HitTypeOffset = 0;
452 const static unsigned short HitTypeMask = 0x3;
455 const static unsigned short SideOffset = 2;
456 const static unsigned short SideMask = 0x1;
459 const static unsigned short LayerOffset = 3;
460 const static unsigned short LayerMask = 0xF;
463 const static unsigned short SubstrOffset = 7;
464 const static unsigned short SubstrMask = 0x7;
467 const static unsigned short SubDetectorOffset = 10;
468 const static unsigned short SubDetectorMask = 0x3;
470 const static unsigned short minTrackerWord = 1 << SubDetectorOffset;
471 const static unsigned short maxTrackerWord = (2 << SubDetectorOffset) - 1;
472 const static unsigned short minPixelWord = minTrackerWord | (1<<SubstrOffset);
473 const static unsigned short minStripWord = minTrackerWord | (3<<SubstrOffset);
493 bool insertTrackHit(
const uint16_t
pattern);
494 bool insertExpectedInnerHit(
const uint16_t
pattern);
495 bool insertExpectedOuterHit(
const uint16_t
pattern);
496 void insertHit(
const uint16_t
pattern);
498 uint16_t getHitPatternByAbsoluteIndex(
int position)
const;
502 uint16_t hitPattern[ARRAY_LENGTH];
522 return std::pair<uint8_t, uint8_t>(beginTrackHits, endTrackHits);
524 case MISSING_INNER_HITS:
525 return std::pair<uint8_t, uint8_t>(beginInner, endInner);
527 case MISSING_OUTER_HITS:
528 return std::pair<uint8_t, uint8_t>(beginOuter, endOuter);
531 return std::pair<uint8_t, uint8_t>(-1, -1);
547 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
548 if UNLIKELY((position < 0 || (position + range.first) >= range.second)) {
549 return HitPattern::EMPTY_PATTERN;
552 return getHitPatternByAbsoluteIndex(range.first + position);
558 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
559 for (
int i = range.first;
i < range.second; ++
i) {
560 if (
filter(getHitPatternByAbsoluteIndex(
i))) {
571 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
572 for (
int i = range.first;
i < range.second;
i++) {
573 uint16_t
pattern = getHitPatternByAbsoluteIndex(
i);
575 if (typeFilter(pattern) && !
f(pattern)) {
584 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
585 for (
int i = range.first;
i < range.second; ++
i) {
586 uint16_t
pattern = getHitPatternByAbsoluteIndex(
i);
587 if (typeFilter(pattern) &&
filter(pattern)) {
594 inline bool HitPattern::pixelHitFilter(uint16_t
pattern)
596 if UNLIKELY(!trackerHitFilter(pattern)) {
600 uint32_t substructure = getSubStructure(pattern);
605 inline bool HitPattern::pixelBarrelHitFilter(uint16_t
pattern)
607 if UNLIKELY(!trackerHitFilter(pattern)) {
611 uint32_t substructure = getSubStructure(pattern);
615 inline bool HitPattern::pixelEndcapHitFilter(uint16_t
pattern)
617 if UNLIKELY(!trackerHitFilter(pattern)) {
621 uint32_t substructure = getSubStructure(pattern);
625 inline bool HitPattern::stripHitFilter(uint16_t
pattern)
627 return pattern > minStripWord;
633 if UNLIKELY(!trackerHitFilter(pattern)) {
637 return substructure == getSubStructure(pattern);
640 inline bool HitPattern::stripTIBHitFilter(uint16_t
pattern)
645 inline bool HitPattern::stripTIDHitFilter(uint16_t
pattern)
650 inline bool HitPattern::stripTOBHitFilter(uint16_t
pattern)
655 inline bool HitPattern::stripTECHitFilter(uint16_t
pattern)
660 inline bool HitPattern::muonDTHitFilter(uint16_t
pattern)
662 if UNLIKELY(!muonHitFilter(pattern)) {
666 uint32_t substructure = getSubStructure(pattern);
670 inline bool HitPattern::muonCSCHitFilter(uint16_t
pattern)
672 if UNLIKELY(!muonHitFilter(pattern)) {
676 uint32_t substructure = getSubStructure(pattern);
680 inline bool HitPattern::muonRPCHitFilter(uint16_t
pattern)
682 if UNLIKELY(!muonHitFilter(pattern)) {
686 uint32_t substructure = getSubStructure(pattern);
690 inline bool HitPattern::muonGEMHitFilter(uint16_t
pattern)
692 if UNLIKELY(!muonHitFilter(pattern)) {
696 uint32_t substructure = getSubStructure(pattern);
700 inline bool HitPattern::muonME0HitFilter(uint16_t
pattern) {
701 if UNLIKELY(!muonHitFilter(pattern))
return false;
702 uint16_t substructure = getSubStructure(pattern);
707 inline bool HitPattern::trackerHitFilter(uint16_t
pattern)
709 return pattern > minTrackerWord && pattern <= maxTrackerWord;
712 inline bool HitPattern::muonHitFilter(uint16_t
pattern)
714 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
718 return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 0);
721 inline bool HitPattern::timingBTLHitFilter(uint16_t
pattern) {
722 if UNLIKELY(!timingHitFilter(pattern))
return false;
723 uint16_t substructure = getSubStructure(pattern);
727 inline bool HitPattern::timingETLHitFilter(uint16_t
pattern) {
728 if UNLIKELY(!timingHitFilter(pattern))
return false;
729 uint16_t substructure = getSubStructure(pattern);
733 inline bool HitPattern::timingHitFilter(uint16_t
pattern)
735 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
739 return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 2);
742 inline uint32_t HitPattern::getSubStructure(uint16_t
pattern)
744 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
748 return ((pattern >> SubstrOffset) & SubstrMask);
751 inline uint32_t HitPattern::getLayer(uint16_t
pattern)
753 return HitPattern::getSubSubStructure(pattern);
756 inline uint32_t HitPattern::getSubSubStructure(uint16_t
pattern)
758 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
762 return ((pattern >> LayerOffset) & LayerMask);
765 inline uint32_t HitPattern::getSubDetector(uint16_t
pattern)
767 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
771 return ((pattern >> SubDetectorOffset) & SubDetectorMask);
775 inline uint32_t HitPattern::getSide(uint16_t
pattern)
777 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
781 return (pattern >> SideOffset) & SideMask;
784 inline uint32_t HitPattern::getHitType(uint16_t
pattern)
786 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
790 return ((pattern >> HitTypeOffset) & HitTypeMask);
793 inline uint16_t HitPattern::getMuonStation(uint16_t
pattern)
795 return (getSubSubStructure(pattern) >> 2) + 1;
798 inline uint16_t HitPattern::getDTSuperLayer(uint16_t
pattern)
800 return (getSubSubStructure(pattern) & 3);
803 inline uint16_t HitPattern::getCSCRing(uint16_t
pattern)
805 return (getSubSubStructure(pattern) & 3) + 1;
808 inline uint16_t HitPattern::getRPCLayer(uint16_t
pattern)
810 uint16_t subSubStructure = getSubSubStructure(pattern);
811 uint16_t
stat = subSubStructure >> 2;
814 return ((subSubStructure >> 1) & 1) + 1;
820 inline uint16_t HitPattern::getRPCregion(uint16_t
pattern)
822 return getSubSubStructure(pattern) & 1;
826 inline uint16_t HitPattern::getGEMStation(uint16_t
pattern)
829 uint16_t sss = getSubSubStructure(pattern),
stat = sss >> 1;
834 inline uint16_t HitPattern::getBTLModType(uint16_t
pattern) {
835 return getSubSubStructure(pattern);
838 inline uint16_t HitPattern::getETLRing(uint16_t
pattern) {
839 return getSubSubStructure(pattern);
842 inline uint16_t HitPattern::getGEMLayer(uint16_t
pattern)
844 return (getSubSubStructure(pattern) & 1) + 1;
847 inline bool HitPattern::validHitFilter(uint16_t
pattern)
849 return getHitType(pattern) == HitPattern::VALID;
852 inline bool HitPattern::missingHitFilter(uint16_t
pattern)
854 return getHitType(pattern) == HitPattern::MISSING;
857 inline bool HitPattern::inactiveHitFilter(uint16_t
pattern)
859 return getHitType(pattern) == HitPattern::INACTIVE;
862 inline bool HitPattern::badHitFilter(uint16_t
pattern)
869 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
870 return range.second - range.first;
875 return countHits(category, trackerHitFilter);
878 inline int HitPattern::numberOfMuonHits()
const 880 return countHits(TRACK_HITS, muonHitFilter);
883 inline int HitPattern::numberOfTimingHits()
const 885 return countHits(TRACK_HITS, timingHitFilter);
888 inline int HitPattern::numberOfValidHits()
const 890 return countHits(TRACK_HITS, validHitFilter);
893 inline int HitPattern::numberOfValidTrackerHits()
const 895 return countTypedHits(TRACK_HITS, validHitFilter, trackerHitFilter);
898 inline int HitPattern::numberOfValidMuonHits()
const 900 return countTypedHits(TRACK_HITS, validHitFilter, muonHitFilter);
903 inline int HitPattern::numberOfValidTimingHits()
const 905 return countTypedHits(TRACK_HITS, validHitFilter, timingHitFilter);
908 inline int HitPattern::numberOfValidPixelHits()
const 910 return countTypedHits(TRACK_HITS, validHitFilter, pixelHitFilter);
913 inline int HitPattern::numberOfValidPixelBarrelHits()
const 915 return countTypedHits(TRACK_HITS, validHitFilter, pixelBarrelHitFilter);
918 inline int HitPattern::numberOfValidPixelEndcapHits()
const 920 return countTypedHits(TRACK_HITS, validHitFilter, pixelEndcapHitFilter);
923 inline int HitPattern::numberOfValidStripHits()
const 925 return countTypedHits(TRACK_HITS, validHitFilter, stripHitFilter);
928 inline int HitPattern::numberOfValidStripTIBHits()
const 930 return countTypedHits(TRACK_HITS, validHitFilter, stripTIBHitFilter);
933 inline int HitPattern::numberOfValidStripTIDHits()
const 935 return countTypedHits(TRACK_HITS, validHitFilter, stripTIDHitFilter);
938 inline int HitPattern::numberOfValidStripTOBHits()
const 940 return countTypedHits(TRACK_HITS, validHitFilter, stripTOBHitFilter);
943 inline int HitPattern::numberOfValidStripTECHits()
const 945 return countTypedHits(TRACK_HITS, validHitFilter, stripTECHitFilter);
948 inline int HitPattern::numberOfValidMuonDTHits()
const 950 return countTypedHits(TRACK_HITS, validHitFilter, muonDTHitFilter);
953 inline int HitPattern::numberOfValidMuonCSCHits()
const 955 return countTypedHits(TRACK_HITS, validHitFilter, muonCSCHitFilter);
958 inline int HitPattern::numberOfValidMuonRPCHits()
const 960 return countTypedHits(TRACK_HITS, validHitFilter, muonRPCHitFilter);
963 inline int HitPattern::numberOfValidMuonGEMHits()
const 965 return countTypedHits(TRACK_HITS, validHitFilter, muonGEMHitFilter);
968 inline int HitPattern::numberOfValidMuonME0Hits()
const {
969 return countTypedHits(TRACK_HITS, validHitFilter, muonME0HitFilter);
972 inline int HitPattern::numberOfValidTimingBTLHits()
const 974 return countTypedHits(TRACK_HITS, validHitFilter, timingBTLHitFilter);
977 inline int HitPattern::numberOfValidTimingETLHits()
const 979 return countTypedHits(TRACK_HITS, validHitFilter, timingETLHitFilter);
984 return countHits(category, missingHitFilter);
989 return countTypedHits(category, missingHitFilter, trackerHitFilter);
992 inline int HitPattern::numberOfLostMuonHits()
const 994 return countTypedHits(TRACK_HITS, missingHitFilter, muonHitFilter);
997 inline int HitPattern::numberOfLostTimingHits()
const 999 return countTypedHits(TRACK_HITS, missingHitFilter, timingHitFilter);
1002 inline int HitPattern::numberOfLostTimingBTLHits()
const 1004 return countTypedHits(TRACK_HITS, missingHitFilter, timingBTLHitFilter);
1007 inline int HitPattern::numberOfLostTimingETLHits()
const 1009 return countTypedHits(TRACK_HITS, missingHitFilter, timingETLHitFilter);
1014 return countTypedHits(category, missingHitFilter, pixelHitFilter);
1019 return countTypedHits(category, missingHitFilter, pixelBarrelHitFilter);
1024 return countTypedHits(category, missingHitFilter, pixelEndcapHitFilter);
1029 return countTypedHits(category, missingHitFilter, stripHitFilter);
1034 return countTypedHits(category, missingHitFilter, stripTIBHitFilter);
1039 return countTypedHits(category, missingHitFilter, stripTIDHitFilter);
1044 return countTypedHits(category, missingHitFilter, stripTOBHitFilter);
1049 return countTypedHits(category, missingHitFilter, stripTECHitFilter);
1052 inline int HitPattern::numberOfLostMuonDTHits()
const 1054 return countTypedHits(TRACK_HITS, missingHitFilter, muonDTHitFilter);
1057 inline int HitPattern::numberOfLostMuonCSCHits()
const 1059 return countTypedHits(TRACK_HITS, missingHitFilter, muonCSCHitFilter);
1062 inline int HitPattern::numberOfLostMuonRPCHits()
const 1064 return countTypedHits(TRACK_HITS, missingHitFilter, muonRPCHitFilter);
1067 inline int HitPattern::numberOfLostMuonGEMHits()
const 1069 return countTypedHits(TRACK_HITS, missingHitFilter, muonGEMHitFilter);
1072 inline int HitPattern::numberOfLostMuonME0Hits()
const {
1073 return countTypedHits(TRACK_HITS, missingHitFilter, muonME0HitFilter);
1076 inline int HitPattern::numberOfBadHits()
const 1078 return countHits(TRACK_HITS, badHitFilter);
1081 inline int HitPattern::numberOfBadMuonHits()
const 1083 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonHitFilter);
1086 inline int HitPattern::numberOfBadMuonDTHits()
const 1088 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonDTHitFilter);
1091 inline int HitPattern::numberOfBadMuonCSCHits()
const 1093 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonCSCHitFilter);
1096 inline int HitPattern::numberOfBadMuonRPCHits()
const 1098 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonRPCHitFilter);
1101 inline int HitPattern::numberOfBadMuonGEMHits()
const 1103 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonGEMHitFilter);
1106 inline int HitPattern::numberOfBadMuonME0Hits()
const {
1107 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonME0HitFilter);
1110 inline int HitPattern::numberOfInactiveHits()
const 1112 return countHits(TRACK_HITS, inactiveHitFilter);
1115 inline int HitPattern::numberOfInactiveTrackerHits()
const 1117 return countTypedHits(TRACK_HITS, inactiveHitFilter, trackerHitFilter);
1120 inline int HitPattern::trackerLayersWithMeasurementOld()
const 1122 return pixelLayersWithMeasurement() + stripLayersWithMeasurement();
1125 inline int HitPattern::pixelLayersWithMeasurementOld()
const 1127 return pixelBarrelLayersWithMeasurement() + pixelEndcapLayersWithMeasurement();
1130 inline int HitPattern::stripLayersWithMeasurement()
const 1132 return stripTIBLayersWithMeasurement() + stripTIDLayersWithMeasurement() +
1133 stripTOBLayersWithMeasurement() + stripTECLayersWithMeasurement();
1138 return pixelLayersWithoutMeasurement(category) +
1139 stripLayersWithoutMeasurement(category);
1144 return pixelBarrelLayersWithoutMeasurement(category) +
1145 pixelEndcapLayersWithoutMeasurement(category);
1150 return stripTIBLayersWithoutMeasurement(category) +
1151 stripTIDLayersWithoutMeasurement(category) +
1152 stripTOBLayersWithoutMeasurement(category) +
1153 stripTECLayersWithoutMeasurement(category);
1158 return pixelLayersTotallyOffOrBad(category) +
1159 stripLayersTotallyOffOrBad(category);
1164 return pixelBarrelLayersTotallyOffOrBad(category) +
1165 pixelEndcapLayersTotallyOffOrBad(category);
1170 return stripTIBLayersTotallyOffOrBad(category) +
1171 stripTIDLayersTotallyOffOrBad(category) +
1172 stripTOBLayersTotallyOffOrBad(category) +
1173 stripTECLayersTotallyOffOrBad(category);
1176 inline int HitPattern::trackerLayersNull()
const 1178 return pixelLayersNull() +
1182 inline int HitPattern::pixelLayersNull()
const 1184 return pixelBarrelLayersNull() +
1185 pixelEndcapLayersNull();
1188 inline int HitPattern::stripLayersNull()
const 1190 return stripTIBLayersNull() +
1191 stripTIDLayersNull() +
1192 stripTOBLayersNull() +
1193 stripTECLayersNull();
1196 inline int HitPattern::muonStationsWithValidHits()
const 1198 return muonStations(0, 0);
1201 inline int HitPattern::muonStationsWithBadHits()
const 1203 return muonStations(0, 3);
1206 inline int HitPattern::muonStationsWithAnyHits()
const 1208 return muonStations(0, -1);
1211 inline int HitPattern::dtStationsWithValidHits()
const 1213 return muonStations(1, 0);
1216 inline int HitPattern::dtStationsWithBadHits()
const 1218 return muonStations(1, 3);
1221 inline int HitPattern::dtStationsWithAnyHits()
const 1223 return muonStations(1, -1);
1226 inline int HitPattern::cscStationsWithValidHits()
const 1228 return muonStations(2, 0);
1231 inline int HitPattern::cscStationsWithBadHits()
const 1233 return muonStations(2, 3);
1236 inline int HitPattern::cscStationsWithAnyHits()
const 1238 return muonStations(2, -1);
1241 inline int HitPattern::rpcStationsWithValidHits()
const 1243 return muonStations(3, 0);
1246 inline int HitPattern::rpcStationsWithBadHits()
const 1248 return muonStations(3, 3);
1251 inline int HitPattern::rpcStationsWithAnyHits()
const 1253 return muonStations(3, -1);
1256 inline int HitPattern::gemStationsWithValidHits()
const 1258 return muonStations(4, 0);
1261 inline int HitPattern::gemStationsWithBadHits()
const 1263 return muonStations(4, 3);
1266 inline int HitPattern::gemStationsWithAnyHits()
const 1268 return muonStations(4,-1);
1271 inline int HitPattern::me0StationsWithValidHits()
const 1273 return muonStations(5, 0);
1276 inline int HitPattern::me0StationsWithBadHits()
const 1278 return muonStations(5, 3);
1281 inline int HitPattern::me0StationsWithAnyHits()
const 1283 return muonStations(5,-1);
1286 inline int HitPattern::innermostMuonStationWithValidHits()
const 1288 return innermostMuonStationWithHits(0);
1291 inline int HitPattern::innermostMuonStationWithBadHits()
const 1293 return innermostMuonStationWithHits(3);
1296 inline int HitPattern::innermostMuonStationWithAnyHits()
const 1298 return innermostMuonStationWithHits(-1);
1301 inline int HitPattern::outermostMuonStationWithValidHits()
const 1303 return outermostMuonStationWithHits(0);
1306 inline int HitPattern::outermostMuonStationWithBadHits()
const 1308 return outermostMuonStationWithHits(3);
1311 inline int HitPattern::outermostMuonStationWithAnyHits()
const 1313 return outermostMuonStationWithHits(-1);
1317 template<
int N = HitPattern::MaxHits>
1328 unsigned char const *
end()
const 1364 unsigned char p = 255 & (
pattern >> 3);
1369 for (
auto h = hit + lhit - 1;
h != hit; --
h) {
1370 if ((*(
h - 1)) <= p) {
1377 return lhit < MaxHits;
1380 hp.
call(category, HitPattern::validHitFilter,
unpack);
unsigned char const * begin() const
unsigned char const * end() const
PatternSet< N > commonHits(PatternSet< N > const &p1, PatternSet< N > const &p2)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void call(HitCategory category, filterType typeFilter, F f) const
S & print(S &os, JobReport::InputFile const &f)
bool filterType(uint16_t)
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
const std::complex< double > I
void fill(HitPattern::HitCategory category, HitPattern const &hp)
static int position[264][3]
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
PatternSet(HitPattern::HitCategory category, HitPattern const &hp)
unsigned char operator[](int i) const