18 #include "G4StepPoint.hh"
19 #include "G4VPhysicalVolume.hh"
20 #include "G4ThreeVector.hh"
47 std::vector<G4double> & energies,
59 for (
unsigned int i=0;
i != 4;
i++) energies.push_back( 0. );
68 static const double oneOverDeta = 10.;
69 static const double oneOverDphi = 32./
M_PI;
73 G4StepPoint* pre_step_point =
step->GetPreStepPoint();
74 G4StepPoint* post_step_point =
step->GetPostStepPoint();
76 G4ThreeVector startPoint = pre_step_point->GetPosition();
77 G4ThreeVector endPoint = post_step_point->GetPosition();
78 G4ThreeVector
p = (startPoint + endPoint) * 0.5;
81 G4double eta = fabs(
p.pseudoRapidity() );
82 G4double phi =
p.phi();
83 if ( phi < 0. ) phi += 2.*
M_PI;
86 ATH_MSG_DEBUG(
"Process: rho,eta,phi " <<
p.perp() <<
" " << eta <<
" " << phi);
90 G4int subdet = (
p.z() > 0.) ? 4 : -4;
91 G4int
phiBin = (
int) ( phi * oneOverDphi );
97 G4int sampling = INT_MIN;
98 G4int region = INT_MIN;
106 else if (eta < 1.5) {
109 etaBin = (
int) ( (eta-1.) * oneOverDeta );
111 else if (eta < 1.6) {
116 else if (eta < 1.8) {
119 etaBin = (
int) ( (eta-1.5) * oneOverDeta );
121 else if (eta < 3.2) {
124 etaBin = (
int) ( (eta-1.3) * oneOverDeta );
149 <<
" energies=(" << energies[0]
150 <<
"," << energies[1]
151 <<
"," << energies[2]
152 <<
"," << energies[3] <<
")");