Introduction to GEANT4
From UCL HEP PBT Wiki
m |
m |
||
Line 88: | Line 88: | ||
<span style="color:#800000"> G4VPhysicalVolume* pWorldPhys = new G4PVPlacement(0,G4ThreeVector(),pWorldLog,"World",0,false,0); </span> | <span style="color:#800000"> G4VPhysicalVolume* pWorldPhys = new G4PVPlacement(0,G4ThreeVector(),pWorldLog,"World",0,false,0); </span> | ||
- | + | The elements and materials used in the experiment are defined using classes G4Element and G4Material. | |
+ | For example water is defined as: | ||
+ | |||
+ | <span style="color:#800000"> G4Element* H = new G4Element("Hydrogen","H",z=1.,a= 1.01*g/mole); </span> | ||
+ | |||
+ | <span style="color:#800000"> G4Element* O = new G4Element("Oxygen","O",z=8.,a=16.00*g/mole); </span> | ||
+ | |||
+ | |||
+ | <span style="color:#800000"> density = 1.000*g/cm3; </span> | ||
+ | |||
+ | <span style="color:#800000"> G4Material* H2O = new G4Material("Water",density,ncomp=2); </span> | ||
+ | |||
+ | <span style="color:#800000"> H2O->AddElement(H, natoms=2); </span> | ||
+ | |||
+ | <span style="color:#800000"> H2O->AddElement(O, natoms=1); </span> | ||
+ | |||
== Physics processes == | == Physics processes == | ||
+ | |||
== Generate primary particles == | == Generate primary particles == | ||
+ | |||
== Optional user classes == | == Optional user classes == |