19 #include "G4SystemOfUnits.hh"
41 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
42 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
43 float hx = hitPoint.x();
44 float hy = hitPoint.y();
45 float hz = hitPoint.z();
50 if ((hr > 3. *
m) && (hr < 3.830 *
m))
57 float hR = hitPoint.mag();
58 float htheta = (hR == 0. ? 0. : acos(
std::max(
std::min(hz / hR,
float(1.)),
float(-1.))));
59 float hsintheta =
sin(htheta);
60 float hphi = (hR * hsintheta == 0. ? 0. : acos(
std::max(
std::min(hx / (hR * hsintheta),
float(1.)),
float(-1.))));
61 float heta = (fabs(hsintheta) == 1. ? 0. : -
log(fabs(
tan(htheta / 2.))));
62 int eta =
int(heta / 0.087);
63 int phi =
int(hphi / (5. * degree));
65 G4VPhysicalVolume* thePV = preStepPoint->GetPhysicalVolume();
66 int ilayer = ((thePV->GetCopyNo()) / 10) % 100;
67 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02HcalNumberingScheme:: Layer " << thePV->GetName()
68 <<
" found at phi = " <<
phi <<
" eta = " <<
eta <<
" lay = " << thePV->GetCopyNo()
81 if ((layerID != 17) && (layerID != 18))
84 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02HcalNumberingScheme:: scintID " << sID <<
" layer = " << layerID;
94 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02HcalNumberingScheme:: scintID " << sID <<
" phi = " << phiID;
98 phiID =
abs(phiID - 3);
108 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02HcalNumberingScheme:: scintID " << sID <<
" eta = " << etaID;