vmc-project / geant4_vmc

GNU General Public License v3.0
6 stars 24 forks source link

How to make use of VecGeomNavigator with ROOT Geometry simulation with Geant4 run configuration through VMC #61

Closed Mehul0111 closed 5 months ago

Mehul0111 commented 5 months ago

I wanted to know how to set the VecGeomNavigator for the ROOT geometry during the simulation when the run configuration is done through Geant4 VMC.

As described below, different navigators can be set through

/// - geomVMCtoGeant4 - geometry defined via VMC, G4 native navigation /// - geomVMCtoRoot - geometry defined via VMC, Root navigation /// - geomRoot - geometry defined via Root, Root navigation /// - geomRootToGeant4 - geometry defined via Root, G4 native navigation /// - geomGeant4 - geometry defined via Geant4, G4 native navigation

TG4RunConfiguration* runConfiguration = new TG4RunConfiguration("geomRoot", "QGSP_BERT_EMV+optical", "stepLimiter+specialCuts");

/// Create the G4 VMC TGeant4* geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration); cout << "Geant4 has been created." << endl;

I do not have any idea how can this be done when someone wants to use VecGeomNavigator. @ihrivnac could you please help here?

I have prepared the geometry based on Tessellated solids

Screenshot from 2024-04-07 13-18-39

and converted it to VG solids. using the converter

auto convertor = TVirtualGeoConverter::Instance(gGeoMan); if(!convertor){ printf("Raytracing a tessellated shape without VecGeom support will just draw a box\n"); }else { convertor->ConvertGeometry(); }

Now I want to perform some simulation using VecGeomNavigator.

ihrivnac commented 5 months ago

Dear @Mehul0111 ,

As you can see from the list of the geometry options, the VecGeomNavigator is not integrated in Geant4 VMC. To my knowledge, it is still under development and not yet in production.

Best regards,