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 | 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 }
 

Public Member Functions

int cscStationsWithAnyHits () const
 
int cscStationsWithBadHits () const
 
int cscStationsWithValidHits () const
 
int dtStationsWithAnyHits () const
 
int dtStationsWithBadHits () const
 
int dtStationsWithValidHits () const
 
uint32_t getCSCRing (uint32_t pattern) const
 CSC ring (1-4). Only valid for muon CSC patterns, of course. More...
 
uint32_t getDTSuperLayer (uint32_t pattern) const
 DT superlayer (1-3). Only valid for muon DT patterns, of course. More...
 
uint32_t getHitPattern (int position) const
 
uint32_t getHitType (uint32_t pattern) const
 
uint32_t getLayer (uint32_t pattern) const
 
uint32_t getMuonStation (uint32_t pattern) const
 Muon station (1-4). Only valid for muon patterns, of course. More...
 
uint32_t getRPCLayer (uint32_t pattern) const
 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...
 
uint32_t getRPCregion (uint32_t pattern) const
 RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course. More...
 
uint32_t getSubStructure (uint32_t pattern) const
 
uint32_t getSubSubStructure (uint32_t pattern) 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
 
bool muonCSCHitFilter (uint32_t pattern) const
 
bool muonDTHitFilter (uint32_t pattern) const
 
bool muonHitFilter (uint32_t pattern) const
 
bool muonRPCHitFilter (uint32_t pattern) 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 () const
 
int numberOfValidStripTECHits () const
 
int numberOfValidStripTIBHits () const
 
int numberOfValidStripTIDHits () const
 
int numberOfValidStripTOBHits () 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
 
bool pixelBarrelHitFilter (uint32_t pattern) const
 
int pixelBarrelLayersNull () const
 
int pixelBarrelLayersTotallyOffOrBad () const
 
int pixelBarrelLayersWithMeasurement () const
 
int pixelBarrelLayersWithoutMeasurement () const
 
bool pixelEndcapHitFilter (uint32_t pattern) const
 
int pixelEndcapLayersNull () const
 
int pixelEndcapLayersTotallyOffOrBad () const
 
int pixelEndcapLayersWithMeasurement () const
 
int pixelEndcapLayersWithoutMeasurement () const
 
bool pixelHitFilter (uint32_t pattern) 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 &, unsigned int i)
 
bool stripHitFilter (uint32_t pattern) const
 
int stripLayersNull () const
 
int stripLayersTotallyOffOrBad () const
 
int stripLayersWithMeasurement () const
 
int stripLayersWithoutMeasurement () const
 
bool stripTECHitFilter (uint32_t pattern) const
 
int stripTECLayersNull () const
 
int stripTECLayersTotallyOffOrBad () const
 
int stripTECLayersWithMeasurement () const
 
int stripTECLayersWithoutMeasurement () const
 
bool stripTIBHitFilter (uint32_t pattern) const
 
int stripTIBLayersNull () const
 
int stripTIBLayersTotallyOffOrBad () const
 
int stripTIBLayersWithMeasurement () const
 
int stripTIBLayersWithoutMeasurement () const
 
bool stripTIDHitFilter (uint32_t pattern) const
 
int stripTIDLayersNull () const
 
int stripTIDLayersTotallyOffOrBad () const
 
int stripTIDLayersWithMeasurement () const
 
int stripTIDLayersWithoutMeasurement () const
 
bool stripTOBHitFilter (uint32_t pattern) const
 
int stripTOBLayersNull () const
 
int stripTOBLayersTotallyOffOrBad () const
 
int stripTOBLayersWithMeasurement () const
 
int stripTOBLayersWithoutMeasurement () const
 
bool trackerHitFilter (uint32_t pattern) const
 
int trackerLayersNull () const
 
int trackerLayersTotallyOffOrBad () const
 
int trackerLayersWithMeasurement () const
 
int trackerLayersWithoutMeasurement () const
 
bool type_1_HitFilter (uint32_t pattern) const
 
bool type_2_HitFilter (uint32_t pattern) const
 
bool type_3_HitFilter (uint32_t pattern) const
 
bool validHitFilter (uint32_t pattern) const
 

Static Public Member Functions

static uint32_t getSide (uint32_t pattern)
 

Private Member Functions

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 HitSize = 11
 
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 PatternSize = 25
 
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 118 of file HitPattern.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MONO 
STEREO 

Definition at line 120 of file HitPattern.h.

Constructor & Destructor Documentation

reco::HitPattern::HitPattern ( )
inline

Definition at line 124 of file HitPattern.h.

References hitPattern_, i, and PatternSize.

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

Definition at line 128 of file HitPattern.h.

References set().

128 { set(begin, end); }
void set(const I &begin, const I &end)
Definition: HitPattern.h:138
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
template<typename C >
reco::HitPattern::HitPattern ( const C &  c)
inline

Definition at line 132 of file HitPattern.h.

References set().

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

Member Function Documentation

int HitPattern::cscStationsWithAnyHits ( ) const

Definition at line 1268 of file HitPattern.cc.

References muonStations().

