Compare commits

...

2 Commits

Author SHA1 Message Date
73a7eb309a readme 2021-01-15 18:29:52 -06:00
64e5709311 move detector parameters to header 2021-01-15 12:48:37 -06:00
3 changed files with 53 additions and 22 deletions

1
Readme.md Normal file
View File

@@ -0,0 +1 @@
Muon tomography simulation

View File

@@ -19,9 +19,39 @@ class DetectorConstruction : public G4VUserDetectorConstruction
virtual G4VPhysicalVolume* Construct(); virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField(); virtual void ConstructSDandField();
const G4String GetTargetMaterial() { return fTargetMaterial; }
void SetTargetMaterial(const G4String mat) { fTargetMaterial = mat; }
protected: protected:
// void DefineMaterials(); // void DefineMaterials();
G4bool fCheckOverlaps; G4bool fCheckOverlaps;
G4double scSizeX;
G4double scSizeY;
G4double scSizeZ;
G4double scGapX;
G4double scGapZ;
G4int nScBar;
G4int nLayerTop;
G4int nLayerBottom;
G4double layerGapZ;
G4double topBotGap;
G4double layerSizeX;
G4double layerSizeY;
G4double layerSizeZ;
G4double concreteX;
G4double concreteY;
G4double concreteZ;
G4double targetX;
G4double targetY;
G4double targetZ;
G4String fTargetMaterial;
G4double worldSizeX;
G4double worldSizeY;
G4double worldSizeZ;
}; };
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

View File

@@ -35,32 +35,32 @@ G4VPhysicalVolume *DetectorConstruction::Construct() {
nist->FindOrBuildMaterial("G4_PLASTIC_SC_VINYLTOLUENE"); nist->FindOrBuildMaterial("G4_PLASTIC_SC_VINYLTOLUENE");
// World and crystals // World and crystals
G4double scSizeX = 5.0 * cm; scSizeX = 5.0 * cm;
G4double scSizeY = 50.0 * cm; scSizeY = 50.0 * cm;
G4double scSizeZ = 1. * cm; scSizeZ = 1. * cm;
G4double scGapX = 0.2 * cm; scGapX = 0.2 * cm;
G4double scGapZ = 0.2 * cm; scGapZ = 0.2 * cm;
G4int nScBar = 10; nScBar = 10;
G4int nLayerTop = 2; nLayerTop = 2;
G4int nLayerBottom = 2; nLayerBottom = 2;
G4double layerGapZ = 1 * cm; layerGapZ = 1 * cm;
G4double topBotGap = 50 * cm; topBotGap = 50 * cm;
G4double layerSizeX = nScBar * scSizeX + nScBar * scGapX; layerSizeX = nScBar * scSizeX + nScBar * scGapX;
G4double layerSizeY = nScBar * scSizeX + nScBar * scGapX; layerSizeY = nScBar * scSizeX + nScBar * scGapX;
G4double layerSizeZ = scSizeZ + scGapZ; layerSizeZ = scSizeZ + scGapZ;
G4double concreteX = 30 * cm; concreteX = 30 * cm;
G4double concreteY = 30 * cm; concreteY = 30 * cm;
G4double concreteZ = 30 * cm; concreteZ = 30 * cm;
G4double targetX = 10 * cm; targetX = 10 * cm;
G4double targetY = 10 * cm; targetY = 10 * cm;
G4double targetZ = 5 * cm; targetZ = 5 * cm;
G4double worldSizeX = 1.2 * layerSizeX; worldSizeX = 1.2 * layerSizeX;
G4double worldSizeY = 1.2 * layerSizeY; worldSizeY = 1.2 * layerSizeY;
G4double worldSizeZ = worldSizeZ =
1.2 * ((nLayerBottom + nLayerTop) * (layerSizeZ + layerGapZ) + topBotGap); 1.2 * ((nLayerBottom + nLayerTop) * (layerSizeZ + layerGapZ) + topBotGap);
// world volume // world volume