|
G4OCCT 0.1.0
Geant4 interface to Open CASCADE Technology (OCCT) geometry definitions
|
Helper for assigning SDs to G4OCCT STEP assembly volumes. More...
#include <G4OCCT_STEPAssemblySD.hh>
Static Public Member Functions | |
| static std::size_t | Apply (const std::string &detectorName, const std::vector< std::pair< std::string, G4VSensitiveDetector * > > &assignments) |
Helper for assigning SDs to G4OCCT STEP assembly volumes.
In the DD4hep workflow, sensitive detectors (as G4VSensitiveDetector* objects) are created during ConstructSDandField(). For G4OCCT STEP assemblies the constituent G4LogicalVolumes bypass the TGeo representation and are therefore not reachable via the normal DD4hep volume-SD association.
This class bridges the gap: after creating SD objects, call G4OCCTAssemblySDSetup::Apply with the detector name (as registered in the compact XML) to retrieve the assembly from G4OCCTAssemblyRegistry and call ApplySDMap on it.
Build a G4OCCTSensitiveDetectorMap from the DD4hep readout and call Apply from a dd4hep::sim::Geant4SensDetActionSequence or a custom ConstructSDandField.
Definition at line 47 of file G4OCCT_STEPAssemblySD.hh.
|
static |
Retrieve the named assembly from G4OCCTAssemblyRegistry and assign the given SDs to matching logical volumes via ApplySDMap.
| detectorName | Assembly name as registered in G4OCCTAssemblyRegistry (equals the DD4hep detector name attribute). |
| assignments | Vector of (volumePattern, sd*) pairs. |
Definition at line 21 of file G4OCCT_STEPAssemblySD.cc.
References G4OCCTSensitiveDetectorMap::Add(), G4OCCTAssemblyVolume::ApplySDMap(), G4OCCTAssemblyRegistry::Get(), and G4OCCTAssemblyRegistry::Instance().