villano-lab / k100Sim

Geant4 simulation for the K100 cryogenic setup at UMN
MIT License
0 stars 2 forks source link

Update Shielding physics list for Geant4.10.7.2 -- had a hack in place for 4.10.1.2 #6

Open villaa opened 2 years ago

villaa commented 2 years ago

The error comes up for the Shielding list hack:

In file included from /Users/villaa/k100Sim/k100Sim.cc:41:
In file included from /Users/villaa/k100Sim/include/Shielding_ComptonsUpdate.hh:72:
/Users/villaa/k100Sim/include/Shielding_ComptonsUpdate.icc:75:10: fatal error: 'G4DataQuestionaire.hh' file not found

I think this basically puts the updated version of compton scattering from Monash--which should now be released in Geant4

villaa commented 2 years ago

To be clear this is an error on compilation (make) after the CMake command.

villaa commented 2 years ago

Found on this Geant4 Release Notes for Geant4.10.6 that the class G4DataQuestionaire was removed. We were using it in a trivial way (constructed object but never used) here:

https://github.com/villano-lab/k100Sim/blob/a78dc1e9028c748437161641a8e3e9c05343ef79/include/Shielding_ComptonsUpdate.icc#L84

and here:

https://github.com/villano-lab/k100Sim/blob/a78dc1e9028c748437161641a8e3e9c05343ef79/include/Shielding_ComptonsUpdate.icc#L123

and the class was included at the top of the file. I removed them and got the thing to compile with CMake/Make on MacOSX Mojave (10.14.6).

villaa commented 2 years ago

It compiled but now getting the following error:

---> I am in a smart tcsh terminal ;-) .
 Macro macros/pubeTest.mac is being run 
***** COMMAND NOT FOUND </vis/scene/create> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
      issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

I'm not sure if the visualization is installed by default (X11 XQuartz?).

villaa commented 2 years ago

I've tried a lot of stuff to get this visualization working, to no avail. I guess it should be a separate issue and we can move on from here. Here are some of the things tried (on Mac OSX Mojave 10.14.6):

The final cmakes used were:

cmake -DCMAKE_INSTALL_PREFIX=/Users/villaa/install/geant4/geant4.10.07.p03-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON -DEXPAT_INCLUDE_DIR=/usr/local/Cellar/spack/0.17.1/opt/spack/darwin-mojave-skylake/apple-clang-10.0.1/expat-2.4.1-g632j2sopjn6ro46q7cqbfx4em2hajqb/include -DEXPAT_LIBRARY=/usr/local/Cellar/spack/0.17.1/opt/spack/darwin-mojave-skylake/apple-clang-10.0.1/expat-2.4.1-g632j2sopjn6ro46q7cqbfx4em2hajqb/lib/libexpat.dylib /Users/villaa/install/geant4/geant4.10.07.p03

To make G4 and then:

cmake -DGeant4_DIR=/Users/villaa/install/geant4/geant4.10.07.p03-install -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON /Users/villaa/install/geant4/geant4.10.07.p03-install/share/Geant4-10.7.3/examples/basic/B1

to build the application. I build the example application just to be sure nothing wrong with the code. I also had these env variables set:

export G4EXPAT_PATH=/usr/local/Cellar/spack/0.17.1/opt/spack/darwin-mojave-skylake/apple-clang-10.0.1/expat-2.4.1-g632j2sopjn6ro46q7cqbfx4em2hajqb/lib/
export G4VIS_USE_OPENGLX=1

The first one sets the location of my (spack) installed EXPAT.