2 #ifndef TrackReco_HitPattern_h
3 #define TrackReco_HitPattern_h
167 if (pattern == 0)
break;
177 if (pattern == 0)
break;
187 if (pattern == 0)
break;
189 if (typeFilter(pattern) && !
f(pattern) )
break;
414 uint32_t
encode(
DetId id, uint32_t hitType,
unsigned int i) ;
502 if unlikely(pattern == 0)
return false;
508 if unlikely(pattern == 0)
return false;
515 if unlikely(pattern == 0)
return 999999;
521 if unlikely(pattern == 0)
return 999999;
526 if unlikely(pattern == 0)
return 999999;
532 if unlikely(pattern == 0)
return 999999;
537 if unlikely(pattern == 0)
return 999999;
555 if likely(stat <= 1)
return ((sss >> 1) & 1) + 1;
831 #ifndef CMS_NOCXX11 // cint....
833 template<
int N=reco::HitPattern::MaxHits>
836 unsigned char hit[
N];
839 unsigned char const *
begin()
const {
return hit;}
840 unsigned char const *
end()
const {
return hit+nhit;}
841 unsigned char *
begin() {
return hit;}
842 unsigned char *
end() {
return hit+nhit;}
843 int size()
const {
return nhit;}
846 PatternSet(): nhit(0){}
860 if ( (*(
h-1)) <= p)
break;
861 (*h)=*(
h-1); *(
h-1)=p;
871 inline PatternSet<N> commonHits(PatternSet<N>
const &
p1, PatternSet<N>
const &
p2) {
873 comm.nhit = std::set_intersection(p1.begin(),p1.end(),p2.begin(),p2.end(),comm.begin())-comm.begin();
int stripTOBLayersWithMeasurement() const
int countTypedHits(filterType typeFilter, filterType filter) const
int cscStationsWithAnyHits() const
static uint32_t getRPCLayer(uint32_t pattern)
RPC layer: for station 1 and 2, layer = 1(inner) or 2(outer); for station 3, 4 layer is always 0...
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
int outermostMuonStationWithValidHits() const
static uint32_t getDTSuperLayer(uint32_t pattern)
DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patter...
int pixelBarrelLayersNull() const
int stripTIBLayersNull() const
int numberOfInactiveHits() const
int numberOfValidTECLayersWithMonoAndStereo(uint32_t layer=0) const
static uint32_t getLayer(uint32_t pattern)
void appendHit(const TrackingRecHit &hit)
static uint32_t isStereo(DetId)
static uint32_t getCSCRing(uint32_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
uint32_t hitPattern_[PatternSize]
int stripTIBLayersWithMeasurement() const
int stripTECLayersNull() const
static const unsigned short SideOffset
void set(const TrackingRecHit &hit, unsigned int i)
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
static uint32_t getSubSubStructure(uint32_t pattern)
int pixelLayersWithoutMeasurement() const
int numberOfLostTrackerHits() const
static bool muonDTHitFilter(uint32_t pattern)
static const unsigned short SubstrOffset
int numberOfValidHits() const
static bool trackerHitFilter(uint32_t pattern)
uint32_t getTrackerMonoStereo(uint32_t substr, uint32_t layer) const
int numberOfLostHits() const
int numberOfDTStationsWithRPhiView() const
int numberOfBadHits() const
int cscStationsWithValidHits() const
int pixelLayersNull() const
int numberOfLostPixelHits() const
int pixelLayersWithMeasurement() const
int trackerLayersWithoutMeasurement() const
int numberOfValidStripHits() const
static uint32_t getHitType(uint32_t pattern)
int numberOfValidTOBLayersWithMonoAndStereo(uint32_t layer=0) const
int stripTIDLayersWithoutMeasurement() const
int rpcStationsWithValidHits() const
static bool type_2_HitFilter(uint32_t pattern)
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
void set(const I &begin, const I &end)
void print(std::ostream &stream=std::cout) const
int numberOfValidTIDLayersWithMonoAndStereo(uint32_t layer=0) const
static const unsigned short PatternSize
int pixelBarrelLayersWithoutMeasurement() const
static bool stripTECHitFilter(uint32_t pattern)
int numberOfLostMuonHits() const
static const unsigned short HitTypeMask
int pixelEndcapLayersWithMeasurement() const
int numberOfValidTIBLayersWithMonoAndStereo(uint32_t layer=0) const
int numberOfValidStripTOBHits() const
int numberOfValidMuonCSCHits() const
void call(filterType typeFilter, F f) const
int numberOfValidMuonRPCHits() const
bool hasValidHitInFirstPixelEndcap() const
static bool stripTIDHitFilter(uint32_t pattern)
int muonStationsWithBadHits() const
int numberOfLostStripTECHits() const
void set(const DetId id, uint32_t hitType, unsigned int i)
static bool muonHitFilter(uint32_t pattern)
int stripLayersNull() const
int muonStationsWithValidHits() const
int stripTOBLayersTotallyOffOrBad() const
int rpcStationsWithBadHits() const
int stripLayersWithoutMeasurement() const
int innermostMuonStationWithAnyHits() const
int trackerLayersTotallyOffOrBad() const
int numberOfValidPixelBarrelHits() const
int stripTIDLayersTotallyOffOrBad() const
static bool type_1_HitFilter(uint32_t pattern)
int numberOfLostPixelEndcapHits() const
int stripTIDLayersWithMeasurement() const
int trackerLayersWithMeasurement() const
static const unsigned short SubDetectorMask
int numberOfLostStripTIDHits() const
int muonStationsWithAnyHits() const
static bool pixelHitFilter(uint32_t pattern)
int pixelLayersTotallyOffOrBad() const
int stripTECLayersTotallyOffOrBad() const
static uint32_t getSubStructure(uint32_t pattern)
int numberOfBadMuonHits() const
int stripTIBLayersWithoutMeasurement() const
T operator[](int i) const
int numberOfValidStripTIDHits() const
const std::complex< double > I
int numberOfDTStationsWithRZView() const
static bool muonRPCHitFilter(uint32_t pattern)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
static bool validHitFilter(uint32_t pattern)
int numberOfValidStripTECHits() const
int stripTIDLayersNull() const
int numberOfLostMuonRPCHits() const
static const unsigned short HitTypeOffset
int numberOfBadMuonRPCHits() const
int dtStationsWithValidHits() const
int stripLayersTotallyOffOrBad() const
int cscStationsWithBadHits() const
int numberOfDTStationsWithBothViews() const
static const unsigned short HitSize
static uint32_t getSide(uint32_t pattern)
int dtStationsWithAnyHits() const
int numberOfLostStripHits() const
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
int numberOfInactiveTrackerHits() const
static const unsigned short SideMask
int pixelEndcapLayersWithoutMeasurement() const
int innermostMuonStationWithBadHits() const
static const unsigned short SubDetectorOffset
int trackerLayersNull() const
int stripLayersWithMeasurement() const
int pixelBarrelLayersWithMeasurement() const
int numberOfBadMuonDTHits() const
static uint32_t getRPCregion(uint32_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
int outermostMuonStationWithBadHits() const
int dtStationsWithBadHits() const
int numberOfValidStripTIBHits() const
int numberOfValidTrackerHits() const
int numberOfValidPixelEndcapHits() const
int stripTOBLayersNull() const
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
static bool type_3_HitFilter(uint32_t pattern)
int pixelBarrelLayersTotallyOffOrBad() const
int numberOfLostMuonDTHits() const
static const unsigned short SubstrMask
int numberOfBadMuonCSCHits() const
int numberOfLostStripTOBHits() const
static const unsigned short LayerOffset
int stripTECLayersWithoutMeasurement() const
static std::atomic< unsigned int > counter
static int position[264][3]
int numberOfValidMuonDTHits() const
static bool stripHitFilter(uint32_t pattern)
int stripTECLayersWithMeasurement() const
int stripTOBLayersWithoutMeasurement() const
int pixelEndcapLayersTotallyOffOrBad() const
int numberOfValidPixelHits() const
static bool pixelEndcapHitFilter(uint32_t pattern)
static bool muonCSCHitFilter(uint32_t pattern)
bool filterType(unsigned int)
void printHitPattern(int position, std::ostream &stream) const
bool hasValidHitInFirstPixelBarrel() const
DetId geographicalId() const
int numberOfValidMuonHits() const
static bool stripTOBHitFilter(uint32_t pattern)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
int stripTIBLayersTotallyOffOrBad() const
static const unsigned short LayerMask
int numberOfLostStripTIBHits() const
uint32_t getHitPattern(int position) const
int rpcStationsWithAnyHits() const
int numberOfLostPixelBarrelHits() const
void set(const TrackingRecHitRef &ref, unsigned int i)
int numberOfValidStripLayersWithMonoAndStereo() const
int countHits(filterType filter) const
tuple size
Write out results.
static bool pixelBarrelHitFilter(uint32_t pattern)
int innermostMuonStationWithValidHits() const
int numberOfLostMuonCSCHits() const
int outermostMuonStationWithAnyHits() const
int pixelEndcapLayersNull() const
void setHitPattern(int position, uint32_t pattern)
static bool stripTIBHitFilter(uint32_t pattern)
HitPattern(const I &begin, const I &end)
uint32_t encode(const TrackingRecHit &hit, unsigned int i)