1268 { 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:1246
int HitPattern::cscStationsWithBadHits ( ) const

Definition at line 1267 of file HitPattern.cc.

References muonStations().

1267 { 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:1246
int HitPattern::cscStationsWithValidHits ( ) const

Definition at line 1266 of file HitPattern.cc.

References muonStations().

1266 { 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:1246
int HitPattern::dtStationsWithAnyHits ( ) const

Definition at line 1265 of file HitPattern.cc.

References muonStations().

1265 { 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:1246
int HitPattern::dtStationsWithBadHits ( ) const

Definition at line 1264 of file HitPattern.cc.

References muonStations().

1264 { 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:1246
int HitPattern::dtStationsWithValidHits ( ) const

Definition at line 1263 of file HitPattern.cc.

References muonStations().

1263 { 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:1246
uint32_t HitPattern::getCSCRing ( uint32_t  pattern) const

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

Definition at line 249 of file HitPattern.cc.

References getSubSubStructure().

Referenced by printHitPattern().

249  {
250  return (getSubSubStructure(pattern) & 3) + 1;
251 }
uint32_t getSubSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:224
uint32_t HitPattern::getDTSuperLayer ( uint32_t  pattern) const

DT superlayer (1-3). Only valid for muon DT patterns, of course.

Definition at line 245 of file HitPattern.cc.

References getSubSubStructure().

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

245  {
246  return (getSubSubStructure(pattern) & 3) + 1;
247 }
uint32_t getSubSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:224
uint32_t HitPattern::getHitPattern ( int  position) const

Definition at line 86 of file HitPattern.cc.

References hitPattern_, and HitSize.

Referenced by PFCheckHitPattern::analyze(), GsfElectronAlgo::ElectronData::checkCtfTrack(), GsfElectronCoreBaseProducer::getCtfTrackRef(), getTrackerLayerCase(), getTrackerMonoStereo(), PrimaryVertexValidation::hasFirstLayerPixelHits(), hasValidHitInFirstPixelBarrel(), hasValidHitInFirstPixelEndcap(), index_to_hitpattern(), innermostMuonStationWithHits(), SoftElectronCandProducer::isClean(), PFElecTkProducer::isInnerMost(), muonStations(), numberOfBadHits(), numberOfBadMuonCSCHits(), numberOfBadMuonDTHits(), numberOfBadMuonHits(), numberOfBadMuonRPCHits(), numberOfDTStationsWithBothViews(), numberOfDTStationsWithRPhiView(), numberOfDTStationsWithRZView(), numberOfHits(), numberOfInactiveHits(), numberOfInactiveTrackerHits(), numberOfLostHits(), numberOfLostMuonCSCHits(), numberOfLostMuonDTHits(), numberOfLostMuonHits(), numberOfLostMuonRPCHits(), numberOfLostPixelBarrelHits(), numberOfLostPixelEndcapHits(), numberOfLostPixelHits(), numberOfLostStripHits(), numberOfLostStripTECHits(), numberOfLostStripTIBHits(), numberOfLostStripTIDHits(), numberOfLostStripTOBHits(), numberOfLostTrackerHits(), numberOfValidHits(), numberOfValidMuonCSCHits(), numberOfValidMuonDTHits(), numberOfValidMuonHits(), numberOfValidMuonRPCHits(), numberOfValidPixelBarrelHits(), numberOfValidPixelEndcapHits(), numberOfValidPixelHits(), numberOfValidStripHits(), numberOfValidStripLayersWithMonoAndStereo(), numberOfValidStripTECHits(), numberOfValidStripTIBHits(), numberOfValidStripTIDHits(), numberOfValidStripTOBHits(), numberOfValidTrackerHits(), EgAmbiguityTools::isInnerMost::operator()(), outermostMuonStationWithHits(), FWTrackResidualDetailView::prepareData(), reco::TrackResiduals::print(), PFCheckHitPattern::print(), print(), printHitPattern(), FWConvTrackHitsDetailView::setTextInfo(), EgAmbiguityTools::sharedDets(), EgAmbiguityTools::sharedHits(), and QcdUeDQM::trackSelection().

86  {
87 /* Note: you are not taking a consecutive sequence of HitSize bits starting from position*HitSize
88  as the bit order in the words are reversed.
89  e.g. if position = 0 you take the lowest 10 bits of the first word.
90 
91  I hope this can clarify what is the memory layout of such thing
92 
93  straight 01234567890123456789012345678901 | 23456789012345678901234567890123 | 4567
94  (global) 0 1 2 3 | 3 4 5 6 | 6
95  words [--------------0---------------] | [--------------1---------------] | [---
96  word 01234567890123456789012345678901 | 01234567890123456789012345678901 | 0123
97  (str) 0 1 2 3 | 0 1 2 3 | 0
98  [--------------0---------------] | [--------------1---------------] | [---
99  word 10987654321098765432109876543210 | 10987654321098765432109876543210 | 1098
100  (rev) 32 21 10 0 | 32 21 10 0 | 32
101  reverse 10987654321098765432109876543210 | 32109876543210987654321098765432 | 5432
102  32 21 10 0 | 6 65 54 43 3 9
103 
104  ugly enough, but it's not my fault, I was not even in CMS at that time [gpetrucc] */
105  uint16_t bitEndOffset = (position+1) * HitSize;
106  uint8_t secondWord = (bitEndOffset >> 5);
107  uint8_t secondWordBits = bitEndOffset & (32-1); // that is, bitEndOffset % 32
108  if (secondWordBits >= HitSize) { // full block is in this word
109  uint8_t lowBitsToTrash = secondWordBits - HitSize;
110  uint32_t myResult = (hitPattern_[secondWord] >> lowBitsToTrash) & ((1 << HitSize)-1);
111  return myResult;
112  } else {
113  uint8_t firstWordBits = HitSize - secondWordBits;
114  uint32_t firstWordBlock = hitPattern_[secondWord-1] >> (32-firstWordBits);
115  uint32_t secondWordBlock = hitPattern_[secondWord] & ((1<<secondWordBits)-1);
116  uint32_t myResult = firstWordBlock + (secondWordBlock << firstWordBits);
117  return myResult;
118  }
119 }
uint32_t hitPattern_[PatternSize]
Definition: HitPattern.h:340
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t HitPattern::getHitType ( uint32_t  pattern) const

Definition at line 236 of file HitPattern.cc.

References HitTypeMask, and HitTypeOffset.

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

236  {
237  if (pattern == 0) return 999999;
238  return ((pattern>>HitTypeOffset) & HitTypeMask);
239 }
static const unsigned short HitTypeMask
Definition: HitPattern.h:337
static const unsigned short HitTypeOffset
Definition: HitPattern.h:336
uint32_t HitPattern::getLayer ( uint32_t  pattern) const
uint32_t HitPattern::getMuonStation ( uint32_t  pattern) const

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

Definition at line 241 of file HitPattern.cc.

References getSubSubStructure().

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

241  {
242  return (getSubSubStructure(pattern)>>2) + 1;
243 }
uint32_t getSubSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:224
uint32_t HitPattern::getRPCLayer ( uint32_t  pattern) const

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 253 of file HitPattern.cc.

References getSubSubStructure().

Referenced by printHitPattern().

253  {
254  uint32_t sss = getSubSubStructure(pattern), stat = sss >> 2;
255  if (stat <= 1) return ((sss >> 1) & 1) + 1;
256  else return 0;
257 }
uint32_t getSubSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:224
uint32_t HitPattern::getRPCregion ( uint32_t  pattern) const

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

Definition at line 259 of file HitPattern.cc.

References getSubSubStructure().

Referenced by printHitPattern().

259  {
260  return getSubSubStructure(pattern) & 1;
261 }
uint32_t getSubSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:224
uint32_t HitPattern::getSide ( uint32_t  pattern)
static

Definition at line 230 of file HitPattern.cc.

References SideMask, and SideOffset.

Referenced by getTrackerMonoStereo(), and numberOfValidStripLayersWithMonoAndStereo().

231 {
232  if (pattern == 0) return 999999;
233  return (pattern >> SideOffset) & SideMask;
234 }
static const unsigned short SideOffset
Definition: HitPattern.h:332
static const unsigned short SideMask
Definition: HitPattern.h:333
uint32_t HitPattern::getSubStructure ( uint32_t  pattern) const
uint32_t HitPattern::getSubSubStructure ( uint32_t  pattern) const

Definition at line 224 of file HitPattern.cc.

References LayerMask, and LayerOffset.

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

224  {
225  if (pattern == 0) return 999999;
226  return ((pattern>>LayerOffset) & LayerMask);
227 }
static const unsigned short LayerOffset
Definition: HitPattern.h:328
static const unsigned short LayerMask
Definition: HitPattern.h:329
uint32_t HitPattern::getTrackerLayerCase ( uint32_t  substr,
uint32_t  layer 
) const

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

806 {
807  uint32_t tk_substr_layer =
808  (1 << SubDetectorOffset) +
809  ((substr & SubstrMask) << SubstrOffset) +
810  ((layer & LayerMask) << LayerOffset);
811 
812  uint32_t mask =
814  (SubstrMask << SubstrOffset) +
815  (LayerMask << LayerOffset);
816 
817  // crossed
818  // layer case 0: valid + (missing, off, bad) ==> with measurement
819  // layer case 1: missing + (off, bad) ==> without measurement
820  // layer case 2: off, bad ==> totally off or bad, cannot say much
821  // not crossed
822  // layer case 999999: track outside acceptance or in gap ==> null
823 
824  uint32_t layerCase = 999999;
825  for (int i=0; i<(PatternSize * 32) / HitSize; i++)
826  {
827  uint32_t pattern = getHitPattern(i);
828  if (pattern == 0) break;
829  if ((pattern & mask) == tk_substr_layer)
830  {
831  uint32_t hitType = (pattern >> HitTypeOffset) & HitTypeMask; // 0,1,2,3
832  if (hitType < layerCase)
833  {
834  layerCase = hitType;
835  if (hitType == 3) layerCase = 2;
836  }
837  }
838  }
839  return layerCase;
840 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short SubstrOffset
Definition: HitPattern.h:324
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitTypeMask
Definition: HitPattern.h:337
static const unsigned short SubDetectorMask
Definition: HitPattern.h:321
static const unsigned short HitTypeOffset
Definition: HitPattern.h:336
static const unsigned short HitSize
Definition: HitPattern.h:317
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:320
static const unsigned short SubstrMask
Definition: HitPattern.h:325
static const unsigned short LayerOffset
Definition: HitPattern.h:328
static const unsigned short LayerMask
Definition: HitPattern.h:329
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t HitPattern::getTrackerMonoStereo ( uint32_t  substr,
uint32_t  layer 
) const

Definition at line 842 of file HitPattern.cc.

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

843 {
844  uint32_t tk_substr_layer =
845  (1 << SubDetectorOffset) +
846  ((substr & SubstrMask) << SubstrOffset) +
847  ((layer & LayerMask) << LayerOffset);
848 
849  uint32_t mask =
851  (SubstrMask << SubstrOffset) +
852  (LayerMask << LayerOffset);
853 
854  // 0: neither a valid mono nor a valid stereo hit
855  // MONO: valid mono hit
856  // STEREO: valid stereo hit
857  // MONO | STEREO: both
858  uint32_t monoStereo = 0;
859  for (int i=0; i<(PatternSize * 32) / HitSize; i++)
860  {
861  uint32_t pattern = getHitPattern(i);
862  if (pattern == 0) break;
863  if ((pattern & mask) == tk_substr_layer)
864  {
865  uint32_t hitType = (pattern >> HitTypeOffset) & HitTypeMask; // 0,1,2,3
866  if (hitType == 0) { // valid hit
867  switch (getSide(pattern)) {
868  case 0: // mono
869  monoStereo |= MONO;
870  break;
871  case 1: // stereo
872  monoStereo |= STEREO;
873  break;
874  default:
875  break;
876  }
877  }
878  }
879  }
880  return monoStereo;
881 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short SubstrOffset
Definition: HitPattern.h:324
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitTypeMask
Definition: HitPattern.h:337
static const unsigned short SubDetectorMask
Definition: HitPattern.h:321
static const unsigned short HitTypeOffset
Definition: HitPattern.h:336
static const unsigned short HitSize
Definition: HitPattern.h:317
static uint32_t getSide(uint32_t pattern)
Definition: HitPattern.cc:230
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:320
static const unsigned short SubstrMask
Definition: HitPattern.h:325
static const unsigned short LayerOffset
Definition: HitPattern.h:328
static const unsigned short LayerMask
Definition: HitPattern.h:329
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool HitPattern::hasValidHitInFirstPixelBarrel ( ) const

Definition at line 284 of file HitPattern.cc.

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

Referenced by TrackClassMatch::operator()(), and TrackClassFilter::operator()().

284  {
285  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
286  uint32_t pattern = getHitPattern(i);
287  if (pixelBarrelHitFilter(pattern)) {
288  if (getLayer(pattern) == 1) {
289  if (validHitFilter(pattern)) {
290  return true;
291  }
292  }
293  }
294  }
295  return false;
296 }
int i
Definition: DBlmapReader.cc:9
uint32_t getLayer(uint32_t pattern) const
Definition: HitPattern.cc:219
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool pixelBarrelHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:146
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool HitPattern::hasValidHitInFirstPixelEndcap ( ) const

Definition at line 298 of file HitPattern.cc.

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

298  {
299  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
300  uint32_t pattern = getHitPattern(i);
301  if (pixelEndcapHitFilter(pattern)) {
302  if (getLayer(pattern) == 1) {
303  if (validHitFilter(pattern)) {
304  return true;
305  }
306  }
307  }
308  }
309  return false;
310 }
int i
Definition: DBlmapReader.cc:9
uint32_t getLayer(uint32_t pattern) const
Definition: HitPattern.cc:219
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool pixelEndcapHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:153
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::innermostMuonStationWithAnyHits ( ) const

Definition at line 1303 of file HitPattern.cc.

References innermostMuonStationWithHits().

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

Definition at line 1302 of file HitPattern.cc.

References innermostMuonStationWithHits().

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

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

Definition at line 1273 of file HitPattern.cc.

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

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

1273  {
1274  int ret = 0;
1275  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
1276  uint32_t pattern = getHitPattern(i);
1277  if (pattern == 0) break;
1278  if (muonHitFilter(pattern) &&
1279  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
1280  int stat = getMuonStation(pattern);
1281  if (ret == 0 || stat < ret) ret = stat;
1282  }
1283  }
1284  return ret;
1285 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitType(uint32_t pattern) const
Definition: HitPattern.cc:236
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t getMuonStation(uint32_t pattern) const
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.cc:241
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
int HitPattern::innermostMuonStationWithValidHits ( ) const

Definition at line 1301 of file HitPattern.cc.

References innermostMuonStationWithHits().

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

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

1210 {
1211  switch (i.det()) {
1212  case DetId::Tracker:
1213  switch (i.subdetId()) {
1216  return 0;
1217  case StripSubdetector::TIB:
1218  {
1219  TIBDetId id = i;
1220  return id.isStereo();
1221  }
1222  case StripSubdetector::TID:
1223  {
1224  TIDDetId id = i;
1225  return id.isStereo();
1226  }
1227  case StripSubdetector::TOB:
1228  {
1229  TOBDetId id = i;
1230  return id.isStereo();
1231  }
1232  case StripSubdetector::TEC:
1233  {
1234  TECDetId id = i;
1235  return id.isStereo();
1236  }
1237  default:
1238  return 0;
1239  }
1240  break;
1241  default:
1242  return 0;
1243  }
1244 }
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:39
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
bool HitPattern::muonCSCHitFilter ( uint32_t  pattern) const

Definition at line 205 of file HitPattern.cc.

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

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

205  {
206  if (!muonHitFilter(pattern)) return false;
207  uint32_t substructure = getSubStructure(pattern);
208  if (substructure == (uint32_t) MuonSubdetId::CSC) return true;
209  return false;
210 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
static const int CSC
Definition: MuonSubdetId.h:15
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
bool HitPattern::muonDTHitFilter ( uint32_t  pattern) const

Definition at line 198 of file HitPattern.cc.

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

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

198  {
199  if (!muonHitFilter(pattern)) return false;
200  uint32_t substructure = getSubStructure(pattern);
201  if (substructure == (uint32_t) MuonSubdetId::DT) return true;
202  return false;
203 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
static const int DT
Definition: MuonSubdetId.h:14
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
bool HitPattern::muonHitFilter ( uint32_t  pattern) const

Definition at line 127 of file HitPattern.cc.

References SubDetectorMask, and SubDetectorOffset.

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

127  {
128  if (pattern == 0) return false;
129  if (((pattern>>SubDetectorOffset) & SubDetectorMask) == 0) return true;
130  return false;
131 }
static const unsigned short SubDetectorMask
Definition: HitPattern.h:321
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:320
bool HitPattern::muonRPCHitFilter ( uint32_t  pattern) const

Definition at line 212 of file HitPattern.cc.

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

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

212  {
213  if (!muonHitFilter(pattern)) return false;
214  uint32_t substructure = getSubStructure(pattern);
215  if (substructure == (uint32_t) MuonSubdetId::RPC) return true;
216  return false;
217 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
static const int RPC
Definition: MuonSubdetId.h:16
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
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 1246 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().

1246  {
1247  int stations[4] = { 0,0,0,0 };
1248  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
1249  uint32_t pattern = getHitPattern(i);
1250  if (pattern == 0) break;
1251  if (muonHitFilter(pattern) &&
1252  (subdet == 0 || int(getSubStructure(pattern)) == subdet) &&
1253  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
1254  stations[getMuonStation(pattern)-1] = 1;
1255  }
1256  }
1257  return stations[0]+stations[1]+stations[2]+stations[3];
1258 }
int i
Definition: DBlmapReader.cc:9
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitType(uint32_t pattern) const
Definition: HitPattern.cc:236
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t getMuonStation(uint32_t pattern) const
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.cc:241
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
int HitPattern::muonStationsWithAnyHits ( ) const

Definition at line 1262 of file HitPattern.cc.

References muonStations().

1262 { 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:1246
int HitPattern::muonStationsWithBadHits ( ) const

Definition at line 1261 of file HitPattern.cc.

References muonStations().

1261 { 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:1246
int HitPattern::muonStationsWithValidHits ( ) const

Definition at line 1260 of file HitPattern.cc.

References muonStations().

1260 { 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:1246
int HitPattern::numberOfBadHits ( ) const

Definition at line 682 of file HitPattern.cc.

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

682  {
683  int count = 0;
684  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
685  uint32_t pattern = getHitPattern(i);
686  if (pattern != 0) {
687  if (type_3_HitFilter(pattern)) count++;
688  }
689  }
690  return count;
691 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_3_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:279
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfBadMuonCSCHits ( ) const

Definition at line 719 of file HitPattern.cc.

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

719  {
720  int count = 0;
721  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
722  uint32_t pattern = getHitPattern(i);
723  if (pattern != 0) {
724  if (type_3_HitFilter(pattern)) {
725  if (muonCSCHitFilter(pattern)) count++;
726  }
727  }
728  }
729  return count;
730 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_3_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:279
bool muonCSCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:205
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfBadMuonDTHits ( ) const

Definition at line 706 of file HitPattern.cc.

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

706  {
707  int count = 0;
708  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
709  uint32_t pattern = getHitPattern(i);
710  if (pattern != 0) {
711  if (type_3_HitFilter(pattern)) {
712  if (muonDTHitFilter(pattern)) count++;
713  }
714  }
715  }
716  return count;
717 }
int i
Definition: DBlmapReader.cc:9
bool muonDTHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:198
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_3_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:279
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfBadMuonHits ( ) const

Definition at line 693 of file HitPattern.cc.

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

693  {
694  int count = 0;
695  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
696  uint32_t pattern = getHitPattern(i);
697  if (pattern != 0) {
698  if (type_3_HitFilter(pattern)) {
699  if (muonHitFilter(pattern)) count++;
700  }
701  }
702  }
703  return count;
704 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_3_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:279
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
int HitPattern::numberOfBadMuonRPCHits ( ) const

Definition at line 732 of file HitPattern.cc.

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

732  {
733  int count = 0;
734  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
735  uint32_t pattern = getHitPattern(i);
736  if (pattern != 0) {
737  if (type_3_HitFilter(pattern)) {
738  if (muonRPCHitFilter(pattern)) count++;
739  }
740  }
741  }
742  return count;
743 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_3_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:279
bool muonRPCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:212
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfDTStationsWithBothViews ( ) const

Definition at line 1332 of file HitPattern.cc.

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

1332  {
1333  int stations[4][2] = { {0,0}, {0,0}, {0,0}, {0,0} };
1334  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
1335  uint32_t pattern = getHitPattern(i);
1336  if (pattern == 0) break;
1337  if (muonDTHitFilter(pattern) && validHitFilter(pattern)) {
1338  stations[getMuonStation(pattern)-1][getDTSuperLayer(pattern) == 2] = 1;
1339  }
1340  }
1341  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];
1342 }
int i
Definition: DBlmapReader.cc:9
bool muonDTHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:198
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getDTSuperLayer(uint32_t pattern) const
DT superlayer (1-3). Only valid for muon DT patterns, of course.
Definition: HitPattern.cc:245
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t getMuonStation(uint32_t pattern) const
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.cc:241
int HitPattern::numberOfDTStationsWithRPhiView ( ) const

Definition at line 1308 of file HitPattern.cc.

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

1308  {
1309  int stations[4] = { 0,0,0,0 };
1310  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
1311  uint32_t pattern = getHitPattern(i);
1312  if (pattern == 0) break;
1313  if (muonDTHitFilter(pattern) && validHitFilter(pattern) && getDTSuperLayer(pattern) != 2) {
1314  stations[getMuonStation(pattern)-1] = 1;
1315  }
1316  }
1317  return stations[0]+stations[1]+stations[2]+stations[3];
1318 }
int i
Definition: DBlmapReader.cc:9
bool muonDTHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:198
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getDTSuperLayer(uint32_t pattern) const
DT superlayer (1-3). Only valid for muon DT patterns, of course.
Definition: HitPattern.cc:245
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t getMuonStation(uint32_t pattern) const
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.cc:241
int HitPattern::numberOfDTStationsWithRZView ( ) const

Definition at line 1320 of file HitPattern.cc.

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

1320  {
1321  int stations[4] = { 0,0,0,0 };
1322  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
1323  uint32_t pattern = getHitPattern(i);
1324  if (pattern == 0) break;
1325  if (muonDTHitFilter(pattern) && validHitFilter(pattern) && getDTSuperLayer(pattern) == 2) {
1326  stations[getMuonStation(pattern)-1] = 1;
1327  }
1328  }
1329  return stations[0]+stations[1]+stations[2]+stations[3];
1330 }
int i
Definition: DBlmapReader.cc:9
bool muonDTHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:198
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getDTSuperLayer(uint32_t pattern) const
DT superlayer (1-3). Only valid for muon DT patterns, of course.
Definition: HitPattern.cc:245
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t getMuonStation(uint32_t pattern) const
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.cc:241
int HitPattern::numberOfHits ( void  ) const
int HitPattern::numberOfInactiveHits ( ) const

Definition at line 745 of file HitPattern.cc.

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

745  {
746  int count = 0;
747  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
748  uint32_t pattern = getHitPattern(i);
749  if (pattern != 0) {
750  if (type_2_HitFilter(pattern)) count++;
751  }
752  }
753  return count;
754 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitSize
Definition: HitPattern.h:317
bool type_2_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:274
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfInactiveTrackerHits ( ) const

Definition at line 756 of file HitPattern.cc.

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

756  {
757  int count = 0;
758  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
759  uint32_t pattern = getHitPattern(i);
760  if (pattern != 0) {
761  if (type_2_HitFilter(pattern) && trackerHitFilter(pattern)) count++;
762  }
763  }
764  return count;
765 }
int i
Definition: DBlmapReader.cc:9
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitSize
Definition: HitPattern.h:317
bool type_2_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:274
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostHits ( ) const

Definition at line 502 of file HitPattern.cc.

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

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

502  {
503  int count = 0;
504  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
505  uint32_t pattern = getHitPattern(i);
506  if (pattern != 0) {
507  if (type_1_HitFilter(pattern)) count++;
508  }
509  }
510  return count;
511 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostMuonCSCHits ( ) const

Definition at line 656 of file HitPattern.cc.

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

656  {
657  int count = 0;
658  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
659  uint32_t pattern = getHitPattern(i);
660  if (pattern != 0) {
661  if (type_1_HitFilter(pattern)) {
662  if (muonCSCHitFilter(pattern)) count++;
663  }
664  }
665  }
666  return count;
667 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool muonCSCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:205
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostMuonDTHits ( ) const

Definition at line 643 of file HitPattern.cc.

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

643  {
644  int count = 0;
645  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
646  uint32_t pattern = getHitPattern(i);
647  if (pattern != 0) {
648  if (type_1_HitFilter(pattern)) {
649  if (muonDTHitFilter(pattern)) count++;
650  }
651  }
652  }
653  return count;
654 }
int i
Definition: DBlmapReader.cc:9
bool muonDTHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:198
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostMuonHits ( ) const

Definition at line 526 of file HitPattern.cc.

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

526  {
527  int count = 0;
528  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
529  uint32_t pattern = getHitPattern(i);
530  if (pattern != 0) {
531  if (type_1_HitFilter(pattern)) {
532  if (muonHitFilter(pattern)) count++;
533  }
534  }
535  }
536  return count;
537 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
int HitPattern::numberOfLostMuonRPCHits ( ) const

Definition at line 669 of file HitPattern.cc.

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

669  {
670  int count = 0;
671  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
672  uint32_t pattern = getHitPattern(i);
673  if (pattern != 0) {
674  if (type_1_HitFilter(pattern)) {
675  if (muonRPCHitFilter(pattern)) count++;
676  }
677  }
678  }
679  return count;
680 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool muonRPCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:212
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostPixelBarrelHits ( ) const

Definition at line 552 of file HitPattern.cc.

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

552  {
553  int count = 0;
554  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
555  uint32_t pattern = getHitPattern(i);
556  if (pattern != 0) {
557  if (type_1_HitFilter(pattern)) {
558  if (pixelBarrelHitFilter(pattern)) count++;
559  }
560  }
561  }
562  return count;
563 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool pixelBarrelHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:146
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostPixelEndcapHits ( ) const

Definition at line 565 of file HitPattern.cc.

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

565  {
566  int count = 0;
567  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
568  uint32_t pattern = getHitPattern(i);
569  if (pattern != 0) {
570  if (type_1_HitFilter(pattern)) {
571  if (pixelEndcapHitFilter(pattern)) count++;
572  }
573  }
574  }
575  return count;
576 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool pixelEndcapHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:153
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostPixelHits ( ) const

Definition at line 539 of file HitPattern.cc.

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

539  {
540  int count = 0;
541  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
542  uint32_t pattern = getHitPattern(i);
543  if (pattern != 0) {
544  if (type_1_HitFilter(pattern)) {
545  if (pixelHitFilter(pattern)) count++;
546  }
547  }
548  }
549  return count;
550 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
bool pixelHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:138
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostStripHits ( ) const

Definition at line 578 of file HitPattern.cc.

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

578  {
579  int count = 0;
580  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
581  uint32_t pattern = getHitPattern(i);
582  if (pattern != 0) {
583  if (type_1_HitFilter(pattern)) {
584  if (stripHitFilter(pattern)) count++;
585  }
586  }
587  }
588  return count;
589 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool stripHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:160
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostStripTECHits ( ) const

Definition at line 630 of file HitPattern.cc.

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

630  {
631  int count = 0;
632  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
633  uint32_t pattern = getHitPattern(i);
634  if (pattern != 0) {
635  if (type_1_HitFilter(pattern)) {
636  if (stripTECHitFilter(pattern)) count++;
637  }
638  }
639  }
640  return count;
641 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool stripTECHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:191
int HitPattern::numberOfLostStripTIBHits ( ) const

Definition at line 591 of file HitPattern.cc.

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

591  {
592  int count = 0;
593  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
594  uint32_t pattern = getHitPattern(i);
595  if (pattern != 0) {
596  if (type_1_HitFilter(pattern)) {
597  if (stripTIBHitFilter(pattern)) count++;
598  }
599  }
600  }
601  return count;
602 }
int i
Definition: DBlmapReader.cc:9
bool stripTIBHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:170
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostStripTIDHits ( ) const

Definition at line 604 of file HitPattern.cc.

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

604  {
605  int count = 0;
606  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
607  uint32_t pattern = getHitPattern(i);
608  if (pattern != 0) {
609  if (type_1_HitFilter(pattern)) {
610  if (stripTIDHitFilter(pattern)) count++;
611  }
612  }
613  }
614  return count;
615 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool stripTIDHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:177
int HitPattern::numberOfLostStripTOBHits ( ) const

Definition at line 617 of file HitPattern.cc.

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

617  {
618  int count = 0;
619  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
620  uint32_t pattern = getHitPattern(i);
621  if (pattern != 0) {
622  if (type_1_HitFilter(pattern)) {
623  if (stripTOBHitFilter(pattern)) count++;
624  }
625  }
626  }
627  return count;
628 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool stripTOBHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:184
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfLostTrackerHits ( ) const

Definition at line 513 of file HitPattern.cc.

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

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

513  {
514  int count = 0;
515  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
516  uint32_t pattern = getHitPattern(i);
517  if (pattern != 0) {
518  if (type_1_HitFilter(pattern)) {
519  if (trackerHitFilter(pattern)) count++;
520  }
521  }
522  }
523  return count;
524 }
int i
Definition: DBlmapReader.cc:9
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool type_1_HitFilter(uint32_t pattern) const
Definition: HitPattern.cc:269
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidHits ( ) const

Definition at line 321 of file HitPattern.cc.

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

Referenced by HLTMuonDQMSource::analyze(), TrackAnalyzer::fillHistosForState(), reco::TransientTrack::numberOfValidHits(), reco::TrackBase::numberOfValidHits(), reco::TrackSelector::operator()(), and TrackIPProducer::produce().

321  {
322  int count = 0;
323  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
324  uint32_t pattern = getHitPattern(i);
325  if (pattern == 0) break;
326  //if (pattern != 0) {
327  if (validHitFilter(pattern)) count++;
328  //}
329  }
330  return count;
331 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidMuonCSCHits ( ) const

Definition at line 476 of file HitPattern.cc.

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

Referenced by MuonTrackValidator::analyze().

476  {
477  int count = 0;
478  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
479  uint32_t pattern = getHitPattern(i);
480  if (pattern != 0) {
481  if (validHitFilter(pattern)) {
482  if (muonCSCHitFilter(pattern)) count++;
483  }
484  }
485  }
486  return count;
487 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool muonCSCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:205
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidMuonDTHits ( ) const

Definition at line 463 of file HitPattern.cc.

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

Referenced by MuonTrackValidator::analyze().

463  {
464  int count = 0;
465  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
466  uint32_t pattern = getHitPattern(i);
467  if (pattern != 0) {
468  if (validHitFilter(pattern)) {
469  if (muonDTHitFilter(pattern)) count++;
470  }
471  }
472  }
473  return count;
474 }
int i
Definition: DBlmapReader.cc:9
bool muonDTHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:198
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidMuonHits ( ) const

Definition at line 346 of file HitPattern.cc.

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

Referenced by HLTMuonDQMSource::analyze(), BPhysicsOniaDQM::selGlobalMuon(), MuScleFitMuonSelector::selGlobalMuon(), and MuScleFit::selGlobalMuon().

346  {
347  int count = 0;
348  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
349  uint32_t pattern = getHitPattern(i);
350  if (pattern != 0) {
351  if (validHitFilter(pattern)) {
352  if (muonHitFilter(pattern)) count++;
353  }
354  }
355  }
356  return count;
357 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
int HitPattern::numberOfValidMuonRPCHits ( ) const

Definition at line 489 of file HitPattern.cc.

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

Referenced by MuonTrackValidator::analyze().

489  {
490  int count = 0;
491  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
492  uint32_t pattern = getHitPattern(i);
493  if (pattern != 0) {
494  if (validHitFilter(pattern)) {
495  if (muonRPCHitFilter(pattern)) count++;
496  }
497  }
498  }
499  return count;
500 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool muonRPCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:212
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidPixelBarrelHits ( ) const

Definition at line 372 of file HitPattern.cc.

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

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

372  {
373  int count = 0;
374  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
375  uint32_t pattern = getHitPattern(i);
376  if (pattern != 0) {
377  if (validHitFilter(pattern)) {
378  if (pixelBarrelHitFilter(pattern)) count++;
379  }
380  }
381  }
382  return count;
383 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool pixelBarrelHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:146
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidPixelEndcapHits ( ) const

Definition at line 385 of file HitPattern.cc.

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

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

385  {
386  int count = 0;
387  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
388  uint32_t pattern = getHitPattern(i);
389  if (pattern != 0) {
390  if (validHitFilter(pattern)) {
391  if (pixelEndcapHitFilter(pattern)) count++;
392  }
393  }
394  }
395  return count;
396 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool pixelEndcapHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:153
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidPixelHits ( ) const

Definition at line 359 of file HitPattern.cc.

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

Referenced by HLTMuonDQMSource::analyze(), HLTTrackWithHits::filter(), reco::TrackSelector::operator()(), TrackClassFilter::operator()(), TrackClassMatch::operator()(), TrackIPProducer::produce(), PFAlgo::reconstructTrack(), PFElectronAlgo::SetLinks(), and TrackWithVertexSelector::testTrack().

359  {
360  int count = 0;
361  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
362  uint32_t pattern = getHitPattern(i);
363  if (pattern != 0) {
364  if (validHitFilter(pattern)) {
365  if (pixelHitFilter(pattern)) count++;
366  }
367  }
368  }
369  return count;
370 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
bool pixelHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:138
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidStripHits ( ) const

Definition at line 398 of file HitPattern.cc.

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

Referenced by HLTMuonDQMSource::analyze().

398  {
399  int count = 0;
400  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
401  uint32_t pattern = getHitPattern(i);
402  if (pattern != 0) {
403  if (validHitFilter(pattern)) {
404  if (stripHitFilter(pattern)) count++;
405  }
406  }
407  }
408  return count;
409 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool stripHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:160
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidStripLayersWithMonoAndStereo ( ) const

Definition at line 768 of file HitPattern.cc.

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

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

769 {
770  static const int nHits = (PatternSize * 32) / HitSize;
771  bool hasMono[SubstrMask + 1][LayerMask + 1];
772  // printf("sizeof(hasMono) = %d\n", sizeof(hasMono));
773  memset(hasMono, 0, sizeof(hasMono));
774  bool hasStereo[SubstrMask + 1][LayerMask + 1];
775  memset(hasStereo, 0, sizeof(hasStereo));
776  // mark which layers have mono/stereo hits
777  for (int i = 0; i < nHits; i++) {
778  uint32_t pattern = getHitPattern(i);
779  if (pattern != 0) {
780  if (validHitFilter(pattern) && stripHitFilter(pattern)) {
781  switch (getSide(pattern)) {
782  case 0: // mono
783  hasMono[getSubStructure(pattern)][getLayer(pattern)]
784  = true;
785  break;
786  case 1: // stereo
787  hasStereo[getSubStructure(pattern)][getLayer(pattern)]
788  = true;
789  break;
790  default:
791  break;
792  }
793  }
794  }
795  }
796  // count how many layers have mono and stereo hits
797  int count = 0;
798  for (int i = 0; i < SubstrMask + 1; ++i)
799  for (int j = 0; j < LayerMask + 1; ++j)
800  if (hasMono[i][j] && hasStereo[i][j])
801  count++;
802  return count;
803 }
int i
Definition: DBlmapReader.cc:9
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
uint32_t getLayer(uint32_t pattern) const
Definition: HitPattern.cc:219
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool stripHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:160
int j
Definition: DBlmapReader.cc:9
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
static uint32_t getSide(uint32_t pattern)
Definition: HitPattern.cc:230
static const unsigned short SubstrMask
Definition: HitPattern.h:325
static const unsigned short LayerMask
Definition: HitPattern.h:329
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidStripTECHits ( ) const

Definition at line 450 of file HitPattern.cc.

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

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

450  {
451  int count = 0;
452  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
453  uint32_t pattern = getHitPattern(i);
454  if (pattern != 0) {
455  if (validHitFilter(pattern)) {
456  if (stripTECHitFilter(pattern)) count++;
457  }
458  }
459  }
460  return count;
461 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool stripTECHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:191
int HitPattern::numberOfValidStripTIBHits ( ) const

Definition at line 411 of file HitPattern.cc.

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

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

411  {
412  int count = 0;
413  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
414  uint32_t pattern = getHitPattern(i);
415  if (pattern != 0) {
416  if (validHitFilter(pattern)) {
417  if (stripTIBHitFilter(pattern)) count++;
418  }
419  }
420  }
421  return count;
422 }
int i
Definition: DBlmapReader.cc:9
bool stripTIBHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:170
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidStripTIDHits ( ) const

Definition at line 424 of file HitPattern.cc.

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

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

424  {
425  int count = 0;
426  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
427  uint32_t pattern = getHitPattern(i);
428  if (pattern != 0) {
429  if (validHitFilter(pattern)) {
430  if (stripTIDHitFilter(pattern)) count++;
431  }
432  }
433  }
434  return count;
435 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
bool stripTIDHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:177
int HitPattern::numberOfValidStripTOBHits ( ) const

Definition at line 437 of file HitPattern.cc.

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

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

437  {
438  int count = 0;
439  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
440  uint32_t pattern = getHitPattern(i);
441  if (pattern != 0) {
442  if (validHitFilter(pattern)) {
443  if (stripTOBHitFilter(pattern)) count++;
444  }
445  }
446  }
447  return count;
448 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool stripTOBHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:184
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::numberOfValidTrackerHits ( ) const

Definition at line 333 of file HitPattern.cc.

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

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

333  {
334  int count = 0;
335  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
336  uint32_t pattern = getHitPattern(i);
337  if (pattern != 0) {
338  if (validHitFilter(pattern)) {
339  if (trackerHitFilter(pattern)) count++;
340  }
341  }
342  }
343  return count;
344 }
int i
Definition: DBlmapReader.cc:9
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
static const unsigned short PatternSize
Definition: HitPattern.h:314
bool validHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:264
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
int HitPattern::outermostMuonStationWithAnyHits ( ) const

Definition at line 1306 of file HitPattern.cc.

References outermostMuonStationWithHits().

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

Definition at line 1305 of file HitPattern.cc.

References outermostMuonStationWithHits().

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

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

Definition at line 1287 of file HitPattern.cc.

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

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

1287  {
1288  int ret = 0;
1289  for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
1290  uint32_t pattern = getHitPattern(i);
1291  if (pattern == 0) break;
1292  if (muonHitFilter(pattern) &&
1293  (hitType == -1 || int(getHitType(pattern)) == hitType)) {
1294  int stat = getMuonStation(pattern);
1295  if (ret == 0 || stat > ret) ret = stat;
1296  }
1297  }
1298  return ret;
1299 }
int i
Definition: DBlmapReader.cc:9
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitSize
Definition: HitPattern.h:317
uint32_t getHitType(uint32_t pattern) const
Definition: HitPattern.cc:236
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t getMuonStation(uint32_t pattern) const
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.cc:241
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
int HitPattern::outermostMuonStationWithValidHits ( ) const

Definition at line 1304 of file HitPattern.cc.

References outermostMuonStationWithHits().

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

Definition at line 146 of file HitPattern.cc.

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

Referenced by PrimaryVertexValidation::hasFirstLayerPixelHits(), hasValidHitInFirstPixelBarrel(), SoftElectronCandProducer::isClean(), numberOfLostPixelBarrelHits(), and numberOfValidPixelBarrelHits().

