# 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