Compare commits

1 Commits

Author SHA1 Message Date
lars ea917da4a7 Point lib/geant4 submodule at gitea instead of KIT gitlab
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 10:11:04 +02:00
8 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -4,4 +4,4 @@
branch = stable branch = stable
[submodule "lib/geant4"] [submodule "lib/geant4"]
path = lib/geant4 path = lib/geant4
url = git@gitlab.etp.kit.edu:lbogner/geant4.git url = gitea@git.larsbogner.de:lars/geant4.git
+7 -7
View File
@@ -8,14 +8,14 @@
"source": [ "source": [
"from G4Calo import GeometryDescriptor, run_batch, display_event\n", "from G4Calo import GeometryDescriptor, run_batch, display_event\n",
"\n", "\n",
"gd = GeometryDescriptor() #the width of the calorimeter is 200 cm times 200 cm (also steerable, but I'd leave it)\n", "gd = GeometryDescriptor() #the width of the calorimeter is 50 cm times 50 cm (also steerable, but I'd leave it)\n",
"\n", "\n",
"gd.addLayer(16,\"G4_Pb\",False) \n", "gd.addLayer(4,\"G4_Pb\",False) \n",
"gd.addLayer(12,\"G4_POLYSTYRENE\",True, 7)\n", "gd.addLayer(3,\"G4_POLYSTYRENE\",True, 7)\n",
"gd.addLayer(16,\"G4_Pb\",False) \n", "gd.addLayer(4,\"G4_Pb\",False) \n",
"gd.addLayer(12,\"G4_POLYSTYRENE\",True, 7)\n", "gd.addLayer(3,\"G4_POLYSTYRENE\",True, 7)\n",
"gd.addLayer(16,\"G4_Pb\",False)\n", "gd.addLayer(4,\"G4_Pb\",False)\n",
"gd.addLayer(12,\"G4_POLYSTYRENE\",True, 7)" "gd.addLayer(3,\"G4_POLYSTYRENE\",True, 7)"
] ]
}, },
{ {
+4 -4
View File
@@ -7,8 +7,8 @@ if __name__ == '__main__':
gd = GeometryDescriptor() gd = GeometryDescriptor()
for _ in range(25): for _ in range(25):
gd.addLayer(2.0, "G4_Pb", False) gd.addLayer(0.5, "G4_Pb", False)
gd.addLayer(4.,"G4_POLYSTYRENE",True,1) gd.addLayer(1.,"G4_POLYSTYRENE",True,1)
df = run_batch(gd, 100, 'gamma', 1) df = run_batch(gd, 100, 'gamma', 1)
@@ -16,8 +16,8 @@ if __name__ == '__main__':
gd = GeometryDescriptor() gd = GeometryDescriptor()
for _ in range(30): for _ in range(30):
gd.addLayer(2.0, "G4_Pb", False) gd.addLayer(0.5, "G4_Pb", False)
gd.addLayer(4.,"G4_POLYSTYRENE",True,1) gd.addLayer(1.,"G4_POLYSTYRENE",True,1)
df = run_batch(gd,10, 'gamma', 40) df = run_batch(gd,10, 'gamma', 40)
display_event(gd,"gamma", 2, outfile='event.html') display_event(gd,"gamma", 2, outfile='event.html')
+1 -1
View File
@@ -5,7 +5,7 @@ from minicalo import GeometryDescriptor
output_dir = os.path.dirname(os.path.abspath(__file__)) output_dir = os.path.dirname(os.path.abspath(__file__))
gd = GeometryDescriptor() gd = GeometryDescriptor()
gd.addLayer(80.0, "G4_PbWO4", True, 10, 10) gd.addLayer(20.0, "G4_PbWO4", True, 10, 10)
hits, steps = run_batch(gd, 10, "e-", 1.0, return_steps=True) hits, steps = run_batch(gd, 10, "e-", 1.0, return_steps=True)
+1 -1
View File
@@ -35,7 +35,7 @@ int main(int argc, char** argv) {
// Minimal valid geometry: one active PbWO4 layer so init() has something to build. // Minimal valid geometry: one active PbWO4 layer so init() has something to build.
GeometryDescriptor gd; GeometryDescriptor gd;
gd.addLayer(8.0, materialName, true, 1, 1); gd.addLayer(2.0, materialName, true, 1, 1);
G4System g4; G4System g4;
g4.init(gd, -1); g4.init(gd, -1);
+1 -1
View File
@@ -134,7 +134,7 @@ public:
class GeometryDescriptor { class GeometryDescriptor {
public: public:
GeometryDescriptor() : xywidth(200), g4system(nullptr) {}; GeometryDescriptor() : xywidth(50), g4system(nullptr) {};
~GeometryDescriptor(); ~GeometryDescriptor();
void addLayer(double thickness_cm, std::string material, bool isActive = true, int nx = 1, int ny = -1); void addLayer(double thickness_cm, std::string material, bool isActive = true, int nx = 1, int ny = -1);
+1 -1
View File
@@ -48,7 +48,7 @@ int main(int argc, char** argv) {
std::string outfile = "pbwo4_" + std::to_string(nEvents) + "events_hits.root"; std::string outfile = "pbwo4_" + std::to_string(nEvents) + "events_hits.root";
GeometryDescriptor gd; GeometryDescriptor gd;
gd.addLayer(80.0, "G4_PbWO4", true, 10, 10); gd.addLayer(20.0, "G4_PbWO4", true, 10, 10);
G4System g4; G4System g4;
g4.init(gd, seed); g4.init(gd, seed);
+9 -9
View File
@@ -13,8 +13,8 @@ namespace {
GeometryDescriptor buildPbScint() { GeometryDescriptor buildPbScint() {
GeometryDescriptor gd; GeometryDescriptor gd;
for (int i = 0; i < 60; ++i) { for (int i = 0; i < 60; ++i) {
gd.addLayer(0.8, "G4_Pb", false); gd.addLayer(0.2, "G4_Pb", false);
gd.addLayer(1.2, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10); gd.addLayer(0.3, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10);
} }
return gd; return gd;
} }
@@ -22,8 +22,8 @@ GeometryDescriptor buildPbScint() {
GeometryDescriptor buildFeScint() { GeometryDescriptor buildFeScint() {
GeometryDescriptor gd; GeometryDescriptor gd;
for (int i = 0; i < 40; ++i) { for (int i = 0; i < 40; ++i) {
gd.addLayer(4.0, "G4_Fe", false); gd.addLayer(1.0, "G4_Fe", false);
gd.addLayer(2.0, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10); gd.addLayer(0.5, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10);
} }
return gd; return gd;
} }
@@ -31,10 +31,10 @@ GeometryDescriptor buildFeScint() {
GeometryDescriptor buildWScintEcal() { GeometryDescriptor buildWScintEcal() {
GeometryDescriptor gd; GeometryDescriptor gd;
// Thin homogeneous preshower: ~0.05 X0, sees MIPs/shower-start, not containment. // Thin homogeneous preshower: ~0.05 X0, sees MIPs/shower-start, not containment.
gd.addLayer(8.0, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10); gd.addLayer(2.0, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10);
for (int i = 0; i < 75; ++i) { for (int i = 0; i < 75; ++i) {
gd.addLayer(0.4, "G4_W", false); gd.addLayer(0.1, "G4_W", false);
gd.addLayer(0.8, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10); gd.addLayer(0.2, "G4_PLASTIC_SC_VINYLTOLUENE", true, 10, 10);
} }
return gd; return gd;
} }
@@ -42,8 +42,8 @@ GeometryDescriptor buildWScintEcal() {
GeometryDescriptor buildPbLAr() { GeometryDescriptor buildPbLAr() {
GeometryDescriptor gd; GeometryDescriptor gd;
for (int i = 0; i < 70; ++i) { for (int i = 0; i < 70; ++i) {
gd.addLayer(0.8, "G4_Pb", false); gd.addLayer(0.2, "G4_Pb", false);
gd.addLayer(1.6, "G4_lAr", true, 10, 10); gd.addLayer(0.4, "G4_lAr", true, 10, 10);
} }
return gd; return gd;
} }