Introduction to GEANT4
From UCL HEP PBT Wiki
m |
m |
||
Line 67: | Line 67: | ||
* Describing the shape and the size of your detector: <span style="color:#ff0000"> G4VSolid </span> | * Describing the shape and the size of your detector: <span style="color:#ff0000"> G4VSolid </span> | ||
- | * Adding properties - material and electromagnetic field: <span style="color:#ff0000"> | + | * Adding properties - material and electromagnetic field: <span style="color:#ff0000"> G4Logical Volume </span> |
- | * Placing it in another volume - in one or many positions: <span style="color:#ff0000"> | + | * Placing it in another volume - in one or many positions: <span style="color:#ff0000"> G4VPhysical Volume </span> |
For example if you want to make an experiment using a water box detector it ca be defined in the following way: | For example if you want to make an experiment using a water box detector it ca be defined in the following way: | ||
Line 75: | Line 75: | ||
<span style="color:#800000"> G4VSolid* pBoxSolid = new G4Box(“WaterBox”, 1.*m, 2.*m, 3.*m); </span> | <span style="color:#800000"> G4VSolid* pBoxSolid = new G4Box(“WaterBox”, 1.*m, 2.*m, 3.*m); </span> | ||
- | <span style="color:#800000"> | + | <span style="color:#800000"> G4LogicalVolume* pBoxLog = new G4LogicalVolume( pBoxSolid, water, “WaterBox”); </span> |
<span style="color:#800000"> G4VPhysicalVolume* aBoxPhys = new G4PVPlacement( pRotation, G4ThreeVector(posX, posY, posZ), pBoxLog, “WaterBox”, pWorldLog, | <span style="color:#800000"> G4VPhysicalVolume* aBoxPhys = new G4PVPlacement( pRotation, G4ThreeVector(posX, posY, posZ), pBoxLog, “WaterBox”, pWorldLog, |