-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpvalues.py
35 lines (23 loc) · 991 Bytes
/
pvalues.py
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
import os
from multiprocessing import Pool
mmin=110.0
mmax=150.0
nm=81
card="/home/bendavid/cms/cmssw/021/CMSSW_4_2_3_patch2/src/MitHgg/macros/cards/feb16/hggcardfeb16smmvavbf.txt"
cmdlist=[]
for i in range(nm):
mass = mmin + i*(mmax-mmin)/float(nm-1)
#observed
#obsexec = "combine -d %s -m %g -M ProfileLikelihood --significance --pvalue -n SigFromGridObs" % (card,mass)
#expected SM over mass range
obsexec = "combine -d %s -m %g -M ProfileLikelihood --significance --pvalue -t -1 --expectSignal=1 -n SigFromGridObs" % (card,mass)
#expected SM for 125GeV
#obsexec = "combine -d %s -m %g -M ProfileLikelihood --significance --pvalue -t -1 --expectSignal=1 --expectSignalMass=125 -n SigFromGridObs" % (card,mass)
print obsexec
cmdlist.append(obsexec)
pool = Pool(processes=20)
pool.map_async(os.system,cmdlist)
pool.close()
pool.join()
os.system("hadd smpvalues.root higgsCombineSigFromGridObs*.root")
os.system("rm higgsCombineSigFromGrid*.root")