_Geant4 Version:_11.01
_Operating System:_Ubuntu 22.04
_Compiler/Version:_GCC 11.4.0 x86_64-linux-gnu
_CMake Version:_3.23.1
Hello,
I am trying to assign importance to a G4PVParameterised volume.
So I’ve tried two method
- Using SetBaisWeight function for logical volume
- G4IStore AddImportanceGeometryCell from Geant4 exmaple/extended/biasing/B01
but both way seem not appliable to G4PVParameterised volume.
For the SetBiasWeight function, I tried two approach.
a. SetBiasWeight for *pLogical, from
b. SetBiasWeight for logical volumes one by one, by accessing G4VPVParameterisation pParam, calling each G4PhysicalVolume* phy, phy->GetLogicalVolume()->SetBiasWeight(G4double 2.0), inside ComputeMaterial member function since this function has G4int repNo and G4VPhysicalVolume currentVol as parameters.
G4Material* TETParameterisation::ComputeMaterial(const G4int copyNo,
G4VPhysicalVolume* phy,
const G4VTouchable* )
{
phy->GetLogicalVolume()->SetBiasWeight(3);
return (some G4Material* type thing)
}
but both approach seem, simply not apply importance to a G4PVParameterised volume.
For the exmaple/extended/biasing/B01 method, I also tried two approach.
a. use AddImportanceGeometryCell to G4PVParameterised volume.
G4IStore* istore = G4IStore::GetInstance();
istore->AddImportanceGeometryCell(1, *fWorldPhysical, 0);
istore->AddImportanceGeometryCell(3, *ParameterisedVolume, 1);
Since G4PVParameterised is inheriting from G4VReplica, and G4VReplica is inheriting from G4VPhysicalVolume, I thought this apporach may work.
b. declare G4IStore instance inside the constructor of G4PVParameterisation, use AddImportanceGeometryCell function inside ComputeMaterial member function one by one for the G4VPhysicalVolume* currentVol, returns G4IStore instance to the main.cpp
for a. approach, it returns exception error
EEEE ------- G4Exception-START -------- EEEE -------
G4Exception : GeomBias0002
issued by : G4IStore::Error()
AddImportanceGeometryCell() - Physical volume not found!
Fatal Exception *** core dump ***
Track information is not available at this moment
Step information is not available at this moment
EEEE -------- G4Exception-END --------- EEEE ------
*** G4Exception: Aborting execution ***
Aborted (core dumped)
for b. approach, during RunManager’s Initialize() operation, segmentaion error occurs.
So my question is these
- Geometry Biasing for G4PVParameterised volume is possible?
- If so, using SetBiasWeight or AddImportanceGeometryCell is appropriate way for G4PVParameterised volume? It should work but did I something wrong or should I use other method?
Thank you