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