Skip to content
Snippets Groups Projects
Commit 473fa83e authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* Adding automatic generation of vis.mac verbose.mac and

* PhysicsListOption.txt when file does not exist
        - Avoid dev to push there personal setting on the server
        - transparent for user, as file is generated on the fly if not
          customization is present
parent d9b4d1df
No related branches found
No related tags found
No related merge requests found
......@@ -150,4 +150,23 @@ target_Link_libraries(npsimulation ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} NPSCore
configure_file(ressources/macro/gui.mac.in ressources/macro/gui.mac @ONLY)
configure_file(ressources/macro/aliases.mac.in ressources/macro/aliases.mac @ONLY)
# Generate vis.mac file if does not exist
if(EXISTS ressources/macro/vis.mac)
else()
configure_file(ressources/macro/vis.mac.in ressources/macro/vis.mac @ONLY)
endif()
# Generate verbose.mac file if does not exist
if(EXISTS ressources/macro/verbose.mac)
else()
configure_file(ressources/macro/verbose.mac.in ressources/macro/verbose.mac @ONLY)
endif()
# Generate PhysicsListOption file if does not exist
if(EXISTS PhysicsListOption.txt)
else()
configure_file(ressources/input/PhysicsListOption.txt.in PhysicsListOption.txt @ONLY)
endif()
install(PROGRAMS npsimulation DESTINATION ${CMAKE_BINARY_OUTPUT_DIRECTORY})
......@@ -113,10 +113,12 @@ int main(int argc, char** argv){
G4VisManager* visManager=NULL;
if(!OptionManager->GetG4BatchMode()){
#ifdef G4UI_USE
#ifdef G4VIS_USE
string Path_Macro = getenv("NPTOOL");
Path_Macro+="/NPSimulation/ressources/macro/";
UImanager->ApplyCommand("/control/execute " +Path_Macro+"verbose.mac");
#ifdef G4VIS_USE
UImanager->ApplyCommand("/control/execute " +Path_Macro+"aliases.mac");
visManager = new G4VisExecutive("Quiet");
visManager->Initialize();
......@@ -160,4 +162,4 @@ int main(int argc, char** argv){
delete runManager;
RootOutput::getInstance()->Destroy();
return 0;
}
\ No newline at end of file
}
EmPhysicsList Option4
DefaultCutOff 1
IonBinaryCascadePhysics 0
NPIonInelasticPhysics 1
NPIonInelasticPhysics 0
EmExtraPhysics 0
HadronElasticPhysics 0
StoppingPhysics 0
OpticalPhysics 0
HadronPhysicsINCLXX 0
HadronPhysicsQGSP_BIC_HP 0
Decay 1
Decay 0
# Sets some default verbose
/control/verbose 0
/run/verbose 0
/material/verbose 0
/tracking/verbose 0
/cuts/verbose 0
/process/em/verbose 0
/process/eLoss/verbose 0
......@@ -15,43 +15,36 @@
#
# Use this open statement to create an OpenGL view:
/vis/open OGLI 1200x600-0+0
# use VRML viewer
#/vis/open VRML2FILE
#
# Draw geometry:
/vis/drawVolume
#
# Set the default view
# Specify view angle:
/vis/viewer/set/viewpointThetaPhi 45. 45.
#
# Specify zoom value:
/vis/viewer/zoom 1.
#
# Specify style (surface or wireframe):
/vis/viewer/set/style surface
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
# Select colour by particle ID:
/vis/modeling/trajectories/create/drawByParticleID
#/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByParticleID-0/default/setStepPtsSize 2
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
#
# To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/verbose 0
#/vis/viewer/set/background black
/vis/viewer/set/background white
# Set the background color
/vis/viewer/set/background black
# print Option
#/vis/ogl/set/printMode vectored
#/vis/ogl/set/transparency true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment