00001
00002 #ifndef TrackReco_HitPattern_h
00003 #define TrackReco_HitPattern_h
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 #include <ostream>
00112 #include "DataFormats/DetId/interface/DetId.h"
00113 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
00114 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00115 #include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
00116 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
00117 #include "FWCore/Utilities/interface/Likely.h"
00118 namespace reco {
00119 class HitPattern {
00120 public:
00121 enum { MONO = 1, STEREO = 2 };
00122
00123
00124
00125 HitPattern() { for (int i=0; i<PatternSize; i++) hitPattern_[i] = 0; }
00126
00127
00128 template<typename I>
00129 HitPattern(const I & begin, const I & end) { set(begin, end); }
00130
00131
00132 template<typename C>
00133 HitPattern(const C & c) { set(c); }
00134
00135
00136
00137
00138 template<typename I>
00139 void set(const I & begin, const I & end) {
00140 for (int i=0; i<PatternSize; i++) hitPattern_[i] = 0;
00141 unsigned int counter = 0;
00142 for (I hit=begin; hit!=end && counter<32*PatternSize/HitSize;
00143 hit++, counter++)
00144 set(*hit, counter);
00145 }
00146
00147
00148
00149 typedef bool filterType(unsigned int);
00150 int countHits(filterType filter) const {
00151 int count = 0;
00152 for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
00153 uint32_t pattern = getHitPattern(i);
00154 if (pattern == 0) break;
00155 if (filter(pattern)) ++count;
00156 }
00157 return count;
00158 }
00159
00160 int countTypedHits(filterType typeFilter, filterType filter) const {
00161 int count = 0;
00162 for (int i=0; i<(PatternSize * 32) / HitSize; i++) {
00163 uint32_t pattern = getHitPattern(i);
00164 if (pattern == 0) break;
00165 if (typeFilter(pattern)&&filter(pattern)) ++count;
00166 }
00167 return count;
00168 }
00169
00170
00171 void printHitPattern (int position, std::ostream &stream) const;
00172 void print (std::ostream &stream = std::cout) const;
00173
00174
00175 void set(const TrackingRecHit &hit, unsigned int i){setHitPattern(i, encode(hit,i));}
00176
00177
00178 void appendHit(const TrackingRecHit & hit);
00179
00180
00181 uint32_t getHitPattern(int position) const;
00182
00183 static bool trackerHitFilter(uint32_t pattern);
00184 static bool muonHitFilter(uint32_t pattern);
00185
00186 static uint32_t getSubStructure(uint32_t pattern);
00187 static bool pixelHitFilter(uint32_t pattern);
00188 static bool pixelBarrelHitFilter(uint32_t pattern);
00189 static bool pixelEndcapHitFilter(uint32_t pattern);
00190 static bool stripHitFilter(uint32_t pattern);
00191 static bool stripTIBHitFilter(uint32_t pattern);
00192 static bool stripTIDHitFilter(uint32_t pattern);
00193 static bool stripTOBHitFilter(uint32_t pattern);
00194 static bool stripTECHitFilter(uint32_t pattern);
00195 static bool muonDTHitFilter(uint32_t pattern);
00196 static bool muonCSCHitFilter(uint32_t pattern);
00197 static bool muonRPCHitFilter(uint32_t pattern);
00198
00199 static uint32_t getLayer(uint32_t pattern);
00200 static uint32_t getSubSubStructure(uint32_t pattern);
00201
00203 static uint32_t getMuonStation(uint32_t pattern);
00205 static uint32_t getDTSuperLayer(uint32_t pattern);
00207 static uint32_t getCSCRing(uint32_t pattern) ;
00209 static uint32_t getRPCLayer(uint32_t pattern) ;
00211 static uint32_t getRPCregion(uint32_t pattern);
00212
00213 static uint32_t getHitType(uint32_t pattern);
00214 static bool validHitFilter(uint32_t pattern);
00215 static bool type_1_HitFilter(uint32_t pattern);
00216 static bool type_2_HitFilter(uint32_t pattern);
00217 static bool type_3_HitFilter(uint32_t pattern);
00218
00219 static uint32_t getSide (uint32_t pattern);
00220
00221 bool hasValidHitInFirstPixelBarrel() const;
00222 bool hasValidHitInFirstPixelEndcap() const;
00223
00224 int numberOfHits() const;
00225 int numberOfValidHits() const;
00226 int numberOfValidTrackerHits() const;
00227 int numberOfValidMuonHits() const;
00228 int numberOfValidPixelHits() const;
00229 int numberOfValidPixelBarrelHits() const;
00230 int numberOfValidPixelEndcapHits() const;
00231 int numberOfValidStripHits() const;
00232 int numberOfValidStripTIBHits() const;
00233 int numberOfValidStripTIDHits() const;
00234 int numberOfValidStripTOBHits() const;
00235 int numberOfValidStripTECHits() const;
00236 int numberOfValidMuonDTHits() const;
00237 int numberOfValidMuonCSCHits() const;
00238 int numberOfValidMuonRPCHits() const;
00239 int numberOfLostHits() const;
00240 int numberOfLostTrackerHits() const;
00241 int numberOfLostMuonHits() const;
00242 int numberOfLostPixelHits() const;
00243 int numberOfLostPixelBarrelHits() const;
00244 int numberOfLostPixelEndcapHits() const;
00245 int numberOfLostStripHits() const;
00246 int numberOfLostStripTIBHits() const;
00247 int numberOfLostStripTIDHits() const;
00248 int numberOfLostStripTOBHits() const;
00249 int numberOfLostStripTECHits() const;
00250 int numberOfLostMuonDTHits() const;
00251 int numberOfLostMuonCSCHits() const;
00252 int numberOfLostMuonRPCHits() const;
00253 int numberOfBadHits() const;
00254 int numberOfBadMuonHits() const;
00255 int numberOfBadMuonDTHits() const;
00256 int numberOfBadMuonCSCHits() const;
00257 int numberOfBadMuonRPCHits() const;
00258 int numberOfInactiveHits() const;
00259 int numberOfInactiveTrackerHits() const;
00260
00261
00262 int numberOfValidStripLayersWithMonoAndStereo ()
00263 const;
00264
00265 uint32_t getTrackerLayerCase(uint32_t substr, uint32_t layer) const;
00266 uint32_t getTrackerMonoStereo (uint32_t substr, uint32_t layer) const;
00267
00268 int trackerLayersWithMeasurement() const;
00269 int pixelLayersWithMeasurement() const;
00270 int stripLayersWithMeasurement() const;
00271 int pixelBarrelLayersWithMeasurement() const;
00272 int pixelEndcapLayersWithMeasurement() const;
00273 int stripTIBLayersWithMeasurement() const;
00274 int stripTIDLayersWithMeasurement() const;
00275 int stripTOBLayersWithMeasurement() const;
00276 int stripTECLayersWithMeasurement() const;
00277 int trackerLayersWithoutMeasurement() const;
00278 int pixelLayersWithoutMeasurement() const;
00279 int stripLayersWithoutMeasurement() const;
00280 int pixelBarrelLayersWithoutMeasurement() const;
00281 int pixelEndcapLayersWithoutMeasurement() const;
00282 int stripTIBLayersWithoutMeasurement() const;
00283 int stripTIDLayersWithoutMeasurement() const;
00284 int stripTOBLayersWithoutMeasurement() const;
00285 int stripTECLayersWithoutMeasurement() const;
00286 int trackerLayersTotallyOffOrBad() const;
00287 int pixelLayersTotallyOffOrBad() const;
00288 int stripLayersTotallyOffOrBad() const;
00289 int pixelBarrelLayersTotallyOffOrBad() const;
00290 int pixelEndcapLayersTotallyOffOrBad() const;
00291 int stripTIBLayersTotallyOffOrBad() const;
00292 int stripTIDLayersTotallyOffOrBad() const;
00293 int stripTOBLayersTotallyOffOrBad() const;
00294 int stripTECLayersTotallyOffOrBad() const;
00295 int trackerLayersNull() const;
00296 int pixelLayersNull() const;
00297 int stripLayersNull() const;
00298 int pixelBarrelLayersNull() const;
00299 int pixelEndcapLayersNull() const;
00300 int stripTIBLayersNull() const;
00301 int stripTIDLayersNull() const;
00302 int stripTOBLayersNull() const;
00303 int stripTECLayersNull() const;
00304
00305
00306
00308 int muonStations(int subdet, int hitType) const ;
00309
00310 int muonStationsWithValidHits() const ;
00311 int muonStationsWithBadHits() const ;
00312 int muonStationsWithAnyHits() const ;
00313 int dtStationsWithValidHits() const ;
00314 int dtStationsWithBadHits() const ;
00315 int dtStationsWithAnyHits() const ;
00316 int cscStationsWithValidHits() const ;
00317 int cscStationsWithBadHits() const ;
00318 int cscStationsWithAnyHits() const ;
00319 int rpcStationsWithValidHits() const ;
00320 int rpcStationsWithBadHits() const ;
00321 int rpcStationsWithAnyHits() const ;
00322
00324 int innermostMuonStationWithHits(int hitType) const ;
00325 int innermostMuonStationWithValidHits() const ;
00326 int innermostMuonStationWithBadHits() const ;
00327 int innermostMuonStationWithAnyHits() const ;
00328
00330 int outermostMuonStationWithHits(int hitType) const ;
00331 int outermostMuonStationWithValidHits() const ;
00332 int outermostMuonStationWithBadHits() const ;
00333 int outermostMuonStationWithAnyHits() const ;
00334
00335 int numberOfDTStationsWithRPhiView() const ;
00336 int numberOfDTStationsWithRZView() const ;
00337 int numberOfDTStationsWithBothViews() const ;
00338 private:
00339
00340
00341 const static unsigned short PatternSize = 25;
00342
00343
00344 const static unsigned short HitSize = 11;
00345
00346
00347 const static unsigned short SubDetectorOffset = 10;
00348 const static unsigned short SubDetectorMask = 0x1;
00349
00350
00351 const static unsigned short SubstrOffset = 7;
00352 const static unsigned short SubstrMask = 0x7;
00353
00354
00355 const static unsigned short LayerOffset = 3;
00356 const static unsigned short LayerMask = 0xF;
00357
00358
00359 const static unsigned short SideOffset = 2;
00360 const static unsigned short SideMask = 0x1;
00361
00362
00363 const static unsigned short HitTypeOffset = 0;
00364 const static unsigned short HitTypeMask = 0x3;
00365
00366
00367 uint32_t hitPattern_[ PatternSize ];
00368
00369
00370 void setHitPattern(int position, uint32_t pattern);
00371
00372
00373 void set(const TrackingRecHitRef & ref, unsigned int i) { set(* ref, i); }
00374
00375
00376 static uint32_t isStereo (DetId);
00377
00378
00379 uint32_t encode(const TrackingRecHit &,unsigned int);
00380 };
00381
00382
00383
00384 inline bool HitPattern::pixelHitFilter(uint32_t pattern) {
00385 if unlikely(!trackerHitFilter(pattern)) return false;
00386 uint32_t substructure = getSubStructure(pattern);
00387 if (substructure == PixelSubdetector::PixelBarrel ||
00388 substructure == PixelSubdetector::PixelEndcap) return true;
00389 return false;
00390 }
00391
00392 inline bool HitPattern::pixelBarrelHitFilter(uint32_t pattern) {
00393 if unlikely(!trackerHitFilter(pattern)) return false;
00394 uint32_t substructure = getSubStructure(pattern);
00395 if (substructure == PixelSubdetector::PixelBarrel) return true;
00396 return false;
00397 }
00398
00399 inline bool HitPattern::pixelEndcapHitFilter(uint32_t pattern) {
00400 if unlikely(!trackerHitFilter(pattern)) return false;
00401 uint32_t substructure = getSubStructure(pattern);
00402 if (substructure == PixelSubdetector::PixelEndcap) return true;
00403 return false;
00404 }
00405
00406 inline bool HitPattern::stripHitFilter(uint32_t pattern) {
00407 if unlikely(!trackerHitFilter(pattern)) return false;
00408 uint32_t substructure = getSubStructure(pattern);
00409 if (substructure == StripSubdetector::TIB ||
00410 substructure == StripSubdetector::TID ||
00411 substructure == StripSubdetector::TOB ||
00412 substructure == StripSubdetector::TEC) return true;
00413 return false;
00414 }
00415
00416 inline bool HitPattern::stripTIBHitFilter(uint32_t pattern) {
00417 if unlikely(!trackerHitFilter(pattern)) return false;
00418 uint32_t substructure = getSubStructure(pattern);
00419 if (substructure == StripSubdetector::TIB) return true;
00420 return false;
00421 }
00422
00423 inline bool HitPattern::stripTIDHitFilter(uint32_t pattern) {
00424 if unlikely(!trackerHitFilter(pattern)) return false;
00425 uint32_t substructure = getSubStructure(pattern);
00426 if (substructure == StripSubdetector::TID) return true;
00427 return false;
00428 }
00429
00430 inline bool HitPattern::stripTOBHitFilter(uint32_t pattern) {
00431 if unlikely(!trackerHitFilter(pattern)) return false;
00432 uint32_t substructure = getSubStructure(pattern);
00433 if (substructure == StripSubdetector::TOB) return true;
00434 return false;
00435 }
00436
00437 inline bool HitPattern::stripTECHitFilter(uint32_t pattern) {
00438 if unlikely(!trackerHitFilter(pattern)) return false;
00439 uint32_t substructure = getSubStructure(pattern);
00440 if (substructure == StripSubdetector::TEC) return true;
00441 return false;
00442 }
00443
00444 inline bool HitPattern::muonDTHitFilter(uint32_t pattern) {
00445 if unlikely(!muonHitFilter(pattern)) return false;
00446 uint32_t substructure = getSubStructure(pattern);
00447 if (substructure == (uint32_t) MuonSubdetId::DT) return true;
00448 return false;
00449 }
00450
00451 inline bool HitPattern::muonCSCHitFilter(uint32_t pattern) {
00452 if unlikely(!muonHitFilter(pattern)) return false;
00453 uint32_t substructure = getSubStructure(pattern);
00454 if (substructure == (uint32_t) MuonSubdetId::CSC) return true;
00455 return false;
00456 }
00457
00458 inline bool HitPattern::muonRPCHitFilter(uint32_t pattern) {
00459 if unlikely(!muonHitFilter(pattern)) return false;
00460 uint32_t substructure = getSubStructure(pattern);
00461 if (substructure == (uint32_t) MuonSubdetId::RPC) return true;
00462 return false;
00463 }
00464
00465
00466 inline bool HitPattern::trackerHitFilter(uint32_t pattern) {
00467 if unlikely(pattern == 0) return false;
00468 if (((pattern>>SubDetectorOffset) & SubDetectorMask) == 1) return true;
00469 return false;
00470 }
00471
00472 inline bool HitPattern::muonHitFilter(uint32_t pattern) {
00473 if unlikely(pattern == 0) return false;
00474 if (((pattern>>SubDetectorOffset) & SubDetectorMask) == 0) return true;
00475 return false;
00476 }
00477
00478
00479 inline uint32_t HitPattern::getSubStructure(uint32_t pattern) {
00480 if unlikely(pattern == 0) return 999999;
00481 return ((pattern >> SubstrOffset) & SubstrMask);
00482 }
00483
00484
00485 inline uint32_t HitPattern::getLayer(uint32_t pattern) {
00486 if unlikely(pattern == 0) return 999999;
00487 return ((pattern>>LayerOffset) & LayerMask);
00488 }
00489
00490 inline uint32_t HitPattern::getSubSubStructure(uint32_t pattern) {
00491 if unlikely(pattern == 0) return 999999;
00492 return ((pattern>>LayerOffset) & LayerMask);
00493 }
00494
00495
00496 inline uint32_t HitPattern::getSide (uint32_t pattern) {
00497 if unlikely(pattern == 0) return 999999;
00498 return (pattern >> SideOffset) & SideMask;
00499 }
00500
00501 inline uint32_t HitPattern::getHitType( uint32_t pattern ) {
00502 if unlikely(pattern == 0) return 999999;
00503 return ((pattern>>HitTypeOffset) & HitTypeMask);
00504 }
00505
00506 inline uint32_t HitPattern::getMuonStation(uint32_t pattern) {
00507 return (getSubSubStructure(pattern)>>2) + 1;
00508 }
00509
00510 inline uint32_t HitPattern::getDTSuperLayer(uint32_t pattern) {
00511 return (getSubSubStructure(pattern) & 3);
00512 }
00513
00514 inline uint32_t HitPattern::getCSCRing(uint32_t pattern) {
00515 return (getSubSubStructure(pattern) & 3) + 1;
00516 }
00517
00518 inline uint32_t HitPattern::getRPCLayer(uint32_t pattern) {
00519 uint32_t sss = getSubSubStructure(pattern), stat = sss >> 2;
00520 if likely(stat <= 1) return ((sss >> 1) & 1) + 1;
00521 return 0;
00522 }
00523
00524 inline uint32_t HitPattern::getRPCregion(uint32_t pattern) {
00525 return getSubSubStructure(pattern) & 1;
00526 }
00527
00528
00529 inline bool HitPattern::validHitFilter(uint32_t pattern) {
00530 if (getHitType(pattern) == 0) return true;
00531 return false;
00532 }
00533
00534 inline bool HitPattern::type_1_HitFilter(uint32_t pattern) {
00535 if (getHitType(pattern) == 1) return true;
00536 return false;
00537 }
00538
00539 inline bool HitPattern::type_2_HitFilter(uint32_t pattern) {
00540 if (getHitType(pattern) == 2) return true;
00541 return false;
00542 }
00543
00544 inline bool HitPattern::type_3_HitFilter(uint32_t pattern) {
00545 if (getHitType(pattern) == 3) return true;
00546 return false;
00547 }
00548
00549
00550
00551
00552
00553
00554 inline int HitPattern::numberOfValidHits() const {
00555 return countHits(validHitFilter);
00556 }
00557
00558 inline int HitPattern::numberOfValidTrackerHits() const {
00559 return countTypedHits(validHitFilter, trackerHitFilter);
00560 }
00561
00562 inline int HitPattern::numberOfValidMuonHits() const {
00563 return countTypedHits(validHitFilter, muonHitFilter);
00564 }
00565
00566 inline int HitPattern::numberOfValidPixelHits() const {
00567 return countTypedHits(validHitFilter, pixelHitFilter);
00568 }
00569
00570 inline int HitPattern::numberOfValidPixelBarrelHits() const {
00571 return countTypedHits(validHitFilter, pixelBarrelHitFilter);
00572 }
00573
00574 inline int HitPattern::numberOfValidPixelEndcapHits() const {
00575 return countTypedHits(validHitFilter, pixelEndcapHitFilter);
00576 }
00577
00578 inline int HitPattern::numberOfValidStripHits() const {
00579 return countTypedHits(validHitFilter, stripHitFilter);
00580 }
00581
00582 inline int HitPattern::numberOfValidStripTIBHits() const {
00583 return countTypedHits(validHitFilter, stripTIBHitFilter);
00584 }
00585
00586 inline int HitPattern::numberOfValidStripTIDHits() const {
00587 return countTypedHits(validHitFilter, stripTIDHitFilter);
00588 }
00589
00590 inline int HitPattern::numberOfValidStripTOBHits() const {
00591 return countTypedHits(validHitFilter, stripTOBHitFilter);
00592 }
00593
00594 inline int HitPattern::numberOfValidStripTECHits() const {
00595 return countTypedHits(validHitFilter, stripTECHitFilter);
00596 }
00597
00598 inline int HitPattern::numberOfValidMuonDTHits() const {
00599 return countTypedHits(validHitFilter, muonDTHitFilter);
00600 }
00601
00602 inline int HitPattern::numberOfValidMuonCSCHits() const {
00603 return countTypedHits(validHitFilter, muonCSCHitFilter);
00604 }
00605
00606 inline int HitPattern::numberOfValidMuonRPCHits() const {
00607 return countTypedHits(validHitFilter, muonRPCHitFilter);
00608 }
00609
00610
00611 inline int HitPattern::numberOfLostHits() const {
00612 return countHits(type_1_HitFilter);
00613 }
00614
00615 inline int HitPattern::numberOfLostTrackerHits() const {
00616 return countTypedHits(type_1_HitFilter, trackerHitFilter);
00617 }
00618
00619 inline int HitPattern::numberOfLostMuonHits() const {
00620 return countTypedHits(type_1_HitFilter, muonHitFilter);
00621 }
00622
00623 inline int HitPattern::numberOfLostPixelHits() const {
00624 return countTypedHits(type_1_HitFilter, pixelHitFilter);
00625 }
00626
00627 inline int HitPattern::numberOfLostPixelBarrelHits() const {
00628 return countTypedHits(type_1_HitFilter, pixelBarrelHitFilter);
00629 }
00630
00631 inline int HitPattern::numberOfLostPixelEndcapHits() const {
00632 return countTypedHits(type_1_HitFilter, pixelEndcapHitFilter);
00633 }
00634
00635 inline int HitPattern::numberOfLostStripHits() const {
00636 return countTypedHits(type_1_HitFilter, stripHitFilter);
00637 }
00638
00639 inline int HitPattern::numberOfLostStripTIBHits() const {
00640 return countTypedHits(type_1_HitFilter, stripTIBHitFilter);
00641 }
00642
00643 inline int HitPattern::numberOfLostStripTIDHits() const {
00644 return countTypedHits(type_1_HitFilter, stripTIDHitFilter);
00645 }
00646
00647 inline int HitPattern::numberOfLostStripTOBHits() const {
00648 return countTypedHits(type_1_HitFilter, stripTOBHitFilter);
00649 }
00650
00651 inline int HitPattern::numberOfLostStripTECHits() const {
00652 return countTypedHits(type_1_HitFilter, stripTECHitFilter);
00653 }
00654
00655 inline int HitPattern::numberOfLostMuonDTHits() const {
00656 return countTypedHits(type_1_HitFilter, muonDTHitFilter);
00657 }
00658
00659 inline int HitPattern::numberOfLostMuonCSCHits() const {
00660 return countTypedHits(type_1_HitFilter, muonCSCHitFilter);
00661 }
00662
00663 inline int HitPattern::numberOfLostMuonRPCHits() const {
00664 return countTypedHits(type_1_HitFilter, muonRPCHitFilter);
00665 }
00666
00667
00668
00669 inline int HitPattern::numberOfBadHits() const {
00670 return countHits(type_3_HitFilter);
00671 }
00672
00673 inline int HitPattern::numberOfBadMuonHits() const {
00674 return countTypedHits(type_2_HitFilter, muonHitFilter);
00675 }
00676
00677 inline int HitPattern::numberOfBadMuonDTHits() const {
00678 return countTypedHits(type_2_HitFilter, muonDTHitFilter);
00679 }
00680
00681 inline int HitPattern::numberOfBadMuonCSCHits() const {
00682 return countTypedHits(type_2_HitFilter, muonCSCHitFilter);
00683 }
00684
00685 inline int HitPattern::numberOfBadMuonRPCHits() const {
00686 return countTypedHits(type_2_HitFilter, muonRPCHitFilter);
00687 }
00688
00689
00690
00691 inline int HitPattern::numberOfInactiveHits() const {
00692 return countHits(type_2_HitFilter);
00693 }
00694
00695 inline int HitPattern::numberOfInactiveTrackerHits() const {
00696 return countTypedHits(type_2_HitFilter, trackerHitFilter);
00697 }
00698
00699
00700
00701
00702
00703
00704
00705 inline int HitPattern::trackerLayersWithMeasurement() const {
00706 return pixelLayersWithMeasurement() +
00707 stripLayersWithMeasurement();
00708 }
00709
00710 inline int HitPattern::pixelLayersWithMeasurement() const {
00711 return pixelBarrelLayersWithMeasurement() +
00712 pixelEndcapLayersWithMeasurement();
00713 }
00714
00715 inline int HitPattern::stripLayersWithMeasurement() const {
00716 return stripTIBLayersWithMeasurement() +
00717 stripTIDLayersWithMeasurement() +
00718 stripTOBLayersWithMeasurement() +
00719 stripTECLayersWithMeasurement();
00720 }
00721
00722
00723 inline int HitPattern::trackerLayersWithoutMeasurement() const {
00724 return pixelLayersWithoutMeasurement() +
00725 stripLayersWithoutMeasurement();
00726 }
00727
00728 inline int HitPattern::pixelLayersWithoutMeasurement() const {
00729 return pixelBarrelLayersWithoutMeasurement() +
00730 pixelEndcapLayersWithoutMeasurement();
00731 }
00732
00733 inline int HitPattern::stripLayersWithoutMeasurement() const {
00734 return stripTIBLayersWithoutMeasurement() +
00735 stripTIDLayersWithoutMeasurement() +
00736 stripTOBLayersWithoutMeasurement() +
00737 stripTECLayersWithoutMeasurement();
00738 }
00739
00740
00741 inline int HitPattern::trackerLayersTotallyOffOrBad() const {
00742 return pixelLayersTotallyOffOrBad() +
00743 stripLayersTotallyOffOrBad();
00744 }
00745
00746 inline int HitPattern::pixelLayersTotallyOffOrBad() const {
00747 return pixelBarrelLayersTotallyOffOrBad() +
00748 pixelEndcapLayersTotallyOffOrBad();
00749 }
00750
00751 inline int HitPattern::stripLayersTotallyOffOrBad() const {
00752 return stripTIBLayersTotallyOffOrBad() +
00753 stripTIDLayersTotallyOffOrBad() +
00754 stripTOBLayersTotallyOffOrBad() +
00755 stripTECLayersTotallyOffOrBad();
00756 }
00757
00758 inline int HitPattern::trackerLayersNull() const {
00759 return pixelLayersNull() +
00760 stripLayersNull();
00761 }
00762
00763 inline int HitPattern::pixelLayersNull() const {
00764 return pixelBarrelLayersNull() +
00765 pixelEndcapLayersNull();
00766 }
00767
00768 inline int HitPattern::stripLayersNull() const {
00769 return stripTIBLayersNull() +
00770 stripTIDLayersNull() +
00771 stripTOBLayersNull() +
00772 stripTECLayersNull();
00773 }
00774
00775
00776 inline int HitPattern::muonStationsWithValidHits() const { return muonStations(0, 0); }
00777 inline int HitPattern::muonStationsWithBadHits() const { return muonStations(0, 3); }
00778 inline int HitPattern::muonStationsWithAnyHits() const { return muonStations(0,-1); }
00779 inline int HitPattern::dtStationsWithValidHits() const { return muonStations(1, 0); }
00780 inline int HitPattern::dtStationsWithBadHits() const { return muonStations(1, 3); }
00781 inline int HitPattern::dtStationsWithAnyHits() const { return muonStations(1,-1); }
00782 inline int HitPattern::cscStationsWithValidHits() const { return muonStations(2, 0); }
00783 inline int HitPattern::cscStationsWithBadHits() const { return muonStations(2, 3); }
00784 inline int HitPattern::cscStationsWithAnyHits() const { return muonStations(2,-1); }
00785 inline int HitPattern::rpcStationsWithValidHits() const { return muonStations(3, 0); }
00786 inline int HitPattern::rpcStationsWithBadHits() const { return muonStations(3, 3); }
00787 inline int HitPattern::rpcStationsWithAnyHits() const { return muonStations(3,-1); }
00788
00789 inline int HitPattern::innermostMuonStationWithValidHits() const { return innermostMuonStationWithHits(0); }
00790 inline int HitPattern::innermostMuonStationWithBadHits() const { return innermostMuonStationWithHits(3); }
00791 inline int HitPattern::innermostMuonStationWithAnyHits() const { return innermostMuonStationWithHits(-1); }
00792 inline int HitPattern::outermostMuonStationWithValidHits() const { return outermostMuonStationWithHits(0); }
00793 inline int HitPattern::outermostMuonStationWithBadHits() const { return outermostMuonStationWithHits(3); }
00794 inline int HitPattern::outermostMuonStationWithAnyHits() const { return outermostMuonStationWithHits(-1); }
00795
00796 }
00797
00798 #endif