vtkGeantEvent
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "Math/ContainerBox.h"
|
||||
#include "Math/TriangleMesh.h"
|
||||
#include "Math/Dense.h"
|
||||
#include "Math/Units.h"
|
||||
#include "testing-prototype.h"
|
||||
#include <Geant4/G4Material.hh>
|
||||
#include <Geant4/G4NistManager.hh>
|
||||
@@ -20,9 +21,8 @@ int main() {
|
||||
// Test: Scene with iron cube in air, launch muons, collect events //
|
||||
{
|
||||
// 1. Create world box (air, 30m x 30m x 30m)
|
||||
ContainerBox world_box(Vector3f(30000, 30000, 30000)); // mm
|
||||
Geant::Scene scene;
|
||||
scene.ConstructWorldBox(&world_box, "G4_AIR");
|
||||
scene.ConstructWorldBox(Vector3f(30_m, 30_m, 30_m), "G4_AIR");
|
||||
|
||||
// 2. Create iron cube (1m x 1m x 1m) at center
|
||||
ContainerBox iron_box(Vector3f(1000, 1000, 1000)); // mm
|
||||
|
||||
@@ -8,10 +8,8 @@ using namespace uLib;
|
||||
|
||||
int main() {
|
||||
|
||||
uLib::ContainerBox world_box(Vector3f(100, 100, 100));
|
||||
uLib::Geant::Scene scene;
|
||||
|
||||
scene.ConstructWorldBox(&world_box, "G4_AIR");
|
||||
scene.ConstructWorldBox(Vector3f(100, 100, 100), "G4_AIR");
|
||||
scene.Initialize();
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -15,9 +15,12 @@ int main() {
|
||||
// Test Solid initialization and NIST material //
|
||||
{
|
||||
Geant::Solid solid("test_solid");
|
||||
TEST1(solid.GetLogical() != nullptr);
|
||||
// Logical volume is not created until material and solid are set
|
||||
TEST1(solid.GetLogical() == nullptr);
|
||||
|
||||
solid.SetNistMaterial("G4_AIR");
|
||||
// Still null because base Solid has no GetG4Solid()
|
||||
TEST1(solid.GetLogical() == nullptr);
|
||||
TEST1(solid.GetMaterial() != nullptr);
|
||||
TEST1(solid.GetMaterial()->GetName() == "G4_AIR");
|
||||
}
|
||||
@@ -25,6 +28,7 @@ int main() {
|
||||
// Test TessellatedSolid with a simple mesh //
|
||||
{
|
||||
Geant::TessellatedSolid tsolid("test_tessellated");
|
||||
tsolid.SetNistMaterial("G4_AIR");
|
||||
TEST1(tsolid.GetLogical() != nullptr);
|
||||
TEST1(tsolid.GetSolid() != nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user