CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
reco::HitPattern Class Reference

#include <HitPattern.h>

Public Types

enum  { MONO = 1, STEREO = 2 }
 
typedef bool filterType (unsigned int)
 

Public Member Functions

void appendHit (const TrackingRecHit &hit)
 
template<typename F >
void call (filterType typeFilter, F f) const
 
int countHits (filterType filter) const
 
int countTypedHits (filterType typeFilter, filterType filter) const
 
int cscStationsWithAnyHits () const
 
int cscStationsWithBadHits () const
 
int cscStationsWithValidHits () const
 
int dtStationsWithAnyHits () const
 
int dtStationsWithBadHits () const
 
int dtStationsWithValidHits () const
 
uint32_t getHitPattern (int position) const
 
uint32_t getTrackerLayerCase (uint32_t substr, uint32_t layer) const
 
uint32_t getTrackerMonoStereo (uint32_t substr, uint32_t layer) const
 
bool hasValidHitInFirstPixelBarrel () const
 
bool hasValidHitInFirstPixelEndcap () const
 
 HitPattern ()
 
template<typename I >
 HitPattern (const I &begin, const I &end)
 
template<typename C >
 HitPattern (const C &c)
 
int innermostMuonStationWithAnyHits () const
 
int innermostMuonStationWithBadHits () const
 
int innermostMuonStationWithHits (int hitType) const
 hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all More...
 
int innermostMuonStationWithValidHits () const
 
int muonStations (int subdet, int hitType) const
 subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad More...
 
int muonStationsWithAnyHits () const
 
int muonStationsWithBadHits () const
 
int muonStationsWithValidHits () const
 
int numberOfBadHits () const
 
int numberOfBadMuonCSCHits () const
 
int numberOfBadMuonDTHits () const
 
int numberOfBadMuonHits () const
 
int numberOfBadMuonRPCHits () const
 
int numberOfDTStationsWithBothViews () const
 
int numberOfDTStationsWithRPhiView () const
 
int numberOfDTStationsWithRZView () const
 
int numberOfHits () const
 
int numberOfInactiveHits () const
 
int numberOfInactiveTrackerHits () const
 
int numberOfLostHits () const
 
int numberOfLostMuonCSCHits () const
 
int numberOfLostMuonDTHits () const
 
int numberOfLostMuonHits () const
 
int numberOfLostMuonRPCHits () const
 
int numberOfLostPixelBarrelHits () const
 
int numberOfLostPixelEndcapHits () const
 
int numberOfLostPixelHits () const
 
int numberOfLostStripHits () const
 
int numberOfLostStripTECHits () const
 
int numberOfLostStripTIBHits () const
 
int numberOfLostStripTIDHits () const
 
int numberOfLostStripTOBHits () const
 
int numberOfLostTrackerHits () const
 
int numberOfValidHits () const
 
int numberOfValidMuonCSCHits () const
 
int numberOfValidMuonDTHits () const
 
int numberOfValidMuonHits () const
 
int numberOfValidMuonRPCHits () const
 
int numberOfValidPixelBarrelHits () const
 
int numberOfValidPixelEndcapHits () const
 
int numberOfValidPixelHits () const
 
int numberOfValidStripHits () const
 
int numberOfValidStripLayersWithMonoAndStereo (uint32_t stripdet, uint32_t layer) const
 
int numberOfValidStripLayersWithMonoAndStereo () const
 
int numberOfValidStripTECHits () const
 
int numberOfValidStripTIBHits () const
 
int numberOfValidStripTIDHits () const
 
int numberOfValidStripTOBHits () const
 
int numberOfValidTECLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTIBLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTIDLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTOBLayersWithMonoAndStereo (uint32_t layer=0) const
 
int numberOfValidTrackerHits () const
 
int outermostMuonStationWithAnyHits () const
 
int outermostMuonStationWithBadHits () const
 
int outermostMuonStationWithHits (int hitType) const
 hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all More...
 
int outermostMuonStationWithValidHits () const
 
int pixelBarrelLayersNull () const
 
int pixelBarrelLayersTotallyOffOrBad () const
 
int pixelBarrelLayersWithMeasurement () const
 
int pixelBarrelLayersWithoutMeasurement () const
 
int pixelEndcapLayersNull () const
 
int pixelEndcapLayersTotallyOffOrBad () const
 
int pixelEndcapLayersWithMeasurement () const
 
int pixelEndcapLayersWithoutMeasurement () const
 
int pixelLayersNull () const
 
int pixelLayersTotallyOffOrBad () const
 
int pixelLayersWithMeasurement () const
 
int pixelLayersWithoutMeasurement () const
 
void print (std::ostream &stream=std::cout) const
 
void printHitPattern (int position, std::ostream &stream) const
 
int rpcStationsWithAnyHits () const
 
int rpcStationsWithBadHits () const
 
int rpcStationsWithValidHits () const
 
template<typename I >
void set (const I &begin, const I &end)
 
void set (const TrackingRecHit &hit, unsigned int i)
 
int stripLayersNull () const
 
int stripLayersTotallyOffOrBad () const
 
int stripLayersWithMeasurement () const
 
int stripLayersWithoutMeasurement () const
 
int stripTECLayersNull () const
 
int stripTECLayersTotallyOffOrBad () const
 
int stripTECLayersWithMeasurement () const
 
int stripTECLayersWithoutMeasurement () const
 
int stripTIBLayersNull () const
 
int stripTIBLayersTotallyOffOrBad () const
 
int stripTIBLayersWithMeasurement () const
 
int stripTIBLayersWithoutMeasurement () const
 
int stripTIDLayersNull () const
 
int stripTIDLayersTotallyOffOrBad () const
 
int stripTIDLayersWithMeasurement () const
 
int stripTIDLayersWithoutMeasurement () const
 
int stripTOBLayersNull () const
 
int stripTOBLayersTotallyOffOrBad () const
 
int stripTOBLayersWithMeasurement () const
 
int stripTOBLayersWithoutMeasurement () const
 
int trackerLayersNull () const
 
int trackerLayersTotallyOffOrBad () const
 
int trackerLayersWithMeasurement () const
 
int trackerLayersWithoutMeasurement () const
 

Static Public Member Functions

static uint32_t getCSCRing (uint32_t pattern)
 CSC ring (1-4). Only valid for muon CSC patterns, of course. More...
 
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 patterns, of course. More...
 
static uint32_t getHitType (uint32_t pattern)
 
static uint32_t getLayer (uint32_t pattern)
 
static uint32_t getMuonStation (uint32_t pattern)
 Muon station (1-4). Only valid for muon patterns, of course. More...
 
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. Only valid for muon RPC patterns, of course. More...
 
static uint32_t getRPCregion (uint32_t pattern)
 RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course. More...
 
static uint32_t getSide (uint32_t pattern)
 
static uint32_t getSubStructure (uint32_t pattern)
 
static uint32_t getSubSubStructure (uint32_t pattern)
 
static bool muonCSCHitFilter (uint32_t pattern)
 
static bool muonDTHitFilter (uint32_t pattern)
 
static bool muonHitFilter (uint32_t pattern)
 
static bool muonRPCHitFilter (uint32_t pattern)
 
static bool pixelBarrelHitFilter (uint32_t pattern)
 
static bool pixelEndcapHitFilter (uint32_t pattern)
 
static bool pixelHitFilter (uint32_t pattern)
 
static bool stripHitFilter (uint32_t pattern)
 
static bool stripTECHitFilter (uint32_t pattern)
 
static bool stripTIBHitFilter (uint32_t pattern)
 
static bool stripTIDHitFilter (uint32_t pattern)
 
static bool stripTOBHitFilter (uint32_t pattern)
 
static bool trackerHitFilter (uint32_t pattern)
 
static bool type_1_HitFilter (uint32_t pattern)
 
static bool type_2_HitFilter (uint32_t pattern)
 
static bool type_3_HitFilter (uint32_t pattern)
 
static bool validHitFilter (uint32_t pattern)
 

Static Public Attributes

static const unsigned short HitSize = 11
 
static const int MaxHits = (PatternSize * 32) / HitSize
 
static const unsigned short PatternSize = 25
 

Private Member Functions

uint32_t encode (const TrackingRecHit &, unsigned int)
 
void set (const TrackingRecHitRef &ref, unsigned int i)
 
void setHitPattern (int position, uint32_t pattern)
 

Static Private Member Functions

static uint32_t isStereo (DetId)
 

Private Attributes

uint32_t hitPattern_ [PatternSize]
 

Static Private Attributes

static const unsigned short HitTypeMask = 0x3
 
static const unsigned short HitTypeOffset = 0
 
static const unsigned short LayerMask = 0xF
 
static const unsigned short LayerOffset = 3
 
static const unsigned short SideMask = 0x1
 
static const unsigned short SideOffset = 2
 
static const unsigned short SubDetectorMask = 0x1
 
static const unsigned short SubDetectorOffset = 10
 
static const unsigned short SubstrMask = 0x7
 
static const unsigned short SubstrOffset = 7
 

Detailed Description

Definition at line 123 of file HitPattern.h.

Member Typedef Documentation

typedef bool reco::HitPattern::filterType(unsigned int)

Definition at line 161 of file HitPattern.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MONO 
STEREO 

Definition at line 125 of file HitPattern.h.

Constructor & Destructor Documentation

reco::HitPattern::HitPattern ( )
inline

Definition at line 137 of file HitPattern.h.

References hitPattern_, i, and PatternSize.

137 { for (int i=0; i<PatternSize; i++) hitPattern_[i] = 0; }
int i
Definition: DBlmapReader.cc:9
uint32_t hitPattern_[PatternSize]
Definition: HitPattern.h:395
static const unsigned short PatternSize
Definition: HitPattern.h:128
template<typename I >
reco::HitPattern::HitPattern ( const I &  begin,
const I &  end 
)
inline

Definition at line 141 of file HitPattern.h.

References set().

141 { set(begin, end); }
void set(const I &begin, const I &end)
Definition: HitPattern.h:151
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
template<typename C >
reco::HitPattern::HitPattern ( const C &  c)
inline

Definition at line 145 of file HitPattern.h.

References set().

145 { set(c); }
void set(const I &begin, const I &end)
Definition: HitPattern.h:151

Member Function Documentation

void HitPattern::appendHit ( const TrackingRecHit hit)

Definition at line 88 of file HitPattern.cc.

References filterCSVwithJSON::copy, MuonSubdetId::CSC, cond::rpcobgas::detid, TrackingRecHit::dimension(), MuonSubdetId::DT, TrackingRecHit::geographicalId(), i, DetId::Muon, numberOfHits(), TrackingRecHit::recHits(), MuonSubdetId::RPC, set(), and DetId::Tracker.

Referenced by reco::TrackBase::appendHitPattern().

