How to get Logical Volume of detectors using gdml file

Hello Experts,
For the last few weeks, I’m trying to get the logical volume of the detector in the stepping Action class from the Detector Construction class. For that, I used to write the following command in the stepping action class (no gdml file has been used ):
const G01DetectorConstruction* detectorConstruction
= static_cast<const G01DetectorConstruction*>
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
fScoringVolume = detectorConstruction->GetScoringVolume();

This is what I did without using gdml file, But now I’ve a gdml file and I used it to read and define the geometry and got the world volume by the following command in Detector Construction class:
G4VPhysicalVolume fWorld
fParser.Read(fReadFile);
G4cout<<
(G4Material::GetMaterialTable())<<G4endl;
fWorld fParser.GetWorldVolume();

Now the question is what exact commands am I suppose to write in the:-

  1. DetectorConstruction Class in order to get the Scoring Volume
  2. SteppingAction Class to get the logical volume of the detectors.

It would be great if someone could help me out with the query.
Thank you in advance.