-- AkitakaAriga - 2020-07-23

Installation / usage of GENIE, done for the pilot run analysis

Note

This is Aki's memo when the FASERnu LOI and pilot run analysis. GENIE has a relatively strong dependence on the versions. v2_12_10, which is rather widely used version, is used for this study. However, this version doesn't have a good implementation of charmed particle productions. If one wants to study numu induced charm production channels (and so the background to nutau CC events) he should use GENIE >=3.2.0 (Not released yet as of July 2020).

GENIE web page: http://www.genie-mc.org/

Third-party software packages

GSL

May be not necessary. Use buildin in ROOT

cmake -DGSL_ROOT_DIR=/usr/local ..

wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz

./configure

make

(sudo) make install

Pythia

wget http://home.thep.lu.se/~torbjorn/pythia8/pythia8243.tgz


./configure

make

cd examples

make main01

./main01


ROOT

wget https://root.cern/download/root_v6.18.04.Linux-ubuntu14-x86_64-gcc4.8.tar.gz

gunzip root_v6.18.04.Linux-ubuntu14-x86_64-gcc4.8.tar.gz

tar xvf root_v6.18.04.Linux-ubuntu14-x86_64-gcc4.8.tar

source root/bin/thisroot.sh

6.18 needs cmake 3.9 but it cannot be installed in Ubuntu16.04? Try to install 6.14.

Enable buildin-gsl, mathmore, pythia6, pythia6_nolink throught ./configure

./configure --enable-builtin_gsl

--enable-pythia6

--with-pythia6-libdir=/home/scanner/GENIE/pythia6/lib

--enable-mathmore

cd obj

ccmake .

lhapdf

lhapdf-5.9.1

This was difficult to install for Aki. He got the package directly from Callum.

GENIE installation

GENIE web page: http://www.genie-mc.org/ . Files/instractions are there.

export GENIE=/home/scanner/GENIE/Generator
./configure

export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/home/scanner/GENIE/pythia6/v6_428/lib
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/home/scanner/GENIE/

Environmental variable settings

source $HOME/GENIE/root-6.14.06/obj/bin/thisroot.sh
export GENIE=$HOME/GENIE/Generator/
export LHAPATH=$HOME/GENIE/lhapdf-5.9.1/include/LHA
export PYTHIA6=/usr/local/lib
export GSL_LIB=$HOME/GENIE/gsl-2.6/lib
export GSL_INC=$HOME/GENIE/gsl-2.6/include
export LOG4CPP _INC=$HOME/GENIE/log4cpp/include
export LOG4CPP _LIB=$HOME/GENIE/log4cpp/lib
export LHAPDF_INC=$HOME/GENIE/lhapdf-5.9.1/include
export LHAPDF_LIB=$HOME/GENIE/lhapdf-5.9.1/lib
export LIBXML2_INC=/usr/include/libxml2
export LIBXML2_LIB=/usr/lib64
export PATH=$PATH:$GENIE/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\
$LOG4CPP_LIB:\
$LIBXML2_LIB:\
$LHAPDF_LIB:\
$PYTHIA6:\
$GENIE/lib
source $HOME/GENIE/nuisancegit/build/Linux/setup.sh

Usage

Make splines

The default GENIE doesn't have the cross section splines above 100 GeV. The cross section splines should be calculated in advance

#!/bin/bash

GENIE_DIR=~/generators/GENIE/v2_12_10
THIS_DIR=$GENIE_DIR/making_splines
cfgname=ValenciaQEBergerSehgalCOHRES

if [ -z $GENIE ]; then source $GENIE_DIR/environment_setup.sh; fi;
export GXMLPATH=${GENIE_DIR}/genie_xsec/v2_12_10/NULL/${cfgname}/data

## Event properties
outFile="FASER_numu_2.5M.root"
nuType="14"
# TARG=1000822080
TARG=1000741840

outFile=${nuType}_${TARG}_spline.xml
logFile=${outFile/.xml/.log}

