-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.sh
executable file
·56 lines (46 loc) · 1.51 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
echo "########### Setting up env for expresso ##############"
system=$(uname --all)
if [[ "$system" == *"WSL2"* ]]; then
echo "In wsl2"
conda activate py37_coffea_hep
elif [[ "$system" == *"lxslc"* ]]; then
echo "In lxslc"
conda activate expresso
elif [[ "$system" == *"lxplus"* ]]; then
echo "In lxplus"
source /cvmfs/sft.cern.ch/lcg/views/dev4cuda/latest/x86_64-centos7-gcc8-opt/setup.sh
pip install objprint
pip install pprintpp
else
echo "Are you in supported node?"
fi
chmod +x plot+.py
chmod +x expresso.py
pip install -e .
chmod +x modules/createJSON.py
ehelp () {
python expresso.py --help
}
phelp () {
python plot+.py --help
}
ana () {
ls Analysis/
}
testana () {
./expresso.py --Samples Analysis/barebones/samples.txt --Analysis barebones --NumberOfTasks 2 --Debug --SaveRoot
}
testanatight () {
./expresso.py --Samples Analysis/barebones/samples.txt --Analysis barebones --NumberOfTasks 2 --Debug --SaveRoot --AnalysisPoint tight_ele_tight_mu
}
testplot () {
python Analysis/barebones/plot.py
}
lumical () {
if [ "$1" == "-h" ] ; then
echo "Usage: lumical <path to data json> <full or mask> "
echo "Usage: lumical blabla/DoubleMuon.json mask"
return
fi
rm -rf Analysis/LumiCal/lumi.txt; ./expresso.py --NumberOfTasks 1000000 --Analysis Analysis/LumiCal/ --PassOptions $2 --Sample $1 --ChunkSize 1000000;awk '{ sum += $1 } END { printf "Luminosity is: %d pb⁻¹\n", sum}' Analysis/LumiCal/lumi.txt;rm -rf Analysis/LumiCal/lumi.txt
}