Differences between revisions 13 and 14
| Deletions are marked like this. | Additions are marked like this. |
| Line 85: | Line 85: |
|
== 2KM vector file location (in Kashiwa) == {{{nue vectors : /kam/scratch/work/jparc/process_2km_k2kcomp/convertneut/vectors_2km/nue/ h2o.neut4.5.1.flux04b_40gev_2.5deg.nue.2km.00[0-9].nfsi.nuance_*.gz }}} {{{ numu vectors : /kam/scratch/work/jparc/process_2km_k2kcomp/convertneut/vectors_2km/numu h2o.neut4.5.1.flux04b_40gev_2.5deg.2km.1*.nfsi.nuance.gz (numbers above 100). the vectors from #30 to #99 (the rest) are in /kam/scratch/store/jparc/process_2km_k2kcomp/2km-dec05-vectors/vectors-*.tar Note that these are 04b vectors (40GeV beam, 2.5 off axis, long decay tunnel) but now the version is >07 (shorter decay tunnel, maybe only 30 Gev beam, I can't remember). }}} |
Contents
Accessing the code from CVS
Please follow the instructions in BU CVS repository and then type:
cvs checkout 2km-geant4
Code pre-requisites
In order to build and use the code you must have installed
- Geant4 (which in turn needs CLHEP)
- The Geant4 hadronic data files need to be installed
- CERNLIB/ROOT (ROOT is not strictly necessary but will be in the future)
Building the G4 code
It should be enough to type "make" or "gmake".
Note: Currently ROOT output is optional so ROOT is not strictly required. This will change soon. ROOT will become the default output and the paw ntuple output will disappear (and with it the CERNLIB requirement). For now in order to build with ROOT please follow the instructions in the README.ROOT file. Namely:
The ROOT code is encapsulated in #ifdefs. If you want to use it, make sure you have a recent version of ROOT installed and ROOTSYS set, and then: gmake clean setenv USE_ROOT 1 gmake rootcint gmake
Running the Simulation
When the program starts it will automatically run the commands in the vis.mac file. This will open a graphics window etc.
By default the simulation is set up to read 2KM vector files(see DataFiles for more information). Specifically it looks for a file called inputvectorfile. You can change this by editing the line:
/mygen/vecfile inputvectorfile
If you would like to use the G4 particle gun instead to manually inject particles in the tank do something like the following:
/mygen/generator normal /gun/particle mu- /gun/energy 1000 MeV /gun/direction 0 0 1 /gun/position 0 0 0 /run/beamOn 1
This will start a 1 GeV muon in the center of the tank and shoot it down the length.
Exercise for students! Calculate the energy you would need to give a muon to for it to travel the entire distance of the water tank. Start a muon at the end of the tank with this energy and confirm it stops about where you expect. Bonus questions: - Why does the length differ from event to event? - Did you assume constant energy loss? - If so, when does this assumption break down?
If you were to type "/run/beamOn 100" you would get a root file with 100 events called jhf2km.root. This is set in vis.mac with:
/JHF2kmIO/RootFile jhf2km.root
2KM vector file location (in Kashiwa)
nue vectors : /kam/scratch/work/jparc/process_2km_k2kcomp/convertneut/vectors_2km/nue/ h2o.neut4.5.1.flux04b_40gev_2.5deg.nue.2km.00[0-9].nfsi.nuance_*.gz
numu vectors : /kam/scratch/work/jparc/process_2km_k2kcomp/convertneut/vectors_2km/numu h2o.neut4.5.1.flux04b_40gev_2.5deg.2km.1*.nfsi.nuance.gz (numbers above 100). the vectors from #30 to #99 (the rest) are in /kam/scratch/store/jparc/process_2km_k2kcomp/2km-dec05-vectors/vectors-*.tar Note that these are 04b vectors (40GeV beam, 2.5 off axis, long decay tunnel) but now the version is >07 (shorter decay tunnel, maybe only 30 Gev beam, I can't remember).