Go to the documentation of this file.
3 #ifndef TrackReco_HitPattern_h
4 #define TrackReco_HitPattern_h
140 namespace TestHitPattern {
234 template <
typename I>
475 template <
typename F>
518 return std::pair<uint8_t, uint8_t>(-1, -1);
521 template <
typename I>
549 template <
typename F>
740 uint16_t
stat = subSubStructure >> 2;
743 LIKELY(
stat <= 1) {
return ((subSubStructure >> 1) & 1) + 1; }
1061 template <
int N = HitPattern::MaxHits>
1086 unsigned char p = 255 & (
pattern >> 3);
1091 for (
auto h =
hit + lhit - 1;
h !=
hit; --
h) {
1092 if ((*(
h - 1)) <=
p) {
1110 comm.
nhit = std::set_intersection(
p1.begin(),
p1.end(),
p2.begin(),
p2.end(), comm.
begin()) - comm.
begin();
bool appendHit(const TrackingRecHit &hit, const TrackerTopology &ttopo)
HitPattern & operator=(const HitPattern &other)
int numberOfBadMuonDTHits() const
uint16_t getHitPattern(HitCategory category, int position) const
static uint32_t getSubStructure(uint16_t pattern)
int cscStationsWithAnyHits() const
int numberOfValidStripTECHits() const
static bool inactiveHitFilter(uint16_t pattern)
const static unsigned short HIT_LENGTH
const static unsigned short LayerOffset
int numberOfLostMuonDTHits() const
int numberOfValidTimingBTLHits() const
static uint32_t getSubDetector(uint16_t pattern)
int pixelEndcapLayersWithMeasurement() const
bool filterType(uint16_t)
int innermostMuonStationWithBadHits() const
int stripTOBLayersWithMeasurement() const
int numberOfAllTrackerHits(HitCategory category) const
int trackerLayersWithoutMeasurement(HitCategory category) const
int numberOfTimingHits() const
int numberOfLostStripTIBHits(HitCategory category) const
int stripTIBLayersWithoutMeasurement(HitCategory category) const
static bool muonRPCHitFilter(uint16_t pattern)
int numberOfValidTOBLayersWithMonoAndStereo(uint32_t layer=0) const
PatternSet(HitPattern::HitCategory category, HitPattern const &hp)
const static unsigned short SideMask
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void fill(HitPattern::HitCategory category, HitPattern const &hp)
static bool validHitFilter(uint16_t pattern)
int numberOfLostTimingBTLHits() const
const static unsigned short HitTypeOffset
int numberOfLostStripTECHits(HitCategory category) const
static bool muonHitFilter(uint16_t pattern)
static bool trackerHitFilter(uint16_t pattern)
int dtStationsWithValidHits() const
int numberOfBadMuonGEMHits() const
int numberOfMuonHits() const
int gemStationsWithAnyHits() const
int stripTIBLayersNull() const
static uint16_t getGEMLayer(uint16_t pattern)
GEM layer: 1,2. Only valid for muon GEM patterns, of course.
int numberOfLostTimingHits() const
static bool muonGEMHitFilter(uint16_t pattern)
int stripLayersWithoutMeasurement(HitCategory category) const
int trackerLayersWithoutMeasurementOld(HitCategory category) const
static uint16_t getCSCRing(uint16_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
static bool muonCSCHitFilter(uint16_t pattern)
int dtStationsWithBadHits() const
static bool stripTOBHitFilter(uint16_t pattern)
static bool fillNewHitPatternWithOldHitPattern_v12(const uint16_t oldHitPattern[], uint8_t hitCount, uint8_t beginTrackHits, uint8_t endTrackHits, uint8_t beginInner, uint8_t endInner, uint8_t beginOuter, uint8_t endOuter, reco::HitPattern *newObj)
int rpcStationsWithBadHits() const
bool insertExpectedInnerHit(const uint16_t pattern)
int numberOfLostHits(HitCategory category) const
int numberOfValidPixelEndcapHits() const
static bool stripTIBHitFilter(uint16_t pattern)
int trackerLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
const static unsigned short maxTrackerWord
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....
int me0StationsWithBadHits() const
static uint32_t getHitType(uint16_t pattern)
static uint32_t getSide(uint16_t pattern)
int numberOfLostPixelEndcapHits(HitCategory category) const
int pixelLayersWithMeasurement() const
int stripTOBLayersWithoutMeasurement(HitCategory category) const
int numberOfInactiveTrackerHits() const
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
int pixelBarrelLayersWithMeasurement() const
int numberOfBadHits() const
int numberOfLostMuonHits() const
const static unsigned short minTrackerWord
int outermostMuonStationWithBadHits() const
int numberOfValidPixelBarrelHits() const
int pixelLayersNull() const
int pixelBarrelLayersNull() const
int trackerLayersWithMeasurementOld() const
int stripLayersWithMeasurement() const
int numberOfLostStripTIDHits(HitCategory category) const
static uint16_t encode(const TrackingRecHit &hit, const TrackerTopology &ttopo)
int numberOfValidMuonGEMHits() const
int muonStationsWithValidHits() const
int innermostMuonStationWithValidHits() const
const std::complex< double > I
int trackerLayersWithMeasurement() const
static bool stripTIDHitFilter(uint16_t pattern)
const static unsigned short minPixelWord
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
static bool timingETLHitFilter(uint16_t pattern)
int numberOfLostStripTOBHits(HitCategory category) const
static uint32_t getSubSubStructure(uint16_t pattern)
int stripTIDLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
void print(HitCategory category, std::ostream &stream=std::cout) const
unsigned char operator[](int i) const
const static unsigned short minStripWord
int numberOfLostTimingETLHits() const
int pixelEndcapLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
static uint16_t getGEMStation(uint16_t pattern)
GEM station: 1,2. Only valid for muon GEM patterns, of course.
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
bool hasValidHitInPixelLayer(enum PixelSubdetector::SubDetector, uint16_t layer) const
static constexpr auto TIB
static bool missingHitFilter(uint16_t pattern)
int numberOfInactiveTimingHits() const
int muonStationsWithAnyHits() const
int pixelBarrelLayersWithoutMeasurement(HitCategory category) const
void insertHit(const uint16_t pattern)
static uint16_t getRPCregion(uint16_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
int numberOfValidMuonCSCHits() const
constexpr std::array< uint8_t, layerIndexSize > layer
const static unsigned short SideOffset
static bool pixelHitFilter(uint16_t pattern)
int stripTIBLayersWithMeasurement() const
int numberOfDTStationsWithBothViews() const
static uint32_t getLayer(uint16_t pattern)
unsigned const char * end() const
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
int numberOfInactiveHits() const
int cscStationsWithBadHits() const
static bool pixelEndcapHitFilter(uint16_t pattern)
int stripTECLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
bool appendHits(const I &begin, const I &end, const TrackerTopology &ttopo)
int innermostMuonStationWithAnyHits() const
int numberOfLostPixelHits(HitCategory category) const
int outermostMuonStationWithValidHits() const
const static unsigned short SubstrMask
int outermostMuonStationWithAnyHits() const
int pixelLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
int numberOfBadMuonME0Hits() const
static bool timingHitFilter(uint16_t pattern)
static int position[264][3]
int numberOfValidTECLayersWithMonoAndStereo(uint32_t layer=0) const
static const uint16_t EMPTY_PATTERN
int numberOfBadMuonRPCHits() const
static uint16_t getETLRing(uint16_t pattern)
ETL Ring: 1-12. Only valid for ETL patterns of course.
int stripTIDLayersWithoutMeasurement(HitCategory category) const
int pixelLayersWithMeasurementOld() const
int rpcStationsWithValidHits() const
int numberOfValidStripTIBHits() const
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon,...
int numberOfValidTimingETLHits() const
int muonStationsWithBadHits() const
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
int numberOfLostMuonCSCHits() const
uint16_t getHitPatternByAbsoluteIndex(int position) const
const static unsigned short SubDetectorMask
int numberOfLostMuonGEMHits() const
const static unsigned short LayerMask
static uint16_t isStereo(DetId i, const TrackerTopology &ttopo)
static bool timingBTLHitFilter(uint16_t pattern)
static bool badHitFilter(uint16_t pattern)
int pixelBarrelLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
int numberOfValidMuonDTHits() const
const static unsigned short ARRAY_LENGTH
int pixelEndcapLayersNull() const
static uint16_t getBTLModType(uint16_t pattern)
BTL Module type: 1,2,3. Only valid for BTL patterns of course.
int numberOfLostPixelBarrelHits(HitCategory category) const
int numberOfValidStripTIDHits() const
int stripTOBLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
int stripTIDLayersWithMeasurement() const
int numberOfAllHits(HitCategory category) const
static constexpr auto TEC
int trackerLayersNull() const
int gemStationsWithBadHits() const
int rpcStationsWithAnyHits() const
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC) 4(GEM); hitType=-1(all), 0=valid, 3=bad
unsigned const char * begin() const
int me0StationsWithAnyHits() const
int numberOfValidStripHits() const
int numberOfValidTrackerHits() const
int numberOfValidStripTOBHits() const
bool appendMuonHit(const DetId &id, TrackingRecHit::Type hitType)
int stripLayersNull() const
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
bool appendTrackerHit(uint16_t subdet, uint16_t layer, uint16_t stereo, TrackingRecHit::Type hitType)
int numberOfValidMuonHits() const
int cscStationsWithValidHits() const
int stripLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
static constexpr auto TOB
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
const static unsigned short HitTypeMask
static bool stripTECHitFilter(uint16_t pattern)
int countHits(HitCategory category, filterType filter) const
int numberOfBadMuonCSCHits() const
PatternSet< N > commonHits(PatternSet< N > const &p1, PatternSet< N > const &p2)
int numberOfBadMuonHits() const
int pixelEndcapLayersWithoutMeasurement(HitCategory category) const
int numberOfValidMuonRPCHits() const
int numberOfLostTrackerHits(HitCategory category) const
int numberOfValidPixelHits() const
int numberOfLostStripHits(HitCategory category) const
int numberOfDTStationsWithRPhiView() const
static const uint32_t NULL_RETURN
const static unsigned short SubstrOffset
int numberOfLostMuonME0Hits() const
static bool pixelBarrelHitFilter(uint16_t pattern)
int pixelLayersWithoutMeasurement(HitCategory category) const
int numberOfValidStripLayersWithMonoAndStereo() const
int numberOfValidMuonME0Hits() const
int numberOfValidTIDLayersWithMonoAndStereo(uint32_t layer=0) const
int stripTECLayersWithMeasurement() const
int numberOfValidTimingHits() const
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
int numberOfValidHits() const
bool insertExpectedOuterHit(const uint16_t pattern)
int stripTIBLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) const
const static unsigned short SubDetectorOffset
static bool stripHitFilter(uint16_t pattern)
const static unsigned short MaxHits
int me0StationsWithValidHits() const
int gemStationsWithValidHits() const
static bool muonDTHitFilter(uint16_t pattern)
uint16_t getTrackerMonoStereo(HitCategory category, uint16_t substr, uint16_t layer) const
int numberOfDTStationsWithRZView() const
static uint16_t getDTSuperLayer(uint16_t pattern)
DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patter...
uint16_t hitPattern[ARRAY_LENGTH]
int numberOfLostMuonRPCHits() const
int numberOfValidTIBLayersWithMonoAndStereo(uint32_t layer=0) const
static bool muonME0HitFilter(uint16_t pattern)
static constexpr auto TID
int stripTECLayersNull() const
int stripTECLayersWithoutMeasurement(HitCategory category) const
void call(HitCategory category, filterType typeFilter, F f) const
static constexpr int MaxHits
bool insertTrackHit(const uint16_t pattern)
int stripTOBLayersNull() const
int stripTIDLayersNull() const
int dtStationsWithAnyHits() const