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)
 
void set (const DetId id, uint32_t hitType, 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 &hit, unsigned int i)
 
uint32_t encode (DetId id, uint32_t hitType, unsigned int i)
 
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 124 of file HitPattern.h.

Member Typedef Documentation

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

Definition at line 162 of file HitPattern.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MONO 
STEREO 

Definition at line 126 of file HitPattern.h.

Constructor & Destructor Documentation

reco::HitPattern::HitPattern ( )
inline

Definition at line 138 of file HitPattern.h.

References hitPattern_, i, and PatternSize.

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

Definition at line 142 of file HitPattern.h.

References set().

142 { set(begin, end); }
void set(const I &begin, const I &end)
Definition: HitPattern.h:152
#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 146 of file HitPattern.h.

References set().

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

Member Function Documentation

void HitPattern::appendHit ( const TrackingRecHit hit)

Definition at line 86 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().

86  {
87 
88  // get rec hit det id and rec hit type
89  DetId id = hit.geographicalId();
90  uint32_t detid = id.det();
91  uint32_t subdet = id.subdetId();
92 
93  std::vector<const TrackingRecHit*> hits;
94 
95 
96  if (detid == DetId::Tracker)
97  hits.push_back(&hit);
98 
99  if (detid == DetId::Muon) {
100 
101  if (subdet == (uint32_t) MuonSubdetId::DT){
102 
103  // DT rechit (granularity 2)
104  if(hit.dimension() == 1)
105  hits.push_back(&hit);
106 
107  // 4D segment (granularity 0)
108  else if(hit.dimension() > 1){ // Both 2 and 4 dim cases. MB4s have 2D, but formatted in 4D segments
109  std::vector<const TrackingRecHit*> seg2D = hit.recHits(); // 4D --> 2D
110  // load 1D hits (2D --> 1D)
111  for(std::vector<const TrackingRecHit*>::const_iterator it = seg2D.begin(); it != seg2D.end(); ++it){
112  std::vector<const TrackingRecHit*> hits1D = (*it)->recHits();
113  copy(hits1D.begin(),hits1D.end(),back_inserter(hits));
114  }
115  }
116  }
117 
118  else if (subdet == (uint32_t) MuonSubdetId::CSC){
119 
120  // CSC rechit (granularity 2)
121  if(hit.dimension() == 2)
122  hits.push_back(&hit);
123 
124  // 4D segment (granularity 0)
125  if(hit.dimension() == 4)
126  hits = hit.recHits(); // load 2D hits (4D --> 1D)
127  }
128 
129  else if (subdet == (uint32_t) MuonSubdetId::RPC) {
130  hits.push_back(&hit);
131  }
132  }
133 
134  unsigned int i = numberOfHits();
135  for(std::vector<const TrackingRecHit*>::const_iterator it = hits.begin(); it != hits.end(); ++it)
136  set(**it,i++);
137 
138 
139 }
int i
Definition: DBlmapReader.cc:9
virtual int dimension() const =0
void set(const I &begin, const I &end)
Definition: HitPattern.h:152
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:211
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 184 of file HitPattern.h.

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

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

Definition at line 163 of file HitPattern.h.

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

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

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

Definition at line 173 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().

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

Definition at line 819 of file HitPattern.h.

References muonStations().

