Skip to content

bsathian/TrackLooper-1

 
 

Repository files navigation

TrackLooper

Quick Start

Setting up LSTPerformanceWeb (only for lnx7188)

For lnx7188 this needs to be done once

cd /cdat/tem/${USER}/
git clone git@github.com:SegmentLinking/LSTPerformanceWeb.git

Running the code

git clone --recursive git@github.com:SegmentLinking/TrackLooper.git
cd TrackLooper/
source setup.sh
# source setup_cgpu.sh # if you are on cgpu-1
sdl_make_tracklooper -mc
sdl -i PU200 -o LSTNtuple.root
createPerfNumDenHists -i LSTNtuple.root -o LSTNumDen.root
lst_plot_performance.py LSTNumDen.root -t "myTag"
# python3 efficiency/python/lst_plot_performance.py LSTNumDen.root -t "myTag" # if you are on cgpu-1

The above can be even simplified

git clone --recursive git@github.com:SegmentLinking/TrackLooper.git
cd TrackLooper/
source setup.sh
# source setup_cgpu.sh # if you are on cgpu-1
sdl_run -f -mc -s PU200 -n -1 -t myTag

Instructions

Log on to phi3 or lnx7188 Go to your working directory

mkdir /go/to/your/working/directory
cd /go/to/your/working/directory

Clone the repository

git clone git@github.com:SegmentLinking/TrackLooper.git
cd TrackLooper/

Once every new shell, source the setup script to initilaize the enviornment.

source setup.sh

Compile the code with option flags

sdl_make_tracklooper -mc
-c: run with the cmssw caching allocator
-h: show help screen with all options

Run the code

sdl -n <nevents> -v <verbose> -w <writeout> -s <streams> -i <dataset> -o <output>

-i: PU200; muonGun, etc
-n: number of events
-v: 0-no printout; 1- timing printout only; 2- multiplicity printout
-s: number of streams/events in flight
-w: 0- no writout; 1- minimum writeout; 2- full ntuple writeout
-o: provide an output root file name (e.g. LSTNtuple.root)

Plotting numerators and denominators of performance plots

createPerfNumDenHists -i <input> -o <output> [-g <pdgids> -n <nevents>]

-i: Path to LSTNtuple.root
-o: provide an output root file name (e.g. num_den_hist.root)
-n: (optional) number of events
-g: (optional) comma separated pdgids to add more efficiency plots with different sim particle slices

Plotting performance plots

lst_plot_performance.py num_den_hist.root -t "mywork"

When running on cgpu-1 remember to specify python3 as there is no python. The shebang on the lst_plot_performance.py is not updated as lnx7188 works with python2....

python3 efficiency/python/lst_plot_performance.py num_den_hist.root -t "mywork" # If running on cgpu-1

Comparing two different runs

lst_plot_performance.py \
    num_den_hist_1.root \     # Reference
    num_den_hist_2.root \     # New work
    -l BaseLine,MyNewWork \   # Labeling
    -t "mywork"

CMSSW Integration

This is the a complete set of instruction on how the TrackLooper code can be linked as an external tool in CMSSW:

Build TrackLooper

git clone git@github.com:SegmentLinking/TrackLooper.git
cd TrackLooper/
source setup.sh
sdl_make_tracklooper -m8xc2
cd ..

Set up TrackLooper as an external

export SCRAM_ARCH=slc7_amd64_gcc10

go the one folder above the TrackLooper

cmsrel CMSSW_13_0_0_pre4
cd CMSSW_13_0_0_pre4/src
cmsenv
git cms-init
git remote add lst-cmssw git@github.com:SegmentLinking/cmssw.git
git fetch lst-cmssw CMSSW_13_0_0_pre4_LST_X
git cms-addpkg RecoTracker
git checkout CMSSW_13_0_0_pre4_LST_X
git cms-addpkg Configuration
cat <<EOF >lst.xml
<tool name="lst" version="1.0">
  <client>
    <environment name="LSTBASE" default="$PWD/../../TrackLooper"/>
    <environment name="LIBDIR" default="\$LSTBASE/SDL"/>
    <environment name="INCLUDE" default="\$LSTBASE"/>
  </client>
  <runtime name="LST_BASE" value="\$LSTBASE"/>
  <lib name="sdl"/>
</tool>
EOF
compile the TrackLooper repository if you haven’t
scram setup lst.xml
cmsenv
git cms-checkdeps -a
scram b -j 12
cd RecoTracker/LST/test/
cmsRun LSTAlpakaTester.py

Including the line

<use name="lst"/>

in the relevant package BuildFile.xml allows for including our headers in the code of that package.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 65.0%
  • Cuda 23.3%
  • Python 8.6%
  • HTML 1.1%
  • Shell 0.8%
  • Makefile 0.6%
  • Other 0.6%