
Construcción de la geometría
Descripción 
```
class BasicDetectorConstruction : public G4VUserDetectorConstruction{
public:
G4VPhysicalVolume* Construct(){};
}
```
ID:(9415, 0)

Crear los volúmenes
Descripción 
Definir las formas geometricas
```
G4Box* solidWorld = new G4Box('World',world_sizeX,world_sizeY,world_sizeZ);
G4Box* solidTarget new G4Box('Target',target_sizeX, target_sizeY, target_sizeZ);
```
ID:(9416, 0)

Cargar datos físicos
Descripción 
Cargar datos físicos
```
//Get pointer to materials database
G4NistManager* nist = G4NistManager::Instance();
```
ID:(9417, 0)

Construir datos físicos
Descripción 
Construir datos físicos
```
//Build lead and air materials
G4Material* Pb = nist->FindOrBuildMaterial('G4_Pb');
G4Material* air = nist->FindOrBuildMaterial('G4_AIR');
```
ID:(9418, 0)

Asignar datos físicos a volúmenes
Descripción 
Construir datos físicos
```
//Fill the world with air. Create a lead target to fire particles at.
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, air, 'myWorld');
G4LogicalVolume* logicTarget = new G4LogicalVolume(solidTarget, Pb, 'myTarget');
```
ID:(9419, 0)

Asignar volúmenes a volumen principal
Descripción 
Asignar volúmenes a volumen principal
```
//Create world mother volume
G4VPhysicalVolume* physWorld = new G4PVPlacement(
0, //no rotation
G4ThreeVector(), //at (0,0,0)
logicWorld, //its logical volume
'World', //its name
0, //its mother volume
false, //no boolean operation
0, //copy number
true); //overlaps checking
//Place lead target in world volume
G4VPhysicalVolume* physTarget = new G4PVPlacement(
0, //no rotation
G4ThreeVector(), //at (0,0,0)
logicWorld, //its logical volume
'Target', //its name
logicWorld, //its mother volume
false, //no boolean operation
0, //copy number
true); //overlaps checking
```
ID:(9420, 0)