From 447f69727f486cfdce3e0528e11a518f68a2afb9 Mon Sep 17 00:00:00 2001 From: hiro98 Date: Tue, 26 May 2020 17:09:01 +0200 Subject: [PATCH] add some runcards and use proper titles in plot --- prog/runcards/pp_phaeno/makefile | 13 +++++++------ .../qqgg_proton/MC_DIPHOTON_PROTON.cc | 10 ++++++---- .../qqgg_proton/MC_DIPHOTON_PROTON.plot | 2 ++ .../pp_phaeno/runcards/basic/.gitignore | 1 + .../pp_phaeno/runcards/basic/plot.flags | 1 + .../runcards/{with_pT => with_jets}/.gitignore | 1 + .../runcards/with_jets/Sherpa_Ext.yaml | 18 ++++++++++++++++++ .../pp_phaeno/runcards/with_jets/plot.flags | 1 + .../runcards/with_jets_and_pT/.gitignore | 4 ++++ .../Sherpa_Ext.yaml | 1 + .../runcards/with_jets_and_pT/plot.flags | 1 + .../with_pT_and_fragmentation/Sherpa_Ext.yaml | 3 ++- .../.gitignore | 1 + .../Sherpa_Ext.yaml | 3 ++- .../plot.flags | 1 + 15 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 prog/runcards/pp_phaeno/runcards/basic/plot.flags rename prog/runcards/pp_phaeno/runcards/{with_pT => with_jets}/.gitignore (72%) create mode 100644 prog/runcards/pp_phaeno/runcards/with_jets/Sherpa_Ext.yaml create mode 100644 prog/runcards/pp_phaeno/runcards/with_jets/plot.flags create mode 100644 prog/runcards/pp_phaeno/runcards/with_jets_and_pT/.gitignore rename prog/runcards/pp_phaeno/runcards/{with_pT => with_jets_and_pT}/Sherpa_Ext.yaml (94%) create mode 100644 prog/runcards/pp_phaeno/runcards/with_jets_and_pT/plot.flags create mode 100644 prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/plot.flags diff --git a/prog/runcards/pp_phaeno/makefile b/prog/runcards/pp_phaeno/makefile index c3de92d..b0ce971 100644 --- a/prog/runcards/pp_phaeno/makefile +++ b/prog/runcards/pp_phaeno/makefile @@ -18,7 +18,7 @@ OUT_DIR = out EVENT_COUNT = 100000 # List of Runcards, see RUNCARD_FOLDER -RUNCARDS = basic with_pT with_pT_and_fragmentation with_pT_and_fragmentation_and_mi +RUNCARDS = basic with_jets with_jets_and_pT with_pT_and_fragmentation with_pT_and_fragmentation_and_mi # Base Runcard BASE_RUNCARD = Sherpa_Base.yaml @@ -29,13 +29,14 @@ SHERPA_EXT_RUNCARD = Sherpa_Ext.yaml # Macros # ############################################################################### -NUM_CPUS = $(shell nproc) +NUM_CPUS = 1 # $(shell nproc) EVENT_COUNT_CPU = $(shell echo "$(EVENT_COUNT) / $(NUM_CPUS)" | bc) THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) SET_RIVET := RIVET_ANALYSIS_PATH="$(THIS_DIR)$(ANALYSIS_DIR)" SHERPA_ARGS := -e $(EVENT_COUNT_CPU) "RESULT_DIRECTORY: Results" "ANALYSIS_OUTPUT: analysis" -OUT_YODA_FILES := $(foreach card,$(RUNCARDS),$(OUT_DIR)/$(card).yoda) - +OUT_YODA_FILE_NAMES := $(foreach card,$(RUNCARDS),$(card).yoda) +OUT_YODA_FILES := $(foreach name,$(OUT_YODA_FILE_NAMES),$(OUT_DIR)/$(name)) +OUT_YODA_FILE_NAMES_WITH_FLAGS := $(foreach card,$(RUNCARDS),$(card).yoda:'$(shell cat $(RUNCARD_DIR)/$(card)/plot.flags)') # check if outdir is list ifneq ($(words $(OUT_DIR)),1) $(error "OUT_DIR must be a single directory!") @@ -75,7 +76,7 @@ $(OUT_YODA_FILES): $(OUT_DIR)/%.yoda: $(RUNCARD_DIR)/%/$(SHERPA_EXT_RUNCARD) $(A @printf "\033[1;32mRunning Sherpa\033[0m\n" cd $(R_DIR) && $(SHERPA) $(SHERPA_ARGS) -e 0 cd $(R_DIR) && \ - $(SET_RIVET) $(THIS_DIR)/run_n_sherpas.fish $(NUM_CPUS) $(SHERPA_ARGS) "EVT_OUTPUT: 0" + $(SET_RIVET) $(THIS_DIR)/run_n_sherpas.fish $(NUM_CPUS) $(SHERPA_ARGS) "EVT_OUTPUT: 15" cd $(R_DIR) && yodamerge *.yoda -o $(YODA_FILE) \ && mv $(YODA_FILE) $(THIS_DIR)$(OUT_DIR)/ @@ -86,7 +87,7 @@ $(OUT_YODA_FILES): $(OUT_DIR)/%.yoda: $(RUNCARD_DIR)/%/$(SHERPA_EXT_RUNCARD) $(A .PHONY: histograms histograms: $(OUT_DIR)/analysis/index.html $(OUT_DIR)/analysis/index.html: $(OUT_YODA_FILES) $(ANALYSIS_DIR)/$(ANALYSIS_NAME).plot $(ANALYSIS_DIR)/$(ANALYSIS_NAME).info - cd $(OUT_DIR) && $(SET_RIVET) rivet-mkhtml *.yoda -o analysis + cd $(OUT_DIR) && $(SET_RIVET) rivet-mkhtml $(OUT_YODA_FILE_NAMES_WITH_FLAGS) -o analysis .PHONY: clean clean: diff --git a/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.cc b/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.cc index 902a7db..f743be3 100644 --- a/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.cc +++ b/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.cc @@ -25,8 +25,7 @@ public: // Calorimeter particles for photon isolation VisibleFinalState visFS; VetoedFinalState calo_fs(visFS); - calo_fs.addVetoPairId(PID::MUON); - calo_fs.addVetoId(PID::PHOTON); + calo_fs.addVetoPairId(PID::MUON); // we also want photon declare(calo_fs, "calo_fs"); // we chain in a prompt final state just to be save @@ -44,7 +43,7 @@ public: book(_histos["pT"], "pT", logspace(50, min_pT, energy, true)); book(_histos["eta"], "eta", 50, -eta, eta); book(_histos["cos_theta"], "cos_theta", 50, -1, 1); - book(_histos["inv_m"], "inv_m", logspace(50, 2 * min_pT, 2 * energy, true)); + book(_histos["inv_m"], "inv_m", logspace(50, 1, 2 * energy, true)); book(_histos["o_angle"], "o_angle", 50, 0, 1); book(_histos["o_angle_cs"], "o_angle_cs", 50, 0, 1); } @@ -87,6 +86,7 @@ public: // Sum momentum mom_in_EtCone += p.momentum(); } + // subtract core photon mom_in_EtCone -= photon.momentum(); @@ -125,8 +125,10 @@ public: //@} void finalize() { + const double sf = crossSection() / (picobarn * sumOfWeights()); + for (auto name : _observables) { - normalize(_histos[name]); + scale(_histos[name], sf); } } diff --git a/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.plot b/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.plot index 93230ee..40d8e2e 100644 --- a/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.plot +++ b/prog/runcards/pp_phaeno/qqgg_proton/MC_DIPHOTON_PROTON.plot @@ -35,9 +35,11 @@ XLabel=$\cos\theta$ # BEGIN PLOT /MC_DIPHOTON_PROTON/o_angle Title=scattering angle XLabel=$\cos\theta^\ast$ +LogY=0 # END PLOT # BEGIN PLOT /MC_DIPHOTON_PROTON/o_angle_cs Title=scattering angle in CS frame XLabel=$\cos\theta^\ast_\text{CS}$ +LogY=0 # END PLOT diff --git a/prog/runcards/pp_phaeno/runcards/basic/.gitignore b/prog/runcards/pp_phaeno/runcards/basic/.gitignore index bfb0b01..119b720 100644 --- a/prog/runcards/pp_phaeno/runcards/basic/.gitignore +++ b/prog/runcards/pp_phaeno/runcards/basic/.gitignore @@ -1,3 +1,4 @@ * !Sherpa_Ext.yaml !.gitignore +!plot.flags diff --git a/prog/runcards/pp_phaeno/runcards/basic/plot.flags b/prog/runcards/pp_phaeno/runcards/basic/plot.flags new file mode 100644 index 0000000..65cf264 --- /dev/null +++ b/prog/runcards/pp_phaeno/runcards/basic/plot.flags @@ -0,0 +1 @@ +Title=Bare ME diff --git a/prog/runcards/pp_phaeno/runcards/with_pT/.gitignore b/prog/runcards/pp_phaeno/runcards/with_jets/.gitignore similarity index 72% rename from prog/runcards/pp_phaeno/runcards/with_pT/.gitignore rename to prog/runcards/pp_phaeno/runcards/with_jets/.gitignore index bfb0b01..119b720 100644 --- a/prog/runcards/pp_phaeno/runcards/with_pT/.gitignore +++ b/prog/runcards/pp_phaeno/runcards/with_jets/.gitignore @@ -1,3 +1,4 @@ * !Sherpa_Ext.yaml !.gitignore +!plot.flags diff --git a/prog/runcards/pp_phaeno/runcards/with_jets/Sherpa_Ext.yaml b/prog/runcards/pp_phaeno/runcards/with_jets/Sherpa_Ext.yaml new file mode 100644 index 0000000..af6e93d --- /dev/null +++ b/prog/runcards/pp_phaeno/runcards/with_jets/Sherpa_Ext.yaml @@ -0,0 +1,18 @@ +# the main scattering process +PROCESSES: +- 94 -94 -> 22 22: + Order: {QCD: 0, EW: 2} + Integration_Error: 0.001 + +# use pure QED +EW_SCHEME: alpha0 + +# disable all advanced processes +FRAGMENTATION: None +MI_HANDLER: None + +INTRINSIC_KPERP: + ENABLED: false + +BEAM_REMNANTS: false +SHOWER_GENERATOR: CSS diff --git a/prog/runcards/pp_phaeno/runcards/with_jets/plot.flags b/prog/runcards/pp_phaeno/runcards/with_jets/plot.flags new file mode 100644 index 0000000..d8f7a12 --- /dev/null +++ b/prog/runcards/pp_phaeno/runcards/with_jets/plot.flags @@ -0,0 +1 @@ +Title=Jets and Showers diff --git a/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/.gitignore b/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/.gitignore new file mode 100644 index 0000000..119b720 --- /dev/null +++ b/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/.gitignore @@ -0,0 +1,4 @@ +* +!Sherpa_Ext.yaml +!.gitignore +!plot.flags diff --git a/prog/runcards/pp_phaeno/runcards/with_pT/Sherpa_Ext.yaml b/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/Sherpa_Ext.yaml similarity index 94% rename from prog/runcards/pp_phaeno/runcards/with_pT/Sherpa_Ext.yaml rename to prog/runcards/pp_phaeno/runcards/with_jets_and_pT/Sherpa_Ext.yaml index 8cfbff3..0a31b7c 100644 --- a/prog/runcards/pp_phaeno/runcards/with_pT/Sherpa_Ext.yaml +++ b/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/Sherpa_Ext.yaml @@ -15,4 +15,5 @@ MI_HANDLER: None # showers are enabled as well INTRINSIC_KPERP: ENABLED: true +BEAM_REMNANTS: true SHOWER_GENERATOR: CSS diff --git a/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/plot.flags b/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/plot.flags new file mode 100644 index 0000000..0fce39c --- /dev/null +++ b/prog/runcards/pp_phaeno/runcards/with_jets_and_pT/plot.flags @@ -0,0 +1 @@ +Title=Jets + Primordial $\kt$ diff --git a/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation/Sherpa_Ext.yaml b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation/Sherpa_Ext.yaml index 575a06d..77bf0c1 100644 --- a/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation/Sherpa_Ext.yaml +++ b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation/Sherpa_Ext.yaml @@ -8,7 +8,7 @@ PROCESSES: EW_SCHEME: 0 # Enable fragmentation -FRAGMENTATION: Ahadic +FRAGMENTATION: Lund MI_HANDLER: None @@ -17,4 +17,5 @@ MI_HANDLER: None INTRINSIC_KPERP: ENABLED: true +BEAM_REMNANTS: true SHOWER_GENERATOR: CSS diff --git a/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/.gitignore b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/.gitignore index bfb0b01..119b720 100644 --- a/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/.gitignore +++ b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/.gitignore @@ -1,3 +1,4 @@ * !Sherpa_Ext.yaml !.gitignore +!plot.flags diff --git a/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/Sherpa_Ext.yaml b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/Sherpa_Ext.yaml index 0c1647e..77da527 100644 --- a/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/Sherpa_Ext.yaml +++ b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/Sherpa_Ext.yaml @@ -8,7 +8,7 @@ PROCESSES: EW_SCHEME: 0 # Enable fragmentation -FRAGMENTATION: Ahadic +FRAGMENTATION: Lund # and multiple interactions MI_HANDLER: Amisic @@ -18,4 +18,5 @@ MI_HANDLER: Amisic INTRINSIC_KPERP: ENABLED: true +BEAM_REMNANTS: true SHOWER_GENERATOR: CSS diff --git a/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/plot.flags b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/plot.flags new file mode 100644 index 0000000..d73f967 --- /dev/null +++ b/prog/runcards/pp_phaeno/runcards/with_pT_and_fragmentation_and_mi/plot.flags @@ -0,0 +1 @@ +Title=Jets+Primordial+Fragmentation+MI