5 |
|
echo " $0 (directory where datacard & histo root file are stored) (name of datacard, usually susydatacard.txt)" |
6 |
|
fi |
7 |
|
|
8 |
< |
echo -e "Have been supplied with the following arguments \n $1 \n $2 \n" |
8 |
> |
echo -e "Have been supplied with the following arguments \n $1 \n $2 \n $3" |
9 |
|
ORIGDIR=`pwd` |
10 |
|
cd ~/final_production_2011/CMSSW_4_2_8/src/HiggsAnalysis/ |
11 |
|
origscramarch=$SCRAM_ARCH |
19 |
|
python /shome/buchmann/final_production_2011/CMSSW_4_2_8/src/HiggsAnalysis/CombinedLimit/scripts/text2workspace.py $2 -b -o $1/model.root |
20 |
|
if [ $? -gt 0 ]; then |
21 |
|
echo "SOMETHING FAILED" |
22 |
< |
failures=$3 |
22 |
> |
failures=$4 |
23 |
|
if [ -e $failures ]; then |
24 |
|
echo "~~~~ THIS IS THE FIRST FAILURE" |
25 |
|
failures=0; |
29 |
|
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Going to retry (failures so far: $failures)" |
30 |
|
let "failures = failures + 1" |
31 |
|
cd $ORIGDIR |
32 |
< |
bash $0 $1 $2 $failures |
32 |
> |
bash $0 $1 $2 $3 $failures |
33 |
|
exit |
34 |
|
else |
35 |
|
echo "There's something totally wrong ..." |
49 |
|
echo " ~~~~~~~~~~~~~ " |
50 |
|
|
51 |
|
#$CMSSW_BASE/bin/$SCRAM_ARCH/combine $1/model.root -t500 -s2 |
52 |
– |
#combine -M HybridNew --frequentist --testStat LHC realistic-counting-experiment.txt -H ProfileLikelihood --fork 4 |
53 |
– |
|
52 |
|
|
53 |
|
#$CMSSW_BASE/bin/$SCRAM_ARCH/combine -M HybridNew --frequentist --testStat LHC $1/model.root -H ProfileLikelihood |
54 |
+ |
|
55 |
|
echo "Ready to run limit!" |
56 |
< |
command="$CMSSW_BASE/bin/$SCRAM_ARCH/combine -M HybridNew -t1 --frequentist --testStat LHC $1/model.root -H ProfileLikelihood" |
56 |
> |
if [[ $3 -gt 1 ]]; then |
57 |
> |
echo "Asymptotic is $3 (0) therefore doing FULL LIMITS" |
58 |
> |
# command="$CMSSW_BASE/bin/$SCRAM_ARCH/combine -M HybridNew -t1 --frequentist --testStat LHC $1/model.root -H ProfileLikelihood" |
59 |
> |
command="$CMSSW_BASE/bin/$SCRAM_ARCH/combine -M HybridNew --rule CLs --testStat LHC --rMin $5 --rMax $6 --freq -T 1000 -i 8 --saveHybridResult --saveToys -v 1 -s 0 $1/model.root " |
60 |
> |
else |
61 |
> |
if [[ $3 -lt 1 ]]; then |
62 |
> |
echo "Asymptotic is $3 (0) therefore doing ASYMPTOTIC LIMITS" |
63 |
> |
command="$CMSSW_BASE/bin/$SCRAM_ARCH/combine -M Asymptotic -t1 $1/model.root -H ProfileLikelihood" |
64 |
> |
else |
65 |
> |
echo "Asymptotic is $3 (0) therefore doing ASYMPTOTIC LIMITS but WITH initial guess" |
66 |
> |
command="$CMSSW_BASE/bin/$SCRAM_ARCH/combine -M Asymptotic --rMax $6 -t1 $1/model.root -H ProfileLikelihood" |
67 |
> |
fi |
68 |
> |
fi |
69 |
> |
|
70 |
|
echo "Going to run $command" |
71 |
|
time eval $command |
72 |
|
echo "Done running limits" |
83 |
|
|
84 |
|
g++ $ORIGDIR/ReadAndSave.C -o ReadAndSave.exec `root-config --glibs --cflags` |
85 |
|
|
86 |
+ |
if [[ $3 -gt 1 ]]; then |
87 |
+ |
startfile=$outfile |
88 |
+ |
outfile="allmerged.root" |
89 |
+ |
$CMSSW_BASE/bin/$SCRAM_ARCH/combine $1/model.root -M HybridNew --freq --grid=$startfile --expectedFromGrid 0.16 |
90 |
+ |
$CMSSW_BASE/bin/$SCRAM_ARCH/combine $1/model.root -M HybridNew --freq --grid=$startfile --expectedFromGrid 0.025 |
91 |
+ |
$CMSSW_BASE/bin/$SCRAM_ARCH/combine $1/model.root -M HybridNew --freq --grid=$startfile --expectedFromGrid 0.5 |
92 |
+ |
$CMSSW_BASE/bin/$SCRAM_ARCH/combine $1/model.root -M HybridNew --freq --grid=$startfile --expectedFromGrid 0.84 |
93 |
+ |
$CMSSW_BASE/bin/$SCRAM_ARCH/combine $1/model.root -M HybridNew --freq --grid=$startfile --expectedFromGrid 0.975 |
94 |
+ |
hadd $outfile *.root |
95 |
+ |
fi |
96 |
+ |
|
97 |
|
./ReadAndSave.exec $1/$outfile $1/ShapeDropletResult.txt |
98 |
|
|
99 |
|
rm ReadAndSave.exec |
102 |
|
echo "Stored the droplet in $1/ShapeDropletResult.txt" |
103 |
|
|
104 |
|
|
105 |
< |
#$CMSSW_BASE/bin/$SCRAM_ARCH/combine -M Asymptotic $1/model.root -t10 |
105 |
> |
|
106 |
|
|
107 |
|
|
108 |
|
|