88  {
89 
90  // get rec hit det id and rec hit type
91  DetId id = hit.geographicalId();
92  uint32_t detid = id.det();
93  uint32_t subdet = id.subdetId();
94 
95  std::vector<const TrackingRecHit*> hits;
96 
97 
98  if (detid == DetId::Tracker)
99  hits.push_back(&hit);
100 
101  if (detid == DetId::Muon) {
102 
103  if (subdet == (uint32_t) MuonSubdetId::DT){
104 
105  // DT rechit (granularity 2)
106  if(hit.dimension() == 1)
107  hits.push_back(&hit);
108 
109  // 4D segment (granularity 0)
110  else if(hit.dimension() > 1){ // Both 2 and 4 dim cases. MB4s have 2D, but formatted in 4D segments
111  std::vector<const TrackingRecHit*> seg2D = hit.recHits(); // 4D --> 2D
112  // load 1D hits (2D --> 1D)
113  for(std::vector<const TrackingRecHit*>::const_iterator it = seg2D.begin(); it != seg2D.end(); ++it){
114  std::vector<const TrackingRecHit*> hits1D = (*it)->recHits();
115  copy(hits1D.begin(),hits1D.end(),back_inserter(hits));
116  }
117  }
118  }
119 
120  else if (subdet == (uint32_t) MuonSubdetId::CSC){
121 
122  // CSC rechit (granularity 2)
123  if(hit.dimension() == 2)
124  hits.push_back(&hit);
125 
126  // 4D segment (granularity 0)
127  if(hit.dimension() == 4)
128  hits = hit.recHits(); // load 2D hits (4D --> 1D)
129  }
130 
131  else if (subdet == (uint32_t) MuonSubdetId::RPC) {
132  hits.push_back(&hit);
133  }
134  }
135 
136  unsigned int i = numberOfHits();
137  for(std::vector<const TrackingRecHit*>::const_iterator it = hits.begin(); it != hits.end(); ++it)
138  set(**it,i++);
139 
140 
141 }
int i
Definition: DBlmapReader.cc:9
virtual int dimension() const =0
void set(const I &begin, const I &end)
Definition: HitPattern.h:151
static const int CSC
Definition: MuonSubdetId.h:13
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
int numberOfHits() const
Definition: HitPattern.cc:213
Definition: DetId.h:18
static const int RPC
Definition: MuonSubdetId.h:14
static const int DT
Definition: MuonSubdetId.h:12
DetId geographicalId() const
template<typename F >
void reco::HitPattern::call ( filterType  typeFilter,
F  f 
) const
inline

Definition at line 183 of file HitPattern.h.

References f, getHitPattern(), HitSize, i, listBenchmarks::pattern, and PatternSize.

Referenced by reco::PatternSet< N >::fill().

183  {
184  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
185  uint32_t pattern = getHitPattern(i);
186  if (pattern == 0) break;
187  // f() return false to ask to stop looping
188  if (typeFilter(pattern) && !f(pattern) ) break;
189  }
190  }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:128
double f[11][100]
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::countHits ( filterType  filter) const
inline

Definition at line 162 of file HitPattern.h.

References prof2calltree::count, alcazmumu_cfi::filter, getHitPattern(), HitSize, i, listBenchmarks::pattern, and PatternSize.

Referenced by numberOfBadHits(), numberOfInactiveHits(), numberOfLostHits(), and numberOfValidHits().

162  {
163  int count = 0;
164  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
165  uint32_t pattern = getHitPattern(i);
166  if (pattern == 0) break;
167  if (filter(pattern)) ++count;
168  }
169  return count;
170  }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:128
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::countTypedHits ( filterType  typeFilter,
filterType  filter 
) const
inline

Definition at line 172 of file HitPattern.h.

References prof2calltree::count, alcazmumu_cfi::filter, getHitPattern(), HitSize, i, listBenchmarks::pattern, and PatternSize.

Referenced by numberOfBadMuonCSCHits(), numberOfBadMuonDTHits(), numberOfBadMuonHits(), numberOfBadMuonRPCHits(), numberOfInactiveTrackerHits(), numberOfLostMuonCSCHits(), numberOfLostMuonDTHits(), numberOfLostMuonHits(), numberOfLostMuonRPCHits(), numberOfLostPixelBarrelHits(), numberOfLostPixelEndcapHits(), numberOfLostPixelHits(), numberOfLostStripHits(), numberOfLostStripTECHits(), numberOfLostStripTIBHits(), numberOfLostStripTIDHits(), numberOfLostStripTOBHits(), numberOfLostTrackerHits(), numberOfValidMuonCSCHits(), numberOfValidMuonDTHits(), numberOfValidMuonHits(), numberOfValidMuonRPCHits(), numberOfValidPixelBarrelHits(), numberOfValidPixelEndcapHits(), numberOfValidPixelHits(), numberOfValidStripHits(), numberOfValidStripTECHits(), numberOfValidStripTIBHits(), numberOfValidStripTIDHits(), numberOfValidStripTOBHits(), and numberOfValidTrackerHits().

172  {
173  int count = 0;
174  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
175  uint32_t pattern = getHitPattern(i);
176  if (pattern == 0) break;
177  if (typeFilter(pattern)&&filter(pattern)) ++count;
178  }
179  return count;
180  }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:128
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::cscStationsWithAnyHits ( ) const
inline

Definition at line 812 of file HitPattern.h.

References muonStations().

