Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cigar #258

Closed
wants to merge 4 commits into from
Closed

Cigar #258

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions macros/Cigar.config.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#/Generator/SingleParticle/particle opticalphoton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the description of the macro (same text as the init file).

#/Generator/SingleParticle/min_energy 7 eV
#/Generator/SingleParticle/max_energy 7 eV
#/Generator/SingleParticle/region INSIDE_CIGAR
/Generator/Kr83mGenerator/region INSIDE_CIGAR

/Geometry/Cigar/pressure 1 bar
/Geometry/Cigar/fiber_diameter 1 mm
/Geometry/Cigar/coating TPB
/Geometry/Cigar/fiber_type Y11
/Geometry/Cigar/gas Xe

/run/verbose 1
/event/verbose 0
/tracking/verbose 0
/process/em/verbose 0

### JOB CONTROL
/nexus/random_seed 1
/nexus/persistency/start_id 0
/nexus/persistency/output_file Cigar
26 changes: 26 additions & 0 deletions macros/Cigar.init.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### --------------------------------------------------------
### This init macro simulates the response of a SensL SiPM DICE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the description of the macro to what it actually does.

### board in the black box.
### --------------------------------------------------------

/control/execute macros/physics/DefaultPhysicsList.mac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the default physics, do not repeat the 13-18 lines. Make sure you actually want to use the default list, otherwise, just remove this line.

/tracking/verbose 1
/nexus/RegisterGeometry Cigar
#/nexus/RegisterGenerator SingleParticleGenerator
/nexus/RegisterGenerator Kr83mGenerator
/nexus/RegisterPersistencyManager PersistencyManager

/PhysicsList/RegisterPhysics G4EmStandardPhysics_option4
/PhysicsList/RegisterPhysics G4DecayPhysics
/PhysicsList/RegisterPhysics G4RadioactiveDecayPhysics
/PhysicsList/RegisterPhysics G4OpticalPhysics
/PhysicsList/RegisterPhysics NexusPhysics
/PhysicsList/RegisterPhysics G4StepLimiterPhysics
### ACTIONS

/nexus/RegisterRunAction DefaultRunAction
/nexus/RegisterTrackingAction DefaultTrackingAction
/nexus/RegisterTrackingAction OpticalTrackingAction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpticalTrackingAction saves all optical photons. Why do you need that? It creates very huge files and should be used only for debugging. Please, use the default tracking action instead.

/nexus/RegisterSteppingAction AnalysisSteppingAction

/nexus/RegisterMacro macros/Cigar.config.mac
64 changes: 64 additions & 0 deletions running_nexus.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file, you may have added it by mistake.


# Geant4 Path, edit G4Install path to where the main geant4 code folder your downloaded
export G4INSTALL=/home/investigator/Documents/simulation_software//geant4-v11.0.2/install;
export PATH=$G4INSTALL/bin:$PATH;
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$G4INSTALL/lib;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$G4INSTALL/lib;

echo geant4;

cd $G4INSTALL/bin;
source geant4.sh;
cd -;

echo g4finished;

export QT_PATH=/home/investigator/Qt/5.15.2/gcc_64;
export PATH=$QT_PATH/bin:$PATH;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QT_PATH/lib;
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$QT_PATH/lib;

echo QT;

# Path to GSL
export GSL_PATH=/usr/local;
export PATH=$GSL_PATH/bin:$PATH;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GSL_PATH/lib;
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GSL_PATH/lib;

echo gsl;

# Path to HDF5
export HDF5_PATH=/usr/local/hdf5; # Set the installation path of HDF5
export HDF5_LIB=/usr/local/hdf5/lib; # Set the path to HDF5 libraries
export HDF5_INC=/usr/local/hdf5/include; # Set the path to HDF5 headers

echo hdf5;

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HDF5_LIB;
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HDF5_LIB;

echo sourcing;

# Source the default nexus setup file to set the nexusdir environmental variable
source /home/$USER/Documents/simulation_software/nexus_original/scripts/nexus_setup.sh;

echo sourced;

# Add the nexus exe to the path
export PATH=$PATH:/home/$USER/Documents/simulation_software/nexus_original/bin;

#cmake compilation
cmake_compile () {
cmake --build build --target install
cd build;
cmake ..;
cmake --build . -j 32;
cd ..;
}

echo "Setup Nexus is complete!"
echo "To compile run cmake_compile"


Loading
Loading