|
ATLAS Offline Software
|
#include <LArHVIdMapping.h>
Definition at line 21 of file LArHVIdMapping.h.
◆ LArHVIdMapping() [1/2]
LArHVIdMapping::LArHVIdMapping |
( |
| ) |
|
|
delete |
◆ LArHVIdMapping() [2/2]
◆ getCellElectrodeMinMax()
std::pair< int, int > LArHVIdMapping::getCellElectrodeMinMax |
( |
const Identifier & |
offId | ) |
const |
Definition at line 1404 of file LArHVIdMapping.cxx.
1450 if( abs(l_bec) == 1 )
1454 if( l_sampling == 0 || ( l_sampling == 1 && l_region == 0) ){
1466 int phi_module =
int((l_phi+2)/4);
1467 int phi_local = l_phi+2 - 4*phi_module;
1468 ElecMin = phi_local*16;
1469 ElecMax = ElecMin + 16-1;
1480 if( l_sampling == 0 ){
1486 else if( (l_sampling == 1 && l_region == 1) || l_sampling == 2 || l_sampling == 3 ){
1510 int phi_module =
int((l_phi+8)/16);
1512 int phi_local = l_phi+8 - 16*phi_module;
1513 ElecMin = phi_local * 4;
1514 ElecMax = ElecMin + 4 - 1;
1528 else if( l_bec == -1){
1536 if( l_sampling == 0 || ( l_sampling == 1 && l_region == 0) ){
1549 int phi_module =
int((l_phi+2)/4);
1550 int phi_local = (l_phi+2 - 4*phi_module) ;
1551 ElecMin = 48-phi_local*16;
1552 ElecMax = ElecMin + 16 - 1;
1563 if( l_sampling == 0 ){
1568 else if( (l_sampling == 1 && l_region == 1) || l_sampling == 2 || l_sampling == 3 ){
1593 int phi_module =
int((l_phi+8)/16);
1594 int phi_local = (l_phi+8 - 16*phi_module);
1597 if( phi_module <= 8){
1598 phi_module = 8 - phi_module;
1601 phi_module = 24 - phi_module;
1603 ElecMin = 60-phi_local * 4;
1604 ElecMax = ElecMin + 4 - 1;
1623 else if(abs(l_bec) == 2 || abs(l_bec) == 3){
1629 if( l_sampling == 0 ||
1630 (l_sampling == 1 && l_region >= 0 && l_region <= 5) ){
1648 int phi_module =
int(l_phi/8);
1649 int phi_local = l_phi - 8*phi_module;
1650 ElecMin = phi_local * 12;
1651 ElecMax = ElecMin + 12 - 1;
1664 else if( l_sampling == 2 || l_sampling == 3){
1679 int phi_module =
int(l_phi/32);
1680 int phi_local = l_phi - 32*phi_module;
1681 ElecMin = phi_local*3;
1682 ElecMax = ElecMin+3-1;
1696 else if( l_bec == 3 ){
1700 if( l_sampling == 1 || l_sampling == 2 || l_sampling == 0 ){
1715 int phi_module =
int(l_phi/8);
1716 int phi_local = l_phi - 8*phi_module;
1717 ElecMin = phi_local *4;
1718 ElecMax = ElecMin + 4 - 1;
1731 else if( l_bec == -2 ){
1735 if( l_sampling == 0 || (l_sampling == 1 && l_region >= 0 && l_region <= 5) ){
1753 int phi_module =
int(l_phi/8);
1754 int phi_local = 7 - (l_phi - 8*phi_module);
1755 ElecMin = phi_local * 12;
1756 ElecMax = ElecMin + 12 - 1;
1769 else if( l_sampling == 2 || l_sampling == 3){
1784 int phi_module =
int(l_phi/32);
1785 int phi_local = 31 - (l_phi - 32*phi_module);
1786 ElecMin = phi_local*3;
1787 ElecMax = ElecMin + 3 - 1;
1800 else if( l_bec == -3 ){
1802 if( l_sampling == 1 || l_sampling == 2 || l_sampling == 0 ){
1807 int phi_module =
int(l_phi/8);
1808 int phi_local = l_phi - 8*phi_module;
1809 ElecMin = 28 - phi_local *4;
1810 ElecMax = ElecMin + 4 -1;
1824 else if( abs(l_bec)==20 ){
1833 if( l_sampling == 0){
1851 else if( l_sampling == 1){
1867 else if( l_sampling == 2){
1882 else if( l_sampling == 3){
1894 else if( abs(l_bec)==40 ){
1904 std::pair<int, int> electrodeMinMax( ElecMin, ElecMax);
1905 return electrodeMinMax;
◆ getCellEtaSector()
Definition at line 720 of file LArHVIdMapping.cxx.
767 if( abs(l_bec) == 1 ){
772 if( ieta >= 0 && ieta < 64 ){
775 else if( ieta >=64 && ieta < 128 ){
778 else if( ieta >=128 && ieta < 192 ){
781 else if( ieta >=192 && ieta < 256 ){
784 else if( ieta >=256 && ieta < 320 ){
787 else if( ieta >=320 && ieta < 384 ){
790 else if( ieta >=384 && ieta < 448 ){
794 else if( region == 1){
801 else if( sampling == 2 ){
806 if( ieta >= 0 && ieta < 8 ){
809 else if( ieta >=8 && ieta < 16 ){
812 else if( ieta >=16 && ieta < 24 ){
815 else if( ieta >=24 && ieta < 32 ){
818 else if( ieta >=32 && ieta < 40 ){
821 else if( ieta >=40 && ieta < 48 ){
824 else if( ieta >=48 && ieta < 57 ){
828 else if( region == 1)
837 else if( sampling == 3 ){
842 if( ieta >= 0 && ieta < 4 ){
845 else if( ieta >=4 && ieta < 8 ){
848 else if( ieta >=8 && ieta < 12 ){
851 else if( ieta >=12 && ieta < 16 ){
854 else if( ieta >=16 && ieta < 20 ){
857 else if( ieta >=20 && ieta < 24 ){
860 else if( ieta >=24 && ieta < 28 ){
864 else if( region == 1){
872 else if( sampling == 0 ){
878 if( ieta >= 0 && ieta < 15 ){
881 else if( ieta >=15 && ieta <30 ){
884 else if( ieta >=30 && ieta < 45 ){
887 else if( ieta >=45 && ieta < 61 ){
900 else if( abs(l_bec) == 2 || abs(l_bec) == 3){
909 if( ieta >= 0 && ieta <= 1){
912 else if(ieta >=2 && ieta <= 5){
915 else if(ieta >=6 && ieta <= 9){
918 else if(ieta >=10 && ieta <= 11){
921 else if(ieta >=12 && ieta <= 15){
924 else if(ieta >=16 && ieta <= 19){
928 else if( sampling == 2 && abs(l_bec) == 2 ){
937 else if( region == 1 ){
939 if( ieta >=0 && ieta <= 2){
942 else if( ieta >=3 && ieta <= 6){
945 else if( ieta >=7 && ieta <= 15){
948 else if( ieta >=16 && ieta <= 23){
951 else if( ieta >=24 && ieta <= 27){
954 else if( ieta >=28 && ieta <= 35){
957 else if( ieta >=36 && ieta <= 42){
963 else if( sampling == 2 && abs(l_bec) == 3 ){
969 if( ieta >=0 && ieta <= 2){
972 else if( ieta >=3 && ieta <= 6){
977 else if( sampling == 1 && abs(l_bec) == 3 ){
983 if( ieta >=0 && ieta <= 2){
986 else if( ieta >=3 && ieta <= 6){
991 else if( sampling == 1 && abs(l_bec) == 2 ){
995 if( region == 0 || region == 1)
999 else if( region == 2 ){
1000 if( ieta >= 0 && ieta <= 31)
1005 else if( ieta <= 95) {
1010 else if(region == 3){
1014 else if(region == 4){
1016 if( ieta >=0 && ieta <= 15 ){
1020 else if( ieta >= 16 && ieta <= 47 ){
1024 else if( ieta >= 48 && ieta <= 63 ){
1029 else if( region == 5 ){
1037 else if( abs(l_bec)== 20 ){
1040 if( sampling == 0 ){
1043 else if( sampling == 1){
1046 else if( sampling == 2){
1049 else if( sampling == 3){
1059 else if( abs(l_bec)== 40 ){
1062 if( sampling == 1 ){
1065 else if( sampling == 2 ){
1068 else if( sampling == 3 ){
◆ getCellModule()
returns the Module of a given offId
Definition at line 398 of file LArHVIdMapping.cxx.
470 int phi_module=
int(
phi/2);
471 ModuleID = phi_module;
473 else if( sampling == 1 && region == 0 ){
477 int phi_module =
int((
phi+2)/4);
478 if( phi_module == 16 ){
482 ModuleID = phi_module;
485 else if( sampling == 2 || sampling == 3 || (sampling == 1 && region == 1 ) ){
489 int phi_module =
int((
phi+8)/16);
490 if( phi_module == 16 ){
499 else if(
bec == -1 ){
506 int phi_module=
int(
phi/2);
507 if( phi_module <= 15 ){
508 phi_module = 15 - phi_module;
511 phi_module = 47 - phi_module;
513 ModuleID = phi_module;
515 else if( sampling == 1 && region == 0 ){
519 int phi_module =
int((
phi+2)/4);
520 if( phi_module <= 8){
521 phi_module = 8 - phi_module;
524 phi_module = 24 - phi_module;
526 ModuleID = phi_module;
528 else if( sampling == 2 || sampling == 3 || (sampling == 1 && region == 1 ) ){
532 int phi_module =
int((
phi+8)/16);
533 if( phi_module <= 8){
534 phi_module = 8 - phi_module;
537 phi_module = 24 - phi_module;
539 ModuleID = phi_module;
544 else if( abs(
bec) == 2 || abs(
bec) == 3){
564 if( sampling == 0 || sampling == 1 ||
565 (sampling == 2 && abs(
bec) == 3 ) ){
571 int phi_local =
int(
phi/8);
572 ModuleID = phi_local;
574 else if( (sampling == 2 && abs(
bec) == 2) || (sampling == 3 && abs(
bec) == 2)){
580 int phi_local =
int(
phi/32);
581 ModuleID = phi_local;
586 if( sampling == 0 || sampling == 1 ||
587 (sampling == 2 && abs(
bec) == 3 ) ){
594 int phi_local =
int(
phi/8);
595 if( phi_local == 0 ){rev_phi = 3;}
596 if( phi_local == 1 ){rev_phi = 2;}
597 if( phi_local == 2 ){rev_phi = 1;}
598 if( phi_local == 3 ){rev_phi = 0;}
599 if( phi_local == 4 ){rev_phi = 7;}
600 if( phi_local == 5 ){rev_phi = 6;}
601 if( phi_local == 6 ){rev_phi = 5;}
602 if( phi_local == 7 ){rev_phi = 4;}
605 else if( (sampling == 2 && abs(
bec) == 2) || (sampling == 3 && abs(
bec) == 2)){
612 int phi_local =
int(
phi/32);
613 if( phi_local == 0 ){rev_phi = 3;}
614 if( phi_local == 1 ){rev_phi = 2;}
615 if( phi_local == 2 ){rev_phi = 1;}
616 if( phi_local == 3 ){rev_phi = 0;}
617 if( phi_local == 4 ){rev_phi = 7;}
618 if( phi_local == 5 ){rev_phi = 6;}
619 if( phi_local == 6 ){rev_phi = 5;}
620 if( phi_local == 7 ){rev_phi = 4;}
627 else if( abs(
bec) == 20 ){
637 int phi_module=
int(
phi/2);
638 ModuleID = phi_module;
640 else if( region == 1){
646 ModuleID = phi_module;
654 int phi_module=
int(
phi/2);
655 if( phi_module <= 15 ){
656 phi_module = 15 - phi_module;
659 phi_module = 47 - phi_module;
661 ModuleID = phi_module;
663 else if( region == 1){
667 if( phi_module <= 15 ){
668 phi_module = 15 - phi_module;
671 phi_module = 47 - phi_module;
673 ModuleID = phi_module;
693 else if( abs(
bec) == 40 ){
703 else if( sampling == 2 ){
706 else if( sampling == 3){
◆ getCellPhiSector()
Definition at line 1088 of file LArHVIdMapping.cxx.
1142 if( sampling == 0 ){
1148 if( sampling == 1 && region == 0 ){
1153 int phi_local =
int(
phi);
1154 for(
int ift=0; ift<= 15; ift++){
1155 if( phi_local == ift*4 || phi_local == 1+ift*4 ){
1158 if( phi_local == 2+ift*4 || phi_local == 3+ift*4 ){
1163 else if( sampling == 2 || sampling == 3 || (sampling == 1 && region == 1 ) ){
1167 int phi_local =
int(
phi);
1168 for(
int ift=0; ift<= 15; ift++){
1169 for(
int i=0;
i<=7;
i++){
1170 if( phi_local ==
i+ift*16 ){
1174 for(
int i=8;
i<=15;
i++){
1175 if( phi_local ==
i+ift*16 ){
1183 else if(
bec == -1){
1186 if( sampling == 0 ){
1192 if( sampling == 1 && region == 0 ){
1196 int phi_local =
int(
phi);
1197 for(
int ift=0; ift<= 15; ift++){
1198 if( phi_local == ift*4 || phi_local == 1+ift*4 ){
1201 if( phi_local == 2+ift*4 || phi_local == 3+ift*4 ){
1206 else if( sampling == 2 || sampling == 3 || (sampling == 1 && region == 1 ) ){
1208 int phi_local =
int(
phi);
1209 for(
int ift=0; ift<= 15; ift++){
1210 for(
int i=0;
i<=7;
i++){
1211 if( phi_local ==
i+ift*16 ){
1215 for(
int i=8;
i<=15;
i++){
1216 if( phi_local ==
i+ift*16 ){
1225 else if( abs(
bec) == 2 || abs(
bec) == 3 ){
1229 if( sampling == 1 && abs(
bec) == 2 ){
1240 int phi_local =
phi - imod*8;
1241 if( phi_local == 0 || phi_local == 1){
1244 else if( phi_local == 2 || phi_local == 3){
1247 else if( phi_local == 4 || phi_local == 5){
1250 else if( phi_local == 6 || phi_local == 7){
1254 if( sampling == 1 && abs(
bec) == 3 ){
1259 int phi_local =
phi-imod*8;
1260 hvPhi = phi_local+1;
1262 else if( sampling == 2 && abs(
bec) == 3 ){
1268 int phi_local =
phi - imod*8;
1269 hvPhi = phi_local+1;
1271 else if( sampling == 2 && abs(
bec) == 2 ){
1276 int imod = (
phi/32);
1277 int phi_local=
phi-imod*32;
1278 if( phi_local >= 0 && phi_local <= 7 ){
1281 else if( phi_local >= 8 && phi_local <= 15 ){
1284 else if( phi_local >= 16 && phi_local <= 23 ){
1287 else if( phi_local >= 24 && phi_local <= 31 ){
1291 else if( sampling == 3 ){
1296 int imod = (
phi/32);
1297 int phi_local=
phi-imod*32;
1298 if( phi_local >= 0 && phi_local <= 7 ){
1301 else if( phi_local >= 8 && phi_local <= 15 ){
1304 else if( phi_local >= 16 && phi_local <= 23 ){
1307 else if( phi_local >= 24 && phi_local <= 31 ){
1314 if( sampling == 1 && abs(
bec) == 2 ){
1318 int phi_local =
phi-imod*8;
1319 if( phi_local == 0 || phi_local == 1){
1322 else if( phi_local == 2 || phi_local == 3){
1325 else if( phi_local == 4 || phi_local == 5){
1328 else if( phi_local == 6 || phi_local == 7){
1332 if( sampling == 1 && abs(
bec) == 3 ){
1337 int phi_local =
phi - imod*8;
1338 hvPhi = 8-(phi_local);
1340 else if( sampling == 2 && abs(
bec) == 3 ){
1344 int phi_local =
phi-imod*8;
1345 hvPhi = 8-(phi_local);
1347 else if( sampling == 2 && abs(
bec) == 2 ){
1350 int imod = (
phi/32);
1351 int phi_local=
phi-imod*32;
1352 if( phi_local >= 0 && phi_local <= 7 ){
1355 else if( phi_local >= 8 && phi_local <= 15 ){
1358 else if( phi_local >= 16 && phi_local <= 23 ){
1361 else if( phi_local >= 24 && phi_local <= 31 ){
1365 else if( sampling == 3 ){
1368 int imod = (
phi/32);
1369 int phi_local=
phi-imod*32;
1370 if( phi_local >= 0 && phi_local <= 7 ){
1373 else if( phi_local >= 8 && phi_local <= 15 ){
1376 else if( phi_local >= 16 && phi_local <= 23 ){
1379 else if( phi_local >= 24 && phi_local <= 31 ){
1386 else if( abs(
bec)==20){
1392 else if( abs(
bec)==40){
◆ getElectrodeInCell()
Definition at line 113 of file LArHVIdMapping.cxx.
187 for(
int ielec=elecmin; ielec<elecmax+1; ielec++){
188 for(
int iGap=0; iGap<iGapMax+1; iGap++){
191 electrodeIdVec.push_back(electrodeId);
◆ getHVLineInCell()
Returns a vector<HVLineID> given an input offlineID.
Definition at line 207 of file LArHVIdMapping.cxx.
277 for(
int ielec=elecmin; ielec<elecmax+1; ielec++){
289 for(
int iGap=0; iGap<iGapMax+1; iGap++){
293 std::map<HWIdentifier,HWIdentifier>::const_iterator elecIt =
323 if( hvlineIdVec.empty() ){
325 hvlineIdVec.push_back(hvlineId);
328 bool foundHvId =
false;
329 std::vector<HWIdentifier>::const_iterator hv = hvlineIdVec.begin();
330 std::vector<HWIdentifier>::const_iterator hvEnd = hvlineIdVec.end();
331 for(; hv!=hvEnd;++hv){
345 if( hvlineId == hvRef ){
352 hvlineIdVec.push_back(hvlineId);
◆ getLArElectrodeIDvec()
◆ getLArHVLineID()
◆ LArHVIdMappingAlg
◆ m_caloHelper
◆ m_electrode_hvline_map
◆ m_electrodeHelper
◆ m_emHelper
◆ m_fcalHelper
◆ m_hecHelper
◆ m_hvline_electrode_map
◆ m_hvlineHelper
◆ m_invalid
The documentation for this class was generated from the following files:
int phi(const Identifier id) const
return phi according to :
std::map< HWIdentifier, HWIdentifier > m_electrode_hvline_map
HWIdentifier HVLineId(int part, int canline, int cannode, int line) const
Create an HighVoltage line identifier from fields.
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
Scalar phi() const
phi method
int getCellEtaSector(const Identifier &offId) const
const LArEM_ID * em_idHelper() const
access to EM idHelper
std::map< HWIdentifier, std::vector< HWIdentifier > > m_hvline_electrode_map
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
const LArHEC_ID * m_hecHelper
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
HWIdentifier ElectrodeId(int det, int side, int mod, int phi, int eta, int gap, int elec) const
Create an Electrode identifier from fields.
const LArElectrodeID * m_electrodeHelper
const LArFCAL_ID * m_fcalHelper
int getCellModule(const Identifier &offId) const
returns the Module of a given offId
int module(const Identifier id) const
module [1,3]
int region(const Identifier id) const
return region according to :
int sampling(const Identifier id) const
return sampling according to :
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
virtual std::string dictionaryVersion(void) const override
int eta(const Identifier id) const
return eta according to :
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
const CaloCell_ID * m_caloHelper
int phi(const Identifier id) const
phi [0,15]
bool is_em(const Identifier id) const
test if the id belongs to LArEM
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
const LArHVLineID * m_hvlineHelper
const LArEM_ID * m_emHelper
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
int barrel_ec(const Identifier id) const
return barrel_ec according to :
std::pair< int, int > getCellElectrodeMinMax(const Identifier &offId) const
const std::vector< HWIdentifier > m_invalid
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
int getCellPhiSector(const Identifier &offId) const
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
int region(const Identifier id) const
return region [0,1]
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
int phi(const Identifier id) const
return phi[0,63] outer part [0,31] inner part