seems to work with different geometries

This commit is contained in:
Jan Kieseler
2023-09-21 09:06:20 +02:00
parent cee740716c
commit 8d2302b5dc
8 changed files with 58 additions and 38 deletions
+13 -1
View File
@@ -40,6 +40,7 @@ class ConstructionWrapper;
namespace B4
{
/// Detector construction class to define materials and geometry.
/// The calorimeter is a box made of a given number of layers. A layer consists
/// of an absorber plate and of a detection gap. The layer is replicated.
@@ -59,13 +60,24 @@ namespace B4
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction( ConstructionWrapper* Cw): G4VUserDetectorConstruction(), cw(Cw){}
static DetectorConstruction* _global_detector_construction;
static DetectorConstruction* getDetectorConstruction(){
return _global_detector_construction;
}
DetectorConstruction( ConstructionWrapper* Cw): G4VUserDetectorConstruction(), cw(Cw){
_global_detector_construction=this;
}
~DetectorConstruction() override = default;
public:
G4VPhysicalVolume* Construct() override;
void ConstructSDandField() override;
void setConstructionWrapper(ConstructionWrapper* Cw){
this->cw = Cw;
}
ConstructionWrapper* getConstructionWrapper(){
return cw;