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;
449 static bool fillNewHitPatternWithOldHitPattern_v12(
const uint16_t oldHitPattern[],
451 uint8_t beginTrackHits, uint8_t endTrackHits,
452 uint8_t beginInner, uint8_t endInner,
453 uint8_t beginOuter, uint8_t endOuter,
459 const static unsigned short HitTypeOffset = 0;
460 const static unsigned short HitTypeMask = 0x3;
463 const static unsigned short SideOffset = 2;
464 const static unsigned short SideMask = 0x1;
467 const static unsigned short LayerOffset = 3;
468 const static unsigned short LayerMask = 0xF;
471 const static unsigned short SubstrOffset = 7;
472 const static unsigned short SubstrMask = 0x7;
475 const static unsigned short SubDetectorOffset = 10;
476 const static unsigned short SubDetectorMask = 0x3;
478 const static unsigned short minTrackerWord = 1 << SubDetectorOffset;
479 const static unsigned short maxTrackerWord = (2 << SubDetectorOffset) - 1;
480 const static unsigned short minPixelWord = minTrackerWord | (1<<SubstrOffset);
481 const static unsigned short minStripWord = minTrackerWord | (3<<SubstrOffset);
501 bool insertTrackHit(
const uint16_t
pattern);
502 bool insertExpectedInnerHit(
const uint16_t
pattern);
503 bool insertExpectedOuterHit(
const uint16_t
pattern);
504 void insertHit(
const uint16_t
pattern);
506 uint16_t getHitPatternByAbsoluteIndex(
int position)
const;
510 uint16_t hitPattern[ARRAY_LENGTH];
530 return std::pair<uint8_t, uint8_t>(beginTrackHits, endTrackHits);
532 case MISSING_INNER_HITS:
533 return std::pair<uint8_t, uint8_t>(beginInner, endInner);
535 case MISSING_OUTER_HITS:
536 return std::pair<uint8_t, uint8_t>(beginOuter, endOuter);
539 return std::pair<uint8_t, uint8_t>(-1, -1);
555 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
556 if UNLIKELY((position < 0 || (position + range.first) >= range.second)) {
557 return HitPattern::EMPTY_PATTERN;
560 return getHitPatternByAbsoluteIndex(range.first + position);
566 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
567 for (
int i = range.first;
i < range.second; ++
i) {
568 if (
filter(getHitPatternByAbsoluteIndex(
i))) {
579 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
580 for (
int i = range.first;
i < range.second;
i++) {
581 uint16_t
pattern = getHitPatternByAbsoluteIndex(
i);
583 if (typeFilter(pattern) && !
f(pattern)) {
592 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
593 for (
int i = range.first;
i < range.second; ++
i) {
594 uint16_t
pattern = getHitPatternByAbsoluteIndex(
i);
595 if (typeFilter(pattern) &&
filter(pattern)) {
602 inline bool HitPattern::pixelHitFilter(uint16_t
pattern)
604 if UNLIKELY(!trackerHitFilter(pattern)) {
608 uint32_t substructure = getSubStructure(pattern);
613 inline bool HitPattern::pixelBarrelHitFilter(uint16_t
pattern)
615 if UNLIKELY(!trackerHitFilter(pattern)) {
619 uint32_t substructure = getSubStructure(pattern);
623 inline bool HitPattern::pixelEndcapHitFilter(uint16_t
pattern)
625 if UNLIKELY(!trackerHitFilter(pattern)) {
629 uint32_t substructure = getSubStructure(pattern);
633 inline bool HitPattern::stripHitFilter(uint16_t
pattern)
635 return pattern > minStripWord && pattern <= maxTrackerWord;
641 if UNLIKELY(!trackerHitFilter(pattern)) {
645 return substructure == getSubStructure(pattern);
648 inline bool HitPattern::stripTIBHitFilter(uint16_t
pattern)
653 inline bool HitPattern::stripTIDHitFilter(uint16_t
pattern)
658 inline bool HitPattern::stripTOBHitFilter(uint16_t
pattern)
663 inline bool HitPattern::stripTECHitFilter(uint16_t
pattern)
668 inline bool HitPattern::muonDTHitFilter(uint16_t
pattern)
670 if UNLIKELY(!muonHitFilter(pattern)) {
674 uint32_t substructure = getSubStructure(pattern);
678 inline bool HitPattern::muonCSCHitFilter(uint16_t
pattern)
680 if UNLIKELY(!muonHitFilter(pattern)) {
684 uint32_t substructure = getSubStructure(pattern);
688 inline bool HitPattern::muonRPCHitFilter(uint16_t
pattern)
690 if UNLIKELY(!muonHitFilter(pattern)) {
694 uint32_t substructure = getSubStructure(pattern);
698 inline bool HitPattern::muonGEMHitFilter(uint16_t
pattern)
700 if UNLIKELY(!muonHitFilter(pattern)) {
704 uint32_t substructure = getSubStructure(pattern);
708 inline bool HitPattern::muonME0HitFilter(uint16_t
pattern) {
709 if UNLIKELY(!muonHitFilter(pattern))
return false;
710 uint16_t substructure = getSubStructure(pattern);
715 inline bool HitPattern::trackerHitFilter(uint16_t
pattern)
717 return pattern > minTrackerWord && pattern <= maxTrackerWord;
720 inline bool HitPattern::muonHitFilter(uint16_t
pattern)
722 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
726 return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 0);
729 inline bool HitPattern::timingBTLHitFilter(uint16_t
pattern) {
730 if UNLIKELY(!timingHitFilter(pattern))
return false;
731 uint16_t substructure = getSubStructure(pattern);
735 inline bool HitPattern::timingETLHitFilter(uint16_t
pattern) {
736 if UNLIKELY(!timingHitFilter(pattern))
return false;
737 uint16_t substructure = getSubStructure(pattern);
741 inline bool HitPattern::timingHitFilter(uint16_t
pattern)
743 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
747 return (((pattern >> SubDetectorOffset) & SubDetectorMask) == 2);
750 inline uint32_t HitPattern::getSubStructure(uint16_t
pattern)
752 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
756 return ((pattern >> SubstrOffset) & SubstrMask);
759 inline uint32_t HitPattern::getLayer(uint16_t
pattern)
761 return HitPattern::getSubSubStructure(pattern);
764 inline uint32_t HitPattern::getSubSubStructure(uint16_t
pattern)
766 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
770 return ((pattern >> LayerOffset) & LayerMask);
773 inline uint32_t HitPattern::getSubDetector(uint16_t
pattern)
775 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
779 return ((pattern >> SubDetectorOffset) & SubDetectorMask);
783 inline uint32_t HitPattern::getSide(uint16_t
pattern)
785 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
789 return (pattern >> SideOffset) & SideMask;
792 inline uint32_t HitPattern::getHitType(uint16_t
pattern)
794 if UNLIKELY(pattern == HitPattern::EMPTY_PATTERN) {
798 return ((pattern >> HitTypeOffset) & HitTypeMask);
801 inline uint16_t HitPattern::getMuonStation(uint16_t
pattern)
803 return (getSubSubStructure(pattern) >> 2) + 1;
806 inline uint16_t HitPattern::getDTSuperLayer(uint16_t
pattern)
808 return (getSubSubStructure(pattern) & 3);
811 inline uint16_t HitPattern::getCSCRing(uint16_t
pattern)
813 return (getSubSubStructure(pattern) & 3) + 1;
816 inline uint16_t HitPattern::getRPCLayer(uint16_t
pattern)
818 uint16_t subSubStructure = getSubSubStructure(pattern);
819 uint16_t
stat = subSubStructure >> 2;
822 return ((subSubStructure >> 1) & 1) + 1;
828 inline uint16_t HitPattern::getRPCregion(uint16_t
pattern)
830 return getSubSubStructure(pattern) & 1;
834 inline uint16_t HitPattern::getGEMStation(uint16_t
pattern)
837 uint16_t sss = getSubSubStructure(pattern),
stat = sss >> 1;
842 inline uint16_t HitPattern::getBTLModType(uint16_t
pattern) {
843 return getSubSubStructure(pattern);
846 inline uint16_t HitPattern::getETLRing(uint16_t
pattern) {
847 return getSubSubStructure(pattern);
850 inline uint16_t HitPattern::getGEMLayer(uint16_t
pattern)
852 return (getSubSubStructure(pattern) & 1) + 1;
855 inline bool HitPattern::validHitFilter(uint16_t
pattern)
857 return getHitType(pattern) == HitPattern::VALID;
860 inline bool HitPattern::missingHitFilter(uint16_t
pattern)
862 return getHitType(pattern) == HitPattern::MISSING;
865 inline bool HitPattern::inactiveHitFilter(uint16_t
pattern)
867 return getHitType(pattern) == HitPattern::INACTIVE;
870 inline bool HitPattern::badHitFilter(uint16_t
pattern)
877 std::pair<uint8_t, uint8_t> range = getCategoryIndexRange(category);
878 return range.second - range.first;
883 return countHits(category, trackerHitFilter);
886 inline int HitPattern::numberOfMuonHits()
const 888 return countHits(TRACK_HITS, muonHitFilter);
891 inline int HitPattern::numberOfTimingHits()
const 893 return countHits(TRACK_HITS, timingHitFilter);
896 inline int HitPattern::numberOfValidHits()
const 898 return countHits(TRACK_HITS, validHitFilter);
901 inline int HitPattern::numberOfValidTrackerHits()
const 903 return countTypedHits(TRACK_HITS, validHitFilter, trackerHitFilter);
906 inline int HitPattern::numberOfValidMuonHits()
const 908 return countTypedHits(TRACK_HITS, validHitFilter, muonHitFilter);
911 inline int HitPattern::numberOfValidTimingHits()
const 913 return countTypedHits(TRACK_HITS, validHitFilter, timingHitFilter);
916 inline int HitPattern::numberOfValidPixelHits()
const 918 return countTypedHits(TRACK_HITS, validHitFilter, pixelHitFilter);
921 inline int HitPattern::numberOfValidPixelBarrelHits()
const 923 return countTypedHits(TRACK_HITS, validHitFilter, pixelBarrelHitFilter);
926 inline int HitPattern::numberOfValidPixelEndcapHits()
const 928 return countTypedHits(TRACK_HITS, validHitFilter, pixelEndcapHitFilter);
931 inline int HitPattern::numberOfValidStripHits()
const 933 return countTypedHits(TRACK_HITS, validHitFilter, stripHitFilter);
936 inline int HitPattern::numberOfValidStripTIBHits()
const 938 return countTypedHits(TRACK_HITS, validHitFilter, stripTIBHitFilter);
941 inline int HitPattern::numberOfValidStripTIDHits()
const 943 return countTypedHits(TRACK_HITS, validHitFilter, stripTIDHitFilter);
946 inline int HitPattern::numberOfValidStripTOBHits()
const 948 return countTypedHits(TRACK_HITS, validHitFilter, stripTOBHitFilter);
951 inline int HitPattern::numberOfValidStripTECHits()
const 953 return countTypedHits(TRACK_HITS, validHitFilter, stripTECHitFilter);
956 inline int HitPattern::numberOfValidMuonDTHits()
const 958 return countTypedHits(TRACK_HITS, validHitFilter, muonDTHitFilter);
961 inline int HitPattern::numberOfValidMuonCSCHits()
const 963 return countTypedHits(TRACK_HITS, validHitFilter, muonCSCHitFilter);
966 inline int HitPattern::numberOfValidMuonRPCHits()
const 968 return countTypedHits(TRACK_HITS, validHitFilter, muonRPCHitFilter);
971 inline int HitPattern::numberOfValidMuonGEMHits()
const 973 return countTypedHits(TRACK_HITS, validHitFilter, muonGEMHitFilter);
976 inline int HitPattern::numberOfValidMuonME0Hits()
const {
977 return countTypedHits(TRACK_HITS, validHitFilter, muonME0HitFilter);
980 inline int HitPattern::numberOfValidTimingBTLHits()
const 982 return countTypedHits(TRACK_HITS, validHitFilter, timingBTLHitFilter);
985 inline int HitPattern::numberOfValidTimingETLHits()
const 987 return countTypedHits(TRACK_HITS, validHitFilter, timingETLHitFilter);
992 return countHits(category, missingHitFilter);
997 return countTypedHits(category, missingHitFilter, trackerHitFilter);
1000 inline int HitPattern::numberOfLostMuonHits()
const 1002 return countTypedHits(TRACK_HITS, missingHitFilter, muonHitFilter);
1005 inline int HitPattern::numberOfLostTimingHits()
const 1007 return countTypedHits(TRACK_HITS, missingHitFilter, timingHitFilter);
1010 inline int HitPattern::numberOfLostTimingBTLHits()
const 1012 return countTypedHits(TRACK_HITS, missingHitFilter, timingBTLHitFilter);
1015 inline int HitPattern::numberOfLostTimingETLHits()
const 1017 return countTypedHits(TRACK_HITS, missingHitFilter, timingETLHitFilter);
1022 return countTypedHits(category, missingHitFilter, pixelHitFilter);
1027 return countTypedHits(category, missingHitFilter, pixelBarrelHitFilter);
1032 return countTypedHits(category, missingHitFilter, pixelEndcapHitFilter);
1037 return countTypedHits(category, missingHitFilter, stripHitFilter);
1042 return countTypedHits(category, missingHitFilter, stripTIBHitFilter);
1047 return countTypedHits(category, missingHitFilter, stripTIDHitFilter);
1052 return countTypedHits(category, missingHitFilter, stripTOBHitFilter);
1057 return countTypedHits(category, missingHitFilter, stripTECHitFilter);
1060 inline int HitPattern::numberOfLostMuonDTHits()
const 1062 return countTypedHits(TRACK_HITS, missingHitFilter, muonDTHitFilter);
1065 inline int HitPattern::numberOfLostMuonCSCHits()
const 1067 return countTypedHits(TRACK_HITS, missingHitFilter, muonCSCHitFilter);
1070 inline int HitPattern::numberOfLostMuonRPCHits()
const 1072 return countTypedHits(TRACK_HITS, missingHitFilter, muonRPCHitFilter);
1075 inline int HitPattern::numberOfLostMuonGEMHits()
const 1077 return countTypedHits(TRACK_HITS, missingHitFilter, muonGEMHitFilter);
1080 inline int HitPattern::numberOfLostMuonME0Hits()
const {
1081 return countTypedHits(TRACK_HITS, missingHitFilter, muonME0HitFilter);
1084 inline int HitPattern::numberOfBadHits()
const 1086 return countHits(TRACK_HITS, badHitFilter);
1089 inline int HitPattern::numberOfBadMuonHits()
const 1091 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonHitFilter);
1094 inline int HitPattern::numberOfBadMuonDTHits()
const 1096 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonDTHitFilter);
1099 inline int HitPattern::numberOfBadMuonCSCHits()
const 1101 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonCSCHitFilter);
1104 inline int HitPattern::numberOfBadMuonRPCHits()
const 1106 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonRPCHitFilter);
1109 inline int HitPattern::numberOfBadMuonGEMHits()
const 1111 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonGEMHitFilter);
1114 inline int HitPattern::numberOfBadMuonME0Hits()
const {
1115 return countTypedHits(TRACK_HITS, inactiveHitFilter, muonME0HitFilter);
1118 inline int HitPattern::numberOfInactiveHits()
const 1120 return countHits(TRACK_HITS, inactiveHitFilter);
1123 inline int HitPattern::numberOfInactiveTrackerHits()
const 1125 return countTypedHits(TRACK_HITS, inactiveHitFilter, trackerHitFilter);
1128 inline int HitPattern::trackerLayersWithMeasurementOld()
const 1130 return pixelLayersWithMeasurement() + stripLayersWithMeasurement();
1133 inline int HitPattern::pixelLayersWithMeasurementOld()
const 1135 return pixelBarrelLayersWithMeasurement() + pixelEndcapLayersWithMeasurement();
1138 inline int HitPattern::stripLayersWithMeasurement()
const 1140 return stripTIBLayersWithMeasurement() + stripTIDLayersWithMeasurement() +
1141 stripTOBLayersWithMeasurement() + stripTECLayersWithMeasurement();
1146 return pixelLayersWithoutMeasurement(category) +
1147 stripLayersWithoutMeasurement(category);
1152 return pixelBarrelLayersWithoutMeasurement(category) +
1153 pixelEndcapLayersWithoutMeasurement(category);
1158 return stripTIBLayersWithoutMeasurement(category) +
1159 stripTIDLayersWithoutMeasurement(category) +
1160 stripTOBLayersWithoutMeasurement(category) +
1161 stripTECLayersWithoutMeasurement(category);
1166 return pixelLayersTotallyOffOrBad(category) +
1167 stripLayersTotallyOffOrBad(category);
1172 return pixelBarrelLayersTotallyOffOrBad(category) +
1173 pixelEndcapLayersTotallyOffOrBad(category);
1178 return stripTIBLayersTotallyOffOrBad(category) +
1179 stripTIDLayersTotallyOffOrBad(category) +
1180 stripTOBLayersTotallyOffOrBad(category) +
1181 stripTECLayersTotallyOffOrBad(category);
1184 inline int HitPattern::trackerLayersNull()
const 1186 return pixelLayersNull() +
1190 inline int HitPattern::pixelLayersNull()
const 1192 return pixelBarrelLayersNull() +
1193 pixelEndcapLayersNull();
1196 inline int HitPattern::stripLayersNull()
const 1198 return stripTIBLayersNull() +
1199 stripTIDLayersNull() +
1200 stripTOBLayersNull() +
1201 stripTECLayersNull();
1204 inline int HitPattern::muonStationsWithValidHits()
const 1206 return muonStations(0, 0);
1209 inline int HitPattern::muonStationsWithBadHits()
const 1211 return muonStations(0, 3);
1214 inline int HitPattern::muonStationsWithAnyHits()
const 1216 return muonStations(0, -1);
1219 inline int HitPattern::dtStationsWithValidHits()
const 1221 return muonStations(1, 0);
1224 inline int HitPattern::dtStationsWithBadHits()
const 1226 return muonStations(1, 3);
1229 inline int HitPattern::dtStationsWithAnyHits()
const 1231 return muonStations(1, -1);
1234 inline int HitPattern::cscStationsWithValidHits()
const 1236 return muonStations(2, 0);
1239 inline int HitPattern::cscStationsWithBadHits()
const 1241 return muonStations(2, 3);
1244 inline int HitPattern::cscStationsWithAnyHits()
const 1246 return muonStations(2, -1);
1249 inline int HitPattern::rpcStationsWithValidHits()
const 1251 return muonStations(3, 0);
1254 inline int HitPattern::rpcStationsWithBadHits()
const 1256 return muonStations(3, 3);
1259 inline int HitPattern::rpcStationsWithAnyHits()
const 1261 return muonStations(3, -1);
1264 inline int HitPattern::gemStationsWithValidHits()
const 1266 return muonStations(4, 0);
1269 inline int HitPattern::gemStationsWithBadHits()
const 1271 return muonStations(4, 3);
1274 inline int HitPattern::gemStationsWithAnyHits()
const 1276 return muonStations(4,-1);
1279 inline int HitPattern::me0StationsWithValidHits()
const 1281 return muonStations(5, 0);
1284 inline int HitPattern::me0StationsWithBadHits()
const 1286 return muonStations(5, 3);
1289 inline int HitPattern::me0StationsWithAnyHits()
const 1291 return muonStations(5,-1);
1294 inline int HitPattern::innermostMuonStationWithValidHits()
const 1296 return innermostMuonStationWithHits(0);
1299 inline int HitPattern::innermostMuonStationWithBadHits()
const 1301 return innermostMuonStationWithHits(3);
1304 inline int HitPattern::innermostMuonStationWithAnyHits()
const 1306 return innermostMuonStationWithHits(-1);
1309 inline int HitPattern::outermostMuonStationWithValidHits()
const 1311 return outermostMuonStationWithHits(0);
1314 inline int HitPattern::outermostMuonStationWithBadHits()
const 1316 return outermostMuonStationWithHits(3);
1319 inline int HitPattern::outermostMuonStationWithAnyHits()
const 1321 return outermostMuonStationWithHits(-1);
1325 template<
int N = HitPattern::MaxHits>
1336 unsigned char const *
end()
const 1372 unsigned char p = 255 & (
pattern >> 3);
1377 for (
auto h = hit + lhit - 1;
h != hit; --
h) {
1378 if ((*(
h - 1)) <= p) {
1385 return lhit < MaxHits;
1388 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)
void countHits(const reco::Muon &muon, std::vector< int > &numHitsDT, std::vector< int > &numHitsCSC, std::vector< int > &numHitsRPC)
unsigned char operator[](int i) const