ATLAS Offline Software
Loading...
Searching...
No Matches
MuonFixedId.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 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 return Imezz ;
793}
794
795inline bool MuonFixedId::setMdtTubeLayerIndex( unsigned int idx ) {
796 if ( idx > kMdtTubeLayerMask ) {
797 clear();
798 return false;
799 }
802 return true;
803}
804
805inline bool MuonFixedId::setMdtTubeLayer( int num ) {
807}
808
812
813inline int MuonFixedId::mdtTubeLayer() const {
815}
816
817inline bool MuonFixedId::setMdtMultilayerIndex( unsigned int idx ) {
818 if ( idx > kMdtMultilayerMask ) {
819 clear();
820 return false;
821 }
824 return true;
825}
826
827inline bool MuonFixedId::setMdtMultilayer( int num ) {
829}
830
834
835inline int MuonFixedId::mdtMultilayer() const {
837}
838
840 return kMdtTubeMin;
841}
842
844 return kMdtTubeMin + kMdtTubeMask;
845}
846
848 return kMdtTubeLayerMin;
849}
850
854
858
862
864 // mdt chamber id = muon station id
866}
867
869 // mdt multilayer id = muon station id + multilayer field
871}
872
873
874// Csc specific methods
875
876inline bool MuonFixedId::setCscChamberLayerIndex( unsigned int idx ) {
877 if ( idx > kCscChamberLayerMask ) {
878 clear();
879 return false;
880 }
883 return true;
884}
885
886inline bool MuonFixedId::setCscChamberLayer( int num ) {
888}
889
893
897
898
899inline bool MuonFixedId::setCscWireLayerIndex( unsigned int idx ) {
900 if ( idx > kCscWireLayerMask ) {
901 clear();
902 return false;
903 }
906 return true;
907}
908
909inline bool MuonFixedId::setCscWireLayer( int num ) {
911}
912
916
917inline int MuonFixedId::cscWireLayer() const {
919}
920
921inline bool MuonFixedId::setCscMeasuresPhiIndex( unsigned int idx ) {
922 if ( idx > kCscMeasuresPhiMask ) {
923 clear();
924 return false;
925 }
928 return true;
929}
930
931inline bool MuonFixedId::setCscMeasuresPhi( int num ) {
933}
934
938
942
943inline bool MuonFixedId::setCscStripIndex( unsigned int idx ) {
944 if ( idx > kCscStripMask ) {
945 clear();
946 return false;
947 }
949 m_data |= (idx & kCscStripMask) << kCscStripShift;
950 return true;
951}
952
953inline bool MuonFixedId::setCscStrip( int num ) {
954 return setCscStripIndex( num - kCscStripMin );
955}
956
957inline int MuonFixedId::cscStripIndex() const {
958 return (m_data >> kCscStripShift) & kCscStripMask;
959}
960
961inline int MuonFixedId::cscStrip() const {
962 return cscStripIndex() + kCscStripMin;
963}
964
968
972
974 return kCscWireLayerMin;
975}
976
980
984
988
990 return kCscStripMin;
991}
992
995}
996
997// Rpc specific methods
998inline bool MuonFixedId::setRpcDoubletRIndex( unsigned int idx ) {
999 if ( idx > kRpcDoubletRMask ) {
1000 clear();
1001 return false;
1002 }
1005 return true;
1006}
1007
1008inline bool MuonFixedId::setRpcDoubletR( int num ) {
1009 return setRpcDoubletRIndex( num - kRpcDoubletRMin );
1010}
1011
1014}
1015
1016inline int MuonFixedId::rpcDoubletR() const {
1018}
1019
1020inline bool MuonFixedId::setRpcDoubletZIndex( unsigned int idx ) {
1021 if ( idx > kRpcDoubletZMask ) {
1022 clear();
1023 return false;
1024 }
1027 return true;
1028}
1029
1030inline bool MuonFixedId::setRpcDoubletZ( int num ) {
1031 return setRpcDoubletZIndex( num - kRpcDoubletZMin );
1032}
1033
1036}
1037
1038inline int MuonFixedId::rpcDoubletZ() const {
1040}
1041
1042inline bool MuonFixedId::setRpcDoubletPhiIndex( unsigned int idx ) {
1043 if ( idx > kRpcDoubletPhiMask ) {
1044 clear();
1045 return false;
1046 }
1049 return true;
1050}
1051
1052inline bool MuonFixedId::setRpcDoubletPhi( int num ) {
1054}
1055
1059
1060inline int MuonFixedId::rpcDoubletPhi() const {
1062}
1063
1064inline bool MuonFixedId::setRpcGasGapIndex( unsigned int idx ) {
1065 if ( idx > kRpcGasGapMask ) {
1066 clear();
1067 return false;
1068 }
1071 return true;
1072}
1073
1074inline bool MuonFixedId::setRpcGasGap( int num ) {
1075 return setRpcGasGapIndex( num - kRpcGasGapMin );
1076}
1077
1080}
1081
1082inline int MuonFixedId::rpcGasGap() const {
1083 return rpcGasGapIndex() + kRpcGasGapMin;
1084}
1085
1086inline bool MuonFixedId::setRpcMeasuresPhiIndex( unsigned int idx ) {
1087 if ( idx > kRpcMeasuresPhiMask ) {
1088 clear();
1089 return false;
1090 }
1093 return true;
1094}
1095
1096inline bool MuonFixedId::setRpcMeasuresPhi( int num ) {
1098}
1099
1103
1106}
1107
1108inline bool MuonFixedId::setRpcStripIndex( unsigned int idx ) {
1109 if ( idx > kRpcStripMask ) {
1110 clear();
1111 return false;
1112 }
1114 m_data |= (idx & kRpcStripMask) << kRpcStripShift;
1115 return true;
1116}
1117
1118inline bool MuonFixedId::setRpcStrip( int num ) {
1119 return setRpcStripIndex( num - kRpcStripMin );
1120}
1121
1122inline int MuonFixedId::rpcStripIndex() const {
1123 return (m_data >> kRpcStripShift) & kRpcStripMask;
1124}
1125
1126inline int MuonFixedId::rpcStrip() const {
1127 return rpcStripIndex() + kRpcStripMin;
1128}
1129
1130
1131// Tgc specific methods
1132inline bool MuonFixedId::setTgcGasGapIndex( unsigned int idx ) {
1133 if ( idx > kTgcGasGapMask ) {
1134 clear();
1135 return false;
1136 }
1139 return true;
1140}
1141
1142inline bool MuonFixedId::setTgcGasGap( int num ) {
1143 return setTgcGasGapIndex( num - kTgcGasGapMin );
1144}
1145
1148}
1149
1150inline int MuonFixedId::tgcGasGap() const {
1151 return tgcGasGapIndex() + kTgcGasGapMin;
1152}
1153
1154inline bool MuonFixedId::setTgcIsStripIndex( unsigned int idx ) {
1155 if ( idx > kTgcIsStripMask ) {
1156 clear();
1157 return false;
1158 }
1161 return true;
1162}
1163
1164inline bool MuonFixedId::setTgcIsStrip( int num ) {
1165 return setTgcIsStripIndex( num - kTgcIsStripMin );
1166}
1167
1170}
1171
1172inline int MuonFixedId::tgcIsStrip() const {
1174}
1175
1176
1177inline bool MuonFixedId::setTgcChannelIndex( unsigned int idx ) {
1178 if ( idx > kTgcChannelMask ) {
1179 clear();
1180 return false;
1181 }
1184 return true;
1185}
1186
1187inline bool MuonFixedId::setTgcChannel( int num ) {
1188 return setTgcChannelIndex( num - kTgcChannelMin );
1189}
1190
1193}
1194
1195inline int MuonFixedId::tgcChannel() const {
1197}
1198
1199
1200inline std::ostream& operator<<( std::ostream& os, const MuonCalib::MuonFixedId& id ) {
1201 return id.dump( os );
1202}
1203} //MuonCalib namespace
1204
1205/*
1206***** must solve conflicts between MuonCalib namespace and friendship
1207inline std::istream& operator>>( std::istream& is, MuonCalib::MuonFixedId& id){
1208 is >> id.m_data ;
1209 return is;
1210}
1211*/
1212#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