Thank you, you solution looks pretty native for this problem.
I have implemented the calculations as far as i understood in order to calculate an angle of incidence.
I was not sure if the rotation acts on coordinates or basis, but I’ve checked on 3d visualization of local step positions and they all belong to the expected surface of solid i have, so direct rotation should be done in order to represent vector in local basis.
G4double L_SteppingAction::GetIncidenceAngle(const G4Step *aStep)
G4StepPoint *preStep = aStep->GetPreStepPoint();
G4ThreeVector photonDirection = preStep->GetMomentum() / preStep->GetMomentum().mag();
G4ThreeVector stepPos = preStep->GetPosition();
const G4VTouchable *touchable = preStep->GetTouchable();
const G4RotationMatrix *rotation = touchable->GetRotation();
G4RotationMatrix rotation_inv = rotation->inverse();
G4ThreeVector translation = touchable->GetTranslation();
G4VSolid *sector = touchable->GetSolid();
G4ThreeVector posLocal = *rotation * (stepPos - translation);
G4ThreeVector normal = - sector->SurfaceNormal(posLocal);
G4ThreeVector photonDirectionLocal = *rotation * photonDirection;
G4double incidenceAngle = acos( normal.dot(photonDirectionLocal) );
But I have got results which I did not really expect (Total internal reflections below an angle of TIR, Fresnel processes above it).