Calculating Phi and eta values from RE01 example

Dear All,
I would like to calculate the Phi and pseudorapidity values for each cell from the given example in examples/extended/runAndEvent/RE01. How to extract the position of hits correctly in this geometry? I have tried in the following two ways(in code snippet), however, the distribution does not look correct.
Any help will be very much appreciated.

const G4VTouchable* ROhist = aStep->GetPreStepPoint()->GetTouchable();
G4AffineTransform aTrans = ROhist->GetHistory()->GetTopTransform();

//G4ThreeVector position = aTrans.NetTranslation();    
//G4ThreeVector position = aStep->GetPostStepPoint()->GetPosition();

G4double theta = std::acos(position[2]/sqrt(std::pow(position[0],2) + pow(position[1],2) + pow(position[2],2)))/deg;
G4double eta = - std::log(tan((theta/2)*deg));
G4double phi = std::atan2(position[1],position[0])/deg;