WenjieWu-Sci / FLArE

Simulation code for R&D of the FLArE detector
2 stars 0 forks source link

FLArE

Simulation code for R&D of the FLArE detector nutau evt display

Setting up on lxplus

The LXPLUS service at CERN (lxplus.cern.ch) provides a cluster of machines for interactive computing as well as access to the HTCondor batch system for job submission. Provided you have a valid CERN computing account, you can access LXPLUS following these instructions:

  1. Visit the list of services at the CERN Resources Portal, and search for boxes: LXPLUS and Linux, AFS Workspaces, EOS/CERNBox.
  2. Subscribe to LXPLUS and Linux
  3. Subscribe and setup your AFS Workspaces: you can have up to 10GB in /afs/cern.ch/user/<initial>/<username> and up to 100GB in /afs/cern.ch/work/<initial>/<username>. You can set these limits from the Settings in the "AFS Workspace".
  4. Subscribe to EOS/CERNBox and login to cernbox: https://cernbox.cern.ch/. This will allow you access to /eos/user/<initial>/<username> with up to 1TB of space.

Users are recommended to setup code in their AFS Workspace areas and use their EOS/CERNBox for long term data storage. A simple script is provided to setup the relevant software dependencies in the LXPLUS environment.

source lxplus_setup.sh

To compile the code

The minimal software requirements are:

These are automatially satisfied once the lxplus_setup.sh script is sourced. There is no longer an explicit GENIE dependency. However, the input GENIE ghep files need to be converted in the gst format (plain ROOT tree). The conversion can be perfomed with the native GENIE utility gntpc.

Run the simulation

Once the code has been compiled, the simulation can be run by passing a macro file to the FLArE executable:

./FLArE /path/to/macro.mac

Several examples of macros are available in the macros directory. The detector geometries can be easily imported by including one of the macros in macros\geometry_options. If no macro is passed as argument, the default is macros\vis.mac which simply displays the current geometry.

Single particles

There are several .mac macros in macros\single_particle directory: LAr_e-_mono.mac, LAr_mu-_mono.mac, etc. As denoted by the name, they're used to simulate single e-/mu-/... particles inside the FLArE volume. To run a simulation, just do ./FLArE macros/single_particle/LAr_e-_mono.mac. If you want to modify the energy you intend to simulate, modify the parameters inside the mac scripts.

Neutrino events

Neutrino events are generated by reading nu-Ar interaction vertexes from GENIE output files and transposing the final states particles in Geant4. These GENIE gst files are available for all users in \eos\user\m\mvicenzi\genie. Example macros can be found in macros: numu_genie.mac, nue_genie.mac, nutau_genie.mac.

Macro commands

Geometry

Command Description Default
/det/saveGdml option for saving detector geometry in a GDML file, run before /run/initialize false
/det/checkOverlap check overlap of volumns during detector construction, run before /run/initialize false
/det/addFLArE option for adding the FLArE detector, run before /run/initialize true
/det/addFLArEPos position of the FLArE detector, run before /run/initialize 0 0 4300 mm
/det/material option for detector material, choose LAr or LKr, run before /run/initialize LAr
/det/module option for tpc module option, choose single or 3x7, run before /run/initialize single
/det/field option for setting the magnetic field value in FLArE HadCather and Muon Finder 1 T
/det/addFORMOSA option for adding the FORMOSA detector, run before /run/initialize true
/det/addFORMOSAPos position of the FORMOSA detector, run before /run/initialize 0 0 13870 mm
/det/addFASERnu2 option for adding the FASERnu2 detector, run before /run/initialize true
/det/addFASERnu2Pos position of the FASERnu2 detector, run before /run/initialize 0 0 22023 mm
/det/addFASER2 option for adding the FASER2 detector, run before /run/initialize true
/det/addFASER2Pos position of the FASER2 detector, run before /run/initialize 0 0 42636 mm
/det/magnetGeom option for FASER2 magnet geometry, choose SAMURAI or CrystalPulling SAMURAI
/det/magnetField option for setting the FASER2 magnetic field value 1 T
/det/magnetWinX option for SAMURAI magnet window size along X axis 3.0 m
/det/magnetWinY option for SAMURAI magnet window size along Y axis 1.0 m
/det/magnetWinZ option for SAMURAI magnet window size along Z size 4.0 m
/det/yokeThickX option for SAMURAI yoke thickness along X axis 1.5 m
/det/yokeThickY option for SAMURAI yoke thickness along Y axis 2.0 m
/det/magnetNumber option for number of CrystalPulling magnets 3
/det/magnetInnerR option for CrystalPulling magnet inner radius 0.8 m
/det/magnetOuterR option for CrystalPulling magnet outer radius 1.2 m
/det/magnetLengthZ option for CrystalPulling magnet size along Z axis 1.25 m
/det/magnetGap option for gap length (along Z) between CrystalPullin magnets 0.5 m
/det/trackingNumber option for number of FASER2 tracking stations in each assembly 6
/det/trackingNBarsX option for number of vertical scintillator bars (segmentation along X axis) 7
/det/trackingNBarsY option for number of horizontal scintillator bars (segmentation along Y axis) 3
/det/trackingScinThick option for scintillator bar thickness (along Z) in tracking layers 1.0 cm
/det/trackingGap option for gap length (along Z) between tracking stations, and gap to magnet 0.5 m

Event generators

Command Description
/genie/useGenie option for PrimaryGeneratorMessenger, set true to read neutrino interactions from GENIE
/genie/genieInput if useGenie is true, give which .ghep.root file to read GENIE events
/genie/genieIStart if useGenie is true, give the start position of the file to read GENIE events

Analysis

Command Description
/histo/fileName option for AnalysisManagerMessenger, set name of the file saving all analysis variables
/histo/saveHit if true save information for all hits, false in default to save space
/histo/save3DEvd if true save 3D spatial distribution of energy deposition, false in default
/histo/save2DEvd if true save 2D spatial distribution of energy deposition, false in default
/histo/circleFit if true run circle fitting and save information in output, false in default to save space
/histo/addDiffusion if toy diffuse energy, if single diffuse single electron, false in default without diffusion

How to save an event display with high resolution using the DAWN Event Display

There is this tutorial for use at the October 2003 Fermilab Geant4 Tutorial.

Some initial results

cern indico 1

cern indico 2