1041 const G4double radius2Zpos = xZpos*xZpos + yZpos*yZpos;
1042 const G4double radiusZpos = sqrt(radius2Zpos);
1044 CalcData currentCellData;
1046 currentCellData.zSide = 1;
1049 currentCellData.zSide = zside;
1066 const bool MapDetail(
false);
1067 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1071 if( currentCellData.zSide == -1 )
1073 if( currentCellData.sampling == 1 && currentCellData.region ==0 )
1075 currentCellData.phiBin = 31 - currentCellData.phiBin;
1076 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 64;
1078 if( currentCellData.sampling == 1 && currentCellData.region ==1 )
1080 currentCellData.phiBin = 127 - currentCellData.phiBin;
1081 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 256;
1083 if( currentCellData.sampling >= 2 )
1085 currentCellData.phiBin = 127 - currentCellData.phiBin;
1086 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 256;
1093 if (currentCellData.sampling==1 && currentCellData.region==0 && currentCellData.etaBin==0) {
1094 currentCellData.etaBin=1;
1099 << currentCellData.zSide
1100 << currentCellData.sampling
1101 << currentCellData.region
1102 << currentCellData.etaBin
1103 << currentCellData.phiBin;
1108 ATH_MSG_VERBOSE(
"currentCellData.zSide ----> " << currentCellData.zSide);
1109 ATH_MSG_VERBOSE(
"currentCellData.sampling ----> " << currentCellData.sampling);
1110 ATH_MSG_VERBOSE(
"currentCellData.region ----> " << currentCellData.region);
1111 ATH_MSG_VERBOSE(
"currentCellData.etaBin ----> " << currentCellData.etaBin);
1112 ATH_MSG_VERBOSE(
"currentCellData.phiBin ----> " << currentCellData.phiBin);
1113 ATH_MSG_VERBOSE(
"And also etafirst ----> " << thisStepPoint->GetPosition().pseudoRapidity());
1130 const G4int numDeadPhiBins = 64;
1131 double abs_eta = std::fabs(etaZpos);
1132 const double DM1EtaWidth = 0.1 ;
1133 const double DM1PhiWidth = 2.*
M_PI / numDeadPhiBins ;
1134 currentCellData.etaBin = (G4int) ( abs_eta * (1./DM1EtaWidth) ) ;
1135 currentCellData.phiBin = (G4int) (phiZpos/ DM1PhiWidth );
1138 if (currentCellData.phiBin==numDeadPhiBins) currentCellData.phiBin=currentCellData.phiBin-1;
1142 if ( currentCellData.zSide == -1 ) {
1143 currentCellData.phiBin = 31 - currentCellData.phiBin;
1144 if (currentCellData.phiBin < 0 ) currentCellData.phiBin +=64 ;
1151 if (currentCellData.etaBin > 14) currentCellData.etaBin=14;
1154 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume in front of the accordion (DEAD MATERIAL) !!!!! ");
1160 if (abs_eta < 1.0 ) {
1163 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume behind accordion (DEAD MATERIAL 0) !!!!! ");
1165 }
else if ( abs_eta >= 1.0 && abs_eta < 1.5) {
1167 currentCellData.etaBin = currentCellData.etaBin - 10;
1169 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume behind accordion (DEAD MATERIAL 2) !!!!! ");
1172 ATH_MSG_ERROR(
" LArBarrelGeometry: hit behind accordion at eta>1.5 !!! ");
1174 currentCellData.etaBin = 4;
1180 const G4int phisave=currentCellData.phiBin;
1181 const G4bool MapDetail(
false);
1182 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1183 sampling = currentCellData.sampling;
1184 currentCellData.etaBin=0;
1185 currentCellData.phiBin=phisave;
1188 if (abs_eta >1.0 && abs_eta < 1.5) {
1191 currentCellData.etaBin = currentCellData.etaBin - 10;
1192 }
else if (abs_eta < 1.6) {
1195 currentCellData.etaBin=0;
1200 currentCellData.etaBin=0;
1204 const G4double thisStepEnergyDeposit = a_step->GetTotalEnergyDeposit() * a_step->GetTrack()->GetWeight();
1205 std::ostringstream dmLog;
1206 dmLog <<
"LArBarrelGeometry: cannot find region for DM hit..." << std::endl;
1207 dmLog <<
"LArBarrelGeometry: cannot find region for DM hit..." << std::endl;
1208 dmLog <<
"m_zMinBarrel: " <<
m_zMinBarrel << std::endl;
1209 dmLog <<
"m_zMaxBarrel: " <<
m_zMaxBarrel << std::endl;
1212 dmLog <<
"r,z,eta,phi " << radiusZpos <<
" " << zZpos <<
" " << etaZpos <<
" " << phiZpos << std::endl;
1213 dmLog <<
"x,y,z (Atlas) " <<
p.x() <<
" " <<
p.y() <<
" " <<
p.z() << std::endl;
1214 dmLog <<
" inSTAC " << inSTAC << std::endl;
1215 dmLog <<
" eDeposited " << thisStepEnergyDeposit << std::endl;
1216 const G4VPhysicalVolume* vol = thisStepPoint->GetPhysicalVolume();
1217 const G4String volName = vol->GetName();
1218 dmLog <<
" volName " << volName << std::endl;
1219 const G4int ndep = g4navigation->GetDepth();
1220 for (G4int ii=0;ii<=ndep;ii++) {
1221 const G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii);
1222 const G4String vname = v1->GetName();
1223 dmLog <<
"vname " << vname << std::endl;
1235 G4bool MapDetail=
false;
1236 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1241 if (currentCellData.sampling==1 && currentCellData.region==0 && currentCellData.etaBin==0) {
1242 currentCellData.etaBin=1;
1248 << currentCellData.zSide
1249 << currentCellData.sampling
1250 << currentCellData.region
1251 << currentCellData.etaBin
1252 << currentCellData.phiBin;
1258 << currentCellData.zSide * 4
1262 << currentCellData.etaBin
1263 << currentCellData.phiBin;
1266 ATH_MSG_VERBOSE(
"Here the identifier for the barrel DEAD materials ---->");
1291 if (type <1 || type > 2)
return false;
1293 if (sampling<1 || sampling>2)
return false;
1295 if (region!=3 && region !=4)
return false;
1296 if (phi<0 || phi>63)
return false;
1298 if (eta<0 || eta>14)
return false;
1301 if (
eta !=0)
return false;
1305 if (region !=0 && region !=2)
return false;
1306 if (phi<0 || phi>63)
return false;
1308 if (eta<0 || eta>9)
return false;
1311 if (eta<0 || eta>4)
return false;
1316 if (sampling<1 || sampling >3)
return false;
1317 if (region !=0)
return false;
1318 if (
eta!=0)
return false;