Code Monkey home page Code Monkey logo

tracklooper's Introduction

TrackLooper

Quick Start

Setting up LSTPerformanceWeb (only for lnx7188)

For lnx7188 this needs to be done once

cd /cdat/tem/${USER}/
git clone [email protected]:SegmentLinking/LSTPerformanceWeb.git

Running the code

git clone --recursive [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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 [email protected]: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.

tracklooper's People

Contributors

tresreid avatar bsathian avatar sgnoohc avatar yonsig avatar vourma avatar slava77devel avatar gniendorf avatar beiwang2003 avatar slava77 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.