From e3428354c1737a2eea0b69e4949c99c3153f6fd4 Mon Sep 17 00:00:00 2001 From: Meng_Lu <1501110102@pku.edu.cn> Date: Thu, 1 Jun 2023 10:12:35 +0200 Subject: [PATCH 1/6] Update 13000 to 13600 in ReweightUserHooks.h for Run3 --- GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h index 886e5faac1c16..404e88b8149a0 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h +++ b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h @@ -39,7 +39,7 @@ class PtHatEmpReweightUserHook : public Pythia8::UserHooks { 3.5e+02}; sigma = [this](double x) -> double { return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * - pow(1 - 2 * x / (13000. + p[5]), p[1])) * + pow(1 - 2 * x / (13600. + p[5]), p[1])) * x; }; } From 3d1f89a22dccefec1c361b3932ae3a05b1939e52 Mon Sep 17 00:00:00 2001 From: Meng_Lu <1501110102@pku.edu.cn> Date: Thu, 1 Jun 2023 15:45:58 +0200 Subject: [PATCH 2/6] Update ReweightUserHooks.h, make it to be able to handle run2 and run3 --- .../Pythia8Interface/plugins/ReweightUserHooks.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h index 404e88b8149a0..e66258aab89d6 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h +++ b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h @@ -27,7 +27,7 @@ class PtHatReweightUserHook : public Pythia8::UserHooks { class PtHatEmpReweightUserHook : public Pythia8::UserHooks { public: PtHatEmpReweightUserHook(const std::string& tuneName = "") { - if (tuneName == "CP5") + if (tuneName == "CP5" || tuneName == "CP5Run3") p = {7377.94700788, 8.38168461349, -4.70983112392, -0.0310148108446, -0.028798537937, 925.335472326}; //Default reweighting - works good for tune CUEPT8M1 else @@ -37,10 +37,15 @@ class PtHatEmpReweightUserHook : public Pythia8::UserHooks { -5.1575514014931e-01, 5.5951279807561e-02, 3.5e+02}; - sigma = [this](double x) -> double { - return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * - pow(1 - 2 * x / (13600. + p[5]), p[1])) * - x; + if (tuneName == "CP5Run3") + sigma = [this](double x) -> double { + return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * + pow(1 - 2 * x / (13600. + p[5]), p[1])) * x; + else + sigma = [this](double x) -> double { + return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * + pow(1 - 2 * x / (13000. + p[5]), p[1])) * x; + }; } ~PtHatEmpReweightUserHook() override {} From 79976a3fcdf59680706aa1c412dbe4c2b34ed273 Mon Sep 17 00:00:00 2001 From: Meng_Lu <1501110102@pku.edu.cn> Date: Thu, 1 Jun 2023 15:56:47 +0200 Subject: [PATCH 3/6] Update ReweightUserHooks.h --- .../Pythia8Interface/plugins/ReweightUserHooks.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h index e66258aab89d6..e81f3b7e58d67 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h +++ b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h @@ -41,12 +41,12 @@ class PtHatEmpReweightUserHook : public Pythia8::UserHooks { sigma = [this](double x) -> double { return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * pow(1 - 2 * x / (13600. + p[5]), p[1])) * x; + } else sigma = [this](double x) -> double { return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * pow(1 - 2 * x / (13000. + p[5]), p[1])) * x; - - }; + }; } ~PtHatEmpReweightUserHook() override {} From 0d92736f7cb2731e435ca29d668c44b6b8e001a3 Mon Sep 17 00:00:00 2001 From: Meng_Lu <1501110102@pku.edu.cn> Date: Thu, 1 Jun 2023 16:18:24 +0200 Subject: [PATCH 4/6] Update ReweightUserHooks.h --- .../Pythia8Interface/plugins/ReweightUserHooks.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h index e81f3b7e58d67..5870768a70b77 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h +++ b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h @@ -37,16 +37,11 @@ class PtHatEmpReweightUserHook : public Pythia8::UserHooks { -5.1575514014931e-01, 5.5951279807561e-02, 3.5e+02}; - if (tuneName == "CP5Run3") - sigma = [this](double x) -> double { - return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * - pow(1 - 2 * x / (13600. + p[5]), p[1])) * x; - } - else - sigma = [this](double x) -> double { - return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * - pow(1 - 2 * x / (13000. + p[5]), p[1])) * x; - }; + const double ecms = ( tuneName == "CP5Run3" ? 13600. : 13000.); + sigma = [this](double x) -> double { + return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * + pow(1 - 2 * x / (ecms + p[5]), p[1])) * x; + }; } ~PtHatEmpReweightUserHook() override {} From bfc5432077f75220c6116852f424d4a48d08f0db Mon Sep 17 00:00:00 2001 From: Meng_Lu <1501110102@pku.edu.cn> Date: Thu, 1 Jun 2023 17:02:44 +0200 Subject: [PATCH 5/6] Update ReweightUserHooks.h --- .../Pythia8Interface/plugins/ReweightUserHooks.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h index 5870768a70b77..5792ef54de5f2 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h +++ b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h @@ -37,10 +37,11 @@ class PtHatEmpReweightUserHook : public Pythia8::UserHooks { -5.1575514014931e-01, 5.5951279807561e-02, 3.5e+02}; - const double ecms = ( tuneName == "CP5Run3" ? 13600. : 13000.); + const double ecms = (tuneName == "CP5Run3" ? 13600. : 13000.); sigma = [this](double x) -> double { return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * - pow(1 - 2 * x / (ecms + p[5]), p[1])) * x; + pow(1 - 2 * x / (ecms + p[5]), p[1])) * + x; }; } ~PtHatEmpReweightUserHook() override {} From 562551f59337bc9d58565e5fd280fc34c860c3e7 Mon Sep 17 00:00:00 2001 From: Meng_Lu <1501110102@pku.edu.cn> Date: Thu, 1 Jun 2023 21:36:21 +0200 Subject: [PATCH 6/6] Update ReweightUserHooks.h --- GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h index 5792ef54de5f2..3e3d2897bf2c6 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h +++ b/GeneratorInterface/Pythia8Interface/plugins/ReweightUserHooks.h @@ -38,7 +38,7 @@ class PtHatEmpReweightUserHook : public Pythia8::UserHooks { 5.5951279807561e-02, 3.5e+02}; const double ecms = (tuneName == "CP5Run3" ? 13600. : 13000.); - sigma = [this](double x) -> double { + sigma = [this, ecms](double x) -> double { return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) * pow(1 - 2 * x / (ecms + p[5]), p[1])) * x;