seems to work with different geometries
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user