819 { 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:642
int reco::HitPattern::cscStationsWithBadHits ( ) const
inline

Definition at line 818 of file HitPattern.h.

References muonStations().

818 { 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:642
int reco::HitPattern::cscStationsWithValidHits ( ) const
inline

Definition at line 817 of file HitPattern.h.

References muonStations().

817 { 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:642
int reco::HitPattern::dtStationsWithAnyHits ( ) const
inline

Definition at line 816 of file HitPattern.h.

References muonStations().

816 { 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:642
int reco::HitPattern::dtStationsWithBadHits ( ) const
inline

Definition at line 815 of file HitPattern.h.

References muonStations().

815 { 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:642
int reco::HitPattern::dtStationsWithValidHits ( ) const
inline

Definition at line 814 of file HitPattern.h.

References muonStations().

814 { 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:642
uint32_t reco::HitPattern::encode ( const TrackingRecHit hit,
unsigned int  i 
)
inlineprivate

Definition at line 412 of file HitPattern.h.

References encode(), TrackingRecHit::geographicalId(), TrackingRecHit::getType(), and i.

Referenced by encode(), and set().

412 { return encode(hit.geographicalId(), hit.getType(), i); }
int i
Definition: DBlmapReader.cc:9
Type getType() const
DetId geographicalId() const
uint32_t encode(const TrackingRecHit &hit, unsigned int i)
Definition: HitPattern.h:412
uint32_t HitPattern::encode ( DetId  id,
uint32_t  hitType,
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, 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().

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  uint32_t detid = id.det();
22 
23  // init pattern of this hit to 0
24  uint32_t pattern = 0;
25 
26  // adding tracker/muon detector bit
27  pattern += ((detid)&SubDetectorMask)<<SubDetectorOffset;
28 
29  // adding substructure (PXB,PXF,TIB,TID,TOB,TEC, or DT,CSC,RPC) bits
30  uint32_t subdet = id.subdetId();
31  pattern += ((subdet)&SubstrMask)<<SubstrOffset;
32 
33  // adding layer/disk/wheel bits
34  uint32_t layer = 0;
35  if (detid == DetId::Tracker) {
36  if (subdet == PixelSubdetector::PixelBarrel)
37  layer = PXBDetId(id).layer();
38  else if (subdet == PixelSubdetector::PixelEndcap)
39  layer = PXFDetId(id).disk();
40  else if (subdet == StripSubdetector::TIB)
41  layer = TIBDetId(id).layer();
42  else if (subdet == StripSubdetector::TID)
43  layer = TIDDetId(id).wheel();
44  else if (subdet == StripSubdetector::TOB)
45  layer = TOBDetId(id).layer();
46  else if (subdet == StripSubdetector::TEC)
47  layer = TECDetId(id).wheel();
48  } else if (detid == DetId::Muon) {
49  if (subdet == (uint32_t) MuonSubdetId::DT)
50  layer = ((DTLayerId(id.rawId()).station()-1)<<2) + DTLayerId(id.rawId()).superLayer();
51  else if (subdet == (uint32_t) MuonSubdetId::CSC)
52  layer = ((CSCDetId(id.rawId()).station()-1)<<2) + (CSCDetId(id.rawId()).ring()-1);
53  else if (subdet == (uint32_t) MuonSubdetId::RPC) {
54  RPCDetId rpcid(id.rawId());
55  layer = ((rpcid.station()-1)<<2) + abs(rpcid.region());
56  if (rpcid.station() <= 2) layer += 2*(rpcid.layer()-1);
57  }
58  }
59  pattern += (layer&LayerMask)<<LayerOffset;
60 
61  // adding mono/stereo bit
62  uint32_t side = 0;
63  if (detid == DetId::Tracker) {
64  side = isStereo(id);
65  } else if (detid == DetId::Muon) {
66  side = 0;
67  }
68  pattern += (side&SideMask)<<SideOffset;
69 
70  // adding hit type bits
71  pattern += (hitType&HitTypeMask)<<HitTypeOffset;
72 
73  return pattern;
74 }
int i
Definition: DBlmapReader.cc:9
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
static uint32_t isStereo(DetId)
Definition: HitPattern.cc:605
static const unsigned short SideOffset
Definition: HitPattern.h:392
static const unsigned short SubstrOffset
Definition: HitPattern.h:384
static const unsigned short PatternSize
Definition: HitPattern.h:129
static const unsigned short HitTypeMask
Definition: HitPattern.h:397
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:381
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned short HitTypeOffset
Definition: HitPattern.h:396
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
static const unsigned short HitSize
Definition: HitPattern.h:132
static const unsigned short SideMask
Definition: HitPattern.h:393
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:380
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:385
static const int RPC
Definition: MuonSubdetId.h:14
static const unsigned short LayerOffset
Definition: HitPattern.h:388
static const int DT
Definition: MuonSubdetId.h:12
static const unsigned short LayerMask
Definition: HitPattern.h:389
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 549 of file HitPattern.h.

References getSubSubStructure().

Referenced by printHitPattern().

549  {
550  return (getSubSubStructure(pattern) & 3) + 1;
551  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:525
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 545 of file HitPattern.h.

References getSubSubStructure().

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

545  {
546  return (getSubSubStructure(pattern) & 3);
547  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:525
uint32_t HitPattern::getHitPattern ( int  position) const

Definition at line 142 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(), TrackMaker::SetVars(), EgAmbiguityTools::sharedDets(), EgAmbiguityTools::sharedHits(), and QcdUeDQM::trackSelection().

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

References getSubSubStructure().

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

541  {
542  return (getSubSubStructure(pattern)>>2) + 1;
543  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:525
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 553 of file HitPattern.h.

References getSubSubStructure(), and likely.

Referenced by printHitPattern().

553  {
554  uint32_t sss = getSubSubStructure(pattern), stat = sss >> 2;
555  if likely(stat <= 1) return ((sss >> 1) & 1) + 1;
556  return 0;
557  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:525
return((rh^lh)&mask)
#define likely(x)
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 559 of file HitPattern.h.

References getSubSubStructure().

Referenced by printHitPattern().

559  {
560  return getSubSubStructure(pattern) & 1;
561  }
static uint32_t getSubSubStructure(uint32_t pattern)
Definition: HitPattern.h:525
uint32_t reco::HitPattern::getSide ( uint32_t  pattern)
inlinestatic

Definition at line 531 of file HitPattern.h.

References SideMask, SideOffset, and unlikely.

Referenced by getTrackerMonoStereo(), and numberOfValidStripLayersWithMonoAndStereo().

531  {
532  if unlikely(pattern == 0) return 999999;
534  }
static const unsigned short SideOffset
Definition: HitPattern.h:392
return((rh^lh)&mask)
#define unlikely(x)
static const unsigned short SideMask
Definition: HitPattern.h:393
uint32_t reco::HitPattern::getSubStructure ( uint32_t  pattern)
inlinestatic
uint32_t reco::HitPattern::getSubSubStructure ( uint32_t  pattern)
inlinestatic

Definition at line 525 of file HitPattern.h.

References LayerMask, LayerOffset, and unlikely.

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

525  {
526  if unlikely(pattern == 0) return 999999;
528  }
return((rh^lh)&mask)
#define unlikely(x)
static const unsigned short LayerOffset
Definition: HitPattern.h:388
static const unsigned short LayerMask
Definition: HitPattern.h:389
uint32_t HitPattern::getTrackerLayerCase ( uint32_t  substr,
uint32_t  layer 
) const

Definition at line 259 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().

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

Definition at line 293 of file HitPattern.cc.

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

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

Definition at line 181 of file HitPattern.cc.

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

Referenced by TrackClassFilter::operator()(), and pat::PATPackedCandidateProducer::produce().

181  {
182  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
183  uint32_t pattern = getHitPattern(i);
184  if (pattern == 0) break;
185  if (pixelBarrelHitFilter(pattern)) {
186  if (getLayer(pattern) == 1) {
187  if (validHitFilter(pattern)) {
188  return true;
189  }
190  }
191  }
192  }
193  return false;
194 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:520
static const unsigned short PatternSize
Definition: HitPattern.h:129
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static const unsigned short HitSize
Definition: HitPattern.h:132
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142
static bool pixelBarrelHitFilter(uint32_t pattern)
Definition: HitPattern.h:427
bool HitPattern::hasValidHitInFirstPixelEndcap ( ) const

Definition at line 196 of file HitPattern.cc.

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

196  {
197  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
198  uint32_t pattern = getHitPattern(i);
199  if (pattern == 0) break;
200  if (pixelEndcapHitFilter(pattern)) {
201  if (getLayer(pattern) == 1) {
202  if (validHitFilter(pattern)) {
203  return true;
204  }
205  }
206  }
207  }
208  return false;
209 }
int i
Definition: DBlmapReader.cc:9
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:520
static const unsigned short PatternSize
Definition: HitPattern.h:129
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static const unsigned short HitSize
Definition: HitPattern.h:132
static bool pixelEndcapHitFilter(uint32_t pattern)
Definition: HitPattern.h:434
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142
int reco::HitPattern::innermostMuonStationWithAnyHits ( ) const
inline

Definition at line 826 of file HitPattern.h.

References innermostMuonStationWithHits().

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

Definition at line 825 of file HitPattern.h.

References innermostMuonStationWithHits().

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

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

Definition at line 657 of file HitPattern.cc.

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

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

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

Definition at line 824 of file HitPattern.h.

References innermostMuonStationWithHits().

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

Definition at line 605 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().

606 {
607  switch (i.det()) {
608  case DetId::Tracker:
609  switch (i.subdetId()) {
612  return 0;
614  {
615  TIBDetId id = i;
616  return id.isStereo();
617  }
619  {
620  TIDDetId id = i;
621  return id.isStereo();
622  }
624  {
625  TOBDetId id = i;
626  return id.isStereo();
627  }
629  {
630  TECDetId id = i;
631  return id.isStereo();
632  }
633  default:
634  return 0;
635  }
636  break;
637  default:
638  return 0;
639  }
640 }
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 486 of file HitPattern.h.

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

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

486  {
488  uint32_t substructure = getSubStructure(pattern);
489  if (substructure == (uint32_t) MuonSubdetId::CSC) return true;
490  return false;
491  }
return((rh^lh)&mask)
#define unlikely(x)
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:507
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
</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
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
bool reco::HitPattern::muonDTHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 479 of file HitPattern.h.

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

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

479  {
481  uint32_t substructure = getSubStructure(pattern);
482  if (substructure == (uint32_t) MuonSubdetId::DT) return true;
483  return false;
484  }
return((rh^lh)&mask)
#define unlikely(x)
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:507
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
bool reco::HitPattern::muonHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 507 of file HitPattern.h.

References SubDetectorMask, SubDetectorOffset, and unlikely.

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

507  {
508  if unlikely(pattern == 0) return false;
510  return false;
511  }
return((rh^lh)&mask)
#define unlikely(x)
static const unsigned short SubDetectorMask
Definition: HitPattern.h:381
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:380
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
bool reco::HitPattern::muonRPCHitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 493 of file HitPattern.h.

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

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

493  {
495  uint32_t substructure = getSubStructure(pattern);
496  if (substructure == (uint32_t) MuonSubdetId::RPC) return true;
497  return false;
498  }
return((rh^lh)&mask)
#define unlikely(x)
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:507
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
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 642 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().

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

Definition at line 813 of file HitPattern.h.

References muonStations().

813 { 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:642
int reco::HitPattern::muonStationsWithBadHits ( ) const
inline

Definition at line 812 of file HitPattern.h.

References muonStations().

812 { 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:642
int reco::HitPattern::muonStationsWithValidHits ( ) const
inline

Definition at line 811 of file HitPattern.h.

References muonStations().

811 { 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:642
int reco::HitPattern::numberOfBadHits ( ) const
inline

Definition at line 704 of file HitPattern.h.

References countHits(), and type_3_HitFilter().

704  {
705  return countHits(type_3_HitFilter);
706 }
static bool type_3_HitFilter(uint32_t pattern)
Definition: HitPattern.h:579
int countHits(filterType filter) const
Definition: HitPattern.h:163
int reco::HitPattern::numberOfBadMuonCSCHits ( ) const
inline

Definition at line 716 of file HitPattern.h.

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

716  {
718 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:574
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
int reco::HitPattern::numberOfBadMuonDTHits ( ) const
inline

Definition at line 712 of file HitPattern.h.

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

712  {
714 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:574
int reco::HitPattern::numberOfBadMuonHits ( ) const
inline

Definition at line 708 of file HitPattern.h.

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

708  {
710 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:574
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:507
int reco::HitPattern::numberOfBadMuonRPCHits ( ) const
inline

Definition at line 720 of file HitPattern.h.

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

720  {
722 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:574
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:493
int HitPattern::numberOfDTStationsWithBothViews ( ) const

Definition at line 710 of file HitPattern.cc.

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

710  {
711  int stations[4][2] = { {0,0}, {0,0}, {0,0}, {0,0} };
712  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
713  uint32_t pattern = getHitPattern(i);
714  if (pattern == 0) break;
715  if (muonDTHitFilter(pattern) && validHitFilter(pattern)) {
716  stations[getMuonStation(pattern)-1][getDTSuperLayer(pattern) == 2] = 1;
717  }
718  }
719  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];
720 }
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:545
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:541
static const unsigned short PatternSize
Definition: HitPattern.h:129
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static const unsigned short HitSize
Definition: HitPattern.h:132
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142
int HitPattern::numberOfDTStationsWithRPhiView ( ) const

Definition at line 686 of file HitPattern.cc.

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

686  {
687  int stations[4] = { 0,0,0,0 };
688  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
689  uint32_t pattern = getHitPattern(i);
690  if (pattern == 0) break;
691  if (muonDTHitFilter(pattern) && validHitFilter(pattern) && getDTSuperLayer(pattern) != 2) {
692  stations[getMuonStation(pattern)-1] = 1;
693  }
694  }
695  return stations[0]+stations[1]+stations[2]+stations[3];
696 }
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:545
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:541
static const unsigned short PatternSize
Definition: HitPattern.h:129
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static const unsigned short HitSize
Definition: HitPattern.h:132
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142
int HitPattern::numberOfDTStationsWithRZView ( ) const

Definition at line 698 of file HitPattern.cc.

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

698  {
699  int stations[4] = { 0,0,0,0 };
700  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
701  uint32_t pattern = getHitPattern(i);
702  if (pattern == 0) break;
703  if (muonDTHitFilter(pattern) && validHitFilter(pattern) && getDTSuperLayer(pattern) == 2) {
704  stations[getMuonStation(pattern)-1] = 1;
705  }
706  }
707  return stations[0]+stations[1]+stations[2]+stations[3];
708 }
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:545
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:541
static const unsigned short PatternSize
Definition: HitPattern.h:129
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static const unsigned short HitSize
Definition: HitPattern.h:132
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142
int HitPattern::numberOfHits ( void  ) const

Definition at line 211 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(), ElectronMaker::SetVars(), and QcdUeDQM::trackSelection().

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

Definition at line 726 of file HitPattern.h.

References countHits(), and type_2_HitFilter().

726  {
727  return countHits(type_2_HitFilter);
728 }
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:574
int countHits(filterType filter) const
Definition: HitPattern.h:163
int reco::HitPattern::numberOfInactiveTrackerHits ( ) const
inline

Definition at line 730 of file HitPattern.h.

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

730  {
732 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
static bool type_2_HitFilter(uint32_t pattern)
Definition: HitPattern.h:574
int reco::HitPattern::numberOfLostHits ( ) const
inline

Definition at line 646 of file HitPattern.h.

References countHits(), and type_1_HitFilter().

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

646  {
647  return countHits(type_1_HitFilter);
648 }
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
int countHits(filterType filter) const
Definition: HitPattern.h:163
int reco::HitPattern::numberOfLostMuonCSCHits ( ) const
inline

Definition at line 694 of file HitPattern.h.

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

694  {
696 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
int reco::HitPattern::numberOfLostMuonDTHits ( ) const
inline

Definition at line 690 of file HitPattern.h.

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

690  {
692 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
int reco::HitPattern::numberOfLostMuonHits ( ) const
inline

Definition at line 654 of file HitPattern.h.

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

654  {
656 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:507
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
int reco::HitPattern::numberOfLostMuonRPCHits ( ) const
inline

Definition at line 698 of file HitPattern.h.

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

698  {
700 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:493
int reco::HitPattern::numberOfLostPixelBarrelHits ( ) const
inline

Definition at line 662 of file HitPattern.h.

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

662  {
664 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool pixelBarrelHitFilter(uint32_t pattern)
Definition: HitPattern.h:427
int reco::HitPattern::numberOfLostPixelEndcapHits ( ) const
inline

Definition at line 666 of file HitPattern.h.

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

666  {
668 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool pixelEndcapHitFilter(uint32_t pattern)
Definition: HitPattern.h:434
int reco::HitPattern::numberOfLostPixelHits ( ) const
inline

Definition at line 658 of file HitPattern.h.

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

658  {
660 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool pixelHitFilter(uint32_t pattern)
Definition: HitPattern.h:419
int reco::HitPattern::numberOfLostStripHits ( ) const
inline

Definition at line 670 of file HitPattern.h.

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

670  {
672 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool stripHitFilter(uint32_t pattern)
Definition: HitPattern.h:441
int reco::HitPattern::numberOfLostStripTECHits ( ) const
inline

Definition at line 686 of file HitPattern.h.

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

686  {
688 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool stripTECHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
int reco::HitPattern::numberOfLostStripTIBHits ( ) const
inline

Definition at line 674 of file HitPattern.h.

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

674  {
676 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool stripTIBHitFilter(uint32_t pattern)
Definition: HitPattern.h:451
int reco::HitPattern::numberOfLostStripTIDHits ( ) const
inline

Definition at line 678 of file HitPattern.h.

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

678  {
680 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool stripTIDHitFilter(uint32_t pattern)
Definition: HitPattern.h:458
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
int reco::HitPattern::numberOfLostStripTOBHits ( ) const
inline

Definition at line 682 of file HitPattern.h.

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

682  {
684 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
static bool stripTOBHitFilter(uint32_t pattern)
Definition: HitPattern.h:465
int reco::HitPattern::numberOfLostTrackerHits ( ) const
inline

Definition at line 650 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().

650  {
652 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
static bool type_1_HitFilter(uint32_t pattern)
Definition: HitPattern.h:569
int reco::HitPattern::numberOfValidHits ( ) const
inline
int reco::HitPattern::numberOfValidMuonCSCHits ( ) const
inline

Definition at line 637 of file HitPattern.h.

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

Referenced by MuonTrackValidator::analyze().

637  {
639 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
int reco::HitPattern::numberOfValidMuonDTHits ( ) const
inline

Definition at line 633 of file HitPattern.h.

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

Referenced by MuonTrackValidator::analyze().

633  {
635 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
int reco::HitPattern::numberOfValidMuonHits ( ) const
inline

Definition at line 597 of file HitPattern.h.

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

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

597  {
599 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:507
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
int reco::HitPattern::numberOfValidMuonRPCHits ( ) const
inline

Definition at line 641 of file HitPattern.h.

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

Referenced by MuonTrackValidator::analyze().

641  {
643 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:493
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
int reco::HitPattern::numberOfValidPixelBarrelHits ( ) const
inline

Definition at line 605 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().

605  {
607 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static bool pixelBarrelHitFilter(uint32_t pattern)
Definition: HitPattern.h:427
int reco::HitPattern::numberOfValidPixelEndcapHits ( ) const
inline

Definition at line 609 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().

609  {
611 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static bool pixelEndcapHitFilter(uint32_t pattern)
Definition: HitPattern.h:434
int reco::HitPattern::numberOfValidPixelHits ( ) const
inline
int reco::HitPattern::numberOfValidStripHits ( ) const
inline

Definition at line 613 of file HitPattern.h.

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

613  {
615 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static bool stripHitFilter(uint32_t pattern)
Definition: HitPattern.h:441
int HitPattern::numberOfValidStripLayersWithMonoAndStereo ( uint32_t  stripdet,
uint32_t  layer 
) const

Definition at line 221 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().

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

Definition at line 629 of file HitPattern.h.

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

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

629  {
631 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool stripTECHitFilter(uint32_t pattern)
Definition: HitPattern.h:472
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
int reco::HitPattern::numberOfValidStripTIBHits ( ) const
inline

Definition at line 617 of file HitPattern.h.

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

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

617  {
619 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static bool stripTIBHitFilter(uint32_t pattern)
Definition: HitPattern.h:451
int reco::HitPattern::numberOfValidStripTIDHits ( ) const
inline

Definition at line 621 of file HitPattern.h.

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

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

621  {
623 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool stripTIDHitFilter(uint32_t pattern)
Definition: HitPattern.h:458
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
int reco::HitPattern::numberOfValidStripTOBHits ( ) const
inline

Definition at line 625 of file HitPattern.h.

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

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

625  {
627 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
static bool stripTOBHitFilter(uint32_t pattern)
Definition: HitPattern.h:465
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 593 of file HitPattern.h.

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

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

593  {
595 }
int countTypedHits(filterType typeFilter, filterType filter) const
Definition: HitPattern.h:173
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
int reco::HitPattern::outermostMuonStationWithAnyHits ( ) const
inline

Definition at line 829 of file HitPattern.h.

References outermostMuonStationWithHits().

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

Definition at line 828 of file HitPattern.h.

References outermostMuonStationWithHits().

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

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

Definition at line 671 of file HitPattern.cc.

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

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

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

Definition at line 827 of file HitPattern.h.

References outermostMuonStationWithHits().

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

Definition at line 427 of file HitPattern.h.

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

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

427  {
429  uint32_t substructure = getSubStructure(pattern);
430  if (substructure == PixelSubdetector::PixelBarrel) return true;
431  return false;
432  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int HitPattern::pixelBarrelLayersNull ( ) const

Definition at line 507 of file HitPattern.cc.

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

Referenced by pixelLayersNull().

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

Definition at line 450 of file HitPattern.cc.

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

Referenced by pixelLayersTotallyOffOrBad().

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

Definition at line 336 of file HitPattern.cc.

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

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

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

Definition at line 393 of file HitPattern.cc.

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

Referenced by pixelLayersWithoutMeasurement().

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

Definition at line 434 of file HitPattern.h.

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

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

434  {
436  uint32_t substructure = getSubStructure(pattern);
437  if (substructure == PixelSubdetector::PixelEndcap) return true;
438  return false;
439  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int HitPattern::pixelEndcapLayersNull ( ) const

Definition at line 517 of file HitPattern.cc.

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

Referenced by pixelLayersNull().

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

Definition at line 460 of file HitPattern.cc.

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

Referenced by pixelLayersTotallyOffOrBad().

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

Definition at line 346 of file HitPattern.cc.

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

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

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

Definition at line 403 of file HitPattern.cc.

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

Referenced by pixelLayersWithoutMeasurement().

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

Definition at line 419 of file HitPattern.h.

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

Referenced by GsfElectronAlgo::ElectronData::checkCtfTrack(), GsfElectronCoreBaseProducer::getCtfTrackRef(), numberOfLostPixelHits(), numberOfValidPixelHits(), FWConvTrackHitsDetailView::setTextInfo(), TrackMaker::SetVars(), EgAmbiguityTools::sharedDets(), EgAmbiguityTools::sharedHits(), and QcdUeDQM::trackSelection().

419  {
421  uint32_t substructure = getSubStructure(pattern);
422  if (substructure == PixelSubdetector::PixelBarrel ||
423  substructure == PixelSubdetector::PixelEndcap) return true;
424  return false;
425  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int reco::HitPattern::pixelLayersNull ( ) const
inline

Definition at line 798 of file HitPattern.h.

References pixelBarrelLayersNull(), and pixelEndcapLayersNull().

Referenced by trackerLayersNull().

798  {
799  return pixelBarrelLayersNull() +
801  }
int pixelBarrelLayersNull() const
Definition: HitPattern.cc:507
int pixelEndcapLayersNull() const
Definition: HitPattern.cc:517
int reco::HitPattern::pixelLayersTotallyOffOrBad ( ) const
inline

Definition at line 781 of file HitPattern.h.

References pixelBarrelLayersTotallyOffOrBad(), and pixelEndcapLayersTotallyOffOrBad().

Referenced by trackerLayersTotallyOffOrBad().

781  {
784  }
int pixelBarrelLayersTotallyOffOrBad() const
Definition: HitPattern.cc:450
int pixelEndcapLayersTotallyOffOrBad() const
Definition: HitPattern.cc:460
int reco::HitPattern::pixelLayersWithMeasurement ( ) const
inline
int reco::HitPattern::pixelLayersWithoutMeasurement ( ) const
inline

Definition at line 763 of file HitPattern.h.

References pixelBarrelLayersWithoutMeasurement(), and pixelEndcapLayersWithoutMeasurement().

Referenced by trackerLayersWithoutMeasurement().

763  {
766  }
int pixelBarrelLayersWithoutMeasurement() const
Definition: HitPattern.cc:393
int pixelEndcapLayersWithoutMeasurement() const
Definition: HitPattern.cc:403
void HitPattern::print ( std::ostream &  stream = std::cout) const

Definition at line 590 of file HitPattern.cc.

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

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

Definition at line 563 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().

564 {
565  uint32_t pattern = getHitPattern(position);
566  stream << "\t";
567  if (muonHitFilter(pattern))
568  stream << "muon";
569  if (trackerHitFilter(pattern))
570  stream << "tracker";
571  stream << "\tsubstructure " << getSubStructure(pattern);
572  if (muonHitFilter(pattern)) {
573  stream << "\tstation " << getMuonStation(pattern);
574  if (muonDTHitFilter(pattern)) {
575  stream << "\tdt superlayer " << getDTSuperLayer(pattern);
576  } else if (muonCSCHitFilter(pattern)) {
577  stream << "\tcsc ring " << getCSCRing(pattern);
578  } else if (muonRPCHitFilter(pattern)) {
579  stream << "\trpc " << (getRPCregion(pattern) ? "endcaps" : "barrel") << ", layer " << getRPCLayer(pattern);
580  } else {
581  stream << "(UNKNOWN Muon SubStructure!) \tsubsubstructure " << getSubStructure(pattern);
582  }
583  } else {
584  stream << "\tlayer " << getLayer(pattern);
585  }
586  stream << "\thit type " << getHitType(pattern);
587  stream << std::endl;
588 }
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:553
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:545
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:520
static uint32_t getCSCRing(uint32_t pattern)
CSC ring (1-4). Only valid for muon CSC patterns, of course.
Definition: HitPattern.h:549
static bool muonDTHitFilter(uint32_t pattern)
Definition: HitPattern.h:479
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:536
static uint32_t getMuonStation(uint32_t pattern)
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.h:541
static bool muonHitFilter(uint32_t pattern)
Definition: HitPattern.h:507
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
static bool muonRPCHitFilter(uint32_t pattern)
Definition: HitPattern.h:493
static uint32_t getRPCregion(uint32_t pattern)
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
Definition: HitPattern.h:559
static int position[264][3]
Definition: ReadPGInfo.cc:509
static bool muonCSCHitFilter(uint32_t pattern)
Definition: HitPattern.h:486
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:142
int reco::HitPattern::rpcStationsWithAnyHits ( ) const
inline

Definition at line 822 of file HitPattern.h.

References muonStations().

822 { 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:642
int reco::HitPattern::rpcStationsWithBadHits ( ) const
inline

Definition at line 821 of file HitPattern.h.

References muonStations().

821 { 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:642
int reco::HitPattern::rpcStationsWithValidHits ( ) const
inline

Definition at line 820 of file HitPattern.h.

References muonStations().

820 { 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:642
template<typename I >
void reco::HitPattern::set ( const I &  begin,
const I &  end 
)
inline

Definition at line 152 of file HitPattern.h.

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

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

152  {
153  for (int i=0; i<PatternSize; i++) hitPattern_[i] = 0;
154  unsigned int counter = 0;
155  for (I hit=begin; hit!=end && counter<32*PatternSize/HitSize;
156  hit++, counter++)
157  set(*hit, counter);
158  }
int i
Definition: DBlmapReader.cc:9
uint32_t hitPattern_[PatternSize]
Definition: HitPattern.h:400
void set(const I &begin, const I &end)
Definition: HitPattern.h:152
static const unsigned short PatternSize
Definition: HitPattern.h:129
const std::complex< double > I
Definition: I.h:8
#define end
Definition: vmac.h:37
static const unsigned short HitSize
Definition: HitPattern.h:132
#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 198 of file HitPattern.h.

References encode(), and setHitPattern().

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

198 {setHitPattern(i, encode(hit,i));}
int i
Definition: DBlmapReader.cc:9
void setHitPattern(int position, uint32_t pattern)
Definition: HitPattern.cc:77
uint32_t encode(const TrackingRecHit &hit, unsigned int i)
Definition: HitPattern.h:412
void reco::HitPattern::set ( const DetId  id,
uint32_t  hitType,
unsigned int  i 
)
inline

Definition at line 201 of file HitPattern.h.

References encode(), and setHitPattern().

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

201 { setHitPattern(i, encode(id,hitType,i)); }
int i
Definition: DBlmapReader.cc:9
void setHitPattern(int position, uint32_t pattern)
Definition: HitPattern.cc:77
uint32_t encode(const TrackingRecHit &hit, unsigned int i)
Definition: HitPattern.h:412
void reco::HitPattern::set ( const TrackingRecHitRef ref,
unsigned int  i 
)
inlineprivate

Definition at line 406 of file HitPattern.h.

References set().

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

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

Definition at line 77 of file HitPattern.cc.

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

Referenced by set().

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

Definition at line 441 of file HitPattern.h.

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

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

441  {
443  uint32_t substructure = getSubStructure(pattern);
444  if (substructure == StripSubdetector::TIB ||
445  substructure == StripSubdetector::TID ||
446  substructure == StripSubdetector::TOB ||
447  substructure == StripSubdetector::TEC) return true;
448  return false;
449  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int reco::HitPattern::stripLayersNull ( ) const
inline

Definition at line 803 of file HitPattern.h.

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

Referenced by trackerLayersNull().

803  {
804  return stripTIBLayersNull() +
806  stripTOBLayersNull() +
808  }
int stripTIBLayersNull() const
Definition: HitPattern.cc:527
int stripTECLayersNull() const
Definition: HitPattern.cc:554
int stripTIDLayersNull() const
Definition: HitPattern.cc:536
int stripTOBLayersNull() const
Definition: HitPattern.cc:545
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 472 of file HitPattern.h.

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

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

472  {
474  uint32_t substructure = getSubStructure(pattern);
475  if (substructure == StripSubdetector::TEC) return true;
476  return false;
477  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int HitPattern::stripTECLayersNull ( ) const

Definition at line 554 of file HitPattern.cc.

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

Referenced by stripLayersNull().

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

Definition at line 497 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

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

Definition at line 383 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().

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

Definition at line 440 of file HitPattern.cc.

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

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

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

Definition at line 451 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().

451  {
453  uint32_t substructure = getSubStructure(pattern);
454  if (substructure == StripSubdetector::TIB) return true;
455  return false;
456  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int HitPattern::stripTIBLayersNull ( ) const

Definition at line 527 of file HitPattern.cc.

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

Referenced by stripLayersNull().

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

Definition at line 470 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

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

Definition at line 356 of file HitPattern.cc.

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

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

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

Definition at line 413 of file HitPattern.cc.

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

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

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

Definition at line 458 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().

458  {
460  uint32_t substructure = getSubStructure(pattern);
461  if (substructure == StripSubdetector::TID) return true;
462  return false;
463  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int HitPattern::stripTIDLayersNull ( ) const

Definition at line 536 of file HitPattern.cc.

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

Referenced by stripLayersNull().

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

Definition at line 479 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

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

Definition at line 365 of file HitPattern.cc.

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

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

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

Definition at line 422 of file HitPattern.cc.

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

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

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

Definition at line 465 of file HitPattern.h.

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

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

465  {
467  uint32_t substructure = getSubStructure(pattern);
468  if (substructure == StripSubdetector::TOB) return true;
469  return false;
470  }
static bool trackerHitFilter(uint32_t pattern)
Definition: HitPattern.h:501
return((rh^lh)&mask)
#define unlikely(x)
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:514
volatile std::atomic< bool > shutdown_flag false
if(conf.exists("allCellsPositionCalc"))
int HitPattern::stripTOBLayersNull ( ) const

Definition at line 545 of file HitPattern.cc.

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

Referenced by stripLayersNull().

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

Definition at line 488 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

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

Definition at line 374 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().

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

Definition at line 431 of file HitPattern.cc.

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

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

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

Definition at line 793 of file HitPattern.h.

References pixelLayersNull(), and stripLayersNull().

793  {
794  return pixelLayersNull() +
795  stripLayersNull();
796  }
int pixelLayersNull() const
Definition: HitPattern.h:798
int stripLayersNull() const
Definition: HitPattern.h:803
int reco::HitPattern::trackerLayersTotallyOffOrBad ( ) const
inline

Definition at line 776 of file HitPattern.h.

References pixelLayersTotallyOffOrBad(), and stripLayersTotallyOffOrBad().

776  {
777  return pixelLayersTotallyOffOrBad() +
779  }
int pixelLayersTotallyOffOrBad() const
Definition: HitPattern.h:781
int stripLayersTotallyOffOrBad() const
Definition: HitPattern.h:786
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 574 of file HitPattern.h.

References getHitType().

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

574  {
575  if (getHitType(pattern) == 2) return true;
576  return false;
577  }
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:536
bool reco::HitPattern::type_3_HitFilter ( uint32_t  pattern)
inlinestatic

Definition at line 579 of file HitPattern.h.

References getHitType().

Referenced by numberOfBadHits().

579  {
580  if (getHitType(pattern) == 3) return true;
581  return false;
582  }
static uint32_t getHitType(uint32_t pattern)
Definition: HitPattern.h:536
bool reco::HitPattern::validHitFilter ( uint32_t  pattern)
inlinestatic

Member Data Documentation

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

Definition at line 400 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 397 of file HitPattern.h.

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

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

Definition at line 396 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 134 of file HitPattern.h.

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

Definition at line 393 of file HitPattern.h.

Referenced by encode(), and getSide().

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

Definition at line 392 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 384 of file HitPattern.h.

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