3 #ifndef TrackReco_HitPattern_h
4 #define TrackReco_HitPattern_h
442 return std::pair<uint8_t, uint8_t>(-1, -1);
459 if unlikely((position < 0 || (position + range.first) >= range.second)) {
470 for (
int i = range.first;
i < range.second; ++
i) {
483 for (
int i = range.first;
i < range.second;
i++) {
486 if (typeFilter(pattern) && !
f(pattern)) {
496 for (
int i = range.first;
i < range.second; ++
i) {
498 if (typeFilter(pattern) &&
filter(pattern)) {
684 uint16_t stat = subSubStructure >> 2;
687 return ((subSubStructure >> 1) & 1) + 1;
721 return range.second - range.first;
1075 #ifndef CMS_NOCXX11 // cint....
1077 template<
int N = HitPattern::MaxHits>
1080 unsigned char hit[
N];
1083 unsigned char const *
begin()
const
1088 unsigned char const *
end()
const
1093 unsigned char *
begin()
1098 unsigned char *
end()
1113 PatternSet() : nhit(0) {}
1124 unsigned char p = 255 & (
pattern >> 3);
1129 for (
auto h =
hit + lhit - 1;
h !=
hit; --
h) {
1130 if ((*(
h - 1)) <= p) {
1137 return lhit < MaxHits;
1146 inline PatternSet<N> commonHits(PatternSet<N>
const &
p1, PatternSet<N>
const &
p2)
1149 comm.nhit = std::set_intersection(p1.begin(), p1.end(), p2.begin(), p2.end(), comm.begin()) - comm.begin();
int stripTOBLayersWithMeasurement() const
static uint16_t getCSCRing(uint16_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
static bool stripTECHitFilter(uint16_t pattern)
int pixelBarrelLayersWithoutMeasurement(HitCategory category) const
int cscStationsWithAnyHits() const
static uint32_t getLayer(uint16_t pattern)
void insertHit(const uint16_t pattern)
int numberOfLostStripTIBHits(HitCategory category) const
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
static const unsigned short HIT_LENGTH
int outermostMuonStationWithValidHits() const
static const unsigned short ARRAY_LENGTH
static const uint32_t NULL_RETURN
int pixelBarrelLayersNull() const
int numberOfLostStripTOBHits(HitCategory category) const
static bool pixelHitFilter(uint16_t pattern)
int stripTIBLayersNull() const
int numberOfInactiveHits() const
int stripTIBLayersWithMeasurement() const
static bool badHitFilter(uint16_t pattern)
int stripTECLayersNull() const
static const unsigned short SideOffset
static const uint16_t EMPTY_PATTERN
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
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...
static const unsigned short SubstrOffset
int stripTOBLayersWithoutMeasurement(HitCategory category) const
int numberOfValidHits() const
int numberOfLostPixelHits(HitCategory category) const
int numberOfDTStationsWithRPhiView() const
int numberOfBadHits() const
int cscStationsWithValidHits() const
int pixelLayersNull() const
void call(HitCategory category, filterType typeFilter, F f) const
HitPattern & operator=(const HitPattern &other)
uint16_t getTrackerMonoStereo(HitCategory category, uint16_t substr, uint16_t layer) const
static const unsigned short MaxHits
uint32_t getTrackerLayerCase(HitCategory category, uint16_t substr, uint16_t layer) const
int numberOfValidStripHits() const
int rpcStationsWithValidHits() const
int pixelLayersWithMeasurement() const
int countTypedHits(HitCategory category, filterType typeFilter, filterType filter) const
int numberOfValidStripLayersWithMonoAndStereo() const
bool filterType(uint16_t)
int pixelEndcapLayersWithoutMeasurement(HitCategory category) const
int numberOfLostMuonHits() const
static bool missingHitFilter(uint16_t pattern)
int trackerLayersWithMeasurement() const
static const unsigned short HitTypeMask
static bool pixelBarrelHitFilter(uint16_t pattern)
int pixelEndcapLayersWithMeasurement() const
static uint16_t encode(const TrackingRecHit &hit)
int numberOfValidStripTOBHits() const
int numberOfValidMuonCSCHits() const
int numberOfMuonHits() const
bool insertExpectedOuterHit(const uint16_t pattern)
static bool pixelEndcapHitFilter(uint16_t pattern)
int numberOfLostTrackerHits(HitCategory category) const
int numberOfLostStripHits(HitCategory category) const
int numberOfValidMuonRPCHits() const
bool hasValidHitInFirstPixelEndcap() const
static bool validHitFilter(uint16_t pattern)
int muonStationsWithBadHits() const
int trackerLayersWithoutMeasurementOld(HitCategory category) const
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
int stripLayersNull() const
int numberOfLostStripTIDHits(HitCategory category) const
int muonStationsWithValidHits() const
int pixelLayersWithoutMeasurement(HitCategory category) const
int stripTOBLayersTotallyOffOrBad() const
int rpcStationsWithBadHits() const
static const unsigned short minTrackerWord
int innermostMuonStationWithAnyHits() const
int trackerLayersTotallyOffOrBad() const
uint16_t hitPattern[ARRAY_LENGTH]
int numberOfValidPixelBarrelHits() const
int stripTIDLayersTotallyOffOrBad() const
static bool muonCSCHitFilter(uint16_t pattern)
static uint32_t getHitType(uint16_t pattern)
int numberOfValidTECLayersWithMonoAndStereo(uint32_t layer=0) const
int stripTIDLayersWithMeasurement() const
static const unsigned short SubDetectorMask
int numberOfTrackerHits(HitCategory category) const
int muonStationsWithAnyHits() const
static bool stripHitFilter(uint16_t pattern)
int pixelLayersTotallyOffOrBad() const
int stripTECLayersTotallyOffOrBad() const
int stripLayersWithoutMeasurement(HitCategory category) const
int numberOfBadMuonHits() const
T operator[](int i) const
int numberOfValidStripTIDHits() const
const std::complex< double > I
int numberOfDTStationsWithRZView() const
bool appendHits(const I &begin, const I &end)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
int numberOfValidStripTECHits() const
int stripTIDLayersNull() const
int numberOfLostMuonRPCHits() const
static const unsigned short HitTypeOffset
int numberOfBadMuonRPCHits() const
int numberOfValidTIDLayersWithMonoAndStereo(uint32_t layer=0) const
int dtStationsWithValidHits() const
int stripLayersTotallyOffOrBad() const
int cscStationsWithBadHits() const
static uint32_t getSubStructure(uint16_t pattern)
int numberOfDTStationsWithBothViews() const
static bool inactiveHitFilter(uint16_t pattern)
static const unsigned short minPixelWord
int numberOfValidTIBLayersWithMonoAndStereo(uint32_t layer=0) const
static uint16_t getRPCregion(uint16_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
static uint32_t getSubDetector(uint16_t pattern)
int dtStationsWithAnyHits() const
int stripTIDLayersWithoutMeasurement(HitCategory category) const
int pixelLayersWithMeasurementOld() const
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
int numberOfInactiveTrackerHits() const
static bool muonHitFilter(uint16_t pattern)
static bool trackerHitFilter(uint16_t pattern)
int numberOfLostPixelEndcapHits(HitCategory category) const
static const unsigned short SideMask
static const unsigned short minStripWord
std::pair< uint8_t, uint8_t > getCategoryIndexRange(HitCategory category) const
int innermostMuonStationWithBadHits() const
static const unsigned short SubDetectorOffset
int trackerLayersNull() const
int stripLayersWithMeasurement() const
int pixelBarrelLayersWithMeasurement() const
int numberOfBadMuonDTHits() const
int outermostMuonStationWithBadHits() const
int dtStationsWithBadHits() const
int numberOfValidStripTIBHits() const
static bool stripTOBHitFilter(uint16_t pattern)
int numberOfLostHits(HitCategory category) const
int numberOfValidTrackerHits() const
int numberOfValidPixelEndcapHits() const
uint16_t getHitPatternByAbsoluteIndex(int position) const
static uint32_t getSide(uint16_t pattern)
int numberOfLostPixelBarrelHits(HitCategory category) const
int stripTOBLayersNull() const
static bool muonDTHitFilter(uint16_t pattern)
int trackerLayersWithoutMeasurement(HitCategory category) const
bool insertExpectedInnerHit(const uint16_t pattern)
int numberOfLostStripTECHits(HitCategory category) const
static bool stripTIBHitFilter(uint16_t pattern)
int pixelBarrelLayersTotallyOffOrBad() const
int numberOfLostMuonDTHits() const
static const unsigned short SubstrMask
int numberOfBadMuonCSCHits() const
static uint16_t isStereo(DetId i)
static const unsigned short LayerOffset
static int position[264][3]
int numberOfValidMuonDTHits() const
bool insertTrackHit(const uint16_t pattern)
int stripTECLayersWithMeasurement() const
int stripTECLayersWithoutMeasurement(HitCategory category) const
int pixelEndcapLayersTotallyOffOrBad() const
int numberOfValidPixelHits() const
bool appendHit(const TrackingRecHit &hit)
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...
static uint16_t getMuonStation(uint16_t pattern)
Muon station (1-4). Only valid for muon patterns, of course. only for patterns from muon...
void print(HitCategory category, std::ostream &stream=std::cout) const
int numberOfValidTOBLayersWithMonoAndStereo(uint32_t layer=0) const
bool hasValidHitInFirstPixelBarrel() const
int countHits(HitCategory category, filterType filter) const
int numberOfValidMuonHits() const
static uint32_t getSubSubStructure(uint16_t pattern)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
uint16_t getHitPattern(HitCategory category, int position) const
int stripTIBLayersTotallyOffOrBad() const
static const unsigned short LayerMask
static bool stripTIDHitFilter(uint16_t pattern)
static bool muonRPCHitFilter(uint16_t pattern)
int rpcStationsWithAnyHits() const
int trackerLayersWithMeasurementOld() const
tuple size
Write out results.
static bool stripSubdetectorHitFilter(uint16_t pattern, StripSubdetector::SubDetector substructure)
int innermostMuonStationWithValidHits() const
int numberOfHits(HitCategory category) const
int numberOfLostMuonCSCHits() const
int outermostMuonStationWithAnyHits() const
int stripTIBLayersWithoutMeasurement(HitCategory category) const
int pixelEndcapLayersNull() const