vmc-project / geant4_vmc Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hello,
I was recently using geant4_vmc to turn off some processes in a few materials for my simulation application.
The process is described in:
https://vmc-project.github.io/user-guide/geant4_vmc/physics-lists/
Looking through the source code, it became apparent that the process names one needs to specify are the ones from Geant3. A "list" can be found in:
This may well be an issue of my setup, but since updating to geant4_vmc-6.2
(and correspondingly, Geant 4.11.1.0) I observe the following when running tests, here for example with test E06 run manually:
$ unset DISPLAY
$ ./g4vmc_testE06
...
### Processes mapped to VMC codes ok
TG4ComposedPhysicsList::ConstructProcess done
Available UI session types: [ Qt, Xm, tcsh, csh ]
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Aborted
I did not see an obviously related change in the code to this, so it might be something in my environment which is different. I observe the same with the ROOT macro based tests.
Do you have an idea what could be wrong? Any help / pointers to find the cause are appreciated :-).
Hello,
The Geant4 Documentation is quite extensive concerning the use of generic biasing:
https://geant4-userdoc.web.cern.ch/UsersGuides/AllGuides/html/ForToolkitDeveloper/GuideToExtendFunctionality/EventBiasing/eventBiasing.html
I also saw the possibility of adding the +biasing option in the TG4RunConfiguration, as can be seen in https://github.com/vmc-project/geant4_vmc/blob/b1442f7bbbf44617fbeca7fb2491eee76df121e0/examples/E03/g4tgeoConfig6.C
This should allow the use of generic biasing in a way compatible with the use of geant4_vmc.
However looking through some of the code, it seems this was implemented in a way to use icnlxx physics for some media.
I was not able to figure out how to use this method more generally in order to i.e. boost a certain cross section by a fixed factor.
Is this possible with the tools currently available in geant4_vmc? In any case I would be very grateful for some insights regarding this.
_ROOT Version: 6.18.04
_Platform: Windows 10
_Compiler: Visual Studio 2019
I’m trying to setup geant4_vmc following the installation instructions provided. There seems to be some issue finding ROOT when I run Cmake as follows:
cmake -DCMAKE_INSTALL_PREFIX="%HOMEPATH%\geant4_vmc\geant4_vmc_install" “%HOMEPATH%\geant4_vmc\geant4_vmc.4.0.p1” -DROOT_DIR=“C:\Users\Stephen\ROOT\root_v6.18.04” -DGeant4_DIR=“C:\Users\Stephen\Geant4\geant4_10_06_p01”
and I get the error
I've been told that the error is coming from this line, but I don't know how to rectify the problem.
If anyone had a fix for this issue I would really appreciate it. I'm quite new to both Geant4 and ROOT so apologies if this is trivial or poorly worded.
Hi,
i'm getting this when trying to compile master:
[ 2%] Building CXX object g4root/test/OpNovice/CMakeFiles/g4root_OpNovice.dir/src/OpNovicePhysicsList.cc.o
/home/mkrzewic/alfa/sw/SOURCES/GEANT4_VMC/master_O2/0/g4root/test/OpNovice/src/OpNovicePhysicsList.cc: In member function ‘void OpNovicePhysicsList::ConstructDecay()’:
/home/mkrzewic/alfa/sw/SOURCES/GEANT4_VMC/master_O2/0/g4root/test/OpNovice/src/OpNovicePhysicsList.cc:127:45: error: ‘GetParticleIterator’ was not declared in this scope
auto particleIterator=GetParticleIterator();
^
/home/mkrzewic/alfa/sw/SOURCES/GEANT4_VMC/master_O2/0/g4root/test/OpNovice/src/OpNovicePhysicsList.cc: In member function ‘void OpNovicePhysicsList::ConstructEM()’:
/home/mkrzewic/alfa/sw/SOURCES/GEANT4_VMC/master_O2/0/g4root/test/OpNovice/src/OpNovicePhysicsList.cc:165:45: error: ‘GetParticleIterator’ was not declared in this scope
auto particleIterator=GetParticleIterator();
^
/home/mkrzewic/alfa/sw/SOURCES/GEANT4_VMC/master_O2/0/g4root/test/OpNovice/src/OpNovicePhysicsList.cc: In member function ‘void OpNovicePhysicsList::ConstructOp()’:
/home/mkrzewic/alfa/sw/SOURCES/GEANT4_VMC/master_O2/0/g4root/test/OpNovice/src/OpNovicePhysicsList.cc:240:6: error: ‘IsMasterThread’ is not a member of ‘G4Threading’
if(G4Threading::IsMasterThread())
^~~~~~~~~~~
/home/mkrzewic/alfa/sw/SOURCES/GEANT4_VMC/master_O2/0/g4root/test/OpNovice/src/OpNovicePhysicsList.cc:247:45: error: ‘GetParticleIterator’ was not declared in this scope
auto particleIterator=GetParticleIterator();
^
g4root/test/OpNovice/CMakeFiles/g4root_OpNovice.dir/build.make:134: recipe for target 'g4root/test/OpNovice/CMakeFiles/g4root_OpNovice.dir/src/OpNovicePhysicsList.cc.o' failed
make[2]: *** [g4root/test/OpNovice/CMakeFiles/g4root_OpNovice.dir/src/OpNovicePhysicsList.cc.o] Error 1
CMakeFiles/Makefile2:160: recipe for target 'g4root/test/OpNovice/CMakeFiles/g4root_OpNovice.dir/all' failed
make[1]: *** [g4root/test/OpNovice/CMakeFiles/g4root_OpNovice.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Dear Ivana,
since d11d164 it seems that the installed PCM references source paths at runtime which were only available during build time.
To better explain, here's what I see:
libgeant4vmc dictionary payload:44:10: fatal error: '/var/tmp/portage/sci-physics/geant-vmc-9999/work/geant-vmc-9999/source/run/include/TG4RunConfiguration.h' file not found
#include "/var/tmp/portage/sci-physics/geant-vmc-9999/work/geant-vmc-9999/source/run/include/TG4RunConfiguration.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<ERROR> 2020-04-21 00:11:43 <ROOT-TInterpreter::A>(not set ) Error parsing payload code for class TG4RunConfiguration with content:
That's after compiling with:
/var/tmp/portage/sci-physics/geant-vmc-9999/work/geant-vmc-9999
being the source directory and
/var/tmp/portage/sci-physics/geant-vmc-9999/work/geant-vmc-9999_build
being the build directory.
I purge both directories after installation (I used -DCMAKE_INSTALL_PREFIX=/usr
) but the installed PCM is still referencing the source location valid at build-time instead of referencing the installed sources or honouring ROOT_INCLUDE_PATH
.
You can easily reproduce by using a temporary source and build directory, installing to a prefix, and afterwards running:
root[0] TGeant4
which will immediately trigger the issue.
Sadly, I am not an expert of the CMake macros shipped with ROOT...
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
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.
Hi,
when using FairRoot with geant4_vmc to create a new ion via the following function
TVirtualMC->DefineIon(ion->GetName(), ion->GetZ(), ion->GetA(), ion->GetQ(),
ion->GetExcEnergy(),ion->GetMass());
I get in some cases an unexpected pdg code (see example below). Trying to create several La isotopes with a different number of neutrons (z always 57) for three isotopes the pdg code indicates that the isotope is in an excited state. All other isotopes have the expected pdg code.
[INFO ] Going to register ion Ion_120_57_0 with pdg code 1000571200 and (Z,A,Q,ExcEnergy,Mass) 57, 120, 57, 0.000, 112.6 (log from FairRoot)
Adding ion with Z, A, Q, excEnergy [keV]: 57 120 57 0 (log from TG4ParticlesManager.cxx )
Adding particle to TDatabasePDG
name: La120[0.000]
g4name: Ion_120_57_0
PDG: 1000571201
pdgQ: 57
type: Ion
For me it is not clear if the problem is in geant4_vmc or Geant4 itself.
Hi,
I am developing FairRoot based package and need to transport light exotical ion with defined mass using it. I am using FairRunSim::AddNewIon(2 /Z/, 10 /A/, 2 /Q/, 0. /Exc/, 10/Gev/), for example to create new ion. But I see in the log that an ion is created with a mass different from the one I set.
I have investigate this problem and see that defined mass skipped in
Bool_t TG4PhysicsManager::DefineIon(const char* name, Int_t Z, Int_t A, Int_t Q,
Double_t excEnergy, Double_t /*mass*/)
Is it possible to correct the creation of an ion by replacing the G4IonTable::GetIon,
on G4IonTable::Insert()?
I can create Pull Request on this, but maybe you know in advance that this is a bad idea and stop me)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.