10 const std::string&
name,
21 return StatusCode::SUCCESS;
24 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getPassedChambers(): Start");
25 double ext_x = extVec[0];
26 double ext_y = extVec[1];
27 double ext_z = extVec[2];
28 std::set<std::string> passed_chambers;
32 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object.");
33 return passed_chambers;
35 for(
int iStationName = 41 ; iStationName <= 48 ; iStationName++){
36 if ( (iStationName==41 || iStationName==42) &&
38 if ( (iStationName==43 || iStationName==44) &&
40 if ((iStationName==45 || iStationName==46) &&
42 if ( iStationName==48 &&
44 if ( iStationName==47 &&
46 bool endcap = (iStationName%2==0);
48 if(endcap && iStationName==42)
maxEta = 4;
49 else if(endcap && (iStationName==44 || iStationName==46))
maxEta = 5;
50 for(
int iStationEta = -
maxEta ; iStationEta <=
maxEta ; iStationEta++){
51 if(iStationEta==0)
continue;
52 if(ext_z > 0 && iStationEta < 0)
continue;
53 if(ext_z < 0 && iStationEta > 0)
continue;
56 if(iStationName==48 && iStationPhi>21)
continue;
65 if(std::abs(trkLocVec3D.x())>1000.)
continue;
66 if(std::abs(trkLocVec3D.y())>1500.)
continue;
73 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getPassedChambers(): End");
74 ATH_MSG_DEBUG(
"Number of passed TGC chambers: " << passed_chambers.size());
75 return passed_chambers;
79 int& etamap_index,
int& phimap_index,
int& phimap_global_index )
const {
81 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getMapIndex(const TGC::TgcHit& tgcHit,: Start");
82 return getMapIndex(tgcHit,tgcHit.
gasGap(),etamap_index,phimap_index,phimap_global_index);
83 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getMapIndex(const TGC::TgcHit& tgcHit,: End");
86 int& etamap_index,
int& phimap_index,
int& phimap_global_index )
const {
87 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getMapIndex(const TGC::TgcChamber& tgcCham,: Start");
88 if (tgcCham.
iM() > 1 && iLay > 2){
92 int nLay = (tgcCham.
iM()==1)?(3):(2);
93 if (tgcCham.
iM() == 4) {
94 etamap_index = tgcCham.
iEta() * nLay + iLay;
95 if(tgcCham.
iEta() == 0){
96 phimap_index = tgcCham.
iPhi();
98 phimap_index = tgcCham.
iPhi() +
int(tgcCham.
iSec() / 2) + tgcCham.
iSec();
100 phimap_global_index = tgcCham.
iEta() * 24*nLay + (phimap_index - 1) * nLay + iLay;
102 etamap_index = tgcCham.
iEta() * nLay + iLay;
103 phimap_index = (tgcCham.
iSec() - 1) * 4 + tgcCham.
iPhi() + 1;
104 phimap_global_index = tgcCham.
iEta() * 48*nLay + (phimap_index - 1) * nLay + iLay;
106 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getMapIndex(const TGC::TgcChamber& tgcCham,: End");
111 int& etamap_index,
int& phimap_index,
int& phimap_global_index)
const {
114 phimap_global_index=-1;
115 if( chamber_type_name.size() != 16 )
return false;
117 const int offset = (chamber_type_name[5]==
'1')?(0):((chamber_type_name[5]==
'2')?(3):((chamber_type_name[5]==
'3')?(5):(7)));
118 const int layerNumber =
std::atoi(chamber_type_name.substr(14,1).c_str())-1 +
offset;
119 const bool isEndcap = chamber_type_name[9] ==
'E';
121 (chamber_type_name[5]==
'4')
122 ?(
std::atoi(chamber_type_name.substr(8,1).c_str()) + (
std::atoi(chamber_type_name.substr(1,2).c_str())/2)*3 )
124 ?(
std::atoi(chamber_type_name.substr(8,1).c_str()) + (
std::atoi(chamber_type_name.substr(1,2).c_str())-1)*4 )
125 :(
std::atoi(chamber_type_name.substr(8,1).c_str())/2 + (
std::atoi(chamber_type_name.substr(1,2).c_str())-1)*2 ) );
126 const int eNumber =
std::atoi(chamber_type_name.substr(11,1).c_str())-1;
127 const bool isStrip = chamber_type_name[15] ==
'S';
129 int sector = isEndcap ? phiId/4+1 : phiId/2+1;
130 int phi = isEndcap ? phiId%4 : (phiId%2)*2;
131 int efNumber = (isEndcap) ? eNumber : ( (layerNumber<3)?(4):(5)) ;
133 phimap_index = (!isEndcap || chamber_type_name[5]==
'4') ? (phiId*2+1) : (phiId+1);
139 iLay = layerNumber+1;
140 etamap_index = ((
isStrip)?(2):(3)) * efNumber + ((
isStrip)?(iLay/2+1):(iLay));
141 }
else if(layerNumber<5){
143 iLay = layerNumber+1-3;
144 etamap_index = 2 * efNumber + iLay + ((
isStrip)?(10):(15));
145 }
else if(layerNumber<7){
147 iLay = layerNumber+1-5;
148 etamap_index = 2 * efNumber + iLay + ((
isStrip)?(22):(27));
151 iLay = layerNumber+1-7;
152 etamap_index = iLay + ((
isStrip)?(34):(39));
156 phimap_global_index = iLay + efNumber*3 +
phi*18 + (station-1)*72 + (sector-1)*216;
158 phimap_global_index = 2592 + iLay + phiId*2;