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;
98 int phiID = int(
float(sID) /
float(
phiScale));
100 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02HcalNumberingScheme:: scintID " << sID <<
" phi = " << phiID;
105 phiID =
abs(phiID - 3);
113 int etaID = int(
float(aux) /
float(
etaScale));
116 edm::LogVerbatim(
"HcalTBSim") <<
"HcalTB02HcalNumberingScheme:: scintID " << sID <<
" eta = " << etaID;
Log< level::Info, true > LogVerbatim
static std::vector< std::string > checklist log
Sin< T >::type sin(const T &t)
int getphiID(int sID) const
HcalTB02HcalNumberingScheme()
int getlayerID(int sID) const
~HcalTB02HcalNumberingScheme() override
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
int getetaID(int sID) const
int getUnitID(const G4Step *aStep) const override
Power< A, B >::type pow(const A &a, const B &b)