tomeichlersmith / hps

0 stars 0 forks source link

Run hps-mc #1

Closed tomeichlersmith closed 2 years ago

tomeichlersmith commented 2 years ago

From cam Here is my bashrc, you don't need to use the whole thing but you can find the parts you need in there

/sdf/group/hps/users/bravo/setup/bashrc.sh

you can make a ~/.hpsmc and put this in it:

[MG4]
madgraph_dir = /sdf/group/hps/users/bravo/src/hps-mc/generators/madgraph4/src

[MG5]
madgraph_dir = /sdf/group/hps/users/bravo/src/hps-mc/generators/madgraph5/src

[EGS5]
egs5_dir = /sdf/group/hps/users/bravo/src/hps-mc/generators/egs5

[StdHepConverter]
egs5_dir = /sdf/group/hps/users/bravo/src/hps-mc/generators/egs5

[SLIC]
slic_dir = /sdf/group/hps/users/bravo/src/slic/install
hps_fieldmaps_dir = /sdf/group/hps/users/bravo/src/hps-fieldmaps
detector_dir = /sdf/group/hps/users/bravo/src/hps-java/detector-data/detectors

[JobManager]
hps_java_bin_jar = /sdf/home/b/bravo/.m2/repository/org/hps/hps-distribution/5.1-SNAPSHOT/hps-distribution-5.1-SNAPSHOT-bin.jar
java_args = -Xmx3g -XX:+UseSerialGC

[FilterBunches]
hps_java_bin_jar = /sdf/home/b/bravo/.m2/repository/org/hps/hps-distribution/5.1-SNAPSHOT/hps-distribution-5.1-SNAPSHOT-bin.jar
conditions_url = jdbc:sqlite:/sdf/group/hps/users/bravo/db/hps_conditions_test.db

[ExtractEventsWithHitAtHodoEcal]
hps_java_bin_jar = /sdf/home/b/bravo/.m2/repository/org/hps/hps-distribution/5.1-SNAPSHOT/hps-distribution-5.1-SNAPSHOT-bin.jar
conditions_url = jdbc:sqlite:/sdf/group/hps/users/bravo/db/hps_conditions_test.db

[HPSTR]
hpstr_install_dir = /sdf/group/hps/users/bravo/src/hpstr/install
hpstr_base = /sdf/group/hps/users/bravo/src/hpstr

[LCIOCount]
lcio_bin_jar = /sdf/home/b/bravo/.m2/repository/org/lcsim/lcio/2.7.4-SNAPSHOT/lcio-2.7.4-SNAPSHOT-bin.jar

[LCIOMerge]
lcio_bin_jar = /sdf/home/b/bravo/.m2/repository/org/lcsim/lcio/2.7.4-SNAPSHOT/lcio-2.7.4-SNAPSHOT-bin.jar

[EvioToLcio]
hps_java_bin_jar = /sdf/home/b/bravo/.m2/repository/org/hps/hps-distribution/5.1-SNAPSHOT/hps-distribution-5.1-SNAPSHOT-bin.jar
java_args = -Xmx3g -XX:+UseSerialGC

though you won't be able to access my hps-java or lcio so you can install that into your own home directory by downloading the hps-java code and doing alias mvnclbd='mvn clean install -DskipTests=true -Dcheckstyle.skip'

I sent that as an alias because I alias it because I use it so much

you also want to do the same command in hps-lcio (edited)

export JAVA_HOME=/sdf/group/hps/users/bravo/src/jdk-15.0.1
export PATH=/sdf/group/hps/users/bravo/src/jdk-15.0.1/bin:/sdf/group/hps/users/bravo/src/apache-maven-3.6.3/bin:$PATH

those two commands in my bashrc will get the java env setup for you you can just use my slic install, which is what the .hpsmc will take care of for you (edited) you also might want to get rid of the conditions_url lines in my .hpsmc those I have there because I was testing some calibration stuff I put into our conditions database

tomeichlersmith commented 2 years ago

Outline of setup commands so far, will need to update with more thorough notes

At SLAC SDF

cd /sdf/groups/hps/users
mkdir $USER
cd eichl008
git clone git@github.com:tomeichlersmith/hps
cd hps
git clone git@github.com:jeffersonlab/hps-java java
git clone git@github.com:jeffersonlab/hps-lcio lcio
cp /sdf/group/hps/users/bravo/setup/bashrc.sh .
# copy .hpsmc text into file called hpsmc in this directory
source bashrc.sh # saw some errors, will need to update it
cd java
mvncbld # alias from bashrc.sh
cd ../lcio
mvnclbd
tomeichlersmith commented 2 years ago

Need additional packages

python3 -m pip install --user --upgrade cmake uproot matplotlib numpy jupyterlab
tomeichlersmith commented 2 years ago

GSL here:

/sdf/group/hps/users/bravo/src/gsl-2.6/install
tomeichlersmith commented 2 years ago

Able to start a tritrig example run

cd hps/mc/examples/tritrig
hps-mc-job run -d $PWD/scratch tritrig job.json
tomeichlersmith commented 2 years ago

Failed to find egs5 executable, realized defaults for all HPSMC_* cmake options are OFF so I need to update the cmake command using hps-mc/build.sh as reference.