From fd2c1c8f3ff4f789ba37b9f098768de5872a74a6 Mon Sep 17 00:00:00 2001 From: David Olivier Jamin Date: Wed, 28 Feb 2018 13:06:41 +0100 Subject: [PATCH 1/5] fixes in README for LSF submission --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d5a5fe4..5f65e65 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -------------------------- First load the required environment on lxplus: ``` -source init.sh +source ./init.sh ``` Install fastjet (to be done only once): ``` @@ -15,7 +15,7 @@ Install fastjet (to be done only once): First load the required environment on lxplus: ``` -source init.sh +source ./init.sh ``` Compile analysis code (can be found and modified in ```src/analyze.cc```): @@ -35,10 +35,10 @@ e.g: []() LSF submission -------------------- -The script ```batch/submitJetClustering.py``` allows to run this script on LSF queues: +The script ```batch/submitJetClustering.py``` allows to run this script on LSF queues. You must submit the command from the batch/ directory : ``` -python batch/submitJetClustering.py -i [NTUP_dir] -n [nevts_per_job] -o [output_dir] --njobs [number_of_jobs] -q [queue] +python submitJetClustering.py -i [NTUP_dir] -n [nevts_per_job] -o [output_dir] --njobs [number_of_jobs] -q [queue] ``` Jobs can be collected via: From 627caddcdafd88b2ce08474923f4ecc915425410 Mon Sep 17 00:00:00 2001 From: David Olivier Jamin Date: Wed, 28 Feb 2018 22:33:58 +0100 Subject: [PATCH 2/5] add script to plot basic kinematics --- plotting/basic_kinematics.py | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 plotting/basic_kinematics.py diff --git a/plotting/basic_kinematics.py b/plotting/basic_kinematics.py new file mode 100644 index 0000000..d201f2c --- /dev/null +++ b/plotting/basic_kinematics.py @@ -0,0 +1,60 @@ +import ROOT, sys, os +from ROOT import * + +path = "/afs/cern.ch/user/d/djamin/fcc_work/JetClustering/output/20180228_substructure_pt250_5000/" + +mass = ["1000","2000","5000","10000"] +proc = ["qcd" ,"wqq","zqq" ] +color = [kBlue-4,kRed ,kGreen-3] +rec_gen = "reco" +var = ["mass","massSD","tau1","tau2","tau3","tau21","tau32"] + +for m in mass : + for v in var : + fileName = path+proc[0]+m+".root" + f0 = ROOT.TFile(fileName) + h0 = f0.Get(rec_gen+"/"+rec_gen+"_"+v) + fileName = path+proc[1]+m+".root" + f1 = ROOT.TFile(fileName) + h1 = f1.Get(rec_gen+"/"+rec_gen+"_"+v) + fileName = path+proc[2]+m+".root" + f2 = ROOT.TFile(fileName) + h2 = f2.Get(rec_gen+"/"+rec_gen+"_"+v) + + c = ROOT.TCanvas("", "", 1000, 1000) + ROOT.gROOT.SetBatch(True) + ROOT.gStyle.SetOptStat(0) + + h0.Scale(1./h0.Integral()); h0.Rebin(25); h0.SetLineWidth(5); h0.SetLineColor(color[0]) + h1.Scale(1./h1.Integral()); h1.Rebin(25); h1.SetLineWidth(5); h1.SetLineColor(color[1]) + h2.Scale(1./h2.Integral()); h2.Rebin(25); h2.SetLineWidth(5); h2.SetLineColor(color[2]) + + c.cd(0) + + h0.SetTitle("") + h0.GetXaxis().SetTitle(v) + h0.GetYaxis().SetTitle("Normalized to 1.") + + h0.GetXaxis().SetTitleOffset(1.1) + h0.GetYaxis().SetTitleOffset(1.5) + + h0max = h0.GetMaximum() + h1max = h1.GetMaximum() + h2max = h2.GetMaximum() + hmax = h0max + if hmax Date: Wed, 28 Feb 2018 22:36:47 +0100 Subject: [PATCH 3/5] add script to plot basic kinematics + argument --- plotting/basic_kinematics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plotting/basic_kinematics.py b/plotting/basic_kinematics.py index d201f2c..14b4cb3 100644 --- a/plotting/basic_kinematics.py +++ b/plotting/basic_kinematics.py @@ -1,7 +1,8 @@ import ROOT, sys, os from ROOT import * -path = "/afs/cern.ch/user/d/djamin/fcc_work/JetClustering/output/20180228_substructure_pt250_5000/" +#path = "/afs/cern.ch/user/d/djamin/fcc_work/JetClustering/output/20180228_substructure_pt250_5000/" +path = sys.argv[1] mass = ["1000","2000","5000","10000"] proc = ["qcd" ,"wqq","zqq" ] From 9b67c568a42067f08417da99efd53bfc48a35145 Mon Sep 17 00:00:00 2001 From: David Olivier Jamin Date: Thu, 1 Mar 2018 02:08:13 +0100 Subject: [PATCH 4/5] improvements in plotting/basic_kinematics.py --- plotting/basic_kinematics.py | 44 +++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/plotting/basic_kinematics.py b/plotting/basic_kinematics.py index 14b4cb3..75361b6 100644 --- a/plotting/basic_kinematics.py +++ b/plotting/basic_kinematics.py @@ -8,9 +8,17 @@ proc = ["qcd" ,"wqq","zqq" ] color = [kBlue-4,kRed ,kGreen-3] rec_gen = "reco" -var = ["mass","massSD","tau1","tau2","tau3","tau21","tau32"] +var = ["mass" ,"massSD" ,"tau21" ] +leg_var = ["mass [GeV]","SD mass [GeV]","#tau_{21}"] +#var = ["mass","massSD","tau1","tau2","tau3","tau21","tau32"] for m in mass : + + rebin=4 + if m=="2000" : rebin = 5 + if m=="5000" : rebin = 10 + if m=="10000" : rebin = 10 + for v in var : fileName = path+proc[0]+m+".root" f0 = ROOT.TFile(fileName) @@ -26,35 +34,39 @@ ROOT.gROOT.SetBatch(True) ROOT.gStyle.SetOptStat(0) - h0.Scale(1./h0.Integral()); h0.Rebin(25); h0.SetLineWidth(5); h0.SetLineColor(color[0]) - h1.Scale(1./h1.Integral()); h1.Rebin(25); h1.SetLineWidth(5); h1.SetLineColor(color[1]) - h2.Scale(1./h2.Integral()); h2.Rebin(25); h2.SetLineWidth(5); h2.SetLineColor(color[2]) + h0_int = h0.Integral() + h1_int = h1.Integral() + h2_int = h2.Integral() + h0.Scale(1./h0_int); h0.Rebin(rebin); h0.SetLineWidth(7); h0.SetLineColor(color[0]) + h1.Scale(1./h1_int); h1.Rebin(rebin); h1.SetLineWidth(7); h1.SetLineColor(color[1]) + h2.Scale(1./h2_int); h2.Rebin(rebin); h2.SetLineWidth(7); h2.SetLineColor(color[2]) c.cd(0) - h0.SetTitle("") - h0.GetXaxis().SetTitle(v) + h0.SetTitle(m+" GeV") + h0.GetXaxis().SetTitle(leg_var[var.index(v)]) h0.GetYaxis().SetTitle("Normalized to 1.") h0.GetXaxis().SetTitleOffset(1.1) h0.GetYaxis().SetTitleOffset(1.5) - h0max = h0.GetMaximum() - h1max = h1.GetMaximum() - h2max = h2.GetMaximum() - hmax = h0max - if hmaxh0.GetNbinsX()*3./5. : leg_pos="L" + if leg_pos=="L" : legend=TLegend(0.10,0.70,0.40,0.90) + #if leg_pos=="C" : legend=TLegend(0.35,0.70,0.65,0.90) + if leg_pos=="R" : legend=TLegend(0.60,0.70,0.90,0.90) + legend.AddEntry(h0, proc[0]+" = "+str(h0_int)+" events", "l") + legend.AddEntry(h1, proc[1]+" = "+str(h1_int)+" events", "l") + legend.AddEntry(h2, proc[2]+" = "+str(h2_int)+" events", "l") legend.Draw() c.Print('{}_{}_{}.png'.format(rec_gen,v, m)) From 7fdef3d986517db81c79326814eb662fb4bb015b Mon Sep 17 00:00:00 2001 From: David Olivier Jamin Date: Thu, 1 Mar 2018 02:17:57 +0100 Subject: [PATCH 5/5] again improvements in plotting/basic_kinematics.py --- plotting/basic_kinematics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotting/basic_kinematics.py b/plotting/basic_kinematics.py index 75361b6..82cbae7 100644 --- a/plotting/basic_kinematics.py +++ b/plotting/basic_kinematics.py @@ -44,7 +44,7 @@ c.cd(0) h0.SetTitle(m+" GeV") - h0.GetXaxis().SetTitle(leg_var[var.index(v)]) + h0.GetXaxis().SetTitle(rec_gen+" "+leg_var[var.index(v)]) h0.GetYaxis().SetTitle("Normalized to 1.") h0.GetXaxis().SetTitleOffset(1.1)