812 { return muonStations(2,-1); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::cscStationsWithBadHits ( ) const
inline

Definition at line 811 of file HitPattern.h.

References muonStations().

811 { return muonStations(2, 3); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::cscStationsWithValidHits ( ) const
inline

Definition at line 810 of file HitPattern.h.

References muonStations().

810 { return muonStations(2, 0); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::dtStationsWithAnyHits ( ) const
inline

Definition at line 809 of file HitPattern.h.

References muonStations().

809 { return muonStations(1,-1); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::dtStationsWithBadHits ( ) const
inline

Definition at line 808 of file HitPattern.h.

References muonStations().

808 { return muonStations(1, 3); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::dtStationsWithValidHits ( ) const
inline

Definition at line 807 of file HitPattern.h.

References muonStations().

807 { return muonStations(1, 0); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
uint32_t HitPattern::encode ( const TrackingRecHit hit,
unsigned int  i 
)
private

Definition at line 15 of file HitPattern.cc.

References funct::abs(), MuonSubdetId::CSC, CSCDetId, cond::rpcobgas::detid, PXFDetId::disk(), MuonSubdetId::DT, DTLayerId, TrackingRecHit::geographicalId(), TrackingRecHit::getType(), HitSize, HitTypeMask, HitTypeOffset, isStereo(), PXBDetId::layer(), TOBDetId::layer(), TIBDetId::layer(), RPCDetId::layer(), LayerMask, LayerOffset, DetId::Muon, listBenchmarks::pattern, PatternSize, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, RPCDetId::region(), MuonSubdetId::RPC, SideMask, SideOffset, RPCDetId::station(), SubDetectorMask, SubDetectorOffset, SubstrMask, SubstrOffset, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, DetId::Tracker, TIDDetId::wheel(), and TECDetId::wheel().

Referenced by set().

15  {
16 
17  // ignore the rec hit if the number of hit is larger than the max
18  if (i >= 32 * PatternSize / HitSize) return 0;
19 
20  // get rec hit det id and rec hit type
21  DetId id = hit.geographicalId();
22  uint32_t detid = id.det();
23  uint32_t hitType = (uint32_t) hit.getType();
24 
25  // init pattern of this hit to 0
26  uint32_t pattern = 0;
27 
28  // adding tracker/muon detector bit
29  pattern += ((detid)&SubDetectorMask)<<SubDetectorOffset;
30 
31  // adding substructure (PXB,PXF,TIB,TID,TOB,TEC, or DT,CSC,RPC) bits
32  uint32_t subdet = id.subdetId();
33  pattern += ((subdet)&SubstrMask)<<SubstrOffset;
34 
35  // adding layer/disk/wheel bits
36  uint32_t layer = 0;
37  if (detid == DetId::Tracker) {
38  if (subdet == PixelSubdetector::PixelBarrel)
39  layer = PXBDetId(id).layer();
40  else if (subdet == PixelSubdetector::PixelEndcap)
41  layer = PXFDetId(id).disk();
42  else if (subdet == StripSubdetector::TIB)
43  layer = TIBDetId(id).layer();
44  else if (subdet == StripSubdetector::TID)
45  layer = TIDDetId(id).wheel();
46  else if (subdet == StripSubdetector::TOB)
47  layer = TOBDetId(id).layer();
48  else if (subdet == StripSubdetector::TEC)
49  layer = TECDetId(id).wheel();
50  } else if (detid == DetId::Muon) {
51  if (subdet == (uint32_t) MuonSubdetId::DT)
52  layer = ((DTLayerId(id.rawId()).station()-1)<<2) + DTLayerId(id.rawId()).superLayer();
53  else if (subdet == (uint32_t) MuonSubdetId::CSC)
54  layer = ((CSCDetId(id.rawId()).station()-1)<<2) + (CSCDetId(id.rawId()).ring()-1);
55  else if (subdet == (uint32_t) MuonSubdetId::RPC) {
56  RPCDetId rpcid(id.rawId());
57  layer = ((rpcid.station()-1)<<2) + abs(rpcid.region());
58  if (rpcid.station() <= 2) layer += 2*(rpcid.layer()-1);
59  }
60  }
61  pattern += (layer&LayerMask)<<LayerOffset;
62 
63  // adding mono/stereo bit
64  uint32_t side = 0;
65  if (detid == DetId::Tracker) {
66  side = isStereo(id);
67  } else if (detid == DetId::Muon) {
68  side = 0;
69  }
70  pattern += (side&SideMask)<<SideOffset;
71 
72  // adding hit type bits
73  pattern += (hitType&HitTypeMask)<<HitTypeOffset;
74 
75  return pattern;
76 }
int i
Definition: DBlmapReader.cc:9
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
static uint32_t isStereo(DetId)
Definition: HitPattern.cc:607
static const unsigned short SideOffset
Definition: HitPattern.h:387
static const unsigned short SubstrOffset
Definition: HitPattern.h:379
static const unsigned short PatternSize
Definition: HitPattern.h:128
static const unsigned short HitTypeMask
Definition: HitPattern.h:392
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
static const int CSC
Definition: MuonSubdetId.h:13
static const unsigned short SubDetectorMask
Definition: HitPattern.h:376
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned short HitTypeOffset
Definition: HitPattern.h:391
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
static const unsigned short HitSize
Definition: HitPattern.h:131
Definition: DetId.h:18
Type getType() const
static const unsigned short SideMask
Definition: HitPattern.h:388
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:375
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
static const unsigned short SubstrMask
Definition: HitPattern.h:380
static const int RPC
Definition: MuonSubdetId.h:14
static const unsigned short LayerOffset
Definition: HitPattern.h:383
static const int DT
Definition: MuonSubdetId.h:12
DetId geographicalId() const
static const unsigned short LayerMask
Definition: HitPattern.h:384
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
uint32_t reco::HitPattern::getCSCRing ( uint32_t  pattern)
inlinestatic

CSC ring (1-4). Only valid for muon CSC patterns, of course.

Definition at line 542 of file HitPattern.h.

References getSubSubStructure().

Referenced by printHitPattern().

542  {
543  return (getSubSubStructure(pattern) & 3) + 1;
544  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:518
uint32_t reco::HitPattern::getDTSuperLayer ( uint32_t  pattern)
inlinestatic

DT superlayer (1-3). Where the "hit" was a DT segment, superlayer is 0. Only valid for muon DT patterns, of course.

Definition at line 538 of file HitPattern.h.

References getSubSubStructure().

Referenced by numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), and printHitPattern().

538  {
539  return (getSubSubStructure(pattern) & 3);
540  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:518
uint32_t HitPattern::getHitPattern ( int  position) const

Definition at line 144 of file HitPattern.cc.

References hitPattern_, and HitSize.

Referenced by CheckHitPattern::analyze(), PFCheckHitPattern::analyze(), FixTrackHitPattern::analyze(), GetTrackTrajInfo::analyze(), call(), GsfElectronAlgo::ElectronData::checkCtfTrack(), countHits(), countTypedHits(), GsfElectronCoreBaseProducer::getCtfTrackRef(), getTrackerLayerCase(), getTrackerMonoStereo(), PrimaryVertexValidation::hasFirstLayerPixelHits(), hasValidHitInFirstPixelBarrel(), hasValidHitInFirstPixelEndcap(), index_to_hitpattern(), innermostMuonStationWithHits(), SoftPFElectronTagInfoProducer::isElecClean(), PFElecTkProducer::isInnerMost(), muonStations(), numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), numberOfHits(), numberOfValidStripLayersWithMonoAndStereo(), EgAmbiguityTools::isInnerMost::operator()(), outermostMuonStationWithHits(), FWTrackResidualDetailView::prepareData(), reco::TrackResiduals::print(), CheckHitPattern::print(), PFCheckHitPattern::print(), print(), printHitPattern(), FWConvTrackHitsDetailView::setTextInfo(), EgAmbiguityTools::sharedDets(), EgAmbiguityTools::sharedHits(), and QcdUeDQM::trackSelection().

144  {
145 /* Note: you are not taking a consecutive sequence of HitSize bits starting from position*HitSize
146  as the bit order in the words are reversed.
147  e.g. if position = 0 you take the lowest 10 bits of the first word.
148 
149  I hope this can clarify what is the memory layout of such thing
150 
151  straight 01234567890123456789012345678901 | 23456789012345678901234567890123 | 4567
152  (global) 0 1 2 3 | 3 4 5 6 | 6
153  words [--------------0---------------] | [--------------1---------------] | [---
154  word 01234567890123456789012345678901 | 01234567890123456789012345678901 | 0123
155  (str) 0 1 2 3 | 0 1 2 3 | 0
156  [--------------0---------------] | [--------------1---------------] | [---
157  word 10987654321098765432109876543210 | 10987654321098765432109876543210 | 1098
158  (rev) 32 21 10 0 | 32 21 10 0 | 32
159  reverse 10987654321098765432109876543210 | 32109876543210987654321098765432 | 5432
160  32 21 10 0 | 6 65 54 43 3 9
161 
162  ugly enough, but it's not my fault, I was not even in CMS at that time [gpetrucc] */
163  uint16_t bitEndOffset = (position+1) * HitSize;
164  uint8_t secondWord = (bitEndOffset >> 5);
165  uint8_t secondWordBits = bitEndOffset & (32-1); // that is, bitEndOffset % 32
166  if (secondWordBits >= HitSize) { // full block is in this word
167  uint8_t lowBitsToTrash = secondWordBits - HitSize;
168  uint32_t myResult = (hitPattern_[secondWord] >> lowBitsToTrash) & ((1 << HitSize)-1);
169  return myResult;
170  } else {
171  uint8_t firstWordBits = HitSize - secondWordBits;
172  uint32_t firstWordBlock = hitPattern_[secondWord-1] >> (32-firstWordBits);
173  uint32_t secondWordBlock = hitPattern_[secondWord] & ((1<<secondWordBits)-1);
174  uint32_t myResult = firstWordBlock + (secondWordBlock << firstWordBits);
175  return myResult;
176  }
177 }
uint32_t hitPattern_[PatternSize]
Definition: HitPattern.h:395
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t reco::HitPattern::getHitType ( uint32_t  pattern)
inlinestatic

Definition at line 529 of file HitPattern.h.

References HitTypeMask, HitTypeOffset, and unlikely.

Referenced by FixTrackHitPattern::analyze(), innermostMuonStationWithHits(), muonStations(), outermostMuonStationWithHits(), CheckHitPattern::print(), PFCheckHitPattern::print(), printHitPattern(), type_1_HitFilter(), type_2_HitFilter(), type_3_HitFilter(), and validHitFilter().

529  {
530  if unlikely(pattern == 0) return 999999;
532  }
static const unsigned short HitTypeMask
Definition: HitPattern.h:392
#define unlikely(x)
Definition: Likely.h:21
static const unsigned short HitTypeOffset
Definition: HitPattern.h:391
return(e1-e2)*(e1-e2)+dp *dp
uint32_t reco::HitPattern::getLayer ( uint32_t  pattern)
inlinestatic
uint32_t reco::HitPattern::getMuonStation ( uint32_t  pattern)
inlinestatic

Muon station (1-4). Only valid for muon patterns, of course.

Definition at line 534 of file HitPattern.h.

References getSubSubStructure().

Referenced by innermostMuonStationWithHits(), muonStations(), numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), outermostMuonStationWithHits(), and printHitPattern().

534  {
535  return (getSubSubStructure(pattern)>>2) + 1;
536  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:518
uint32_t reco::HitPattern::getRPCLayer ( uint32_t  pattern)
inlinestatic

RPC layer: for station 1 and 2, layer = 1(inner) or 2(outer); for station 3, 4 layer is always 0. Only valid for muon RPC patterns, of course.

Definition at line 546 of file HitPattern.h.

References getSubSubStructure(), and likely.

Referenced by printHitPattern().

546  {
547  uint32_t sss = getSubSubStructure(pattern), stat = sss >> 2;
548  if likely(stat <= 1) return ((sss >> 1) & 1) + 1;
549  return 0;
550  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:518
return(e1-e2)*(e1-e2)+dp *dp
#define likely(x)
Definition: Likely.h:20
uint32_t reco::HitPattern::getRPCregion ( uint32_t  pattern)
inlinestatic

RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.

Definition at line 552 of file HitPattern.h.

References getSubSubStructure().

Referenced by printHitPattern().

552  {
553  return getSubSubStructure(pattern) & 1;
554  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:518
uint32_t reco::HitPattern::getSide ( uint32_t  pattern)
inlinestatic

Definition at line 524 of file HitPattern.h.

References SideMask, SideOffset, and unlikely.

Referenced by getTrackerMonoStereo(), and numberOfValidStripLayersWithMonoAndStereo().

524  {
525  if unlikely(pattern == 0) return 999999;
527  }
static const unsigned short SideOffset
Definition: HitPattern.h:387
#define unlikely(x)
Definition: Likely.h:21
static const unsigned short SideMask
Definition: HitPattern.h:388
return(e1-e2)*(e1-e2)+dp *dp
uint32_t reco::HitPattern::getSubStructure ( uint32_t  pattern)
inlinestatic
uint32_t reco::HitPattern::getSubSubStructure ( uint32_t  pattern)
inlinestatic

Definition at line 518 of file HitPattern.h.

References LayerMask, LayerOffset, and unlikely.

Referenced by getCSCRing(), getDTSuperLayer(), getMuonStation(), getRPCLayer(), getRPCregion(), and numberOfValidStripLayersWithMonoAndStereo().

518  {
519  if unlikely(pattern == 0) return 999999;
521  }
#define unlikely(x)
Definition: Likely.h:21
return(e1-e2)*(e1-e2)+dp *dp
static const unsigned short LayerOffset
Definition: HitPattern.h:383
static const unsigned short LayerMask
Definition: HitPattern.h:384
uint32_t HitPattern::getTrackerLayerCase ( uint32_t  substr,
uint32_t  layer 
) const

Definition at line 261 of file HitPattern.cc.

References getHitPattern(), HitSize, HitTypeMask, HitTypeOffset, i, LayerMask, LayerOffset, listBenchmarks::pattern, PatternSize, SubDetectorMask, SubDetectorOffset, SubstrMask, and SubstrOffset.

Referenced by pixelBarrelLayersNull(), pixelBarrelLayersTotallyOffOrBad(), pixelBarrelLayersWithMeasurement(), pixelBarrelLayersWithoutMeasurement(), pixelEndcapLayersNull(), pixelEndcapLayersTotallyOffOrBad(), pixelEndcapLayersWithMeasurement(), pixelEndcapLayersWithoutMeasurement(), stripTECLayersNull(), stripTECLayersTotallyOffOrBad(), stripTECLayersWithMeasurement(), stripTECLayersWithoutMeasurement(), stripTIBLayersNull(), stripTIBLayersTotallyOffOrBad(), stripTIBLayersWithMeasurement(), stripTIBLayersWithoutMeasurement(), stripTIDLayersNull(), stripTIDLayersTotallyOffOrBad(), stripTIDLayersWithMeasurement(), stripTIDLayersWithoutMeasurement(), stripTOBLayersNull(), stripTOBLayersTotallyOffOrBad(), stripTOBLayersWithMeasurement(), and stripTOBLayersWithoutMeasurement().

261  {
262  uint32_t tk_substr_layer =
263  (1 << SubDetectorOffset) +
264  ((substr & SubstrMask) << SubstrOffset) +
265  ((layer & LayerMask) << LayerOffset);
266 
267  uint32_t mask =
269  (SubstrMask << SubstrOffset) +
270  (LayerMask << LayerOffset);
271 
272  // crossed
273  // layer case 0: valid + (missing, off, bad) ==> with measurement
274  // layer case 1: missing + (off, bad) ==> without measurement
275  // layer case 2: off, bad ==> totally off or bad, cannot say much
276  // not crossed
277  // layer case 999999: track outside acceptance or in gap ==> null
278 
279  uint32_t layerCase = 999999;
280  for (int i=0; i<(PatternSize * 32) / HitSize; i++)
281  {
282  uint32_t pattern = getHitPattern(i);
283  if (pattern == 0) break;
284  if ((pattern & mask) == tk_substr_layer) {
285  uint32_t hitType = (pattern >> HitTypeOffset) & HitTypeMask; // 0,1,2,3
286  if (hitType < layerCase) {
287  layerCase = hitType;
288  if (hitType == 3) layerCase = 2;
289  }
290  }
291  }
292  return layerCase;
293 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short SubstrOffset
Definition: HitPattern.h:379
static const unsigned short PatternSize
Definition: HitPattern.h:128
static const unsigned short HitTypeMask
Definition: HitPattern.h:392
static const unsigned short SubDetectorMask
Definition: HitPattern.h:376
static const unsigned short HitTypeOffset
Definition: HitPattern.h:391
static const unsigned short HitSize
Definition: HitPattern.h:131
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:375
static const unsigned short SubstrMask
Definition: HitPattern.h:380
static const unsigned short LayerOffset
Definition: HitPattern.h:383
static const unsigned short LayerMask
Definition: HitPattern.h:384
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
uint32_t HitPattern::getTrackerMonoStereo ( uint32_t  substr,
uint32_t  layer 
) const

Definition at line 295 of file HitPattern.cc.

References getHitPattern(), getSide(), HitSize, HitTypeMask, HitTypeOffset, i, LayerMask, LayerOffset, MONO, listBenchmarks::pattern, PatternSize, STEREO, SubDetectorMask, SubDetectorOffset, SubstrMask, and SubstrOffset.

296 {
297  uint32_t tk_substr_layer =
298  (1 << SubDetectorOffset) +
299  ((substr & SubstrMask) << SubstrOffset) +
300  ((layer & LayerMask) << LayerOffset);
301 
302  uint32_t mask =
304  (SubstrMask << SubstrOffset) +
305  (LayerMask << LayerOffset);
306 
307  // 0: neither a valid mono nor a valid stereo hit
308  // MONO: valid mono hit
309  // STEREO: valid stereo hit
310  // MONO | STEREO: both
311  uint32_t monoStereo = 0;
312  for (int i=0; i<(PatternSize * 32) / HitSize; i++)
313  {
314  uint32_t pattern = getHitPattern(i);
315  if (pattern == 0) break;
316  if ((pattern & mask) == tk_substr_layer)
317  {
318  uint32_t hitType = (pattern >> HitTypeOffset) & HitTypeMask; // 0,1,2,3
319  if (hitType == 0) { // valid hit
320  switch (getSide(pattern)) {
321  case 0: // mono
322  monoStereo |= MONO;
323  break;
324  case 1: // stereo
325  monoStereo |= STEREO;
326  break;
327  default:
328  break;
329  }
330  }
331  }
332  }
333  return monoStereo;
334 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short SubstrOffset
Definition: HitPattern.h:379
static const unsigned short PatternSize
Definition: HitPattern.h:128
static const unsigned short HitTypeMask
Definition: HitPattern.h:392
static const unsigned short SubDetectorMask
Definition: HitPattern.h:376
static const unsigned short HitTypeOffset
Definition: HitPattern.h:391
static const unsigned short HitSize
Definition: HitPattern.h:131
static uint32_t getSide(uint32_t pattern)
Definition: HitPattern.h:524
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:375
static const unsigned short SubstrMask
Definition: HitPattern.h:380
static const unsigned short LayerOffset
Definition: HitPattern.h:383
static const unsigned short LayerMask
Definition: HitPattern.h:384
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
bool HitPattern::hasValidHitInFirstPixelBarrel ( ) const

Definition at line 183 of file HitPattern.cc.

References getHitPattern(), getLayer(), HitSize, i, listBenchmarks::pattern, PatternSize, pixelBarrelHitFilter(), and validHitFilter().

Referenced by TrackClassFilter::operator()().

183  {
184  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
185  uint32_t pattern = getHitPattern(i);
186  if (pattern == 0) break;
187  if (pixelBarrelHitFilter(pattern)) {
188  if (getLayer(pattern) == 1) {
189  if (validHitFilter(pattern)) {
190  return true;
191  }
192  }
193  }
194  }
195  return false;
196 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:513
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
static bool pixelBarrelHitFilter(uint32_t pattern)
Definition: HitPattern.h:420
bool HitPattern::hasValidHitInFirstPixelEndcap ( ) const

Definition at line 198 of file HitPattern.cc.

References getHitPattern(), getLayer(), HitSize, i, listBenchmarks::pattern, PatternSize, pixelEndcapHitFilter(), and validHitFilter().

198  {
199  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
200  uint32_t pattern = getHitPattern(i);
201  if (pattern == 0) break;
202  if (pixelEndcapHitFilter(pattern)) {
203  if (getLayer(pattern) == 1) {
204  if (validHitFilter(pattern)) {
205  return true;
206  }
207  }
208  }
209  }
210  return false;
211 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:513
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static const unsigned short HitSize
Definition: HitPattern.h:131
static bool pixelEndcapHitFilter(uint32_t pattern)
Definition: HitPattern.h:427
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::innermostMuonStationWithAnyHits ( ) const
inline

Definition at line 819 of file HitPattern.h.

References innermostMuonStationWithHits().

819 { return innermostMuonStationWithHits(-1); }
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:659
int reco::HitPattern::innermostMuonStationWithBadHits ( ) const
inline

Definition at line 818 of file HitPattern.h.

References innermostMuonStationWithHits().

818 { return innermostMuonStationWithHits(3); }
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:659
int HitPattern::innermostMuonStationWithHits ( int  hitType) const

hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all

Definition at line 659 of file HitPattern.cc.

References getHitPattern(), getHitType(), getMuonStation(), HitSize, i, muonHitFilter(), listBenchmarks::pattern, PatternSize, and run_regression::ret.

Referenced by innermostMuonStationWithAnyHits(), innermostMuonStationWithBadHits(), and innermostMuonStationWithValidHits().

659  {
660  int ret = 0;
661  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
662  uint32_t pattern = getHitPattern(i);
663  if (pattern == 0) break;
664  if (muonHitFilter(pattern) &&
665  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
666  int stat = getMuonStation(pattern);
667  if (ret == 0 || stat < ret) ret = stat;
668  }
669  }
670  return ret;
671 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:529
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:534
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::innermostMuonStationWithValidHits ( ) const
inline

Definition at line 817 of file HitPattern.h.

References innermostMuonStationWithHits().

817 { return innermostMuonStationWithHits(0); }
int innermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:659
uint32_t HitPattern::isStereo ( DetId  i)
staticprivate

Definition at line 607 of file HitPattern.cc.

References DetId::det(), i, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, and DetId::Tracker.

Referenced by encode().

608 {
609  switch (i.det()) {
610  case DetId::Tracker:
611  switch (i.subdetId()) {
614  return 0;
616  {
617  TIBDetId id = i;
618  return id.isStereo();
619  }
621  {
622  TIDDetId id = i;
623  return id.isStereo();
624  }
626  {
627  TOBDetId id = i;
628  return id.isStereo();
629  }
631  {
632  TECDetId id = i;
633  return id.isStereo();
634  }
635  default:
636  return 0;
637  }
638  break;
639  default:
640  return 0;
641  }
642 }
int i
Definition: DBlmapReader.cc:9
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
bool reco::HitPattern::muonCSCHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 479 of file HitPattern.h.

References MuonSubdetId::CSC, getSubStructure(), muonHitFilter(), and unlikely.

Referenced by numberOfBadMuonCSCHits(), numberOfLostMuonCSCHits(), numberOfValidMuonCSCHits(), and printHitPattern().

479  {
481  uint32_t substructure = getSubStructure(pattern);
482  if (substructure == (uint32_t) MuonSubdetId::CSC) return true;
483  return false;
484  }
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
</a ></td >< td >< ahref="RecoLocalMuon_CSCRecHit.html"> csc2DRecHits</a ></td >< tdclass="description"> CSC(x, y) rechits</td >< td >T.Cox</td ></tr >< tr >< td >< a href
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
bool reco::HitPattern::muonDTHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 472 of file HitPattern.h.

References MuonSubdetId::DT, getSubStructure(), muonHitFilter(), and unlikely.

Referenced by numberOfBadMuonDTHits(), numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), numberOfLostMuonDTHits(), numberOfValidMuonDTHits(), and printHitPattern().

472  {
474  uint32_t substructure = getSubStructure(pattern);
475  if (substructure == (uint32_t) MuonSubdetId::DT) return true;
476  return false;
477  }
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
bool reco::HitPattern::muonHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 500 of file HitPattern.h.

References SubDetectorMask, SubDetectorOffset, and unlikely.

Referenced by innermostMuonStationWithHits(), muonCSCHitFilter(), muonDTHitFilter(), muonRPCHitFilter(), muonStations(), numberOfBadMuonHits(), numberOfLostMuonHits(), numberOfValidMuonHits(), outermostMuonStationWithHits(), and printHitPattern().

500  {
501  if unlikely(pattern == 0) return false;
503  return false;
504  }
#define unlikely(x)
Definition: Likely.h:21
static const unsigned short SubDetectorMask
Definition: HitPattern.h:376
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:375
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
bool reco::HitPattern::muonRPCHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 486 of file HitPattern.h.

References getSubStructure(), muonHitFilter(), MuonSubdetId::RPC, and unlikely.

Referenced by numberOfBadMuonRPCHits(), numberOfLostMuonRPCHits(), numberOfValidMuonRPCHits(), and printHitPattern().

486  {
488  uint32_t substructure = getSubStructure(pattern);
489  if (substructure == (uint32_t) MuonSubdetId::RPC) return true;
490  return false;
491  }
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int HitPattern::muonStations ( int  subdet,
int  hitType 
) const

subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad

Definition at line 644 of file HitPattern.cc.

References getHitPattern(), getHitType(), getMuonStation(), getSubStructure(), HitSize, i, muonHitFilter(), listBenchmarks::pattern, PatternSize, and mergeVDriftHistosByStation::stations.

Referenced by cscStationsWithAnyHits(), cscStationsWithBadHits(), cscStationsWithValidHits(), dtStationsWithAnyHits(), dtStationsWithBadHits(), dtStationsWithValidHits(), muonStationsWithAnyHits(), muonStationsWithBadHits(), muonStationsWithValidHits(), rpcStationsWithAnyHits(), rpcStationsWithBadHits(), and rpcStationsWithValidHits().

644  {
645  int stations[4] = { 0,0,0,0 };
646  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
647  uint32_t pattern = getHitPattern(i);
648  if (pattern == 0) break;
649  if (muonHitFilter(pattern) &&
650  (subdet == 0 || int(getSubStructure(pattern)) == subdet) &&
651  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
652  stations[getMuonStation(pattern)-1] = 1;
653  }
654  }
655  return stations[0]+stations[1]+stations[2]+stations[3];
656 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:529
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:534
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::muonStationsWithAnyHits ( ) const
inline

Definition at line 806 of file HitPattern.h.

References muonStations().

806 { return muonStations(0,-1); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::muonStationsWithBadHits ( ) const
inline

Definition at line 805 of file HitPattern.h.

References muonStations().

805 { return muonStations(0, 3); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::muonStationsWithValidHits ( ) const
inline

Definition at line 804 of file HitPattern.h.

References muonStations().

804 { return muonStations(0, 0); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::numberOfBadHits ( ) const
inline

Definition at line 697 of file HitPattern.h.

References countHits(), and type_3_HitFilter().

697  {
698  return countHits(type_3_HitFilter);
699 }
static bool type_3_HitFilter(uint32_t pattern)
Definition: HitPattern.h:572
int countHits(filterType filter) const
Definition: HitPattern.h:162
int reco::HitPattern::numberOfBadMuonCSCHits ( ) const
inline

Definition at line 709 of file HitPattern.h.

References countTypedHits(), muonCSCHitFilter(), and type_2_HitFilter().

709  {
711 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:567
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
int reco::HitPattern::numberOfBadMuonDTHits ( ) const
inline

Definition at line 705 of file HitPattern.h.

References countTypedHits(), muonDTHitFilter(), and type_2_HitFilter().

705  {
707 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:567
int reco::HitPattern::numberOfBadMuonHits ( ) const
inline

Definition at line 701 of file HitPattern.h.

References countTypedHits(), muonHitFilter(), and type_2_HitFilter().

701  {
703 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:567
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
int reco::HitPattern::numberOfBadMuonRPCHits ( ) const
inline

Definition at line 713 of file HitPattern.h.

References countTypedHits(), muonRPCHitFilter(), and type_2_HitFilter().

713  {
715 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:567
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
int HitPattern::numberOfDTStationsWithBothViews ( ) const

Definition at line 712 of file HitPattern.cc.

References getDTSuperLayer(), getHitPattern(), getMuonStation(), HitSize, i, muonDTHitFilter(), listBenchmarks::pattern, PatternSize, mergeVDriftHistosByStation::stations, and validHitFilter().

712  {
713  int stations[4][2] = { {0,0}, {0,0}, {0,0}, {0,0} };
714  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
715  uint32_t pattern = getHitPattern(i);
716  if (pattern == 0) break;
717  if (muonDTHitFilter(pattern) && validHitFilter(pattern)) {
718  stations[getMuonStation(pattern)-1][getDTSuperLayer(pattern) == 2] = 1;
719  }
720  }
721  return stations[0][0]*stations[0][1] + stations[1][0]*stations[1][1] + stations[2][0]*stations[2][1] + stations[3][0]*stations[3][1];
722 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getDTSuperLayer(uint32_t pattern)
DT superlayer (1-3). Where the &quot;hit&quot; was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:538
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:534
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int HitPattern::numberOfDTStationsWithRPhiView ( ) const

Definition at line 688 of file HitPattern.cc.

References getDTSuperLayer(), getHitPattern(), getMuonStation(), HitSize, i, muonDTHitFilter(), listBenchmarks::pattern, PatternSize, mergeVDriftHistosByStation::stations, and validHitFilter().

688  {
689  int stations[4] = { 0,0,0,0 };
690  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
691  uint32_t pattern = getHitPattern(i);
692  if (pattern == 0) break;
693  if (muonDTHitFilter(pattern) && validHitFilter(pattern) && getDTSuperLayer(pattern) != 2) {
694  stations[getMuonStation(pattern)-1] = 1;
695  }
696  }
697  return stations[0]+stations[1]+stations[2]+stations[3];
698 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getDTSuperLayer(uint32_t pattern)
DT superlayer (1-3). Where the &quot;hit&quot; was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:538
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:534
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int HitPattern::numberOfDTStationsWithRZView ( ) const

Definition at line 700 of file HitPattern.cc.

References getDTSuperLayer(), getHitPattern(), getMuonStation(), HitSize, i, muonDTHitFilter(), listBenchmarks::pattern, PatternSize, mergeVDriftHistosByStation::stations, and validHitFilter().

700  {
701  int stations[4] = { 0,0,0,0 };
702  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
703  uint32_t pattern = getHitPattern(i);
704  if (pattern == 0) break;
705  if (muonDTHitFilter(pattern) && validHitFilter(pattern) && getDTSuperLayer(pattern) == 2) {
706  stations[getMuonStation(pattern)-1] = 1;
707  }
708  }
709  return stations[0]+stations[1]+stations[2]+stations[3];
710 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getDTSuperLayer(uint32_t pattern)
DT superlayer (1-3). Where the &quot;hit&quot; was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:538
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:534
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int HitPattern::numberOfHits ( void  ) const

Definition at line 213 of file HitPattern.cc.

References prof2calltree::count, getHitPattern(), HitSize, i, listBenchmarks::pattern, and PatternSize.

Referenced by TrackAnalyzer::analyze(), PFCheckHitPattern::analyze(), CheckHitPattern::analyze(), TkConvValidator::analyze(), FixTrackHitPattern::analyze(), GetTrackTrajInfo::analyze(), appendHit(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), TrackAnalyzer::fillHistosForState(), PrimaryVertexAnalyzer4PU::fillTrackHistos(), spr::goodTrack(), PrimaryVertexValidation::hasFirstLayerPixelHits(), index_to_hitpattern(), PFDisplacedVertexHelper::isTrackSelected(), TCMETAlgo::nExpectedInnerHits(), TCMETAlgo::nExpectedOuterHits(), FWTrackResidualDetailView::prepareData(), reco::TrackResiduals::print(), CheckHitPattern::print(), PFCheckHitPattern::print(), print(), PrimaryVertexAnalyzer4PU::printRecTrks(), IsolatedTracksCone::printTrack(), IsolatedTracksNxN::printTrack(), FWConvTrackHitsDetailView::setTextInfo(), and QcdUeDQM::trackSelection().

213  {
214  int count = 0;
215  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
216  uint32_t pattern = getHitPattern(i);
217  if (pattern == 0) break;
218  ++count;
219  }
220  return count;
221 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:128
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::numberOfInactiveHits ( ) const
inline

Definition at line 719 of file HitPattern.h.

References countHits(), and type_2_HitFilter().

719  {
720  return countHits(type_2_HitFilter);
721 }
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:567
int countHits(filterType filter) const
Definition: HitPattern.h:162
int reco::HitPattern::numberOfInactiveTrackerHits ( ) const
inline

Definition at line 723 of file HitPattern.h.

References countTypedHits(), trackerHitFilter(), and type_2_HitFilter().

723  {
725 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:567
int reco::HitPattern::numberOfLostHits ( ) const
inline

Definition at line 639 of file HitPattern.h.

References countHits(), and type_1_HitFilter().

Referenced by reco::TransientTrack::numberOfLostHits(), reco::TrackBase::numberOfLostHits(), and reco::modules::DuplicateTrackMerger::produce().

639  {
640  return countHits(type_1_HitFilter);
641 }
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
int countHits(filterType filter) const
Definition: HitPattern.h:162
int reco::HitPattern::numberOfLostMuonCSCHits ( ) const
inline

Definition at line 687 of file HitPattern.h.

References countTypedHits(), muonCSCHitFilter(), and type_1_HitFilter().

687  {
689 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
int reco::HitPattern::numberOfLostMuonDTHits ( ) const
inline

Definition at line 683 of file HitPattern.h.

References countTypedHits(), muonDTHitFilter(), and type_1_HitFilter().

683  {
685 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
int reco::HitPattern::numberOfLostMuonHits ( ) const
inline

Definition at line 647 of file HitPattern.h.

References countTypedHits(), muonHitFilter(), and type_1_HitFilter().

647  {
649 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
int reco::HitPattern::numberOfLostMuonRPCHits ( ) const
inline

Definition at line 691 of file HitPattern.h.

References countTypedHits(), muonRPCHitFilter(), and type_1_HitFilter().

691  {
693 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
int reco::HitPattern::numberOfLostPixelBarrelHits ( ) const
inline

Definition at line 655 of file HitPattern.h.

References countTypedHits(), pixelBarrelHitFilter(), and type_1_HitFilter().

655  {
657 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool pixelBarrelHitFilter(uint32_t pattern)
Definition: HitPattern.h:420
int reco::HitPattern::numberOfLostPixelEndcapHits ( ) const
inline

Definition at line 659 of file HitPattern.h.

References countTypedHits(), pixelEndcapHitFilter(), and type_1_HitFilter().

659  {
661 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool pixelEndcapHitFilter(uint32_t pattern)
Definition: HitPattern.h:427
int reco::HitPattern::numberOfLostPixelHits ( ) const
inline

Definition at line 651 of file HitPattern.h.

References countTypedHits(), pixelHitFilter(), and type_1_HitFilter().

651  {
653 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool pixelHitFilter(uint32_t pattern)
Definition: HitPattern.h:412
int reco::HitPattern::numberOfLostStripHits ( ) const
inline

Definition at line 663 of file HitPattern.h.

References countTypedHits(), stripHitFilter(), and type_1_HitFilter().

663  {
665 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool stripHitFilter(uint32_t pattern)
Definition: HitPattern.h:434
int reco::HitPattern::numberOfLostStripTECHits ( ) const
inline

Definition at line 679 of file HitPattern.h.

References countTypedHits(), stripTECHitFilter(), and type_1_HitFilter().

679  {
681 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool stripTECHitFilter(uint32_t pattern)
Definition: HitPattern.h:465
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
int reco::HitPattern::numberOfLostStripTIBHits ( ) const
inline

Definition at line 667 of file HitPattern.h.

References countTypedHits(), stripTIBHitFilter(), and type_1_HitFilter().

667  {
669 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool stripTIBHitFilter(uint32_t pattern)
Definition: HitPattern.h:444
int reco::HitPattern::numberOfLostStripTIDHits ( ) const
inline

Definition at line 671 of file HitPattern.h.

References countTypedHits(), stripTIDHitFilter(), and type_1_HitFilter().

671  {
673 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool stripTIDHitFilter(uint32_t pattern)
Definition: HitPattern.h:451
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
int reco::HitPattern::numberOfLostStripTOBHits ( ) const
inline

Definition at line 675 of file HitPattern.h.

References countTypedHits(), stripTOBHitFilter(), and type_1_HitFilter().

675  {
677 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
static bool stripTOBHitFilter(uint32_t pattern)
Definition: HitPattern.h:458
int reco::HitPattern::numberOfLostTrackerHits ( ) const
inline

Definition at line 643 of file HitPattern.h.

References countTypedHits(), trackerHitFilter(), and type_1_HitFilter().

Referenced by reco::modules::MultiTrackSelector::processMVA(), reco::modules::MultiTrackSelector::select(), and reco::TrackBase::validFraction().

643  {
645 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:562
int reco::HitPattern::numberOfValidHits ( ) const
inline
int reco::HitPattern::numberOfValidMuonCSCHits ( ) const
inline

Definition at line 630 of file HitPattern.h.

References countTypedHits(), muonCSCHitFilter(), and validHitFilter().

Referenced by MuonTrackValidator::analyze().

630  {
632 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
int reco::HitPattern::numberOfValidMuonDTHits ( ) const
inline

Definition at line 626 of file HitPattern.h.

References countTypedHits(), muonDTHitFilter(), and validHitFilter().

Referenced by MuonTrackValidator::analyze().

626  {
628 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
int reco::HitPattern::numberOfValidMuonHits ( ) const
inline

Definition at line 590 of file HitPattern.h.

References countTypedHits(), muonHitFilter(), and validHitFilter().

Referenced by HLTMuonL3PreFilter::hltFilter(), BPhysicsOniaDQM::selGlobalMuon(), MuScleFitMuonSelector::selGlobalMuon(), and MuScleFit::selGlobalMuon().

590  {
592 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
int reco::HitPattern::numberOfValidMuonRPCHits ( ) const
inline

Definition at line 634 of file HitPattern.h.

References countTypedHits(), muonRPCHitFilter(), and validHitFilter().

Referenced by MuonTrackValidator::analyze().

634  {
636 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
int reco::HitPattern::numberOfValidPixelBarrelHits ( ) const
inline

Definition at line 598 of file HitPattern.h.

References countTypedHits(), pixelBarrelHitFilter(), and validHitFilter().

Referenced by PatTrackAnalyzer::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), TrackAnalyzer::fillHistosForTrackerSpecific(), HLTTrackWithHits::hltFilter(), and HIPAlignmentAlgorithm::run().

598  {
600 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static bool pixelBarrelHitFilter(uint32_t pattern)
Definition: HitPattern.h:420
int reco::HitPattern::numberOfValidPixelEndcapHits ( ) const
inline

Definition at line 602 of file HitPattern.h.

References countTypedHits(), pixelEndcapHitFilter(), and validHitFilter().

Referenced by PatTrackAnalyzer::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), TrackAnalyzer::fillHistosForTrackerSpecific(), HLTTrackWithHits::hltFilter(), and HIPAlignmentAlgorithm::run().

602  {
604 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static bool pixelEndcapHitFilter(uint32_t pattern)
Definition: HitPattern.h:427
int reco::HitPattern::numberOfValidPixelHits ( ) const
inline
int reco::HitPattern::numberOfValidStripHits ( ) const
inline

Definition at line 606 of file HitPattern.h.

References countTypedHits(), stripHitFilter(), and validHitFilter().

606  {
608 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static bool stripHitFilter(uint32_t pattern)
Definition: HitPattern.h:434
int HitPattern::numberOfValidStripLayersWithMonoAndStereo ( uint32_t  stripdet,
uint32_t  layer 
) const

Definition at line 223 of file HitPattern.cc.

References prof2calltree::count, getHitPattern(), getLayer(), getSide(), getSubStructure(), getSubSubStructure(), HitSize, i, j, LayerMask, listBenchmarks::pattern, PatternSize, stripHitFilter(), SubstrMask, and validHitFilter().

Referenced by MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), RecoTrackSelector::operator()(), reco::modules::MultiTrackSelector::processMVA(), reco::modules::CosmicTrackSelector::select(), reco::modules::MultiTrackSelector::select(), and QcdUeDQM::trackSelection().

223  {
224  static const int nHits = (PatternSize * 32) / HitSize;
225  bool hasMono[SubstrMask + 1][LayerMask + 1];
226  // printf("sizeof(hasMono) = %d\n", sizeof(hasMono));
227  memset(hasMono, 0, sizeof(hasMono));
228  bool hasStereo[SubstrMask + 1][LayerMask + 1];
229  memset(hasStereo, 0, sizeof(hasStereo));
230  // mark which layers have mono/stereo hits
231  for (int i = 0; i < nHits; i++) {
232  uint32_t pattern = getHitPattern(i);
233  if (pattern == 0) break;
234  if (validHitFilter(pattern) && stripHitFilter(pattern)) {
235  if (stripdet!=0 && getSubStructure(pattern)!=stripdet) continue;
236  if (layer!=0 && getSubSubStructure(pattern)!=layer) continue;
237  switch (getSide(pattern)) {
238  case 0: // mono
239  hasMono[getSubStructure(pattern)][getLayer(pattern)]
240  = true;
241  break;
242  case 1: // stereo
243  hasStereo[getSubStructure(pattern)][getLayer(pattern)]
244  = true;
245  break;
246  default:
247  break;
248  }
249  }
250 
251  }
252  // count how many layers have mono and stereo hits
253  int count = 0;
254  for (int i = 0; i < SubstrMask + 1; ++i)
255  for (int j = 0; j < LayerMask + 1; ++j)
256  if (hasMono[i][j] && hasStereo[i][j])
257  count++;
258  return count;
259 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:513
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:518
static const unsigned short PatternSize
Definition: HitPattern.h:128
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
int j
Definition: DBlmapReader.cc:9
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static const unsigned short HitSize
Definition: HitPattern.h:131
static uint32_t getSide(uint32_t pattern)
Definition: HitPattern.h:524
static const unsigned short SubstrMask
Definition: HitPattern.h:380
static bool stripHitFilter(uint32_t pattern)
Definition: HitPattern.h:434
static const unsigned short LayerMask
Definition: HitPattern.h:384
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::numberOfValidStripLayersWithMonoAndStereo ( ) const
inline
int reco::HitPattern::numberOfValidStripTECHits ( ) const
inline

Definition at line 622 of file HitPattern.h.

References countTypedHits(), stripTECHitFilter(), and validHitFilter().

Referenced by PatTrackAnalyzer::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), and TrackAnalyzer::fillHistosForTrackerSpecific().

622  {
624 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool stripTECHitFilter(uint32_t pattern)
Definition: HitPattern.h:465
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
int reco::HitPattern::numberOfValidStripTIBHits ( ) const
inline

Definition at line 610 of file HitPattern.h.

References countTypedHits(), stripTIBHitFilter(), and validHitFilter().

Referenced by PatTrackAnalyzer::analyze(), CheckHitPattern::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), and TrackAnalyzer::fillHistosForTrackerSpecific().

610  {
612 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static bool stripTIBHitFilter(uint32_t pattern)
Definition: HitPattern.h:444
int reco::HitPattern::numberOfValidStripTIDHits ( ) const
inline

Definition at line 614 of file HitPattern.h.

References countTypedHits(), stripTIDHitFilter(), and validHitFilter().

Referenced by PatTrackAnalyzer::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), and TrackAnalyzer::fillHistosForTrackerSpecific().

614  {
616 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool stripTIDHitFilter(uint32_t pattern)
Definition: HitPattern.h:451
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
int reco::HitPattern::numberOfValidStripTOBHits ( ) const
inline

Definition at line 618 of file HitPattern.h.

References countTypedHits(), stripTOBHitFilter(), and validHitFilter().

Referenced by PatTrackAnalyzer::analyze(), CheckHitPattern::analyze(), MTVHistoProducerAlgoForTracker::fill_simAssociated_recoTrack_histos(), and TrackAnalyzer::fillHistosForTrackerSpecific().

618  {
620 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
static bool stripTOBHitFilter(uint32_t pattern)
Definition: HitPattern.h:458
int reco::HitPattern::numberOfValidTECLayersWithMonoAndStereo ( uint32_t  layer = 0) const
inline
int reco::HitPattern::numberOfValidTIBLayersWithMonoAndStereo ( uint32_t  layer = 0) const
inline
int reco::HitPattern::numberOfValidTIDLayersWithMonoAndStereo ( uint32_t  layer = 0) const
inline
int reco::HitPattern::numberOfValidTOBLayersWithMonoAndStereo ( uint32_t  layer = 0) const
inline
int reco::HitPattern::numberOfValidTrackerHits ( ) const
inline

Definition at line 586 of file HitPattern.h.

References countTypedHits(), trackerHitFilter(), and validHitFilter().

Referenced by CSCSkim::doBFieldStudySelection(), PFMuonAlgo::isTrackerTightMuon(), PFMuonAlgo::printMuonProperties(), and reco::TrackBase::validFraction().

586  {
588 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:172
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:557
int reco::HitPattern::outermostMuonStationWithAnyHits ( ) const
inline

Definition at line 822 of file HitPattern.h.

References outermostMuonStationWithHits().

822 { return outermostMuonStationWithHits(-1); }
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:673
int reco::HitPattern::outermostMuonStationWithBadHits ( ) const
inline

Definition at line 821 of file HitPattern.h.

References outermostMuonStationWithHits().

821 { return outermostMuonStationWithHits(3); }
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:673
int HitPattern::outermostMuonStationWithHits ( int  hitType) const

hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all

Definition at line 673 of file HitPattern.cc.

References getHitPattern(), getHitType(), getMuonStation(), HitSize, i, muonHitFilter(), listBenchmarks::pattern, PatternSize, and run_regression::ret.

Referenced by outermostMuonStationWithAnyHits(), outermostMuonStationWithBadHits(), and outermostMuonStationWithValidHits().

673  {
674  int ret = 0;
675  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
676  uint32_t pattern = getHitPattern(i);
677  if (pattern == 0) break;
678  if (muonHitFilter(pattern) &&
679  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
680  int stat = getMuonStation(pattern);
681  if (ret == 0 || stat > ret) ret = stat;
682  }
683  }
684  return ret;
685 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:529
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:534
static const unsigned short PatternSize
Definition: HitPattern.h:128
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
static const unsigned short HitSize
Definition: HitPattern.h:131
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::outermostMuonStationWithValidHits ( ) const
inline

Definition at line 820 of file HitPattern.h.

References outermostMuonStationWithHits().

820 { return outermostMuonStationWithHits(0); }
int outermostMuonStationWithHits(int hitType) const
hitType=-1(all), 0=valid, 3=bad; 0 = no stations at all
Definition: HitPattern.cc:673
bool reco::HitPattern::pixelBarrelHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 420 of file HitPattern.h.

References getSubStructure(), PixelSubdetector::PixelBarrel, trackerHitFilter(), and unlikely.

Referenced by PrimaryVertexValidation::hasFirstLayerPixelHits(), hasValidHitInFirstPixelBarrel(), SoftPFElectronTagInfoProducer::isElecClean(), numberOfLostPixelBarrelHits(), and numberOfValidPixelBarrelHits().

420  {
422  uint32_t substructure = getSubStructure(pattern);
423  if (substructure == PixelSubdetector::PixelBarrel) return true;
424  return false;
425  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int HitPattern::pixelBarrelLayersNull ( ) const

Definition at line 509 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelBarrel.

Referenced by pixelLayersNull().

509  {
510  int count = 0;
511  uint32_t substr = PixelSubdetector::PixelBarrel;
512  uint32_t NPixBarrel = 4;
513  for (uint32_t layer=1; layer<=NPixBarrel; layer++) {
514  if (getTrackerLayerCase(substr, layer) == 999999) count++;
515  }
516  return count;
517 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::pixelBarrelLayersTotallyOffOrBad ( ) const

Definition at line 452 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelBarrel.

Referenced by pixelLayersTotallyOffOrBad().

452  {
453  int count = 0;
454  uint32_t substr = PixelSubdetector::PixelBarrel;
455  uint32_t NPixBarrel = 4;
456  for (uint32_t layer=1; layer<=NPixBarrel; layer++) {
457  if (getTrackerLayerCase(substr, layer) == 2) count++;
458  }
459  return count;
460 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::pixelBarrelLayersWithMeasurement ( ) const

Definition at line 338 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelBarrel.

Referenced by TrackAnalyzer::fillHistosForTrackerSpecific(), PrimaryVertexAnalyzer4PU::fillTrackHistos(), pixelLayersWithMeasurement(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

338  {
339  int count = 0;
340  uint32_t substr = PixelSubdetector::PixelBarrel;
341  uint32_t NPixBarrel = 4;
342  for (uint32_t layer=1; layer<=NPixBarrel; layer++) {
343  if (getTrackerLayerCase(substr, layer) == 0) count++;
344  }
345  return count;
346 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::pixelBarrelLayersWithoutMeasurement ( ) const

Definition at line 395 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelBarrel.

Referenced by pixelLayersWithoutMeasurement().

395  {
396  int count = 0;
397  uint32_t substr = PixelSubdetector::PixelBarrel;
398  uint32_t NPixBarrel = 4;
399  for (uint32_t layer=1; layer<=NPixBarrel; layer++) {
400  if (getTrackerLayerCase(substr, layer) == 1) count++;
401  }
402  return count;
403 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
bool reco::HitPattern::pixelEndcapHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 427 of file HitPattern.h.

References getSubStructure(), PixelSubdetector::PixelEndcap, trackerHitFilter(), and unlikely.

Referenced by PrimaryVertexValidation::hasFirstLayerPixelHits(), hasValidHitInFirstPixelEndcap(), SoftPFElectronTagInfoProducer::isElecClean(), numberOfLostPixelEndcapHits(), and numberOfValidPixelEndcapHits().

427  {
429  uint32_t substructure = getSubStructure(pattern);
430  if (substructure == PixelSubdetector::PixelEndcap) return true;
431  return false;
432  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int HitPattern::pixelEndcapLayersNull ( ) const

Definition at line 519 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelEndcap.

Referenced by pixelLayersNull().

519  {
520  int count = 0;
521  uint32_t substr = PixelSubdetector::PixelEndcap;
522  uint32_t NPixForward = 3;
523  for (uint32_t layer=1; layer<=NPixForward; layer++) {
524  if (getTrackerLayerCase(substr, layer) == 999999) count++;
525  }
526  return count;
527 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::pixelEndcapLayersTotallyOffOrBad ( ) const

Definition at line 462 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelEndcap.

Referenced by pixelLayersTotallyOffOrBad().

462  {
463  int count = 0;
464  uint32_t substr = PixelSubdetector::PixelEndcap;
465  uint32_t NPixForward = 3;
466  for (uint32_t layer=1; layer<=NPixForward; layer++) {
467  if (getTrackerLayerCase(substr, layer) == 2) count++;
468  }
469  return count;
470 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::pixelEndcapLayersWithMeasurement ( ) const

Definition at line 348 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelEndcap.

Referenced by TrackAnalyzer::fillHistosForTrackerSpecific(), pixelLayersWithMeasurement(), IsolatedTracksNxN::printTrack(), and BeamFitter::readEvent().

348  {
349  int count = 0;
350  uint32_t substr = PixelSubdetector::PixelEndcap;
351  uint32_t NPixForward = 3;
352  for (uint32_t layer=1; layer<=NPixForward; layer++) {
353  if (getTrackerLayerCase(substr, layer) == 0) count++;
354  }
355  return count;
356 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::pixelEndcapLayersWithoutMeasurement ( ) const

Definition at line 405 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and PixelSubdetector::PixelEndcap.

Referenced by pixelLayersWithoutMeasurement().

405  {
406  int count = 0;
407  uint32_t substr = PixelSubdetector::PixelEndcap;
408  uint32_t NPixForward = 3;
409  for (uint32_t layer=1; layer<=NPixForward; layer++) {
410  if (getTrackerLayerCase(substr, layer) == 1) count++;
411  }
412  return count;
413 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
bool reco::HitPattern::pixelHitFilter ( uint32_t  pattern)
inlinestatic
int reco::HitPattern::pixelLayersNull ( ) const
inline

Definition at line 791 of file HitPattern.h.

References pixelBarrelLayersNull(), and pixelEndcapLayersNull().

Referenced by trackerLayersNull().

791  {
792  return pixelBarrelLayersNull() +
794  }
int pixelBarrelLayersNull() const
Definition: HitPattern.cc:509
int pixelEndcapLayersNull() const
Definition: HitPattern.cc:519
int reco::HitPattern::pixelLayersTotallyOffOrBad ( ) const
inline

Definition at line 774 of file HitPattern.h.

References pixelBarrelLayersTotallyOffOrBad(), and pixelEndcapLayersTotallyOffOrBad().

Referenced by trackerLayersTotallyOffOrBad().

774  {
777  }
int pixelBarrelLayersTotallyOffOrBad() const
Definition: HitPattern.cc:452
int pixelEndcapLayersTotallyOffOrBad() const
Definition: HitPattern.cc:462
int reco::HitPattern::pixelLayersWithMeasurement ( ) const
inline
int reco::HitPattern::pixelLayersWithoutMeasurement ( ) const
inline

Definition at line 756 of file HitPattern.h.

References pixelBarrelLayersWithoutMeasurement(), and pixelEndcapLayersWithoutMeasurement().

Referenced by trackerLayersWithoutMeasurement().

756  {
759  }
int pixelBarrelLayersWithoutMeasurement() const
Definition: HitPattern.cc:395
int pixelEndcapLayersWithoutMeasurement() const
Definition: HitPattern.cc:405
void HitPattern::print ( std::ostream &  stream = std::cout) const

Definition at line 592 of file HitPattern.cc.

References flags, getHitPattern(), i, numberOfHits(), listBenchmarks::pattern, and printHitPattern().

593 {
594  stream << "HitPattern" << std::endl;
595  for (int i = 0; i < numberOfHits(); i++)
596  printHitPattern(i, stream);
597  std::ios_base::fmtflags flags = stream.flags();
598  stream.setf ( std::ios_base::hex, std::ios_base::basefield );
599  stream.setf ( std::ios_base::showbase );
600  for (int i = 0; i < numberOfHits(); i++) {
601  uint32_t pattern = getHitPattern(i);
602  stream << pattern << std::endl;
603  }
604  stream.flags(flags);
605 }
int i
Definition: DBlmapReader.cc:9
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
int numberOfHits() const
Definition: HitPattern.cc:213
void printHitPattern(int position, std::ostream &stream) const
Definition: HitPattern.cc:565
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
void HitPattern::printHitPattern ( int  position,
std::ostream &  stream 
) const

Definition at line 565 of file HitPattern.cc.

References getCSCRing(), getDTSuperLayer(), getHitPattern(), getHitType(), getLayer(), getMuonStation(), getRPCLayer(), getRPCregion(), getSubStructure(), muonCSCHitFilter(), muonDTHitFilter(), muonHitFilter(), muonRPCHitFilter(), listBenchmarks::pattern, and trackerHitFilter().

Referenced by spr::goodTrack(), print(), PrimaryVertexAnalyzer4PU::printRecTrks(), IsolatedTracksCone::printTrack(), and IsolatedTracksNxN::printTrack().

566 {
567  uint32_t pattern = getHitPattern(position);
568  stream << "\t";
569  if (muonHitFilter(pattern))
570  stream << "muon";
571  if (trackerHitFilter(pattern))
572  stream << "tracker";
573  stream << "\tsubstructure " << getSubStructure(pattern);
574  if (muonHitFilter(pattern)) {
575  stream << "\tstation " << getMuonStation(pattern);
576  if (muonDTHitFilter(pattern)) {
577  stream << "\tdt superlayer " << getDTSuperLayer(pattern);
578  } else if (muonCSCHitFilter(pattern)) {
579  stream << "\tcsc ring " << getCSCRing(pattern);
580  } else if (muonRPCHitFilter(pattern)) {
581  stream << "\trpc " << (getRPCregion(pattern) ? "endcaps" : "barrel") << ", layer " << getRPCLayer(pattern);
582  } else {
583  stream << "(UNKNOWN Muon SubStructure!) \tsubsubstructure " << getSubStructure(pattern);
584  }
585  } else {
586  stream << "\tlayer " << getLayer(pattern);
587  }
588  stream << "\thit type " << getHitType(pattern);
589  stream << std::endl;
590 }
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...
Definition: HitPattern.h:546
static uint32_t getDTSuperLayer(uint32_t pattern)
DT superlayer (1-3). Where the &quot;hit&quot; was a DT segment, superlayer is 0. Only valid for muon DT patter...
Definition: HitPattern.h:538
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:513
static uint32_t getCSCRing(uint32_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
Definition: HitPattern.h:542
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:529
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:534
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:500
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
static uint32_t getRPCregion(uint32_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
Definition: HitPattern.h:552
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
int reco::HitPattern::rpcStationsWithAnyHits ( ) const
inline

Definition at line 815 of file HitPattern.h.

References muonStations().

815 { return muonStations(3,-1); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::rpcStationsWithBadHits ( ) const
inline

Definition at line 814 of file HitPattern.h.

References muonStations().

814 { return muonStations(3, 3); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
int reco::HitPattern::rpcStationsWithValidHits ( ) const
inline

Definition at line 813 of file HitPattern.h.

References muonStations().

813 { return muonStations(3, 0); }
int muonStations(int subdet, int hitType) const
subdet = 0(all), 1(DT), 2(CSC), 3(RPC); hitType=-1(all), 0=valid, 3=bad
Definition: HitPattern.cc:644
template<typename I >
void reco::HitPattern::set ( const I &  begin,
const I &  end 
)
inline

Definition at line 151 of file HitPattern.h.

References counter, hitPattern_, HitSize, Exhume::I, i, and PatternSize.

Referenced by FixTrackHitPattern::analyze(), appendHit(), betterConfigParser.BetterConfigParser::getGeneral(), HitPattern(), reco::TrackBase::setHitPattern(), reco::TrackBase::setTrackerExpectedHitsInner(), and reco::TrackBase::setTrackerExpectedHitsOuter().

151  {
152  for (int i=0; i<PatternSize; i++) hitPattern_[i] = 0;
153  unsigned int counter = 0;
154  for (I hit=begin; hit!=end && counter<32*PatternSize/HitSize;
155  hit++, counter++)
156  set(*hit, counter);
157  }
int i
Definition: DBlmapReader.cc:9
uint32_t hitPattern_[PatternSize]
Definition: HitPattern.h:395
void set(const I &begin, const I &end)
Definition: HitPattern.h:151
static const unsigned short PatternSize
Definition: HitPattern.h:128
const std::complex< double > I
Definition: I.h:8
#define end
Definition: vmac.h:37
static const unsigned short HitSize
Definition: HitPattern.h:131
#define begin
Definition: vmac.h:30
static std::atomic< unsigned int > counter
void reco::HitPattern::set ( const TrackingRecHit hit,
unsigned int  i 
)
inline

Definition at line 197 of file HitPattern.h.

References encode(), and setHitPattern().

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

197 {setHitPattern(i, encode(hit,i));}
int i
Definition: DBlmapReader.cc:9
uint32_t encode(const TrackingRecHit &, unsigned int)
Definition: HitPattern.cc:15
void setHitPattern(int position, uint32_t pattern)
Definition: HitPattern.cc:79
void reco::HitPattern::set ( const TrackingRecHitRef ref,
unsigned int  i 
)
inlineprivate

Definition at line 401 of file HitPattern.h.

References set().

Referenced by betterConfigParser.BetterConfigParser::getGeneral(), and set().

401 { set(* ref, i); }
int i
Definition: DBlmapReader.cc:9
void set(const I &begin, const I &end)
Definition: HitPattern.h:151
void HitPattern::setHitPattern ( int  position,
uint32_t  pattern 
)
private

Definition at line 79 of file HitPattern.cc.

References hitPattern_, HitSize, i, and evf::evtn::offset().

Referenced by set().

79  {
80  int offset = position * HitSize;
81  for (int i=0; i<HitSize; i++) {
82  int pos = offset + i;
83  uint32_t bit = (pattern >> i) & 0x1;
84  hitPattern_[pos / 32] += bit << ((offset + i) % 32);
85  }
86 }
int i
Definition: DBlmapReader.cc:9
uint32_t hitPattern_[PatternSize]
Definition: HitPattern.h:395
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
unsigned int offset(bool)
static const unsigned short HitSize
Definition: HitPattern.h:131
bool reco::HitPattern::stripHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 434 of file HitPattern.h.

References getSubStructure(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, trackerHitFilter(), and unlikely.

Referenced by numberOfLostStripHits(), numberOfValidStripHits(), numberOfValidStripLayersWithMonoAndStereo(), and FWConvTrackHitsDetailView::setTextInfo().

434  {
436  uint32_t substructure = getSubStructure(pattern);
437  if (substructure == StripSubdetector::TIB ||
438  substructure == StripSubdetector::TID ||
439  substructure == StripSubdetector::TOB ||
440  substructure == StripSubdetector::TEC) return true;
441  return false;
442  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int reco::HitPattern::stripLayersNull ( ) const
inline

Definition at line 796 of file HitPattern.h.

References stripTECLayersNull(), stripTIBLayersNull(), stripTIDLayersNull(), and stripTOBLayersNull().

Referenced by trackerLayersNull().

796  {
797  return stripTIBLayersNull() +
799  stripTOBLayersNull() +
801  }
int stripTIBLayersNull() const
Definition: HitPattern.cc:529
int stripTECLayersNull() const
Definition: HitPattern.cc:556
int stripTIDLayersNull() const
Definition: HitPattern.cc:538
int stripTOBLayersNull() const
Definition: HitPattern.cc:547
int reco::HitPattern::stripLayersTotallyOffOrBad ( ) const
inline
int reco::HitPattern::stripLayersWithMeasurement ( ) const
inline
int reco::HitPattern::stripLayersWithoutMeasurement ( ) const
inline
bool reco::HitPattern::stripTECHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 465 of file HitPattern.h.

References getSubStructure(), StripSubdetector::TEC, trackerHitFilter(), and unlikely.

Referenced by numberOfLostStripTECHits(), numberOfValidStripTECHits(), EgAmbiguityTools::sharedDets(), and EgAmbiguityTools::sharedHits().

465  {
467  uint32_t substructure = getSubStructure(pattern);
468  if (substructure == StripSubdetector::TEC) return true;
469  return false;
470  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int HitPattern::stripTECLayersNull ( ) const

Definition at line 556 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TEC.

Referenced by stripLayersNull().

556  {
557  int count = 0;
558  uint32_t substr = StripSubdetector::TEC;
559  for (uint32_t layer=1; layer<=9; layer++) {
560  if (getTrackerLayerCase(substr, layer) == 999999) count++;
561  }
562  return count;
563 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTECLayersTotallyOffOrBad ( ) const

Definition at line 499 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TEC.

Referenced by stripLayersTotallyOffOrBad().

499  {
500  int count = 0;
501  uint32_t substr = StripSubdetector::TEC;
502  for (uint32_t layer=1; layer<=9; layer++) {
503  if (getTrackerLayerCase(substr, layer) == 2) count++;
504  }
505  return count;
506 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTECLayersWithMeasurement ( ) const

Definition at line 385 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TEC.

Referenced by IsolatedTracksNxN::analyze(), TrackAnalyzer::fillHistosForTrackerSpecific(), spr::goodTrack(), IsolatedTracksNxN::printTrack(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

385  {
386  int count = 0;
387  uint32_t substr = StripSubdetector::TEC;
388  for (uint32_t layer=1; layer<=9; layer++) {
389  if (getTrackerLayerCase(substr, layer) == 0) count++;
390  }
391  return count;
392 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTECLayersWithoutMeasurement ( ) const

Definition at line 442 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TEC.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

442  {
443  int count = 0;
444  uint32_t substr = StripSubdetector::TEC;
445  for (uint32_t layer=1; layer<=9; layer++) {
446  if (getTrackerLayerCase(substr, layer) == 1) count++;
447  }
448  return count;
449 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
bool reco::HitPattern::stripTIBHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 444 of file HitPattern.h.

References getSubStructure(), StripSubdetector::TIB, trackerHitFilter(), and unlikely.

Referenced by GsfElectronAlgo::ElectronData::checkCtfTrack(), GsfElectronCoreBaseProducer::getCtfTrackRef(), numberOfLostStripTIBHits(), numberOfValidStripTIBHits(), EgAmbiguityTools::sharedDets(), and EgAmbiguityTools::sharedHits().

444  {
446  uint32_t substructure = getSubStructure(pattern);
447  if (substructure == StripSubdetector::TIB) return true;
448  return false;
449  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int HitPattern::stripTIBLayersNull ( ) const

Definition at line 529 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TIB.

Referenced by stripLayersNull().

529  {
530  int count = 0;
531  uint32_t substr = StripSubdetector::TIB;
532  for (uint32_t layer=1; layer<=4; layer++) {
533  if (getTrackerLayerCase(substr, layer) == 999999) count++;
534  }
535  return count;
536 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTIBLayersTotallyOffOrBad ( ) const

Definition at line 472 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TIB.

Referenced by stripLayersTotallyOffOrBad().

472  {
473  int count = 0;
474  uint32_t substr = StripSubdetector::TIB;
475  for (uint32_t layer=1; layer<=4; layer++) {
476  if (getTrackerLayerCase(substr, layer) == 2) count++;
477  }
478  return count;
479 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTIBLayersWithMeasurement ( ) const

Definition at line 358 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TIB.

Referenced by IsolatedTracksNxN::analyze(), TrackAnalyzer::fillHistosForTrackerSpecific(), IsolatedTracksNxN::printTrack(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

358  {
359  int count = 0;
360  uint32_t substr = StripSubdetector::TIB;
361  for (uint32_t layer=1; layer<=4; layer++) {
362  if (getTrackerLayerCase(substr, layer) == 0) count++;
363  }
364  return count;
365 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTIBLayersWithoutMeasurement ( ) const

Definition at line 415 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TIB.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

415  {
416  int count = 0;
417  uint32_t substr = StripSubdetector::TIB;
418  for (uint32_t layer=1; layer<=4; layer++) {
419  if (getTrackerLayerCase(substr, layer) == 1) count++;
420  }
421  return count;
422 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
bool reco::HitPattern::stripTIDHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 451 of file HitPattern.h.

References getSubStructure(), StripSubdetector::TID, trackerHitFilter(), and unlikely.

Referenced by GsfElectronAlgo::ElectronData::checkCtfTrack(), GsfElectronCoreBaseProducer::getCtfTrackRef(), numberOfLostStripTIDHits(), numberOfValidStripTIDHits(), EgAmbiguityTools::sharedDets(), and EgAmbiguityTools::sharedHits().

451  {
453  uint32_t substructure = getSubStructure(pattern);
454  if (substructure == StripSubdetector::TID) return true;
455  return false;
456  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int HitPattern::stripTIDLayersNull ( ) const

Definition at line 538 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TID.

Referenced by stripLayersNull().

538  {
539  int count = 0;
540  uint32_t substr = StripSubdetector::TID;
541  for (uint32_t layer=1; layer<=3; layer++) {
542  if (getTrackerLayerCase(substr, layer) == 999999) count++;
543  }
544  return count;
545 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTIDLayersTotallyOffOrBad ( ) const

Definition at line 481 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TID.

Referenced by stripLayersTotallyOffOrBad().

481  {
482  int count = 0;
483  uint32_t substr = StripSubdetector::TID;
484  for (uint32_t layer=1; layer<=3; layer++) {
485  if (getTrackerLayerCase(substr, layer) == 2) count++;
486  }
487  return count;
488 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTIDLayersWithMeasurement ( ) const

Definition at line 367 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TID.

Referenced by IsolatedTracksNxN::analyze(), TrackAnalyzer::fillHistosForTrackerSpecific(), IsolatedTracksNxN::printTrack(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

367  {
368  int count = 0;
369  uint32_t substr = StripSubdetector::TID;
370  for (uint32_t layer=1; layer<=3; layer++) {
371  if (getTrackerLayerCase(substr, layer) == 0) count++;
372  }
373  return count;
374 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTIDLayersWithoutMeasurement ( ) const

Definition at line 424 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TID.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

424  {
425  int count = 0;
426  uint32_t substr = StripSubdetector::TID;
427  for (uint32_t layer=1; layer<=3; layer++) {
428  if (getTrackerLayerCase(substr, layer) == 1) count++;
429  }
430  return count;
431 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
bool reco::HitPattern::stripTOBHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 458 of file HitPattern.h.

References getSubStructure(), StripSubdetector::TOB, trackerHitFilter(), and unlikely.

Referenced by numberOfLostStripTOBHits(), numberOfValidStripTOBHits(), EgAmbiguityTools::sharedDets(), and EgAmbiguityTools::sharedHits().

458  {
460  uint32_t substructure = getSubStructure(pattern);
461  if (substructure == StripSubdetector::TOB) return true;
462  return false;
463  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:494
#define unlikely(x)
Definition: Likely.h:21
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
return(e1-e2)*(e1-e2)+dp *dp
if(dp >Float(M_PI)) dp-
volatile std::atomic< bool > shutdown_flag false
int HitPattern::stripTOBLayersNull ( ) const

Definition at line 547 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TOB.

Referenced by stripLayersNull().

547  {
548  int count = 0;
549  uint32_t substr = StripSubdetector::TOB;
550  for (uint32_t layer=1; layer<=6; layer++) {
551  if (getTrackerLayerCase(substr, layer) == 999999) count++;
552  }
553  return count;
554 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTOBLayersTotallyOffOrBad ( ) const

Definition at line 490 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TOB.

Referenced by stripLayersTotallyOffOrBad().

490  {
491  int count = 0;
492  uint32_t substr = StripSubdetector::TOB;
493  for (uint32_t layer=1; layer<=6; layer++) {
494  if (getTrackerLayerCase(substr, layer) == 2) count++;
495  }
496  return count;
497 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTOBLayersWithMeasurement ( ) const

Definition at line 376 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TOB.

Referenced by IsolatedTracksNxN::analyze(), TrackAnalyzer::fillHistosForTrackerSpecific(), spr::goodTrack(), IsolatedTracksNxN::printTrack(), BeamFitter::readEvent(), and stripLayersWithMeasurement().

376  {
377  int count = 0;
378  uint32_t substr = StripSubdetector::TOB;
379  for (uint32_t layer=1; layer<=6; layer++) {
380  if (getTrackerLayerCase(substr, layer) == 0) count++;
381  }
382  return count;
383 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
int HitPattern::stripTOBLayersWithoutMeasurement ( ) const

Definition at line 433 of file HitPattern.cc.

References prof2calltree::count, getTrackerLayerCase(), and StripSubdetector::TOB.

Referenced by IsolatedTracksNxN::analyze(), and stripLayersWithoutMeasurement().

433  {
434  int count = 0;
435  uint32_t substr = StripSubdetector::TOB;
436  for (uint32_t layer=1; layer<=6; layer++) {
437  if (getTrackerLayerCase(substr, layer) == 1) count++;
438  }
439  return count;
440 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:261
bool reco::HitPattern::trackerHitFilter ( uint32_t  pattern)
inlinestatic
int reco::HitPattern::trackerLayersNull ( ) const
inline

Definition at line 786 of file HitPattern.h.

References pixelLayersNull(), and stripLayersNull().

786  {
787  return pixelLayersNull() +
788  stripLayersNull();
789  }
int pixelLayersNull() const
Definition: HitPattern.h:791
int stripLayersNull() const
Definition: HitPattern.h:796
int reco::HitPattern::trackerLayersTotallyOffOrBad ( ) const
inline

Definition at line 769 of file HitPattern.h.

References pixelLayersTotallyOffOrBad(), and stripLayersTotallyOffOrBad().

769  {
770  return pixelLayersTotallyOffOrBad() +
772  }
int pixelLayersTotallyOffOrBad() const
Definition: HitPattern.h:774
int stripLayersTotallyOffOrBad() const
Definition: HitPattern.h:779
int reco::HitPattern::trackerLayersWithMeasurement ( ) const
inline
int reco::HitPattern::trackerLayersWithoutMeasurement ( ) const
inline
bool reco::HitPattern::type_1_HitFilter ( uint32_t  pattern)
inlinestatic
bool reco::HitPattern::type_2_HitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 567 of file HitPattern.h.

References getHitType().

Referenced by numberOfBadMuonCSCHits(), numberOfBadMuonDTHits(), numberOfBadMuonHits(), numberOfBadMuonRPCHits(), numberOfInactiveHits(), and numberOfInactiveTrackerHits().

567  {
568  if (getHitType(pattern) == 2) return true;
569  return false;
570  }
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:529
bool reco::HitPattern::type_3_HitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 572 of file HitPattern.h.

References getHitType().

Referenced by numberOfBadHits().

572  {
573  if (getHitType(pattern) == 3) return true;
574  return false;
575  }
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:529
bool reco::HitPattern::validHitFilter ( uint32_t  pattern)
inlinestatic

Member Data Documentation

uint32_t reco::HitPattern::hitPattern_[PatternSize]
private

Definition at line 395 of file HitPattern.h.

Referenced by getHitPattern(), HitPattern(), set(), and setHitPattern().

const unsigned short reco::HitPattern::HitSize = 11
static
const unsigned short reco::HitPattern::HitTypeMask = 0x3
staticprivate

Definition at line 392 of file HitPattern.h.

Referenced by encode(), getHitType(), getTrackerLayerCase(), and getTrackerMonoStereo().

const unsigned short reco::HitPattern::HitTypeOffset = 0
staticprivate

Definition at line 391 of file HitPattern.h.

Referenced by encode(), getHitType(), getTrackerLayerCase(), and getTrackerMonoStereo().

const unsigned short reco::HitPattern::LayerMask = 0xF
staticprivate
const unsigned short reco::HitPattern::LayerOffset = 3
staticprivate
const int reco::HitPattern::MaxHits = (PatternSize * 32) / HitSize
static

Definition at line 133 of file HitPattern.h.

const unsigned short reco::HitPattern::PatternSize = 25
static
const unsigned short reco::HitPattern::SideMask = 0x1
staticprivate

Definition at line 388 of file HitPattern.h.

Referenced by encode(), and getSide().

const unsigned short reco::HitPattern::SideOffset = 2
staticprivate

Definition at line 387 of file HitPattern.h.

Referenced by encode(), and getSide().

const unsigned short reco::HitPattern::SubDetectorMask = 0x1
staticprivate
const unsigned short reco::HitPattern::SubDetectorOffset = 10
staticprivate
const unsigned short reco::HitPattern::SubstrMask = 0x7
staticprivate
const unsigned short reco::HitPattern::SubstrOffset = 7
staticprivate

Definition at line 379 of file HitPattern.h.

Referenced by encode(), getSubStructure(), getTrackerLayerCase(), and getTrackerMonoStereo().