146  {
147  if (!trackerHitFilter(pattern)) return false;
148  uint32_t substructure = getSubStructure(pattern);
149  if (substructure == PixelSubdetector::PixelBarrel) return true;
150  return false;
151 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
int HitPattern::pixelBarrelLayersNull ( ) const

Definition at line 1113 of file HitPattern.cc.

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

Referenced by pixelLayersNull().

1113  {
1114  int count = 0;
1115  uint32_t substr = PixelSubdetector::PixelBarrel;
1116  for (uint32_t layer=1; layer<=3; layer++) {
1117  if (getTrackerLayerCase(substr, layer) == 999999) count++;
1118  }
1119  return count;
1120 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::pixelBarrelLayersTotallyOffOrBad ( ) const

Definition at line 1042 of file HitPattern.cc.

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

Referenced by pixelLayersTotallyOffOrBad().

1042  {
1043  int count = 0;
1044  uint32_t substr = PixelSubdetector::PixelBarrel;
1045  for (uint32_t layer=1; layer<=3; layer++) {
1046  if (getTrackerLayerCase(substr, layer) == 2) count++;
1047  }
1048  return count;
1049 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::pixelBarrelLayersWithMeasurement ( ) const

Definition at line 900 of file HitPattern.cc.

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

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

900  {
901  int count = 0;
902  uint32_t substr = PixelSubdetector::PixelBarrel;
903  for (uint32_t layer=1; layer<=3; layer++) {
904  if (getTrackerLayerCase(substr, layer) == 0) count++;
905  }
906  return count;
907 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::pixelBarrelLayersWithoutMeasurement ( ) const

Definition at line 971 of file HitPattern.cc.

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

Referenced by pixelLayersWithoutMeasurement().

971  {
972  int count = 0;
973  uint32_t substr = PixelSubdetector::PixelBarrel;
974  for (uint32_t layer=1; layer<=3; layer++) {
975  if (getTrackerLayerCase(substr, layer) == 1) count++;
976  }
977  return count;
978 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
bool HitPattern::pixelEndcapHitFilter ( uint32_t  pattern) const

Definition at line 153 of file HitPattern.cc.

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

Referenced by PrimaryVertexValidation::hasFirstLayerPixelHits(), hasValidHitInFirstPixelEndcap(), SoftElectronCandProducer::isClean(), numberOfLostPixelEndcapHits(), and numberOfValidPixelEndcapHits().

153  {
154  if (!trackerHitFilter(pattern)) return false;
155  uint32_t substructure = getSubStructure(pattern);
156  if (substructure == PixelSubdetector::PixelEndcap) return true;
157  return false;
158 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
int HitPattern::pixelEndcapLayersNull ( ) const

Definition at line 1122 of file HitPattern.cc.

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

Referenced by pixelLayersNull().

1122  {
1123  int count = 0;
1124  uint32_t substr = PixelSubdetector::PixelEndcap;
1125  for (uint32_t layer=1; layer<=2; layer++) {
1126  if (getTrackerLayerCase(substr, layer) == 999999) count++;
1127  }
1128  return count;
1129 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::pixelEndcapLayersTotallyOffOrBad ( ) const

Definition at line 1051 of file HitPattern.cc.

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

Referenced by pixelLayersTotallyOffOrBad().

1051  {
1052  int count = 0;
1053  uint32_t substr = PixelSubdetector::PixelEndcap;
1054  for (uint32_t layer=1; layer<=2; layer++) {
1055  if (getTrackerLayerCase(substr, layer) == 2) count++;
1056  }
1057  return count;
1058 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::pixelEndcapLayersWithMeasurement ( ) const

Definition at line 909 of file HitPattern.cc.

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

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

909  {
910  int count = 0;
911  uint32_t substr = PixelSubdetector::PixelEndcap;
912  for (uint32_t layer=1; layer<=2; layer++) {
913  if (getTrackerLayerCase(substr, layer) == 0) count++;
914  }
915  return count;
916 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::pixelEndcapLayersWithoutMeasurement ( ) const

Definition at line 980 of file HitPattern.cc.

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

Referenced by pixelLayersWithoutMeasurement().

980  {
981  int count = 0;
982  uint32_t substr = PixelSubdetector::PixelEndcap;
983  for (uint32_t layer=1; layer<=2; layer++) {
984  if (getTrackerLayerCase(substr, layer) == 1) count++;
985  }
986  return count;
987 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
bool HitPattern::pixelHitFilter ( uint32_t  pattern) const
int HitPattern::pixelLayersNull ( ) const

Definition at line 1101 of file HitPattern.cc.

References pixelBarrelLayersNull(), and pixelEndcapLayersNull().

Referenced by trackerLayersNull().

1101  {
1102  return pixelBarrelLayersNull() +
1104 }
int pixelBarrelLayersNull() const
Definition: HitPattern.cc:1113
int pixelEndcapLayersNull() const
Definition: HitPattern.cc:1122
int HitPattern::pixelLayersTotallyOffOrBad ( ) const

Definition at line 1030 of file HitPattern.cc.

References pixelBarrelLayersTotallyOffOrBad(), and pixelEndcapLayersTotallyOffOrBad().

Referenced by trackerLayersTotallyOffOrBad().

1030  {
1033 }
int pixelBarrelLayersTotallyOffOrBad() const
Definition: HitPattern.cc:1042
int pixelEndcapLayersTotallyOffOrBad() const
Definition: HitPattern.cc:1051
int HitPattern::pixelLayersWithMeasurement ( ) const
int HitPattern::pixelLayersWithoutMeasurement ( ) const

Definition at line 959 of file HitPattern.cc.

References pixelBarrelLayersWithoutMeasurement(), and pixelEndcapLayersWithoutMeasurement().

Referenced by trackerLayersWithoutMeasurement().

959  {
962 }
int pixelBarrelLayersWithoutMeasurement() const
Definition: HitPattern.cc:971
int pixelEndcapLayersWithoutMeasurement() const
Definition: HitPattern.cc:980
void HitPattern::print ( std::ostream &  stream = std::cout) const

Definition at line 1194 of file HitPattern.cc.

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

1195 {
1196  stream << "HitPattern" << std::endl;
1197  for (int i = 0; i < numberOfHits(); i++)
1198  printHitPattern(i, stream);
1199  std::ios_base::fmtflags flags = stream.flags();
1200  stream.setf ( std::ios_base::hex, std::ios_base::basefield );
1201  stream.setf ( std::ios_base::showbase );
1202  for (int i = 0; i < numberOfHits(); i++) {
1203  uint32_t pattern = getHitPattern(i);
1204  stream << pattern << std::endl;
1205  }
1206  stream.flags(flags);
1207 }
int i
Definition: DBlmapReader.cc:9
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
int numberOfHits() const
Definition: HitPattern.cc:312
void printHitPattern(int position, std::ostream &stream) const
Definition: HitPattern.cc:1167
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
void HitPattern::printHitPattern ( int  position,
std::ostream &  stream 
) const

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

1168 {
1169  uint32_t pattern = getHitPattern(position);
1170  stream << "\t";
1171  if (muonHitFilter(pattern))
1172  stream << "muon";
1173  if (trackerHitFilter(pattern))
1174  stream << "tracker";
1175  stream << "\tsubstructure " << getSubStructure(pattern);
1176  if (muonHitFilter(pattern)) {
1177  stream << "\tstation " << getMuonStation(pattern);
1178  if (muonDTHitFilter(pattern)) {
1179  stream << "\tdt superlayer " << getDTSuperLayer(pattern);
1180  } else if (muonCSCHitFilter(pattern)) {
1181  stream << "\tcsc ring " << getCSCRing(pattern);
1182  } else if (muonRPCHitFilter(pattern)) {
1183  stream << "\trpc " << (getRPCregion(pattern) ? "endcaps" : "barrel") << ", layer " << getRPCLayer(pattern);
1184  } else {
1185  stream << "(UNKNOWN Muon SubStructure!) \tsubsubstructure " << getSubStructure(pattern);
1186  }
1187  } else {
1188  stream << "\tlayer " << getLayer(pattern);
1189  }
1190  stream << "\thit type " << getHitType(pattern);
1191  stream << std::endl;
1192 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool muonDTHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:198
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
uint32_t getCSCRing(uint32_t pattern) const
CSC ring (1-4). Only valid for muon CSC patterns, of course.
Definition: HitPattern.cc:249
uint32_t getLayer(uint32_t pattern) const
Definition: HitPattern.cc:219
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
bool muonRPCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:212
bool muonCSCHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:205
uint32_t getRPCLayer(uint32_t pattern) const
RPC layer: for station 1 and 2, layer = 1(inner) or 2(outer); for station 3, 4 layer is always 0...
Definition: HitPattern.cc:253
uint32_t getDTSuperLayer(uint32_t pattern) const
DT superlayer (1-3). Only valid for muon DT patterns, of course.
Definition: HitPattern.cc:245
uint32_t getHitType(uint32_t pattern) const
Definition: HitPattern.cc:236
uint32_t getRPCregion(uint32_t pattern) const
RPC region: 0 = barrel, 1 = endcap. Only valid for muon RPC patterns, of course.
Definition: HitPattern.cc:259
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:86
uint32_t getMuonStation(uint32_t pattern) const
Muon station (1-4). Only valid for muon patterns, of course.
Definition: HitPattern.cc:241
bool muonHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:127
int HitPattern::rpcStationsWithAnyHits ( ) const

Definition at line 1271 of file HitPattern.cc.

References muonStations().

1271 { 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:1246
int HitPattern::rpcStationsWithBadHits ( ) const

Definition at line 1270 of file HitPattern.cc.

References muonStations().

1270 { 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:1246
int HitPattern::rpcStationsWithValidHits ( ) const

Definition at line 1269 of file HitPattern.cc.

References muonStations().

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

Definition at line 138 of file HitPattern.h.

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

Referenced by HitPattern(), reco::TrackBase::setHitPattern(), reco::TrackBase::setTrackerExpectedHitsInner(), and reco::TrackBase::setTrackerExpectedHitsOuter().

138  {
139  for (int i=0; i<PatternSize; i++) hitPattern_[i] = 0;
140  unsigned int counter = 0;
141  for (I hit=begin; hit!=end && counter<32*PatternSize/HitSize;
142  hit++, counter++)
143  set(*hit, counter);
144  }
int i
Definition: DBlmapReader.cc:9
uint32_t hitPattern_[PatternSize]
Definition: HitPattern.h:340
void set(const I &begin, const I &end)
Definition: HitPattern.h:138
static const unsigned short PatternSize
Definition: HitPattern.h:314
const std::complex< double > I
Definition: I.h:8
#define end
Definition: vmac.h:38
static const unsigned short HitSize
Definition: HitPattern.h:317
#define begin
Definition: vmac.h:31
void HitPattern::set ( const TrackingRecHit hit,
unsigned int  i 
)

Definition at line 14 of file HitPattern.cc.

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

14  {
15  // ignore the rec hit if the number of hit is larger than the max
16  if (i >= 32 * PatternSize / HitSize) return;
17 
18  // get rec hit det id and rec hit type
19  DetId id = hit.geographicalId();
20  uint32_t detid = id.det();
21  uint32_t hitType = (uint32_t) hit.getType();
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()-1);
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  // set pattern for i-th hit
74  setHitPattern(i, pattern);
75 }
int i
Definition: DBlmapReader.cc:9
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
static uint32_t isStereo(DetId)
Definition: HitPattern.cc:1209
static const unsigned short SideOffset
Definition: HitPattern.h:332
static const unsigned short SubstrOffset
Definition: HitPattern.h:324
#define abs(x)
Definition: mlp_lapack.h:159
static const unsigned short PatternSize
Definition: HitPattern.h:314
static const unsigned short HitTypeMask
Definition: HitPattern.h:337
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
static const int CSC
Definition: MuonSubdetId.h:15
static const unsigned short SubDetectorMask
Definition: HitPattern.h:321
static const unsigned short HitTypeOffset
Definition: HitPattern.h:336
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
static const unsigned short HitSize
Definition: HitPattern.h:317
Definition: DetId.h:20
Type getType() const
static const unsigned short SideMask
Definition: HitPattern.h:333
static const unsigned short SubDetectorOffset
Definition: HitPattern.h:320
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:325
static const int RPC
Definition: MuonSubdetId.h:16
static const unsigned short LayerOffset
Definition: HitPattern.h:328
static const int DT
Definition: MuonSubdetId.h:14
DetId geographicalId() const
static const unsigned short LayerMask
Definition: HitPattern.h:329
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
void setHitPattern(int position, uint32_t pattern)
Definition: HitPattern.cc:77
void reco::HitPattern::set ( const TrackingRecHitRef ref,
unsigned int  i 
)
inlineprivate

Definition at line 346 of file HitPattern.h.

References set().

Referenced by set().

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

Definition at line 77 of file HitPattern.cc.

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

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:340
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
unsigned int offset(bool)
static const unsigned short HitSize
Definition: HitPattern.h:317
bool HitPattern::stripHitFilter ( uint32_t  pattern) const

Definition at line 160 of file HitPattern.cc.

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

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

160  {
161  if (!trackerHitFilter(pattern)) return false;
162  uint32_t substructure = getSubStructure(pattern);
163  if (substructure == StripSubdetector::TIB ||
164  substructure == StripSubdetector::TID ||
165  substructure == StripSubdetector::TOB ||
166  substructure == StripSubdetector::TEC) return true;
167  return false;
168 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
int HitPattern::stripLayersNull ( ) const

Definition at line 1106 of file HitPattern.cc.

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

Referenced by trackerLayersNull().

1106  {
1107  return stripTIBLayersNull() +
1108  stripTIDLayersNull() +
1109  stripTOBLayersNull() +
1111 }
int stripTIBLayersNull() const
Definition: HitPattern.cc:1131
int stripTECLayersNull() const
Definition: HitPattern.cc:1158
int stripTIDLayersNull() const
Definition: HitPattern.cc:1140
int stripTOBLayersNull() const
Definition: HitPattern.cc:1149
int HitPattern::stripLayersTotallyOffOrBad ( ) const
int HitPattern::stripLayersWithMeasurement ( ) const
int HitPattern::stripLayersWithoutMeasurement ( ) const
bool HitPattern::stripTECHitFilter ( uint32_t  pattern) const

Definition at line 191 of file HitPattern.cc.

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

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

191  {
192  if (!trackerHitFilter(pattern)) return false;
193  uint32_t substructure = getSubStructure(pattern);
194  if (substructure == StripSubdetector::TEC) return true;
195  return false;
196 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
int HitPattern::stripTECLayersNull ( ) const

Definition at line 1158 of file HitPattern.cc.

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

Referenced by stripLayersNull().

1158  {
1159  int count = 0;
1160  uint32_t substr = StripSubdetector::TEC;
1161  for (uint32_t layer=1; layer<=9; layer++) {
1162  if (getTrackerLayerCase(substr, layer) == 999999) count++;
1163  }
1164  return count;
1165 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTECLayersTotallyOffOrBad ( ) const

Definition at line 1087 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

1087  {
1088  int count = 0;
1089  uint32_t substr = StripSubdetector::TEC;
1090  for (uint32_t layer=1; layer<=9; layer++) {
1091  if (getTrackerLayerCase(substr, layer) == 2) count++;
1092  }
1093  return count;
1094 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTECLayersWithMeasurement ( ) const

Definition at line 945 of file HitPattern.cc.

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

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

945  {
946  int count = 0;
947  uint32_t substr = StripSubdetector::TEC;
948  for (uint32_t layer=1; layer<=9; layer++) {
949  if (getTrackerLayerCase(substr, layer) == 0) count++;
950  }
951  return count;
952 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTECLayersWithoutMeasurement ( ) const

Definition at line 1016 of file HitPattern.cc.

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

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

1016  {
1017  int count = 0;
1018  uint32_t substr = StripSubdetector::TEC;
1019  for (uint32_t layer=1; layer<=9; layer++) {
1020  if (getTrackerLayerCase(substr, layer) == 1) count++;
1021  }
1022  return count;
1023 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
bool HitPattern::stripTIBHitFilter ( uint32_t  pattern) const

Definition at line 170 of file HitPattern.cc.

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

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

170  {
171  if (!trackerHitFilter(pattern)) return false;
172  uint32_t substructure = getSubStructure(pattern);
173  if (substructure == StripSubdetector::TIB) return true;
174  return false;
175 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
int HitPattern::stripTIBLayersNull ( ) const

Definition at line 1131 of file HitPattern.cc.

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

Referenced by stripLayersNull().

1131  {
1132  int count = 0;
1133  uint32_t substr = StripSubdetector::TIB;
1134  for (uint32_t layer=1; layer<=4; layer++) {
1135  if (getTrackerLayerCase(substr, layer) == 999999) count++;
1136  }
1137  return count;
1138 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTIBLayersTotallyOffOrBad ( ) const

Definition at line 1060 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

1060  {
1061  int count = 0;
1062  uint32_t substr = StripSubdetector::TIB;
1063  for (uint32_t layer=1; layer<=4; layer++) {
1064  if (getTrackerLayerCase(substr, layer) == 2) count++;
1065  }
1066  return count;
1067 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTIBLayersWithMeasurement ( ) const

Definition at line 918 of file HitPattern.cc.

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

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

918  {
919  int count = 0;
920  uint32_t substr = StripSubdetector::TIB;
921  for (uint32_t layer=1; layer<=4; layer++) {
922  if (getTrackerLayerCase(substr, layer) == 0) count++;
923  }
924  return count;
925 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTIBLayersWithoutMeasurement ( ) const

Definition at line 989 of file HitPattern.cc.

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

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

989  {
990  int count = 0;
991  uint32_t substr = StripSubdetector::TIB;
992  for (uint32_t layer=1; layer<=4; layer++) {
993  if (getTrackerLayerCase(substr, layer) == 1) count++;
994  }
995  return count;
996 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
bool HitPattern::stripTIDHitFilter ( uint32_t  pattern) const

Definition at line 177 of file HitPattern.cc.

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

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

177  {
178  if (!trackerHitFilter(pattern)) return false;
179  uint32_t substructure = getSubStructure(pattern);
180  if (substructure == StripSubdetector::TID) return true;
181  return false;
182 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
int HitPattern::stripTIDLayersNull ( ) const

Definition at line 1140 of file HitPattern.cc.

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

Referenced by stripLayersNull().

1140  {
1141  int count = 0;
1142  uint32_t substr = StripSubdetector::TID;
1143  for (uint32_t layer=1; layer<=3; layer++) {
1144  if (getTrackerLayerCase(substr, layer) == 999999) count++;
1145  }
1146  return count;
1147 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTIDLayersTotallyOffOrBad ( ) const

Definition at line 1069 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

1069  {
1070  int count = 0;
1071  uint32_t substr = StripSubdetector::TID;
1072  for (uint32_t layer=1; layer<=3; layer++) {
1073  if (getTrackerLayerCase(substr, layer) == 2) count++;
1074  }
1075  return count;
1076 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTIDLayersWithMeasurement ( ) const

Definition at line 927 of file HitPattern.cc.

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

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

927  {
928  int count = 0;
929  uint32_t substr = StripSubdetector::TID;
930  for (uint32_t layer=1; layer<=3; layer++) {
931  if (getTrackerLayerCase(substr, layer) == 0) count++;
932  }
933  return count;
934 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTIDLayersWithoutMeasurement ( ) const

Definition at line 998 of file HitPattern.cc.

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

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

998  {
999  int count = 0;
1000  uint32_t substr = StripSubdetector::TID;
1001  for (uint32_t layer=1; layer<=3; layer++) {
1002  if (getTrackerLayerCase(substr, layer) == 1) count++;
1003  }
1004  return count;
1005 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
bool HitPattern::stripTOBHitFilter ( uint32_t  pattern) const

Definition at line 184 of file HitPattern.cc.

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

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

184  {
185  if (!trackerHitFilter(pattern)) return false;
186  uint32_t substructure = getSubStructure(pattern);
187  if (substructure == StripSubdetector::TOB) return true;
188  return false;
189 }
uint32_t getSubStructure(uint32_t pattern) const
Definition: HitPattern.cc:133
bool trackerHitFilter(uint32_t pattern) const
Definition: HitPattern.cc:121
int HitPattern::stripTOBLayersNull ( ) const

Definition at line 1149 of file HitPattern.cc.

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

Referenced by stripLayersNull().

1149  {
1150  int count = 0;
1151  uint32_t substr = StripSubdetector::TOB;
1152  for (uint32_t layer=1; layer<=6; layer++) {
1153  if (getTrackerLayerCase(substr, layer) == 999999) count++;
1154  }
1155  return count;
1156 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTOBLayersTotallyOffOrBad ( ) const

Definition at line 1078 of file HitPattern.cc.

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

Referenced by stripLayersTotallyOffOrBad().

1078  {
1079  int count = 0;
1080  uint32_t substr = StripSubdetector::TOB;
1081  for (uint32_t layer=1; layer<=6; layer++) {
1082  if (getTrackerLayerCase(substr, layer) == 2) count++;
1083  }
1084  return count;
1085 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTOBLayersWithMeasurement ( ) const

Definition at line 936 of file HitPattern.cc.

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

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

936  {
937  int count = 0;
938  uint32_t substr = StripSubdetector::TOB;
939  for (uint32_t layer=1; layer<=6; layer++) {
940  if (getTrackerLayerCase(substr, layer) == 0) count++;
941  }
942  return count;
943 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
int HitPattern::stripTOBLayersWithoutMeasurement ( ) const

Definition at line 1007 of file HitPattern.cc.

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

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

1007  {
1008  int count = 0;
1009  uint32_t substr = StripSubdetector::TOB;
1010  for (uint32_t layer=1; layer<=6; layer++) {
1011  if (getTrackerLayerCase(substr, layer) == 1) count++;
1012  }
1013  return count;
1014 }
uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const
Definition: HitPattern.cc:805
bool HitPattern::trackerHitFilter ( uint32_t  pattern) const
int HitPattern::trackerLayersNull ( ) const

Definition at line 1096 of file HitPattern.cc.

References pixelLayersNull(), and stripLayersNull().

1096  {
1097  return pixelLayersNull() +
1098  stripLayersNull();
1099 }
int stripLayersNull() const
Definition: HitPattern.cc:1106
int pixelLayersNull() const
Definition: HitPattern.cc:1101
int HitPattern::trackerLayersTotallyOffOrBad ( ) const

Definition at line 1025 of file HitPattern.cc.

References pixelLayersTotallyOffOrBad(), and stripLayersTotallyOffOrBad().

1025  {
1026  return pixelLayersTotallyOffOrBad() +
1028 }
int stripLayersTotallyOffOrBad() const
Definition: HitPattern.cc:1035
int pixelLayersTotallyOffOrBad() const
Definition: HitPattern.cc:1030
int HitPattern::trackerLayersWithMeasurement ( ) const
int HitPattern::trackerLayersWithoutMeasurement ( ) const
bool HitPattern::type_1_HitFilter ( uint32_t  pattern) const
bool HitPattern::type_2_HitFilter ( uint32_t  pattern) const

Definition at line 274 of file HitPattern.cc.

References getHitType().

Referenced by numberOfInactiveHits(), and numberOfInactiveTrackerHits().

274  {
275  if (getHitType(pattern) == 2) return true;
276  return false;
277 }
uint32_t getHitType(uint32_t pattern) const
Definition: HitPattern.cc:236
bool HitPattern::type_3_HitFilter ( uint32_t  pattern) const

Definition at line 279 of file HitPattern.cc.

References getHitType().

Referenced by numberOfBadHits(), numberOfBadMuonCSCHits(), numberOfBadMuonDTHits(), numberOfBadMuonHits(), and numberOfBadMuonRPCHits().

279  {
280  if (getHitType(pattern) == 3) return true;
281  return false;
282 }
uint32_t getHitType(uint32_t pattern) const
Definition: HitPattern.cc:236
bool HitPattern::validHitFilter ( uint32_t  pattern) const

Member Data Documentation

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

Definition at line 340 of file HitPattern.h.

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

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

Definition at line 337 of file HitPattern.h.

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

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

Definition at line 336 of file HitPattern.h.

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

const unsigned short reco::HitPattern::LayerMask = 0xF
staticprivate
const unsigned short reco::HitPattern::LayerOffset = 3
staticprivate
const unsigned short reco::HitPattern::PatternSize = 25
staticprivate
const unsigned short reco::HitPattern::SideMask = 0x1
staticprivate

Definition at line 333 of file HitPattern.h.

Referenced by getSide(), and set().

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

Definition at line 332 of file HitPattern.h.

Referenced by getSide(), and set().

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 324 of file HitPattern.h.

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