1039 const G4double radius2Zpos = xZpos*xZpos + yZpos*yZpos;
1040 const G4double radiusZpos = sqrt(radius2Zpos);
1042 CalcData currentCellData;
1044 currentCellData.zSide = 1;
1047 currentCellData.zSide = zside;
1064 const bool MapDetail(
false);
1065 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1069 if( currentCellData.zSide == -1 )
1071 if( currentCellData.sampling == 1 && currentCellData.region ==0 )
1073 currentCellData.phiBin = 31 - currentCellData.phiBin;
1074 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 64;
1076 if( currentCellData.sampling == 1 && currentCellData.region ==1 )
1078 currentCellData.phiBin = 127 - currentCellData.phiBin;
1079 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 256;
1081 if( currentCellData.sampling >= 2 )
1083 currentCellData.phiBin = 127 - currentCellData.phiBin;
1084 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 256;
1091 if (currentCellData.sampling==1 && currentCellData.region==0 && currentCellData.etaBin==0) {
1092 currentCellData.etaBin=1;
1097 << currentCellData.zSide
1098 << currentCellData.sampling
1099 << currentCellData.region
1100 << currentCellData.etaBin
1101 << currentCellData.phiBin;
1106 ATH_MSG_VERBOSE(
"currentCellData.zSide ----> " << currentCellData.zSide);
1107 ATH_MSG_VERBOSE(
"currentCellData.sampling ----> " << currentCellData.sampling);
1108 ATH_MSG_VERBOSE(
"currentCellData.region ----> " << currentCellData.region);
1109 ATH_MSG_VERBOSE(
"currentCellData.etaBin ----> " << currentCellData.etaBin);
1110 ATH_MSG_VERBOSE(
"currentCellData.phiBin ----> " << currentCellData.phiBin);
1111 ATH_MSG_VERBOSE(
"And also etafirst ----> " << thisStepPoint->GetPosition().pseudoRapidity());
1128 const G4int numDeadPhiBins = 64;
1129 double abs_eta = std::fabs(etaZpos);
1130 const double DM1EtaWidth = 0.1 ;
1131 const double DM1PhiWidth = 2.*
M_PI / numDeadPhiBins ;
1132 currentCellData.etaBin = (G4int) ( abs_eta * (1./DM1EtaWidth) ) ;
1133 currentCellData.phiBin = (G4int) (phiZpos/ DM1PhiWidth );
1136 if (currentCellData.phiBin==numDeadPhiBins) currentCellData.phiBin=currentCellData.phiBin-1;
1140 if ( currentCellData.zSide == -1 ) {
1141 currentCellData.phiBin = 31 - currentCellData.phiBin;
1142 if (currentCellData.phiBin < 0 ) currentCellData.phiBin +=64 ;
1149 if (currentCellData.etaBin > 14) currentCellData.etaBin=14;
1152 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume in front of the accordion (DEAD MATERIAL) !!!!! ");
1158 if (abs_eta < 1.0 ) {
1161 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume behind accordion (DEAD MATERIAL 0) !!!!! ");
1163 }
else if ( abs_eta >= 1.0 && abs_eta < 1.5) {
1165 currentCellData.etaBin = currentCellData.etaBin - 10;
1167 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume behind accordion (DEAD MATERIAL 2) !!!!! ");
1170 ATH_MSG_ERROR(
" LArBarrelGeometry: hit behind accordion at eta>1.5 !!! ");
1172 currentCellData.etaBin = 4;
1178 const G4int phisave=currentCellData.phiBin;
1179 const G4bool MapDetail(
false);
1180 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1181 sampling = currentCellData.sampling;
1182 currentCellData.etaBin=0;
1183 currentCellData.phiBin=phisave;
1186 if (abs_eta >1.0 && abs_eta < 1.5) {
1189 currentCellData.etaBin = currentCellData.etaBin - 10;
1190 }
else if (abs_eta < 1.6) {
1193 currentCellData.etaBin=0;
1198 currentCellData.etaBin=0;
1202 const G4double thisStepEnergyDeposit = a_step->GetTotalEnergyDeposit() * a_step->GetTrack()->GetWeight();
1203 std::ostringstream dmLog;
1204 dmLog <<
"LArBarrelGeometry: cannot find region for DM hit..." << std::endl;
1205 dmLog <<
"LArBarrelGeometry: cannot find region for DM hit..." << std::endl;
1206 dmLog <<
"m_zMinBarrel: " <<
m_zMinBarrel << std::endl;
1207 dmLog <<
"m_zMaxBarrel: " <<
m_zMaxBarrel << std::endl;
1210 dmLog <<
"r,z,eta,phi " << radiusZpos <<
" " << zZpos <<
" " << etaZpos <<
" " << phiZpos << std::endl;
1211 dmLog <<
"x,y,z (Atlas) " <<
p.x() <<
" " <<
p.y() <<
" " <<
p.z() << std::endl;
1212 dmLog <<
" inSTAC " << inSTAC << std::endl;
1213 dmLog <<
" eDeposited " << thisStepEnergyDeposit << std::endl;
1214 const G4VPhysicalVolume* vol = thisStepPoint->GetPhysicalVolume();
1215 const G4String volName = vol->GetName();
1216 dmLog <<
" volName " << volName << std::endl;
1217 const G4int ndep = g4navigation->GetDepth();
1218 for (G4int ii=0;ii<=ndep;ii++) {
1219 const G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii);
1220 const G4String vname = v1->GetName();
1221 dmLog <<
"vname " << vname << std::endl;
1233 G4bool MapDetail=
false;
1234 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1239 if (currentCellData.sampling==1 && currentCellData.region==0 && currentCellData.etaBin==0) {
1240 currentCellData.etaBin=1;
1246 << currentCellData.zSide
1247 << currentCellData.sampling
1248 << currentCellData.region
1249 << currentCellData.etaBin
1250 << currentCellData.phiBin;
1256 << currentCellData.zSide * 4
1260 << currentCellData.etaBin
1261 << currentCellData.phiBin;
1264 ATH_MSG_VERBOSE(
"Here the identifier for the barrel DEAD materials ---->");
1289 if (type <1 || type > 2)
return false;
1291 if (sampling<1 || sampling>2)
return false;
1293 if (region!=3 && region !=4)
return false;
1294 if (phi<0 || phi>63)
return false;
1296 if (eta<0 || eta>14)
return false;
1299 if (
eta !=0)
return false;
1303 if (region !=0 && region !=2)
return false;
1304 if (phi<0 || phi>63)
return false;
1306 if (eta<0 || eta>9)
return false;
1309 if (eta<0 || eta>4)
return false;
1314 if (sampling<1 || sampling >3)
return false;
1315 if (region !=0)
return false;
1316 if (
eta!=0)
return false;