add some runcards and use proper titles in plot

This commit is contained in:
hiro98 2020-05-26 17:09:01 +02:00
parent 9b2b4d673e
commit 447f69727f
15 changed files with 49 additions and 12 deletions

View file

@ -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:

View file

@ -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);
}
}

View file

@ -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

View file

@ -1,3 +1,4 @@
*
!Sherpa_Ext.yaml
!.gitignore
!plot.flags

View file

@ -0,0 +1 @@
Title=Bare ME

View file

@ -1,3 +1,4 @@
*
!Sherpa_Ext.yaml
!.gitignore
!plot.flags

View file

@ -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

View file

@ -0,0 +1 @@
Title=Jets and Showers

View file

@ -0,0 +1,4 @@
*
!Sherpa_Ext.yaml
!.gitignore
!plot.flags

View file

@ -15,4 +15,5 @@ MI_HANDLER: None
# showers are enabled as well
INTRINSIC_KPERP:
ENABLED: true
BEAM_REMNANTS: true
SHOWER_GENERATOR: CSS

View file

@ -0,0 +1 @@
Title=Jets + Primordial $\kt$

View file

@ -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

View file

@ -1,3 +1,4 @@
*
!Sherpa_Ext.yaml
!.gitignore
!plot.flags

View file

@ -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

View file

@ -0,0 +1 @@
Title=Jets+Primordial+Fragmentation+MI