ATLAS Offline Software
Loading...
Searching...
No Matches
MuonFixedId.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 * Muon Calibration Utilities
7 * -----------------------------------------
8 *
9 * Authors : Martin Woudstra, Zdenko van Kesteren, Peter Kluit
10 * Creation Date: 21 March 2005
11 * Updated : 03 December 2007
12 * Updated : 16 January 2015 E. Diehl Add BME/BOE/BMG chambers
13 * Note: BOE=BOL in offline, so do not need to explicitly add BOE, it will be handled as BOL
14 ***************************************************************************/
15
16
17#ifndef MUONCALIBIDENTIFIER_MUONFIXEDID_H
18#define MUONCALIBIDENTIFIER_MUONFIXEDID_H
19// std
20#include <iostream>
21#include <iomanip>
22#include <string>
23
24#include <cstdlib>
25
26// other packages
27
28// this package
29//#include "MuonCalibIdentifier/MuonStationName.h"
30
31
35
36namespace MuonCalib {
37
49
51public:
53 MuonFixedId();
55 explicit MuonFixedId( unsigned int id );
56
58 unsigned int getIdInt() const;
60 void clear();
62 bool isValid() const;
63
65 bool is_mdt() const;
67 bool is_tgc() const;
69 bool is_csc() const;
71 bool is_rpc() const;
72
74 void set_mdt();
76 void set_tgc();
78 void set_csc();
80 void set_rpc();
81
82
84 bool operator==( const MuonFixedId& rhs ) const;
86 bool operator!=( const MuonFixedId& rhs ) const;
88 bool operator<( const MuonFixedId& rhs ) const;
89
91 std::ostream& dump(std::ostream& os) const;
92
93// friend std::istream& operator>>( std::istream& is, MuonCalib::MuonFixedId& id );
94
95// Muon generic code
96
99 bool setTechnologyIndex( unsigned int idx );
102 bool setStationNameIndex( unsigned int idx );
105 bool setStationEtaIndex( unsigned int idx );
108 bool setStationPhiIndex( unsigned int idx );
109
112 bool setTechnology( int num );
115 bool setStationName( int num );
118 bool setStationEta( int num );
121 bool setStationPhi( int num );
122
124 int technologyIndex() const;
126 int stationNameIndex() const;
128 int etaIndex() const;
130 int phiIndex() const;
131
133 int technology() const;
135 std::string technologyString() const;
137 int stationName() const;
139 std::string stationNameString() const;
141 int eta() const;
143 int phi() const;
144
146 static int technologyMin();
148 static int stationNameMin();
150 static int etaMin();
152 static int phiMin();
153
155 static int technologyMax();
157 static int stationNameMax();
159 static int etaMax();
161 static int phiMax();
162
166 static int stationStringToFixedStationNumber(const std::string& station);
170 static std::string stationNumberToFixedStationString(const int station);
171
172
173// Mdt specific code
174
177 bool setMdtTubeIndex( unsigned int idx ) ;
180 bool setMdtTubeLayerIndex( unsigned int idx ) ;
183 bool setMdtMultilayerIndex( unsigned int idx ) ;
184
187 bool setMdtTube( int num );
190 bool setMdtTubeLayer( int num );
193 bool setMdtMultilayer( int num );
194
196 int mdtTubeIndex() const;
198 int mdtTubeLayerIndex() const;
200 int mdtMultilayerIndex() const;
201
203 int mdtTube() const;
205 int mdtTubeLayer() const;
207 int mdtMultilayer() const;
210 int mdtMezzanine() const;
211
214
217
219 static int mdtTubeMin();
221 static int mdtTubeLayerMin();
223 static int mdtMultilayerMin();
224
226 static int mdtTubeMax();
228 static int mdtTubeLayerMax();
230 static int mdtMultilayerMax();
231
232
233// Csc specific code
234
237 bool setCscChamberLayerIndex( unsigned int idx );
240 bool setCscWireLayerIndex( unsigned int idx );
243 bool setCscMeasuresPhiIndex( unsigned int idx );
246 bool setCscStripIndex( unsigned int idx );
247
250 bool setCscChamberLayer( int num );
253 bool setCscWireLayer( int num );
256 bool setCscMeasuresPhi( int num );
259 bool setCscStrip( int num );
260
262 int cscChamberLayerIndex() const;
264 int cscWireLayerIndex() const;
266 int cscMeasuresPhiIndex() const;
268 int cscStripIndex() const;
269
271 int cscChamberLayer() const;
273 int cscWireLayer() const;
275 int cscMeasuresPhi() const;
277 int cscStrip() const;
278
280 static int cscChamberLayerMin();
282 static int cscWireLayerMin();
284 static int cscMeasuresPhiMin();
286 static int cscStripMin();
287
289 static int cscChamberLayerMax();
291 static int cscWireLayerMax();
293 static int cscMeasuresPhiMax();
295 static int cscStripMax();
296
297// Rpc specific code
298
301 bool setRpcDoubletRIndex( unsigned int idx );
304 bool setRpcDoubletZIndex( unsigned int idx );
307 bool setRpcDoubletPhiIndex( unsigned int idx );
310 bool setRpcGasGapIndex( unsigned int idx );
313 bool setRpcMeasuresPhiIndex( unsigned int idx );
316 bool setRpcStripIndex( unsigned int idx );
317
320 bool setRpcDoubletR( int num );
323 bool setRpcDoubletZ( int num );
326 bool setRpcDoubletPhi( int num );
329 bool setRpcGasGap( int num );
332 bool setRpcMeasuresPhi( int num );
335 bool setRpcStrip( int num );
336
339 int rpcDoubletRIndex() const;
342 int rpcDoubletZIndex() const;
345 int rpcDoubletPhiIndex() const;
348 int rpcGasGapIndex() const;
351 int rpcMeasuresPhiIndex() const;
354 int rpcStripIndex() const;
355
358 int rpcDoubletR() const;
361 int rpcDoubletZ() const;
364 int rpcDoubletPhi() const;
367 int rpcGasGap() const;
370 int rpcMeasuresPhi() const;
373 int rpcStrip() const;
374
375// Tgc specific code
376
379 bool setTgcGasGapIndex( unsigned int idx );
382 bool setTgcIsStripIndex( unsigned int idx );
385 bool setTgcChannelIndex( unsigned int idx );
386
389 bool setTgcGasGap( int num );
392 bool setTgcIsStrip( int num );
395 bool setTgcChannel( int num );
396
399 int tgcGasGapIndex() const;
402 int tgcIsStripIndex() const;
405 int tgcChannelIndex() const;
406
409 int tgcGasGap() const;
412 int tgcIsStrip() const;
415 int tgcChannel() const;
416
418 static const int technologyMDT = 0;
419 static const int technologyCSC = 1;
420 static const int technologyTGC = 2;
421 static const int technologyRPC = 3;
422
423private:
424 // the member holding the packed fields
425 unsigned int m_data;
426
427 static const unsigned int kInvalidData = 0xFFFFFFFF;
428
429// Muon generic
430
431 static const unsigned int kTechnologyMask = 3;
432 static const unsigned int kTechnologyShift = 30;
433 static const unsigned int kTechnologyMin = 0;
434
435 static const int kNumberOfTechnologies = 4;
437
438 static const unsigned int kStationNameMask = 63;
439 static const unsigned int kStationNameShift = 24;
440 static const unsigned int kStationNameMin = 1;
441
442 static const unsigned int kStationEtaMask = 31;
443 static const unsigned int kStationEtaShift = 19;
444 static const int kStationEtaMin = -8;
445
446 static const unsigned int kStationPhiMask = 63;
447 static const unsigned int kStationPhiShift = 13;
448 static const unsigned int kStationPhiMin = 1;
449
450 static const int kNumberOfStationNames = 35;
452
453 // the full station information for making a station identifier
454 static const unsigned int kStationShift = kStationPhiShift; // the smallest shift
455 static const unsigned int kStationMask =
459 (kStationPhiMask << kStationPhiShift) ) >> kStationShift; // kStationShift for consistent meaning
460
461// Mdt specific code
462
463 static const unsigned int kMdtMultilayerMask = 1;
464 static const unsigned int kMdtMultilayerShift = 9;
465 static const unsigned int kMdtMultilayerMin = 1;
466
467 static const unsigned int kMdtTubeLayerMask = 3;
468 static const unsigned int kMdtTubeLayerShift = 7;
469 static const unsigned int kMdtTubeLayerMin = 1;
470
471 static const unsigned int kMdtTubeMask = 127;
472 static const unsigned int kMdtTubeShift = 0;
473 static const unsigned int kMdtTubeMin = 1;
474
475// Csc specific code
476
477 static const unsigned int kCscChamberLayerMask = 1;
478 static const unsigned int kCscChamberLayerShift = 11;
479 static const unsigned int kCscChamberLayerMin = 1;
480
481 static const unsigned int kCscWireLayerMask = 3;
482 static const unsigned int kCscWireLayerShift = 9;
483 static const unsigned int kCscWireLayerMin = 1;
484
485 static const unsigned int kCscMeasuresPhiMask = 1;
486 static const unsigned int kCscMeasuresPhiShift = 8;
487 static const unsigned int kCscMeasuresPhiMin = 0;
488
489 static const unsigned int kCscStripMask = 255;
490 static const unsigned int kCscStripShift = 0;
491 static const unsigned int kCscStripMin = 1;
492
493// Rpc specific code
494
495 static const unsigned int kRpcDoubletRMask = 1;
496 static const unsigned int kRpcDoubletRShift = 12;
497 static const unsigned int kRpcDoubletRMin = 1;
498
499 static const unsigned int kRpcDoubletZMask = 3;
500 static const unsigned int kRpcDoubletZShift = 10;
501 static const unsigned int kRpcDoubletZMin = 1;
502
503 static const unsigned int kRpcDoubletPhiMask = 1;
504 static const unsigned int kRpcDoubletPhiShift = 9;
505 static const unsigned int kRpcDoubletPhiMin = 1;
506
507 static const unsigned int kRpcGasGapMask = 1;
508 static const unsigned int kRpcGasGapShift = 8;
509 static const unsigned int kRpcGasGapMin = 1;
510
511 static const unsigned int kRpcMeasuresPhiMask = 1;
512 static const unsigned int kRpcMeasuresPhiShift = 7;
513 static const unsigned int kRpcMeasuresPhiMin = 0;
514
515 static const unsigned int kRpcStripMask = 127;
516 static const unsigned int kRpcStripShift = 0;
517 static const unsigned int kRpcStripMin = 1;
518
519// Tgc specific code
520 static const unsigned int kTgcGasGapMask = 3;
521 static const unsigned int kTgcGasGapShift = 9;
522 static const unsigned int kTgcGasGapMin = 1;
523
524 static const unsigned int kTgcIsStripMask = 1;
525 static const unsigned int kTgcIsStripShift = 8;
526 static const unsigned int kTgcIsStripMin = 0;
527
528 static const unsigned int kTgcChannelMask = 255;
529 static const unsigned int kTgcChannelShift = 0;
530 static const unsigned int kTgcChannelMin = 1;
531
532};
533
534// Muon generic methods
535
539
540inline MuonFixedId::MuonFixedId( unsigned int id ) : m_data(id){
541}
542
543inline unsigned int MuonFixedId::getIdInt() const{
544 return m_data;
545}
546/* void MuonFixedId::setMuonIdentifier( int id ){ */
547/* if( id>-1 || id<kInvalidData ) m_data = id; */
548/* else m_data = kInvalidData; */
549/* } */
550
551inline void MuonFixedId::clear() {
553}
554
555inline bool MuonFixedId::isValid() const {
556 return m_data != kInvalidData;
557}
558
559inline bool MuonFixedId::is_mdt() const{
560 return isValid() && technology() == technologyMDT;
561}
562
563inline bool MuonFixedId::is_tgc() const{
564 return isValid() && technology() == technologyTGC;
565}
566
567inline bool MuonFixedId::is_csc() const{
568 return isValid() && technology() == technologyCSC;
569}
570
571inline bool MuonFixedId::is_rpc() const{
572 return isValid() && technology() == technologyRPC;
573}
574
578
582
586
590
591inline bool MuonFixedId::operator==( const MuonFixedId& rhs ) const {
592 return m_data == rhs.m_data;
593}
594
595inline bool MuonFixedId::operator!=( const MuonFixedId& rhs ) const {
596 return m_data != rhs.m_data;
597}
598
599inline bool MuonFixedId::operator<( const MuonFixedId& rhs ) const {
600 return m_data < rhs.m_data;
601}
602
603inline bool MuonFixedId::setTechnologyIndex( unsigned int idx ) {
604 if ( idx > kTechnologyMask ) {
605 clear();
606 return false;
607 }
610 return true;
611}
612
613inline bool MuonFixedId::setTechnology( int num ) {
614 return setTechnologyIndex( num - kTechnologyMin );
615}
616
617inline int MuonFixedId::technologyIndex() const {
619}
620
621inline int MuonFixedId::technology() const {
623}
624
625inline std::string MuonFixedId::technologyString() const {
626 int index = technologyIndex();
627 if ( index >= 0 && index < kNumberOfTechnologies ) {
629 }
630 return "???";
631}
632
633inline bool MuonFixedId::setStationNameIndex( unsigned int idx ) {
634 if ( idx > kStationNameMask ) {
635 clear();
636 return false;
637 }
640 return true;
641}
642
643inline bool MuonFixedId::setStationName( int num ) {
644 return setStationNameIndex( num - kStationNameMin );
645}
646
649}
650
651inline int MuonFixedId::stationName() const {
653}
654
655inline std::string MuonFixedId::stationNameString() const {
656 int index = stationNameIndex();
657 if ( index >= 0 && index < kNumberOfStationNames ) {
659 }
660 return "XXX";
661}
662
663inline bool MuonFixedId::setStationEtaIndex( unsigned int idx ) {
664 if ( idx > kStationEtaMask ) {
665 clear();
666 return false;
667 }
670 return true;
671}
672
673inline bool MuonFixedId::setStationEta( int num ) {
674 return setStationEtaIndex( num - kStationEtaMin );
675}
676
677inline int MuonFixedId::etaIndex() const {
679}
680
681inline int MuonFixedId::eta() const {
682 return etaIndex() + kStationEtaMin;
683}
684
685
686inline bool MuonFixedId::setStationPhiIndex( unsigned int idx ) {
687 if ( idx > kStationPhiMask ) {
688 clear();
689 return false;
690 }
693 return true;
694}
695
696inline bool MuonFixedId::setStationPhi( int num ) {
697 return setStationPhiIndex( num - kStationPhiMin );
698}
699
700inline int MuonFixedId::phiIndex() const {
702}
703
704inline int MuonFixedId::phi() const {
705 return phiIndex() + kStationPhiMin;
706}
707
709 return kTechnologyMin;
710}
711
713 return kStationNameMin;
714}
715
717 return kStationEtaMin;
718}
719
721 return kStationPhiMin;
722}
723
727
731
734}
735
738}
739
740inline int MuonFixedId::stationStringToFixedStationNumber(const std::string& station ) {
741 for ( int i = 0; i < kNumberOfStationNames; ++i ) {
742 if ( station == kStationNameStrings[i] ) return i + kStationNameMin;
743 }
744 return -1; // signal error if not found
745}
746
747inline std::string MuonFixedId::stationNumberToFixedStationString(const int station) {
748 int index = station - kStationNameMin;
749 if ( index >= 0 && index < kNumberOfStationNames ) {
751 }
752 return "XXX"; // signal error if not found
753}
754
755// Mdt specific methods
756
757inline bool MuonFixedId::setMdtTubeIndex( unsigned int idx ) {
758 if ( idx > kMdtTubeMask ) {
759 clear();
760 return false;
761 }
763 m_data |= (idx & kMdtTubeMask) << kMdtTubeShift;
764 return true;
765}
766
767inline bool MuonFixedId::setMdtTube( int num ) {
768 return setMdtTubeIndex( num - kMdtTubeMin );
769}
770
771inline int MuonFixedId::mdtTubeIndex() const {
772 return (m_data >> kMdtTubeShift) & kMdtTubeMask;
773}
774
775inline int MuonFixedId::mdtTube() const {
776 return mdtTubeIndex() + kMdtTubeMin;
777}
778
779inline int MuonFixedId::mdtMezzanine() const {
780 int Ichamber = stationName() ;
781 int Ieta = eta() ;
782 int Iphi = phi() ;
783 int Iml = mdtMultilayer() ;
784 int Itube = mdtTube() ;
785 if (Ieta < 0 ) Ieta = -Ieta*10 ;
786 int ImezzTubes = 8 ;
787 if (Ichamber==1 || Ichamber==2 || Ichamber==8 || Ichamber==13 || Ichamber==7 || Ichamber==15 || Ichamber==24) ImezzTubes=6;
788//exception BIS eta=8 is a 3-layer chamber
789 if(Ichamber==2 && std::abs(Ieta)==8) ImezzTubes=8;
790 int Imezz = ((Itube-1)/ImezzTubes)*2+(Iml-1) ;
791 Imezz = 9*100000000 + Ichamber*1000000 + Ieta*10000 + Iphi*100 + Imezz ;
792 //coverity[INTEGER_OVERFLOW:FALSE]
793 return Imezz ;
794}
795
796inline bool MuonFixedId::setMdtTubeLayerIndex( unsigned int idx ) {
797 if ( idx > kMdtTubeLayerMask ) {
798 clear();
799 return false;
800 }
803 return true;
804}
805
806inline bool MuonFixedId::setMdtTubeLayer( int num ) {
808}
809
813
814inline int MuonFixedId::mdtTubeLayer() const {
816}
817
818inline bool MuonFixedId::setMdtMultilayerIndex( unsigned int idx ) {
819 if ( idx > kMdtMultilayerMask ) {
820 clear();
821 return false;
822 }
825 return true;
826}
827
828inline bool MuonFixedId::setMdtMultilayer( int num ) {
830}
831
835
836inline int MuonFixedId::mdtMultilayer() const {
838}
839
841 return kMdtTubeMin;
842}
843
845 return kMdtTubeMin + kMdtTubeMask;
846}
847
849 return kMdtTubeLayerMin;
850}
851
855
859
863
865 // mdt chamber id = muon station id
867}
868
870 // mdt multilayer id = muon station id + multilayer field
872}
873
874
875// Csc specific methods
876
877inline bool MuonFixedId::setCscChamberLayerIndex( unsigned int idx ) {
878 if ( idx > kCscChamberLayerMask ) {
879 clear();
880 return false;
881 }
884 return true;
885}
886
887inline bool MuonFixedId::setCscChamberLayer( int num ) {
889}
890
894
898
899
900inline bool MuonFixedId::setCscWireLayerIndex( unsigned int idx ) {
901 if ( idx > kCscWireLayerMask ) {
902 clear();
903 return false;
904 }
907 return true;
908}
909
910inline bool MuonFixedId::setCscWireLayer( int num ) {
912}
913
917
918inline int MuonFixedId::cscWireLayer() const {
920}
921
922inline bool MuonFixedId::setCscMeasuresPhiIndex( unsigned int idx ) {
923 if ( idx > kCscMeasuresPhiMask ) {
924 clear();
925 return false;
926 }
929 return true;
930}
931
932inline bool MuonFixedId::setCscMeasuresPhi( int num ) {
934}
935
939
943
944inline bool MuonFixedId::setCscStripIndex( unsigned int idx ) {
945 if ( idx > kCscStripMask ) {
946 clear();
947 return false;
948 }
950 m_data |= (idx & kCscStripMask) << kCscStripShift;
951 return true;
952}
953
954inline bool MuonFixedId::setCscStrip( int num ) {
955 return setCscStripIndex( num - kCscStripMin );
956}
957
958inline int MuonFixedId::cscStripIndex() const {
959 return (m_data >> kCscStripShift) & kCscStripMask;
960}
961
962inline int MuonFixedId::cscStrip() const {
963 return cscStripIndex() + kCscStripMin;
964}
965
969
973
975 return kCscWireLayerMin;
976}
977
981
985
989
991 return kCscStripMin;
992}
993
996}
997
998// Rpc specific methods
999inline bool MuonFixedId::setRpcDoubletRIndex( unsigned int idx ) {
1000 if ( idx > kRpcDoubletRMask ) {
1001 clear();
1002 return false;
1003 }
1006 return true;
1007}
1008
1009inline bool MuonFixedId::setRpcDoubletR( int num ) {
1010 return setRpcDoubletRIndex( num - kRpcDoubletRMin );
1011}
1012
1015}
1016
1017inline int MuonFixedId::rpcDoubletR() const {
1019}
1020
1021inline bool MuonFixedId::setRpcDoubletZIndex( unsigned int idx ) {
1022 if ( idx > kRpcDoubletZMask ) {
1023 clear();
1024 return false;
1025 }
1028 return true;
1029}
1030
1031inline bool MuonFixedId::setRpcDoubletZ( int num ) {
1032 return setRpcDoubletZIndex( num - kRpcDoubletZMin );
1033}
1034
1037}
1038
1039inline int MuonFixedId::rpcDoubletZ() const {
1041}
1042
1043inline bool MuonFixedId::setRpcDoubletPhiIndex( unsigned int idx ) {
1044 if ( idx > kRpcDoubletPhiMask ) {
1045 clear();
1046 return false;
1047 }
1050 return true;
1051}
1052
1053inline bool MuonFixedId::setRpcDoubletPhi( int num ) {
1055}
1056
1060
1061inline int MuonFixedId::rpcDoubletPhi() const {
1063}
1064
1065inline bool MuonFixedId::setRpcGasGapIndex( unsigned int idx ) {
1066 if ( idx > kRpcGasGapMask ) {
1067 clear();
1068 return false;
1069 }
1072 return true;
1073}
1074
1075inline bool MuonFixedId::setRpcGasGap( int num ) {
1076 return setRpcGasGapIndex( num - kRpcGasGapMin );
1077}
1078
1081}
1082
1083inline int MuonFixedId::rpcGasGap() const {
1084 return rpcGasGapIndex() + kRpcGasGapMin;
1085}
1086
1087inline bool MuonFixedId::setRpcMeasuresPhiIndex( unsigned int idx ) {
1088 if ( idx > kRpcMeasuresPhiMask ) {
1089 clear();
1090 return false;
1091 }
1094 return true;
1095}
1096
1097inline bool MuonFixedId::setRpcMeasuresPhi( int num ) {
1099}
1100
1104
1107}
1108
1109inline bool MuonFixedId::setRpcStripIndex( unsigned int idx ) {
1110 if ( idx > kRpcStripMask ) {
1111 clear();
1112 return false;
1113 }
1115 m_data |= (idx & kRpcStripMask) << kRpcStripShift;
1116 return true;
1117}
1118
1119inline bool MuonFixedId::setRpcStrip( int num ) {
1120 return setRpcStripIndex( num - kRpcStripMin );
1121}
1122
1123inline int MuonFixedId::rpcStripIndex() const {
1124 return (m_data >> kRpcStripShift) & kRpcStripMask;
1125}
1126
1127inline int MuonFixedId::rpcStrip() const {
1128 return rpcStripIndex() + kRpcStripMin;
1129}
1130
1131
1132// Tgc specific methods
1133inline bool MuonFixedId::setTgcGasGapIndex( unsigned int idx ) {
1134 if ( idx > kTgcGasGapMask ) {
1135 clear();
1136 return false;
1137 }
1140 return true;
1141}
1142
1143inline bool MuonFixedId::setTgcGasGap( int num ) {
1144 return setTgcGasGapIndex( num - kTgcGasGapMin );
1145}
1146
1149}
1150
1151inline int MuonFixedId::tgcGasGap() const {
1152 return tgcGasGapIndex() + kTgcGasGapMin;
1153}
1154
1155inline bool MuonFixedId::setTgcIsStripIndex( unsigned int idx ) {
1156 if ( idx > kTgcIsStripMask ) {
1157 clear();
1158 return false;
1159 }
1162 return true;
1163}
1164
1165inline bool MuonFixedId::setTgcIsStrip( int num ) {
1166 return setTgcIsStripIndex( num - kTgcIsStripMin );
1167}
1168
1171}
1172
1173inline int MuonFixedId::tgcIsStrip() const {
1175}
1176
1177
1178inline bool MuonFixedId::setTgcChannelIndex( unsigned int idx ) {
1179 if ( idx > kTgcChannelMask ) {
1180 clear();
1181 return false;
1182 }
1185 return true;
1186}
1187
1188inline bool MuonFixedId::setTgcChannel( int num ) {
1189 return setTgcChannelIndex( num - kTgcChannelMin );
1190}
1191
1194}
1195
1196inline int MuonFixedId::tgcChannel() const {
1198}
1199
1200
1201inline std::ostream& operator<<( std::ostream& os, const MuonCalib::MuonFixedId& id ) {
1202 return id.dump( os );
1203}
1204} //MuonCalib namespace
1205
1206/*
1207***** must solve conflicts between MuonCalib namespace and friendship
1208inline std::istream& operator>>( std::istream& is, MuonCalib::MuonFixedId& id){
1209 is >> id.m_data ;
1210 return is;
1211}
1212*/
1213#endif // MUONCALIBIDENTIFIER_MUONFIXEDID_H
Implements fixed identifiers not dependent upon Athena Identifier for internal use in the calibration...
Definition MuonFixedId.h:50
bool setTgcIsStrip(int num)
Tgc specific: set is_strip to num.
int mdtMultilayerIndex() const
Mdt specific:
bool setRpcDoubletZ(int num)
Rpc specific: set doublet_Z to num.
void clear()
clear the identifier (=set to invalid)
void set_rpc()
set identifier to RPC technology type
static const unsigned int kRpcMeasuresPhiMask
bool setRpcDoubletPhiIndex(unsigned int idx)
Rpc specific: set index for doublet_Phi to idx.
static int cscMeasuresPhiMax()
Csc specific:
static const unsigned int kStationShift
bool setMdtMultilayerIndex(unsigned int idx)
Mdt specific: set index idx for multilayer.
int stationNameIndex() const
static const unsigned int kMdtMultilayerShift
static const unsigned int kCscWireLayerMin
int rpcStripIndex() const
Rpc specific:
static const unsigned int kCscMeasuresPhiMask
bool setCscWireLayer(int num)
Csc specific: set wire layer to num.
static int cscWireLayerMin()
Csc specific:
int mdtTubeLayerIndex() const
Mdt specific:
static int mdtMultilayerMin()
Mdt specific:
bool setTgcGasGapIndex(unsigned int idx)
Tgc specific: set index for gas_gap to idx.
void set_csc()
set identifier to CSC technology type
static const unsigned int kTgcGasGapMask
static const unsigned int kCscStripMin
int cscWireLayer() const
Csc specific:
int rpcDoubletZIndex() const
Rpc specific:
static const unsigned int kRpcDoubletZShift
bool setTgcGasGap(int num)
Tgc specific: set gas_gap to num.
static int stationNameMin()
bool operator!=(const MuonFixedId &rhs) const
comparison operator
static const unsigned int kRpcStripShift
bool setCscChamberLayer(int num)
Csc specific: set chamber layer to num.
static const unsigned int kTgcIsStripMask
bool setRpcGasGap(int num)
Rpc specific: set gas_gap to num.
static int mdtTubeLayerMax()
Mdt specific:
static const unsigned int kRpcGasGapShift
static const int technologyTGC
static int technologyMax()
int mdtMezzanine() const
Mdt specific: compute the mezzanine number.
bool setTechnology(int num)
set technology to num in the fixed identifier
static const unsigned int kStationPhiMin
bool setStationEta(int num)
set station eta to num in the fixed identifier
bool setCscMeasuresPhi(int num)
Csc specific: set measures_phi to num.
int cscWireLayerIndex() const
Csc specific:
static const char kStationNameStrings[kNumberOfStationNames][4]
static const unsigned int kCscWireLayerShift
static const unsigned int kMdtTubeLayerShift
static const int kStationEtaMin
static const unsigned int kRpcDoubletRShift
static const unsigned int kCscChamberLayerMask
static const unsigned int kTgcIsStripShift
static int cscWireLayerMax()
Csc specific:
MuonFixedId()
default constructor
static const unsigned int kCscMeasuresPhiShift
int tgcIsStripIndex() const
Tgc specific:
static const unsigned int kMdtMultilayerMask
static const unsigned int kCscStripShift
static const unsigned int kRpcDoubletZMask
static const unsigned int kTgcGasGapMin
bool setRpcDoubletRIndex(unsigned int idx)
Rpc specific: set index for doublet_R to idx.
static const int technologyMDT
constants for technology numbers
bool setTgcChannel(int num)
Tgc specific: set channel to num.
int rpcDoubletPhi() const
Rpc specific:
bool setCscWireLayerIndex(unsigned int idx)
Csc specific: set wire layer index to idx.
bool setMdtTubeLayerIndex(unsigned int idx)
Mdt specific: set index idx for layer.
bool operator<(const MuonFixedId &rhs) const
comparison operator
static const unsigned int kRpcDoubletPhiMask
static const unsigned int kStationPhiShift
std::string technologyString() const
void set_tgc()
set identifier to TGC technology type
bool setRpcGasGapIndex(unsigned int idx)
Rpc specific: set index for gas_gap to idx.
bool setRpcMeasuresPhiIndex(unsigned int idx)
Rpc specific: set index for measures_phi to idx.
static const unsigned int kCscChamberLayerShift
int tgcIsStrip() const
Tgc specific:
static int mdtMultilayerMax()
Mdt specific:
static const unsigned int kTechnologyMin
static const unsigned int kMdtTubeShift
bool setRpcDoubletZIndex(unsigned int idx)
Rpc specific: set index for doublet_Z to idx.
static const unsigned int kTechnologyShift
static int cscStripMax()
Csc specific:
static const unsigned int kStationPhiMask
bool setCscMeasuresPhiIndex(unsigned int idx)
Csc specific: set measures_phi index to idx.
static const unsigned int kRpcStripMask
int tgcChannelIndex() const
Tgc specific:
static const unsigned int kStationNameMask
bool setCscStrip(int num)
Csc specific: set strip to num.
static const unsigned int kRpcDoubletPhiMin
bool setRpcMeasuresPhi(int num)
Rpc specific: set measures_phi to num.
static const unsigned int kCscMeasuresPhiMin
static std::string stationNumberToFixedStationString(const int station)
static const unsigned int kStationNameMin
bool setMdtTubeLayer(int num)
Mdt specific: set layer to num.
static const unsigned int kRpcGasGapMin
int rpcDoubletRIndex() const
Rpc specific:
bool setStationPhi(int num)
set station phi to num in the fixed identifier
bool setMdtTube(int num)
Mdt specific: set tube to num.
static const unsigned int kMdtTubeMask
static int cscChamberLayerMax()
Csc specific:
bool setStationEtaIndex(unsigned int idx)
set station eta index in the fixed identifier
static int cscMeasuresPhiMin()
Csc specific:
int cscChamberLayerIndex() const
Csc specific:
bool operator==(const MuonFixedId &rhs) const
comparison operator
int mdtTubeLayer() const
Mdt specific:
int mdtTube() const
Mdt specific:
int cscStripIndex() const
Csc specific:
bool setStationNameIndex(unsigned int idx)
set station name index in the fixed identifier
MuonFixedId mdtMultilayerId() const
Mdt specific: convert channel ID into MDT Multilayer ID.
int tgcGasGap() const
Tgc specific:
unsigned int getIdInt() const
int rpcGasGapIndex() const
Rpc specific:
static const unsigned int kMdtTubeLayerMin
bool setTgcChannelIndex(unsigned int idx)
Tgc specific: set index for channel to idx.
int rpcGasGap() const
Rpc specific:
static const unsigned int kStationEtaMask
static int mdtTubeMin()
Mdt specific:
static const unsigned int kStationMask
static const unsigned int kRpcMeasuresPhiMin
static int mdtTubeMax()
Mdt specific:
static const int technologyRPC
bool setCscChamberLayerIndex(unsigned int idx)
Csc specific: set chamber layer index to idx.
int mdtTubeIndex() const
Mdt specific:
static const unsigned int kCscChamberLayerMin
static const unsigned int kStationEtaShift
bool setRpcStrip(int num)
Rpc specific: set strip to num.
static const unsigned int kCscStripMask
int cscMeasuresPhi() const
Csc specific:
static int cscStripMin()
Csc specific:
bool setRpcDoubletR(int num)
Rpc specific: set doublet_R to num.
int rpcMeasuresPhi() const
Rpc specific:
static const unsigned int kRpcDoubletRMask
static int mdtTubeLayerMin()
Mdt specific:
static const unsigned int kTechnologyMask
int tgcGasGapIndex() const
Tgc specific:
MuonFixedId mdtChamberId() const
Mdt specific: convert channel ID into MDT Chamber ID.
static const unsigned int kTgcIsStripMin
int cscStrip() const
Csc specific:
bool setMdtMultilayer(int num)
Mdt specific: set multilayer to num.
static int technologyMin()
bool setRpcStripIndex(unsigned int idx)
Rpc specific: set index for strip to idx.
bool setRpcDoubletPhi(int num)
Rpc specific: set doublet_Phi to num.
int tgcChannel() const
Tgc specific:
int rpcMeasuresPhiIndex() const
Rpc specific:
int rpcDoubletR() const
Rpc specific:
bool isValid() const
check validity of the identifier.
bool setMdtTubeIndex(unsigned int idx)
Mdt specific: set index idx for tube.
static const unsigned int kStationNameShift
bool setTgcIsStripIndex(unsigned int idx)
Tgc specific: set index for is_strip to idx.
static int stationNameMax()
static const unsigned int kRpcMeasuresPhiShift
bool setCscStripIndex(unsigned int idx)
Csc specific: set strip index to idx.
int cscMeasuresPhiIndex() const
Csc specific:
std::string stationNameString() const
int technologyIndex() const
bool setStationName(int num)
set station name to num in the fixed identifier
static const int kNumberOfStationNames
static const unsigned int kTgcChannelMask
static const unsigned int kRpcDoubletPhiShift
static const int kNumberOfTechnologies
static const unsigned int kRpcDoubletZMin
static const char kTechnologyStrings[kNumberOfTechnologies][4]
static const unsigned int kRpcGasGapMask
static int stationStringToFixedStationNumber(const std::string &station)
static const unsigned int kInvalidData
int rpcStrip() const
Rpc specific:
int mdtMultilayer() const
Mdt specific:
void set_mdt()
set identifier to MDT technology type
static int cscChamberLayerMin()
Csc specific:
int rpcDoubletPhiIndex() const
Rpc specific:
int rpcDoubletZ() const
Rpc specific:
static const int technologyCSC
bool setStationPhiIndex(unsigned int idx)
set station phi index in the fixed identifier
static const unsigned int kMdtTubeLayerMask
static const unsigned int kRpcStripMin
static const unsigned int kTgcGasGapShift
static const unsigned int kTgcChannelShift
static const unsigned int kTgcChannelMin
bool setTechnologyIndex(unsigned int idx)
set technology index in the fixed identifier
static const unsigned int kCscWireLayerMask
static const unsigned int kRpcDoubletRMin
static const unsigned int kMdtTubeMin
static const unsigned int kMdtMultilayerMin
int cscChamberLayer() const
Csc specific:
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
std::ostream & operator<<(std::ostream &os, const RtFullInfo &data)
-event-from-file
Definition index.py:1