-
Notifications
You must be signed in to change notification settings - Fork 0
/
RunPpGroom.csh
86 lines (59 loc) · 1.98 KB
/
RunPpGroom.csh
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#! /usr/bin/env csh
set Exec = "./bin/Groom"
# make sure executable exists
make $Exec || exit
#parameters
setenv lja antikt
#setenv lja cambri
setenv R 0.4
setenv pcmax 10000
setenv Nevent -1
set noglob
#set input='Data/ppHT/*root'
setenv intype tree
setenv chainname TriggeredTree
setenv etacut 1
#setenv embi NONE
setenv embi 'Data/NewPicoDst_AuAuCentralMB/*root'
setenv embintype pico
setenv embc JetTree
setenv embtrig MB
setenv pjmin 10
setenv pjmax 2000
####### Initialize condor file
echo "" > CondorFile
echo "Universe = vanilla" >> CondorFile
echo "Executable = ${Exec}" >> CondorFile
echo "getenv = true" >>CondorFile
# setenv pcmin 0.2
# setenv NameBase Groom
setenv pcmin 2.0
setenv NameBase Hi_Groom
#setenv trig ppHT
setenv nmix 20
#foreach inputbase ( `find Data/ppHT/ -name *root | cut -c 1-23 | uniq` )
foreach inputbase ( `find AjResults -name Tow0_Eff0_\*_of_12\*root | sed 's/.root//g'` )
set input=$inputbase*root
#construct output name
# arguments
# set OutBase=`basename $input | sed 's/.root//g'`
# set OutBase=pp
#set OutName = Results/${NameBase}_${OutBase}.root
set OutName = Results/${NameBase}_pp_`basename ${inputbase}`.root
#echo $input '->' $OutName
set LogFile = logs/${NameBase}_pp_`basename ${inputbase}`.out
set ErrFile = logs/${NameBase}_pp_`basename ${inputbase}`.err
set Args = ( -i $input -intype ${intype} -c ${chainname} -o ${OutName} -N $Nevent -pj ${pjmin} ${pjmax} -pc ${pcmin} ${pcmax} -lja $lja -ec $etacut -R $R -embi ${embi} -nmix ${nmix} -embintype ${embintype} -embc ${embc} -embtrig ${embtrig} )
echo "" >> CondorFile
echo "Output = ${LogFile}" >> CondorFile
echo "Error = ${ErrFile}" >> CondorFile
echo "Arguments = ${Args}" >> CondorFile
echo "Queue" >> CondorFile
echo Submitting:
echo $Exec $Args
echo "Logging output to " $LogFile
echo "Logging errors to " $ErrFile
echo
end
condor_submit CondorFile
unset noglob