1071 const G4double radius2Zpos = xZpos*xZpos + yZpos*yZpos;
1072 const G4double radiusZpos = sqrt(radius2Zpos);
1074 CalcData currentCellData;
1076 currentCellData.zSide = 1;
1079 currentCellData.zSide = zside;
1096 const bool MapDetail(
false);
1097 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1101 if( currentCellData.zSide == -1 )
1103 if( currentCellData.sampling == 1 && currentCellData.region ==0 )
1105 currentCellData.phiBin = 31 - currentCellData.phiBin;
1106 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 64;
1108 if( currentCellData.sampling == 1 && currentCellData.region ==1 )
1110 currentCellData.phiBin = 127 - currentCellData.phiBin;
1111 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 256;
1113 if( currentCellData.sampling >= 2 )
1115 currentCellData.phiBin = 127 - currentCellData.phiBin;
1116 if(currentCellData.phiBin < 0 ) currentCellData.phiBin += 256;
1123 if (currentCellData.sampling==1 && currentCellData.region==0 && currentCellData.etaBin==0) {
1124 currentCellData.etaBin=1;
1129 << currentCellData.zSide
1130 << currentCellData.sampling
1131 << currentCellData.region
1132 << currentCellData.etaBin
1133 << currentCellData.phiBin;
1138 ATH_MSG_VERBOSE(
"currentCellData.zSide ----> " << currentCellData.zSide);
1139 ATH_MSG_VERBOSE(
"currentCellData.sampling ----> " << currentCellData.sampling);
1140 ATH_MSG_VERBOSE(
"currentCellData.region ----> " << currentCellData.region);
1141 ATH_MSG_VERBOSE(
"currentCellData.etaBin ----> " << currentCellData.etaBin);
1142 ATH_MSG_VERBOSE(
"currentCellData.phiBin ----> " << currentCellData.phiBin);
1143 ATH_MSG_VERBOSE(
"And also etafirst ----> " << thisStepPoint->GetPosition().pseudoRapidity());
1160 const G4int numDeadPhiBins = 64;
1161 double abs_eta = std::fabs(etaZpos);
1162 const double DM1EtaWidth = 0.1 ;
1163 const double DM1PhiWidth = 2.*
M_PI / numDeadPhiBins ;
1164 currentCellData.etaBin = (G4int) ( abs_eta * (1./DM1EtaWidth) ) ;
1165 currentCellData.phiBin = (G4int) (phiZpos/ DM1PhiWidth );
1168 if (currentCellData.phiBin==numDeadPhiBins) currentCellData.phiBin=currentCellData.phiBin-1;
1172 if ( currentCellData.zSide == -1 ) {
1173 currentCellData.phiBin = 31 - currentCellData.phiBin;
1174 if (currentCellData.phiBin < 0 ) currentCellData.phiBin +=64 ;
1181 if (currentCellData.etaBin > 14) currentCellData.etaBin=14;
1184 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume in front of the accordion (DEAD MATERIAL) !!!!! ");
1190 if (abs_eta < 1.0 ) {
1193 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume behind accordion (DEAD MATERIAL 0) !!!!! ");
1195 }
else if ( abs_eta >= 1.0 && abs_eta < 1.5) {
1197 currentCellData.etaBin = currentCellData.etaBin - 10;
1199 ATH_MSG_VERBOSE(
"This hit is in the ECAM volume behind accordion (DEAD MATERIAL 2) !!!!! ");
1202 ATH_MSG_ERROR(
" LArBarrelGeometry: hit behind accordion at eta>1.5 !!! ");
1204 currentCellData.etaBin = 4;
1210 const G4int phisave=currentCellData.phiBin;
1211 const G4bool MapDetail(
false);
1212 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1213 sampling = currentCellData.sampling;
1214 currentCellData.etaBin=0;
1215 currentCellData.phiBin=phisave;
1218 if (abs_eta >1.0 && abs_eta < 1.5) {
1221 currentCellData.etaBin = currentCellData.etaBin - 10;
1222 }
else if (abs_eta < 1.6) {
1225 currentCellData.etaBin=0;
1230 currentCellData.etaBin=0;
1234 const G4double thisStepEnergyDeposit = a_step->GetTotalEnergyDeposit() * a_step->GetTrack()->GetWeight();
1235 std::ostringstream dmLog;
1236 dmLog <<
"LArBarrelGeometry: cannot find region for DM hit..." << std::endl;
1237 dmLog <<
"LArBarrelGeometry: cannot find region for DM hit..." << std::endl;
1238 dmLog <<
"m_zMinBarrel: " <<
m_zMinBarrel << std::endl;
1239 dmLog <<
"m_zMaxBarrel: " <<
m_zMaxBarrel << std::endl;
1242 dmLog <<
"r,z,eta,phi " << radiusZpos <<
" " << zZpos <<
" " << etaZpos <<
" " << phiZpos << std::endl;
1243 dmLog <<
"x,y,z (Atlas) " <<
p.x() <<
" " <<
p.y() <<
" " <<
p.z() << std::endl;
1244 dmLog <<
" inSTAC " << inSTAC << std::endl;
1245 dmLog <<
" eDeposited " << thisStepEnergyDeposit << std::endl;
1246 const G4VPhysicalVolume* vol = thisStepPoint->GetPhysicalVolume();
1247 const G4String volName = vol->GetName();
1248 dmLog <<
" volName " << volName << std::endl;
1249 const G4int ndep = g4navigation->GetDepth();
1250 for (G4int ii=0;ii<=ndep;ii++) {
1251 const G4VPhysicalVolume* v1 = g4navigation->GetVolume(ii);
1252 const G4String vname = v1->GetName();
1253 dmLog <<
"vname " << vname << std::endl;
1265 G4bool MapDetail=
false;
1266 this->
findCell( currentCellData, xZpos, yZpos, zZpos, radiusZpos, etaZpos, phiZpos, MapDetail );
1271 if (currentCellData.sampling==1 && currentCellData.region==0 && currentCellData.etaBin==0) {
1272 currentCellData.etaBin=1;
1278 << currentCellData.zSide
1279 << currentCellData.sampling
1280 << currentCellData.region
1281 << currentCellData.etaBin
1282 << currentCellData.phiBin;
1288 << currentCellData.zSide * 4
1292 << currentCellData.etaBin
1293 << currentCellData.phiBin;
1296 ATH_MSG_VERBOSE(
"Here the identifier for the barrel DEAD materials ---->");
1321 if (type <1 || type > 2)
return false;
1323 if (sampling<1 || sampling>2)
return false;
1325 if (region!=3 && region !=4)
return false;
1326 if (phi<0 || phi>63)
return false;
1328 if (eta<0 || eta>14)
return false;
1331 if (eta !=0)
return false;
1335 if (region !=0 && region !=2)
return false;
1336 if (phi<0 || phi>63)
return false;
1338 if (eta<0 || eta>9)
return false;
1341 if (eta<0 || eta>4)
return false;
1346 if (sampling<1 || sampling >3)
return false;
1347 if (region !=0)
return false;
1348 if (eta!=0)
return false;