gmkspl -p ${nuType} -t ${TARG} -n 200 -e 10000 -o $outFile --event-generator-list Default+CCMEC+1K &> ${logFile} &

Generate events at 1 TeV

#!/bin/bash

GENIE_DIR=~/GENIE/Generator
THIS_DIR=.
cfgname=ValenciaQEBergerSehgalCOHRES

# source $GENIE_DIR/environment_setup.sh

export GXMLPATH=${GENIE_DIR}/genie_xsec/v2_12_10/NULL/${cfgname}/data

## Event properties
outFile="numu_1TeV_1M.root"
nuType="14"
NEVENTS=1000000
TARG=1000741840

logFile=${outFile/.root/.log}


#nohup
gevgen -n ${NEVENTS} -t ${TARG} -p ${nuType} --cross-sections $THIS_DIR/${nuType}_${TARG}_spline.xml --event-generator-list Default+CCMEC+1K -e 1000 -o ${outFile} > ${logFile} &

Generate events with a flat flux (0,9999 GeV)

#!/bin/bash

GENIE_DIR=~/GENIE/Generator
THIS_DIR=.
cfgname=ValenciaQEBergerSehgalCOHRES

# source $GENIE_DIR/environment_setup.sh

export GXMLPATH=${GENIE_DIR}/genie_xsec/v2_12_10/NULL/${cfgname}/data

## Event properties
outFile="numu_flat_1M.root"
nuType="14"
NEVENTS=1000000
TARG=1000741840

logFile=${outFile/.root/.log}


#nohup
gevgen -n ${NEVENTS} -t ${TARG} -p ${nuType} --cross-sections $THIS_DIR/${nuType}_${TARG}_spline.xml --event-generator-list Default+CCMEC+1K -f ${inFlux},${fluxHist} -e 0.02,9999 -o ${outFile} > ${logFile}

Generate events with FASERnu spectrum

#!/bin/bash

GENIE_DIR=~/GENIE/Generator
THIS_DIR=.
cfgname=ValenciaQEBergerSehgalCOHRES

# source $GENIE_DIR/environment_setup.sh

export GXMLPATH=${GENIE_DIR}/genie_xsec/v2_12_10/NULL/${cfgname}/data

## Event properties
inFlux="FASERnu_EnergySpectrum_Incoming.root"
NEVENTS=1000000
TARG=1000741840

outFile="numu_faser_1M.root"
fluxHist="hnumu"
nuType="14"
logFile=${outFile/.root/.log}

echo ${outFile}
date
gevgen -n ${NEVENTS} -t ${TARG} -p ${nuType} --cross-sections ../${nuType}_${TARG}_spline.xml \
--event-generator-list Default+CCMEC+1K -f ${inFlux},${fluxHist} -e 0.02,9999 -o ${outFile} > ${logFile}

Read GENIE output

GENIE's output is not easy to read. This code (dump_genie) dumps the relevant information into root files.

The Event.C, .h might further help you to deal the data.

  • Makefile: Sample code to read GENIE outputs. This code is modified by Aki from GENIE's sample code "gevscan"

Topic attachments
I Attachment History Action Size Date Who Comment
C source code filec Event.C r1 manage 1.4 K 2020-07-23 - 16:08 AkitakaAriga  
Header fileh Event.h r1 manage 5.0 K 2020-07-23 - 16:08 AkitakaAriga  
Unknown file formatext Makefile r1 manage 2.9 K 2020-07-23 - 16:05 AkitakaAriga Sample code to read GENIE outputs. This code is modified by Aki from GENIE's sample code "gevscan"
C source code filecpp dump_genie.cpp r1 manage 31.1 K 2020-07-23 - 16:05 AkitakaAriga Sample code to read GENIE outputs. This code is modified by Aki from GENIE's sample code "gevscan"
Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2020-07-23 - AkitakaAriga
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    FASER All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback