diff --git a/config/G18_02a/G18_02a_03_320/Pythia6Hadro2019.xml b/config/G18_02a/G18_02a_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_02a/G18_02a_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_02a/G18_02a_03_330/Pythia6Hadro2019.xml b/config/G18_02a/G18_02a_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_02a/G18_02a_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_02c/G18_02c_03_320/Pythia6Hadro2019.xml b/config/G18_02c/G18_02c_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_02c/G18_02c_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_02c/G18_02c_03_330/Pythia6Hadro2019.xml b/config/G18_02c/G18_02c_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_02c/G18_02c_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_02d/G18_02d_03_320/Pythia6Hadro2019.xml b/config/G18_02d/G18_02d_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_02d/G18_02d_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_02d/G18_02d_03_330/Pythia6Hadro2019.xml b/config/G18_02d/G18_02d_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_02d/G18_02d_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10a/G18_10a_03_320/Pythia6Hadro2019.xml b/config/G18_10a/G18_10a_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_10a/G18_10a_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10a/G18_10a_03_330/Pythia6Hadro2019.xml b/config/G18_10a/G18_10a_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_10a/G18_10a_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10c/G18_10c_03_320/Pythia6Hadro2019.xml b/config/G18_10c/G18_10c_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_10c/G18_10c_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10c/G18_10c_03_330/Pythia6Hadro2019.xml b/config/G18_10c/G18_10c_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_10c/G18_10c_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10d/G18_10d_03_320/Pythia6Hadro2019.xml b/config/G18_10d/G18_10d_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_10d/G18_10d_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10d/G18_10d_03_330/Pythia6Hadro2019.xml b/config/G18_10d/G18_10d_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_10d/G18_10d_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10i/G18_10i_03_320/Pythia6Hadro2019.xml b/config/G18_10i/G18_10i_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_10i/G18_10i_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10i/G18_10i_03_330/Pythia6Hadro2019.xml b/config/G18_10i/G18_10i_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_10i/G18_10i_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10j/G18_10j_03_320/Pythia6Hadro2019.xml b/config/G18_10j/G18_10j_03_320/Pythia6Hadro2019.xml deleted file mode 100644 index 9726df3727..0000000000 --- a/config/G18_10j/G18_10j_03_320/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.29 - 0.43 - 0.01 - 0.24 - 0.10 - 0.50 - 0.60 - 1.85 - 1.0 - 0.5 - - - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.030802 - 2.338338 - 0.300 - 1.000 - 0.300 - 1.000 - 0.008 - 0.943153 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/G18_10j/G18_10j_03_330/Pythia6Hadro2019.xml b/config/G18_10j/G18_10j_03_330/Pythia6Hadro2019.xml deleted file mode 100644 index ea186f4aeb..0000000000 --- a/config/G18_10j/G18_10j_03_330/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.27 - 0.43 - 0.01 - 0.30 - 0.10 - 0.50 - 0.60 - 1.53 - 1.16 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/Pythia6Hadro2019.xml b/config/Pythia6Hadro2019.xml deleted file mode 100644 index 895cdfcbe8..0000000000 --- a/config/Pythia6Hadro2019.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - NonResBackground,KNO2Pythia - - - - 0.30 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.300 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - 0.100 - 1.000 - - - - - - 0.30 - 0.36 - 0.01 - 0.80 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - - 0.21 - 0.44 - 0.01 - 0.20 - 0.10 - 0.50 - 0.60 - 0.30 - 0.58 - 0.5 - - - - diff --git a/config/master_config.xml b/config/master_config.xml index 2095e3c7d5..e75ba6d376 100644 --- a/config/master_config.xml +++ b/config/master_config.xml @@ -112,10 +112,8 @@ AGKYLowW2019.xml AGKY2019.xml - Pythia6Hadro2019.xml Pythia8Hadro2019.xml AGCharm2023.xml - HEDISGenerator.xml HEDISGenerator.xml @@ -125,7 +123,6 @@ BYPDF.xml - PythiaDecayer.xml PythiaDecayer.xml BaryonResonanceDecayer.xml DarkSectorDecayer.xml @@ -274,17 +271,14 @@ EventLibraryInterface.xml EvtLibInteractionListGenerator.xml EvtLibPXSec.xml - + NormGenerator.xml NormXSec.xml NormInteractionListGenerator.xml - GLRESGenerator.xml GLRESGenerator.xml - PhotonCOHGenerator.xml PhotonCOHGenerator.xml - PhotonRESGenerator.xml PhotonRESGenerator.xml diff --git a/configure b/configure index ccf74eaba5..e7ca5003d7 100755 --- a/configure +++ b/configure @@ -17,8 +17,6 @@ if(($match = grep(/--help/i, @ARGV)) > 0) { print " FLAG DESCRIPTION DEFAULT\n\n"; print " --prefix Installation location (for 'make install') /usr/local/\n"; print "\n enable/disable options with either --enable- or --disable- (eg --enable-lhapdf5 --disable-flux-drivers)\n\n"; - print " pythia6 Use the PYTHIA6 MC generator, assumed to be incl. w/ ROOT default: enabled \n"; - print " pythia8 Use the PYTHIA8 MC generator default: disabled \n"; print " incl Interface with INCL++ for nuclear transport default: disabled \n"; print " geant4 Interface with Geant4 for nuclear transport default: disabled \n"; print " lhapdf5 Use the LHAPDF5 parton density function library default: enabled \n"; @@ -54,9 +52,8 @@ if(($match = grep(/--help/i, @ARGV)) > 0) { print " profiler-lib Path to profiler library needed if you --enable-profiler \n"; print " doxygen-path Doxygen binary path needed if you --enable-doxygen-doc (if unset: checks for a \$DOXYGENPATH env.var.) \n"; - print " pythia6-lib PYTHIA6 libraries path always needed (if unset: checks for a \$PYTHIA6 env.var., then tries to auto-detect it) \n"; - print " pythia8-inc PYTHIA8 includes path needed if you --enable-pythia8 (if unset: checks for a \$PYTHIA8_INC env.var., then tries to auto-detect it) \n"; - print " pythia8-lib PYTHIA8 libraries path needed if you --enable-pythia8 (if unset: checks for a \$PYTHIA8_LIB env.var.. then tries to auto-detect it) \n"; + print " pythia8-inc PYTHIA8 includes path (if unset: checks for a \$PYTHIA8_INC env.var., then tries to auto-detect it) \n"; + print " pythia8-lib PYTHIA8 libraries path (if unset: checks for a \$PYTHIA8_LIB env.var.. then tries to auto-detect it) \n"; print " incl-inc INCL++ includes path needed if you --enable-incl (if unset: tries to auto-detect it) \n"; print " incl-lib INCL++ library path needed if you --enable-incl (if unset: tries to auto-detect it) \n"; print " geant4-inc Geant4 includes path needed if you --enable-geant4 (if unset: checks for a \$GEANT4_INC env.var.. then tries to auto-detect it) \n"; @@ -152,8 +149,7 @@ print MKCONF "GENIE_INSTALLATION_PATH=$prefix\n"; # Default --enable/--disable config options (for a minimal genie build) # -my $gopt_enable_pythia6 = "YES"; -my $gopt_enable_pythia8 = "NO"; +my $gopt_enable_pythia8 = "YES"; my $gopt_enable_lhapdf5 = "YES"; my $gopt_enable_lhapdf6 = "NO"; my $gopt_enable_apfel = "NO"; @@ -184,10 +180,9 @@ my $gopt_enable_professor2 = "NO"; # Check configure's command line arguments for non-default values # -if(($match = grep(/--enable-pythia6/i, @ARGV)) > 0) { $gopt_enable_pythia6 = "YES"; } -if(($match = grep(/--disable-pythia6/i, @ARGV)) > 0) { $gopt_enable_pythia6 = "NO"; } -if(($match = grep(/--enable-pythia8/i, @ARGV)) > 0) { $gopt_enable_pythia8 = "YES"; } -if(($match = grep(/--disable-pythia8/i, @ARGV)) > 0) { $gopt_enable_pythia8 = "NO"; } +# Toggling Pythia8 is disabled since it is currently required +#if(($match = grep(/--enable-pythia8/i, @ARGV)) > 0) { $gopt_enable_pythia8 = "YES"; } +#if(($match = grep(/--disable-pythia8/i, @ARGV)) > 0) { $gopt_enable_pythia8 = "NO"; } if(($match = grep(/--enable-lhapdf5/i, @ARGV)) > 0) { $gopt_enable_lhapdf5 = "YES"; } if(($match = grep(/--disable-lhapdf5/i, @ARGV)) > 0) { $gopt_enable_lhapdf5 = "NO"; } if(($match = grep(/--enable-lhapdf6/i, @ARGV)) > 0) { $gopt_enable_lhapdf6 = "YES"; } @@ -291,46 +286,6 @@ if($gopt_enable_doxygen_doc eq "YES") { } } -# ------------------------------------------------ -# PYTHIA6 paths -# ------------------------------------------------ - -# Get pythia6 library path -# -if($options=~m/--with-pythia6=\S*/i) { - print "*** Error *** Note that the option --with-pythia6 has been renamed to --with-pythia6-lib \n"; - print "*** Error *** Please see './configure --help' for all config option updates \n\n"; - exit 1; -} - -my $gopt_with_pythia6_lib = ""; -if($gopt_enable_pythia6 eq "YES") { - if($options=~m/--with-pythia6-lib=(\S*)/i) { - $gopt_with_pythia6_lib = $1; - } else { - print "\n*** Warning *** You didn't specify the PYTHIA6 path \n"; - } - # if it was not set, try to pick it up from the environment - if(! -d $gopt_with_pythia6_lib && defined $ENV{'PYTHIA6'}) { - $gopt_with_pythia6_lib = $ENV{'PYTHIA6'}; - print "The \$PYTHIA6 env var is defined. I will pick that and set --with-pythia6-lib=$gopt_with_pythia6_lib\n"; - } - # if it still not set, try autodetecting it - if(! -d $gopt_with_pythia6_lib && $auto_detect) - { - print "Auto-detecting the PYTHIA6 path...\n"; - $matched = auto_detect("libPythia6*"); - if( $matched=~m/(\S*)\/libPythia6\S*/i ) { - $gopt_with_pythia6_lib = $1; - } - print "Setting --with-pythia6-lib=$gopt_with_pythia6_lib\n"; - } - if(! -d $gopt_with_pythia6_lib) { - print "*** Error *** Could not locate the PYTHIA6 library path. Please specify it using --with-pythia6=/some/path/\n\n"; - exit 1; - } -} - # ------------------------------------------------ # PYTHIA8 paths # ------------------------------------------------ @@ -974,7 +929,6 @@ if ($gopt_enable_professor2 eq "YES") { # Save config options # -print MKCONF "GOPT_ENABLE_PYTHIA6=$gopt_enable_pythia6\n"; print MKCONF "GOPT_ENABLE_PYTHIA8=$gopt_enable_pythia8\n"; print MKCONF "GOPT_ENABLE_INCL=$gopt_enable_incl\n"; print MKCONF "GOPT_ENABLE_GEANT4_INTERFACE=$gopt_enable_geant4_interface\n"; @@ -1009,7 +963,6 @@ print MKCONF "GOPT_WITH_CXX_DEBUG_FLAG=$gopt_with_cxx_debug_flag\n"; print MKCONF "GOPT_WITH_CXX_OPTIMIZ_FLAG=-$gopt_with_cxx_optimiz_flag\n"; print MKCONF "GOPT_WITH_PROFILER_LIB=$gopt_with_profiler_lib\n"; print MKCONF "GOPT_WITH_DOXYGEN_PATH=$gopt_with_doxygen_path\n"; -print MKCONF "GOPT_WITH_PYTHIA6_LIB=$gopt_with_pythia6_lib\n"; print MKCONF "GOPT_WITH_PYTHIA8_LIB=$gopt_with_pythia8_lib\n"; print MKCONF "GOPT_WITH_PYTHIA8_INC=$gopt_with_pythia8_inc\n"; print MKCONF "GOPT_WITH_LHAPDF5_LIB=$gopt_with_lhapdf5_lib\n"; diff --git a/src/Physics/Decay/LinkDef.h b/src/Physics/Decay/LinkDef.h index b47d2388cb..01a6db9659 100644 --- a/src/Physics/Decay/LinkDef.h +++ b/src/Physics/Decay/LinkDef.h @@ -7,7 +7,6 @@ #pragma link C++ namespace genie; #pragma link C++ class genie::Decayer; -#pragma link C++ class genie::Pythia6Decayer2023; #pragma link C++ class genie::Pythia8Decayer2023; #pragma link C++ class genie::BaryonResonanceDecayer; diff --git a/src/Physics/Decay/Pythia6Decayer2023.cxx b/src/Physics/Decay/Pythia6Decayer2023.cxx deleted file mode 100644 index ea93b55336..0000000000 --- a/src/Physics/Decay/Pythia6Decayer2023.cxx +++ /dev/null @@ -1,460 +0,0 @@ -//____________________________________________________________________________ -/* - Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - - Costas Andreopoulos - University of Liverpool -*/ -//____________________________________________________________________________ - -#include -#include - -#include -#include -#include -#include - -#include "Framework/Conventions/GBuild.h" -#ifdef __GENIE_PYTHIA6_ENABLED__ -#if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,6) -#include -#else -#include -#endif -#endif - -#include "Framework/Conventions/Units.h" -#include "Framework/Conventions/Constants.h" -#include "Framework/ParticleData/BaryonResUtils.h" -#include "Framework/ParticleData/PDGLibrary.h" -#include "Framework/ParticleData/PDGCodes.h" -#include "Framework/ParticleData/PDGUtils.h" -#include "Framework/GHEP/GHepStatus.h" -#include "Framework/GHEP/GHepParticle.h" -#include "Framework/GHEP/GHepRecord.h" -#include "Framework/Messenger/Messenger.h" -#include "Framework/Numerical/RandomGen.h" -#include "Physics/Decay/Pythia6Decayer2023.h" - -using std::vector; - -using namespace genie; - -#ifdef __GENIE_PYTHIA6_ENABLED__ -// actual PYTHIA calls: -extern "C" void py1ent_(int *, int *, double *, double *, double *); -extern "C" void pydecy_(int *); -#endif - -//____________________________________________________________________________ -Pythia6Decayer2023::Pythia6Decayer2023() : -Decayer("genie::Pythia6Decayer2023") -{ - this->Initialize(); -} -//____________________________________________________________________________ -Pythia6Decayer2023::Pythia6Decayer2023(string config) : -Decayer("genie::Pythia6Decayer2023", config) -{ - this->Initialize(); -} -//____________________________________________________________________________ -Pythia6Decayer2023::~Pythia6Decayer2023() -{ - -} -//____________________________________________________________________________ -void Pythia6Decayer2023::ProcessEventRecord(GHepRecord * event) const -{ - LOG("ResonanceDecay", pINFO) - << "Running PYTHIA6 particle decayer " - << ((fRunBefHadroTransp) ? "*before*" : "*after*") << " FSI"; - - // Loop over particles, find unstable ones and decay them - TObjArrayIter piter(event); - GHepParticle * p = 0; - int ipos = -1; - - while( (p = (GHepParticle *) piter.Next()) ) { - ipos++; - - LOG("Pythia6Decay", pDEBUG) << "Checking: " << p->Name(); - - int pdg_code = p->Pdg(); - GHepStatus_t status_code = p->Status(); - - if(!this->IsHandled (pdg_code)) continue; - if(!this->ToBeDecayed(pdg_code, status_code)) continue; - - LOG("Pythia6Decay", pNOTICE) - << "Decaying unstable particle: " << p->Name(); - - bool decayed = this->Decay(ipos, event); - assert(decayed); // handle this more graciously and throw an exception - } - - LOG("Pythia6Decay", pNOTICE) - << "Done finding & decaying unstable particles"; -} -//____________________________________________________________________________ -bool Pythia6Decayer2023::Decay(int decay_particle_id, GHepRecord * event) const -{ - fWeight = 1.; // reset previous decay weight - -#ifdef __GENIE_PYTHIA6_ENABLED__ - // Get particle to be decayed - GHepParticle * decay_particle = event->Particle(decay_particle_id); - if(!decay_particle) return 0; - - // Get the particle 4-momentum, 4-position and PDG code - TLorentzVector decay_particle_p4 = *(decay_particle->P4()); - int decay_particle_pdg_code = decay_particle->Pdg(); - - // Convert to PYTHIA6 particle code and check whether decay is inhibited - int kc = fPythia->Pycomp(decay_particle_pdg_code); - int mdcy = fPythia->GetMDCY(kc, 1); - if(mdcy == 0) { - LOG("Pythia6Decay", pNOTICE) - << (PDGLibrary::Instance())->Find(decay_particle_pdg_code)->GetName() - << " decays are inhibited!"; - return false; - } - - // Get sub of BRs and compute weight if decay channels were inhibited - double sumbr = this->SumOfBranchingRatios(kc); - if(sumbr <= 0) { - LOG("Pythia6Decay", pWARN) - << "The sum of enabled " - << (PDGLibrary::Instance())->Find(decay_particle_pdg_code)->GetName() - << " decay channel branching ratios is non-positive!"; - return false; - } - fWeight = 1./sumbr; // update weight to account for inhibited channels - - // Run PYTHIA6 decay - int ip = 0; - double E = decay_particle_p4.Energy(); - double theta = decay_particle_p4.Theta(); - double phi = decay_particle_p4.Phi(); - fPythia->SetMSTJ(22,1); - py1ent_(&ip, &decay_particle_pdg_code, &E, &theta, &phi); - - // Get decay products - fPythia->GetPrimaries(); - TClonesArray * impl = (TClonesArray *) fPythia->ImportParticles("All"); - if(!impl) { - LOG("Pythia6Decay", pWARN) - << "TPythia6::ImportParticles() returns a null list!"; - return false; - } - - // Copy the PYTHIA6 container to the GENIE event record - - // Check whether the interaction is off a nuclear target or free nucleon - // Depending on whether this module is run before or after the hadron - // transport module it would affect the daughters status code - GHepParticle * target_nucleus = event->TargetNucleus(); - bool in_nucleus = (target_nucleus!=0); - - // the values of space coordinates from pythia are in mm. - // our conventions want it in fm - constexpr double space_scale = units::mm / units::fm ; - - // the values of time coordinate from pythia is in mm/c. - // our conventions want it in ys - constexpr double time_scale = 1e21 * units::m / units::s ; - - TMCParticle * p = 0; - TIter particle_iter(impl); - while( (p = (TMCParticle *) particle_iter.Next()) ) { - // Convert from TMCParticle to GHepParticle - GHepParticle mcp = GHepParticle( - p->GetKF(), // pdg - GHepStatus_t(p->GetKS()), // status - p->GetParent(), // first parent - 0, // second parent - p->GetFirstChild(), // first daughter - p->GetLastChild(), // second daughter - p->GetPx(), // px - p->GetPy(), // py - p->GetPz(), // pz - p->GetEnergy(), // e - p->GetVx() * space_scale , // x - p->GetVy() * space_scale , // y - p->GetVz() * space_scale , // z - p->GetTime() * time_scale // t - ); - - if(mcp.Status()==kIStNucleonTarget) continue; // mother particle, already in GHEP - - int daughter_pdg_code = mcp.Pdg(); - SLOG("Pythia6Decay", pINFO) - << "Adding daughter particle wit PDG code = " - << daughter_pdg_code << ", m = " << mcp.Mass() - << " GeV, E = " << mcp.Energy() << " GeV)"; - - bool is_hadron = pdg::IsHadron(daughter_pdg_code); - bool hadron_in_nuc = (in_nucleus && is_hadron && fRunBefHadroTransp); - - GHepStatus_t daughter_status_code = (hadron_in_nuc) ? - kIStHadronInTheNucleus : kIStStableFinalState; - - TLorentzVector daughter_p4( - mcp.Px(),mcp.Py(),mcp.Pz(),mcp.Energy()); - - event->AddParticle( - daughter_pdg_code, daughter_status_code, - decay_particle_id,-1,-1,-1, - daughter_p4, * mcp.X4() ); - } - - // Update the event weight for each weighted particle decay - double weight = event->Weight() * fWeight; - event->SetWeight(weight); - - // Mark input particle as a 'decayed state' & add its daughter links - decay_particle->SetStatus(kIStDecayedState); - - return true; -#else - LOG("Pythia6Decay", pFATAL) - << "calling GENIE/PYTHIA6 decay without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); - -return false; -#endif -} -//____________________________________________________________________________ -void Pythia6Decayer2023::Initialize(void) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia = TPythia6::Instance(); - fWeight = 1.; - - // sync GENIE/PYTHIA6 seeds - RandomGen::Instance(); -#else - LOG("Pythia6Decay", pFATAL) - << "calling GENIE/PYTHIA6 decay without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif -} -//____________________________________________________________________________ -bool Pythia6Decayer2023::IsHandled(int pdg_code) const -{ -// does not handle requests to decay baryon resonances - - bool is_handled = (!utils::res::IsBaryonResonance(pdg_code)); - - LOG("Pythia6Decay", pDEBUG) - << "Can decay particle with PDG code = " << pdg_code - << "? " << ((is_handled)? "Yes" : "No"); - - return is_handled; -} -//____________________________________________________________________________ -void Pythia6Decayer2023::InhibitDecay(int pdg_code, TDecayChannel * dc) const -{ - if(! this->IsHandled(pdg_code)) return; - -#ifdef __GENIE_PYTHIA6_ENABLED__ - int kc = fPythia->Pycomp(pdg_code); - - if(!dc) { - LOG("Pythia6Decay", pINFO) - << "Switching OFF ALL decay channels for particle = " << pdg_code; - fPythia->SetMDCY(kc, 1,0); - return; - } - - LOG("Pythia6Decay", pINFO) - << "Switching OFF decay channel = " << dc->Number() - << " for particle = " << pdg_code; - - int ichannel = this->FindPythiaDecayChannel(kc, dc); - if(ichannel != -1) { - fPythia->SetMDME(ichannel,1,0); // switch-off - } -#else - LOG("Pythia6Decay", pFATAL) - << "calling GENIE/PYTHIA6 decay without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif - -} -//____________________________________________________________________________ -void Pythia6Decayer2023::UnInhibitDecay(int pdg_code, TDecayChannel * dc) const -{ - if(! this->IsHandled(pdg_code)) return; - -#ifdef __GENIE_PYTHIA6_ENABLED__ - int kc = fPythia->Pycomp(pdg_code); - - if(!dc) { - LOG("Pythia6Decay", pINFO) - << "Switching ON all PYTHIA decay channels for particle = " << pdg_code; - - fPythia->SetMDCY(kc, 1,1); - - int first_channel = fPythia->GetMDCY(kc,2); - int last_channel = fPythia->GetMDCY(kc,2) + fPythia->GetMDCY(kc,3) - 1; - - for(int ichannel = first_channel; - ichannel < last_channel; ichannel++) { - fPythia->SetMDME(ichannel,1,1); // switch-on - } - return; - }//!dc - - LOG("Pythia6Decay", pINFO) - << "Switching OFF decay channel = " << dc->Number() - << " for particle = " << pdg_code; - - int ichannel = this->FindPythiaDecayChannel(kc, dc); - if(ichannel != -1) { - fPythia->SetMDME(ichannel,1,1); // switch-on - } -#else - LOG("Pythia6Decay", pFATAL) - << "calling GENIE/PYTHIA6 decay without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif -} -//____________________________________________________________________________ -double Pythia6Decayer2023::SumOfBranchingRatios(int kc) const -{ -// Sum of branching ratios for enabled channels -// - double sumbr=0.; - -#ifdef __GENIE_PYTHIA6_ENABLED__ - int first_channel = fPythia->GetMDCY(kc,2); - int last_channel = fPythia->GetMDCY(kc,2) + fPythia->GetMDCY(kc,3) - 1; - - bool has_inhibited_channels=false; - - // loop over pythia decay channels - for(int ichannel = first_channel; - ichannel < last_channel; ichannel++) { - - bool enabled = (fPythia->GetMDME(ichannel,1) == 1); - if (!enabled) { - has_inhibited_channels = true; - } else { - sumbr += fPythia->GetBRAT(ichannel); - } - } - - if(!has_inhibited_channels) return 1.; - LOG("Pythia6Decay", pINFO) << "Sum{BR} = " << sumbr; -#else - LOG("Pythia6Decay", pFATAL) - << "calling GENIE/PYTHIA6 decay without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif - - return sumbr; -} -//____________________________________________________________________________ -int Pythia6Decayer2023::FindPythiaDecayChannel(int kc, TDecayChannel* dc) const -{ - if(!dc) return -1; - -#ifdef __GENIE_PYTHIA6_ENABLED__ - int first_channel = fPythia->GetMDCY(kc,2); - int last_channel = fPythia->GetMDCY(kc,2) + fPythia->GetMDCY(kc,3) - 1; - - bool found_match = false; - - // loop over pythia decay channels - for(int ichannel = first_channel; - ichannel < last_channel; ichannel++) { - - // does the current pythia channel matches the input TDecayChannel? - LOG("Pythia6Decay", pINFO) - << "\nComparing PYTHIA's channel = " << ichannel - << " with TDecayChannel = " << dc->Number(); - - found_match = this->MatchDecayChannels(ichannel,dc); - if(found_match) { - LOG("Pythia6Decay", pNOTICE) - << " ** TDecayChannel id = " << dc->Number() - << " corresponds to PYTHIA6 channel id = " << ichannel; - return ichannel; - }//match? - }//loop pythia decay ch. - - LOG("Pythia6Decay", pWARN) - << " ** No PYTHIA6 decay channel match found for " - << "TDecayChannel id = " << dc->Number(); -#else - LOG("Pythia6Decay", pFATAL) - << "calling GENIE/PYTHIA6 decay without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif - - - return -1; -} -//____________________________________________________________________________ -bool Pythia6Decayer2023::MatchDecayChannels(int ichannel, TDecayChannel* dc) const -{ - // num. of daughters in the input TDecayChannel & the input PYTHIA ichannel - int nd = dc->NDaughters(); - -#ifdef __GENIE_PYTHIA6_ENABLED__ - int py_nd = 0; - for (int i = 1; i <= 5; i++) { - if(fPythia->GetKFDP(ichannel,i) != 0) py_nd++; - } - - LOG("Pythia6Decay", pDEBUG) - << "NDaughters: PYTHIA = " << py_nd << ", ROOT's TDecayChannel = " << nd; - - if(nd != py_nd) return false; - - // - // if the two channels have the same num. of daughters, then compare them - // - - // store decay daughters for the input TDecayChannel - vector dc_daughter(nd); - int k=0; - for( ; k < nd; k++) { - dc_daughter[k] = dc->DaughterPdgCode(k); - } - // store decay daughters for the input PYTHIA's ichannel - vector py_daughter(nd); - k=0; - for(int i = 1; i <= 5; i++) { - if(fPythia->GetKFDP(ichannel,i) == 0) continue; - py_daughter[k] = fPythia->GetKFDP(ichannel,i); - k++; - } - - // sort both daughter lists - sort( dc_daughter.begin(), dc_daughter.end() ); - sort( py_daughter.begin(), py_daughter.end() ); - - // compare - for(int i = 0; i < nd; i++) { - if(dc_daughter[i] != py_daughter[i]) return false; - } -#else - LOG("Pythia6Decay", pFATAL) - << "calling GENIE/PYTHIA6 decay without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif - - return true; -} -//____________________________________________________________________________ diff --git a/src/Physics/Decay/Pythia6Decayer2023.h b/src/Physics/Decay/Pythia6Decayer2023.h deleted file mode 100644 index 22c67496da..0000000000 --- a/src/Physics/Decay/Pythia6Decayer2023.h +++ /dev/null @@ -1,61 +0,0 @@ -//____________________________________________________________________________ -/*! - -\class genie::Pythia6Decayer2023 - -\brief Interface to PYTHIA particle decayer. \n - The Pythia6Decayer2023 is a concrete implementation of the Decayer - interface. - -\author Costas Andreopoulos - University of Liverpool - -\created June 20, 2004 - -\cpright Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org -*/ -//____________________________________________________________________________ - -#ifndef _PYTHIA6_DECAYER_I_H_ -#define _PYTHIA6_DECAYER_I_H_ - -#include "Framework/Conventions/GBuild.h" -#ifdef __GENIE_PYTHIA6_ENABLED__ -#include -#endif - -#include "Physics/Decay/Decayer.h" - -namespace genie { - -class GHepParticle; -class Pythia6Decayer2023: protected Decayer { - -public: - Pythia6Decayer2023(); - Pythia6Decayer2023(string config); - virtual ~Pythia6Decayer2023(); - - // Implement the EventRecordVisitorI interface - void ProcessEventRecord(GHepRecord * event) const; - -private: - - void Initialize (void) const; - bool IsHandled (int pdgc) const; - void InhibitDecay (int pdgc, TDecayChannel * ch=0) const; - void UnInhibitDecay (int pdgc, TDecayChannel * ch=0) const; - bool Decay (int ip, GHepRecord * event) const; - double SumOfBranchingRatios (int kc) const; - int FindPythiaDecayChannel (int kc, TDecayChannel * ch) const; - bool MatchDecayChannels (int ic, TDecayChannel * ch) const; - -#ifdef __GENIE_PYTHIA6_ENABLED__ - mutable TPythia6 * fPythia; ///< PYTHIA6 wrapper class -#endif - mutable double fWeight; -}; - -} // genie namespace -#endif // _PYTHIA6_DECAYER_H_ diff --git a/src/Physics/HELepton/EventGen/GLRESWdecPythia6.cxx b/src/Physics/HELepton/EventGen/GLRESWdecPythia6.cxx deleted file mode 100644 index e116ab20a4..0000000000 --- a/src/Physics/HELepton/EventGen/GLRESWdecPythia6.cxx +++ /dev/null @@ -1,320 +0,0 @@ -//____________________________________________________________________________ -/* - Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - - Alfonso Garcia - IFIC (Valencia) -*/ -//____________________________________________________________________________ - -#include "Physics/HELepton/EventGen/GLRESWdecPythia6.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,6) -#include -#else -#include -#endif -#endif // __GENIE_PYTHIA6_ENABLED__ - -//___________________________________________________________________________ -GLRESWdecPythia6::GLRESWdecPythia6() : -EventRecordVisitorI("genie::GLRESWdecPythia6") -{ - this->Initialize(); - born = new Born(); -} -//___________________________________________________________________________ -GLRESWdecPythia6::GLRESWdecPythia6(string config) : -EventRecordVisitorI("genie::GLRESWdecPythia6", config) -{ - this->Initialize(); - born = new Born(); -} -//___________________________________________________________________________ -GLRESWdecPythia6::~GLRESWdecPythia6() -{ - -} -//____________________________________________________________________________ -void GLRESWdecPythia6::ProcessEventRecord(GHepRecord * event) const -{ - - if(!this->Wdecay(event)) { - LOG("GLRESGenerator", pWARN) << "W decayer failed!"; - event->EventFlags()->SetBitNumber(kHadroSysGenErr, true); - genie::exceptions::EVGThreadException exception; - exception.SetReason("Could not simulate the W decay system"); - exception.SwitchOnFastForward(); - throw exception; - return; - } - -} -//___________________________________________________________________________ -bool GLRESWdecPythia6::Wdecay(GHepRecord * -#ifdef __GENIE_PYTHIA6_ENABLED__ - event // avoid unused variable warning if PYTHIA6 is not enabled -#endif -) const -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - Interaction * interaction = event->Summary(); - const InitialState & init_state = interaction->InitState(); - - //incoming v & struck particle & remnant nucleus - GHepParticle * nu = event->Probe(); - GHepParticle * el = event->HitElectron(); - - GHepParticle * target = event -> TargetNucleus(); - if(target) event->AddParticle(target->Pdg(), kIStFinalStateNuclearRemnant, 1,-1,-1,-1, *(target->P4()), *(target->X4()) ); - - TVector3 unit_nu = nu->P4()->Vect().Unit(); - - long double mlout = interaction->FSPrimLepton()->Mass(); //mass of charged lepton - long double mlin = kElectronMass; //mass of incoming charged lepton - - long double Enuin = init_state.ProbeE(kRfLab); - long double s = born->GetS(mlin,Enuin); - - long double n1 = interaction->Kine().GetKV(kKVn1); - long double n2 = interaction->Kine().GetKV(kKVn2); - - long double costhCM = n1; - long double sinthCM = sqrtl(1-costhCM*costhCM); - - long double t = born->GetT(mlin,mlout,s,n1); - long double zeta = born->GetReAlpha()/kPi*(2.0*logl(sqrtl(-t)/kElectronMass)-1.0); - long double omx = powl(n2, 1.0/zeta ); - long double s_r = s*( 1.-omx ); - - // Boost velocity CM -> LAB - long double EnuinCM = (s_r-mlin*mlin)/sqrtl(s_r)/2.; - long double beta = (powl(Enuin,2)-powl(EnuinCM,2))/(powl(Enuin,2)+powl(EnuinCM,2)); - - // Final state primary lepton PDG code - int pdgl = interaction->FSPrimLeptonPdg(); - assert(pdgl!=0); - - if ( pdg::IsElectron(TMath::Abs(pdgl)) || pdg::IsMuon(TMath::Abs(pdgl)) || pdg::IsTau(TMath::Abs(pdgl)) ) { - - long double ElpoutCM = (s_r+mlout*mlout)/sqrtl(s_r)/2.; - long double EnuoutCM = (s_r-mlout*mlout)/sqrtl(s_r)/2.; - LongLorentzVector p4_lpout( 0., EnuoutCM*sinthCM, EnuoutCM*costhCM, ElpoutCM ); - LongLorentzVector p4_nuout( 0., -EnuoutCM*sinthCM, -EnuoutCM*costhCM, EnuoutCM ); - - p4_lpout.BoostZ(beta); - p4_nuout.BoostZ(beta); - - TLorentzVector p4lp_o( (double)p4_lpout.Px(), (double)p4_lpout.Py(), (double)p4_lpout.Pz(), (double)p4_lpout.E() ); - TLorentzVector p4nu_o( (double)p4_nuout.Px(), (double)p4_nuout.Py(), (double)p4_nuout.Pz(), (double)p4_nuout.E() ); - - // Randomize transverse components - RandomGen * rnd = RandomGen::Instance(); - double phi = 2* kPi * rnd->RndLep().Rndm(); - p4lp_o.RotateZ(phi); - p4nu_o.RotateZ(phi); - - //rotate from LAB=[0,0,Ev,Ev]->[px,py,pz,E] - p4lp_o.RotateUz(unit_nu); - p4nu_o.RotateUz(unit_nu); - - int pdgvout = 0; - if ( pdg::IsElectron(pdgl) ) pdgvout = kPdgAntiNuE; - else if ( pdg::IsPositron(pdgl) ) pdgvout = kPdgNuE; - else if ( pdg::IsMuon(pdgl) ) pdgvout = kPdgAntiNuMu; - else if ( pdg::IsAntiMuon(pdgl) ) pdgvout = kPdgNuMu; - else if ( pdg::IsTau(pdgl) ) pdgvout = kPdgAntiNuTau; - else if ( pdg::IsAntiTau(pdgl) ) pdgvout = kPdgNuTau; - - int pdgboson = pdg::IsNeutrino(init_state.ProbePdg()) ? kPdgWP : kPdgWM; - - // Create a GHepParticle and add it to the event record - event->AddParticle( pdgboson, kIStDecayedState, 0, -1, 5, 6, *nu->P4()+*el->P4(), *(nu->X4()) ); //W [mothers: nuebar_in,e_in][daugthers: nulbar_out,lp_out] - event->AddParticle( pdgl, kIStStableFinalState, 4, -1, -1, -1, p4lp_o, *(nu->X4()) ); - event->AddParticle( pdgvout, kIStStableFinalState, 4, -1, -1, -1, p4nu_o, *(nu->X4()) ); - event->Summary()->KinePtr()->SetFSLeptonP4(p4lp_o); - - } - else { - - char p6frame[10],p6nu[10],p6tgt[10]; - strcpy(p6frame, "CMS" ); - strcpy(p6nu, "nu_ebar" ); - strcpy(p6tgt, "e-" ); - - int def61 = fPythia->GetMSTP(61); - int def71 = fPythia->GetMSTP(71); - int def206 = fPythia->GetMDME(206,1); - int def207 = fPythia->GetMDME(207,1); - int def208 = fPythia->GetMDME(208,1); - fPythia->SetMSTP(61,0); // (Default=2) master switch for initial-state QCD and QED radiation. - fPythia->SetMSTP(71,0); // (Default=2) master switch for initial-state QCD and QED radiation. - fPythia->SetMDME(206,1,0); //swicht off W decay leptonic modes - fPythia->SetMDME(207,1,0); - fPythia->SetMDME(208,1,0); - - fPythia->Pyinit(p6frame, p6nu, p6tgt, sqrtl(s_r)); - fPythia->Pyevnt(); - - fPythia->SetMSTP(61,def61); - fPythia->SetMSTP(71,def71); - fPythia->SetMDME(206,1,def206); - fPythia->SetMDME(207,1,def207); - fPythia->SetMDME(208,1,def208); - - // get LUJETS record - fPythia->GetPrimaries(); - TClonesArray * pythia_particles = (TClonesArray *) fPythia->ImportParticles("All"); - int np = pythia_particles->GetEntries(); - assert(np>0); - - TMCParticle * particle = 0; - TIter piter(pythia_particles); - while( (particle = (TMCParticle *) piter.Next()) ) { - - int pdgc = particle->GetKF(); - int ks = particle->GetKS(); - - if ( ks==21 ) { continue; } //we dont want to save first particles from pythia (init states) - - LongLorentzVector p4longo(particle->GetPx(), particle->GetPy(), particle->GetPz(), particle->GetEnergy()); - p4longo.BoostZ(beta); - - TLorentzVector p4o( (double)p4longo.Px(), (double)p4longo.Py(), (double)p4longo.Pz(), (double)p4longo.E() ); - p4o.RotateUz(unit_nu); - - double massPDG = PDGLibrary::Instance()->Find(pdgc)->Mass(); - if ( (ks==1 || ks==4) && p4o.E()LoadConfig(); -} -//____________________________________________________________________________ -void GLRESWdecPythia6::Configure(string config) -{ - Algorithm::Configure(config); - this->LoadConfig(); -} -//____________________________________________________________________________ -void GLRESWdecPythia6::LoadConfig(void) -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - GetParam( "SSBarSuppression", fSSBarSuppression ); - GetParam( "GaussianPt2", fGaussianPt2 ); - GetParam( "NonGaussianPt2Tail", fNonGaussianPt2Tail ); - GetParam( "RemainingEnergyCutoff", fRemainingECutoff ); - GetParam( "DiQuarkSuppression", fDiQuarkSuppression ); - GetParam( "LightVMesonSuppression", fLightVMesonSuppression ); - GetParam( "SVMesonSuppression", fSVMesonSuppression ); - GetParam( "Lunda", fLunda ); - GetParam( "Lundb", fLundb ); - GetParam( "LundaDiq", fLundaDiq ); - - // PYTHIA parameters only valid for HEDIS - double wmin; GetParam( "Xsec-Wmin", wmin ) ; - int warnings; GetParam( "Warnings", warnings ) ; - int errors; GetParam( "Errors", errors ) ; - int qrk_mass; GetParam( "QuarkMass", qrk_mass ) ; - fPythia->SetPARP(2, wmin); //(D = 10. GeV) lowest c.m. energy for the event as a whole that the program will accept to simulate. (bellow 2GeV pythia crashes) - fPythia->SetMSTU(26, warnings); // (Default=10) maximum number of warnings that are printed - fPythia->SetMSTU(22, errors); // (Default=10) maximum number of errors that are printed - fPythia->SetMSTJ(93, qrk_mass); // light (d, u, s, c, b) quark masses are taken from PARF(101) - PARF(105) rather than PMAS(1,1) - PMAS(5,1). Diquark masses are given as sum of quark masses, without spin splitting term. - fPythia->SetPMAS(24,1,kMw); //mass of the W boson (pythia=80.450 // genie=80.385) - fPythia->SetPMAS(24,2,0.); //set to 0 the width of the W boson to avoid problems with energy conservation - fPythia->SetPMAS(6,2,0.); //set to 0 the width of the top to avoid problems with energy conservation - fPythia->SetMDME(192,1,0); // W->dbar+t decay off - fPythia->SetMDME(196,1,0); // W->cbar+t decay off - fPythia->SetMDME(200,1,0); // W->cbar+t decay off - - // PYTHIA tuned parameters - fPythia->SetPARJ(2, fSSBarSuppression ); - fPythia->SetPARJ(21, fGaussianPt2 ); - fPythia->SetPARJ(23, fNonGaussianPt2Tail ); - fPythia->SetPARJ(33, fRemainingECutoff ); - fPythia->SetPARJ(1, fDiQuarkSuppression ); - fPythia->SetPARJ(11, fLightVMesonSuppression ); - fPythia->SetPARJ(12, fSVMesonSuppression ); - fPythia->SetPARJ(41, fLunda ); - fPythia->SetPARJ(42, fLundb ); - fPythia->SetPARJ(45, fLundaDiq ); -#endif // __GENIE_PYTHIA6_ENABLED__ - -} -//____________________________________________________________________________ -void GLRESWdecPythia6::Initialize(void) const -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia = TPythia6::Instance(); - - // sync GENIE/PYTHIA6 seed number - RandomGen::Instance(); -#endif - -} diff --git a/src/Physics/HELepton/EventGen/GLRESWdecPythia6.h b/src/Physics/HELepton/EventGen/GLRESWdecPythia6.h deleted file mode 100644 index a050de7e6c..0000000000 --- a/src/Physics/HELepton/EventGen/GLRESWdecPythia6.h +++ /dev/null @@ -1,89 +0,0 @@ -//____________________________________________________________________________ -/*! - -\class genie::GLRESWdecPythia6 - -\brief Glashow resonance decay with pythia6. - -\author Alfonso Garcia - IFIC (Valencia) - -\created Dec 12, 2024 - -\cpright Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - or see $GENIE/LICENSE -*/ -//____________________________________________________________________________ - -#ifndef _GLASHOW_RESONANCE_WDEC_PYTHIA6_H_ -#define _GLASHOW_RESONANCE_WDEC_PYTHIA6_H_ - -#include "Framework/EventGen/EventRecordVisitorI.h" -#include "Framework/Conventions/Constants.h" -#include "Framework/Numerical/RandomGen.h" -#include "Framework/Numerical/MathUtils.h" -#include "Framework/GHEP/GHepRecord.h" -#include "Framework/GHEP/GHepParticle.h" -#include "Framework/GHEP/GHepFlags.h" -#include "Framework/ParticleData/PDGCodes.h" -#include "Framework/ParticleData/PDGUtils.h" -#include "Framework/ParticleData/PDGLibrary.h" -#include "Framework/EventGen/EVGThreadException.h" -#include "Framework/Utils/StringUtils.h" -#include "Physics/HELepton/XSection/Born.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#include -#endif - -using namespace genie; -using namespace genie::constants; -using namespace genie::utils::math; - -namespace genie { - -class GLRESWdecPythia6 : public EventRecordVisitorI { - -public : - GLRESWdecPythia6(); - GLRESWdecPythia6(string config); - ~GLRESWdecPythia6(); - - //-- implement the HadronizationModelI interface - void ProcessEventRecord(GHepRecord * event) const; - - //-- overload the Algorithm::Configure() methods to load private data - // members from configuration options - void Configure(const Registry & config); - void Configure(string config); - -private: - - bool Wdecay (GHepRecord * event) const; - - void Initialize (void) const; - void LoadConfig (void); - - // PYTHIA physics configuration parameters used - double fSSBarSuppression; ///< ssbar suppression - double fGaussianPt2; ///< gaussian pt2 distribution width - double fNonGaussianPt2Tail; ///< non gaussian pt2 tail parameterization - double fRemainingECutoff; ///< remaining E cutoff stopping fragmentation - double fDiQuarkSuppression; ///< di-quark suppression parameter - double fLightVMesonSuppression; ///< light vector meson suppression - double fSVMesonSuppression; ///< strange vector meson suppression - double fLunda; ///< Lund a parameter - double fLundb; ///< Lund b parameter - double fLundaDiq; ///< adjustment of Lund a for di-quark - - Born * born; - -#ifdef __GENIE_PYTHIA6_ENABLED__ - mutable TPythia6 * fPythia; ///< PYTHIA6 wrapper class -#endif - -}; - -} // genie namespace -#endif // _GLASHOW_RESONANCE_WDEC_PYTHIA6_H_ diff --git a/src/Physics/HELepton/EventGen/LinkDef.h b/src/Physics/HELepton/EventGen/LinkDef.h index 55c180268a..e46f207859 100644 --- a/src/Physics/HELepton/EventGen/LinkDef.h +++ b/src/Physics/HELepton/EventGen/LinkDef.h @@ -10,14 +10,11 @@ #pragma link C++ class genie::HELeptonKinematicsGenerator; #pragma link C++ class genie::GLRESGenerator; -#pragma link C++ class genie::GLRESWdecPythia6; #pragma link C++ class genie::GLRESWdecPythia8; #pragma link C++ class genie::HENuElGenerator; #pragma link C++ class genie::PhotonRESGenerator; -#pragma link C++ class genie::PhotonRESWdecPythia6; #pragma link C++ class genie::PhotonRESWdecPythia8; #pragma link C++ class genie::PhotonCOHGenerator; -#pragma link C++ class genie::PhotonCOHWdecPythia6; #pragma link C++ class genie::PhotonCOHWdecPythia8; #endif diff --git a/src/Physics/HELepton/EventGen/PhotonCOHWdecPythia6.cxx b/src/Physics/HELepton/EventGen/PhotonCOHWdecPythia6.cxx deleted file mode 100644 index 5a30a06651..0000000000 --- a/src/Physics/HELepton/EventGen/PhotonCOHWdecPythia6.cxx +++ /dev/null @@ -1,286 +0,0 @@ -//____________________________________________________________________________ -/* - Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - - Alfonso Garcia - IFIC (Valencia) -*/ -//____________________________________________________________________________ - -#include "Physics/HELepton/EventGen/PhotonCOHWdecPythia6.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,6) -#include -#else -#include -#endif -#endif - -//___________________________________________________________________________ -PhotonCOHWdecPythia6::PhotonCOHWdecPythia6() : -EventRecordVisitorI("genie::PhotonCOHWdecPythia6") -{ - this->Initialize(); -} -//___________________________________________________________________________ -PhotonCOHWdecPythia6::PhotonCOHWdecPythia6(string config) : -EventRecordVisitorI("genie::PhotonCOHWdecPythia6", config) -{ - this->Initialize(); -} -//___________________________________________________________________________ -PhotonCOHWdecPythia6::~PhotonCOHWdecPythia6() -{ - -} -//____________________________________________________________________________ -void PhotonCOHWdecPythia6::ProcessEventRecord(GHepRecord * event) const -{ - - if(!this->Wdecay(event)) { - LOG("PhotonCOHGenerator", pWARN) << "W decayer failed!"; - event->EventFlags()->SetBitNumber(kHadroSysGenErr, true); - genie::exceptions::EVGThreadException exception; - exception.SetReason("Could not simulate the W decay system"); - exception.SwitchOnFastForward(); - throw exception; - return; - } - -} -//___________________________________________________________________________ -bool PhotonCOHWdecPythia6::Wdecay(GHepRecord * -#ifdef __GENIE_PYTHIA6_ENABLED__ - event // avoid unused variable warning if PYTHIA6 is not enabled -#endif -) const -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - Interaction * interaction = event->Summary(); - const InitialState & init_state = interaction->InitState(); - - //incoming v & struck particle & remnant nucleus - GHepParticle * nu = event->Probe(); - - GHepParticle * target = event -> TargetNucleus(); - if(target) event->AddParticle(target->Pdg(), kIStFinalStateNuclearRemnant, 1,-1,-1,-1, *(target->P4()), *(target->X4()) ); - - TVector3 unit_nu = nu->P4()->Vect().Unit(); - - long double Ev = init_state.ProbeE(kRfLab); - - long double Mtgt = init_state.Tgt().Z()*kProtonMass + init_state.Tgt().N()*kNeutronMass; - - long double n1 = interaction->Kine().GetKV(kKVn1); - long double n2 = interaction->Kine().GetKV(kKVn2); - long double n3 = interaction->Kine().GetKV(kKVn3); - - long double costh = n1; - long double sinth = sqrtl(1-costh*costh); - - long double mlout = 0; - if (pdg::IsNuE (TMath::Abs(nu->Pdg()))) mlout = kElectronMass; - else if (pdg::IsNuMu (TMath::Abs(nu->Pdg()))) mlout = kMuonMass; - else if (pdg::IsNuTau(TMath::Abs(nu->Pdg()))) mlout = kTauMass; - long double mlout2 = mlout*mlout; - - long double mL = mlout+kMw; - long double Delta = sqrtl( powl(2.*Ev*Mtgt-mL*mL,2)-4.*powl(Mtgt*mL,2) ); - long double s12_min = Ev/(2.*Ev+Mtgt)*(mL*mL+2.*Ev*Mtgt-Delta); - long double s12_max = Ev/(2.*Ev+Mtgt)*(mL*mL+2.*Ev*Mtgt+Delta); - long double s12 = expl( logl(s12_min)+(logl(s12_max)-logl(s12_min))*n2); - long double Q2_min = powl(s12,2)*Mtgt/(2.*Ev*(2.*Ev*Mtgt-s12)); - long double Q2_max = s12 - mL*mL; - double Q2 = expl( logl(Q2_min) + (logl(Q2_max)-logl(Q2_min))*n3 ); - double s_r = s12 - Q2; - - long double EW = (s_r+kMw2-mlout2)/sqrtl(s_r)/2.; - long double El = (s_r-kMw2+mlout2)/sqrtl(s_r)/2.; - long double p = sqrtl( EW*EW - kMw2 ); - LongLorentzVector p4_lout( 0., -p*sinth, -p*costh, El ); - - long double bz = 4.*Ev*Mtgt*Q2/(Q2+s_r)/(2.*Ev*Mtgt-Q2) - (2.*Ev*Mtgt+Q2)/(2.*Ev*Mtgt-Q2); - long double by = sqrtl(Mtgt*powl(Q2+s_r,2)/(2.*Ev*Q2*(s_r+Q2-2.*Ev*Mtgt))+1.); - - p4_lout.BoostZ(-bz); - p4_lout.BoostY(-by); - - TLorentzVector p4l_o(p4_lout.Px(),p4_lout.Py(),p4_lout.Pz(),p4_lout.E()); - p4l_o.RotateX((double)acosl(by)-kPi/2.); - - - // Randomize transverse components - RandomGen * rnd = RandomGen::Instance(); - double phi = 2 * kPi * rnd->RndLep().Rndm(); - - p4l_o.RotateZ(phi); - - //rotate from LAB=[0,0,Ev,Ev]->[px,py,pz,E] - p4l_o.RotateUz(unit_nu); - - int pdglout = 0; - if (pdg::IsAntiNuE (nu->Pdg())) pdglout = kPdgPositron; - else if (pdg::IsNuE (nu->Pdg())) pdglout = kPdgElectron; - else if (pdg::IsAntiNuMu (nu->Pdg())) pdglout = kPdgAntiMuon; - else if (pdg::IsNuMu (nu->Pdg())) pdglout = kPdgMuon; - else if (pdg::IsAntiNuTau(nu->Pdg())) pdglout = kPdgAntiTau; - else if (pdg::IsNuTau (nu->Pdg())) pdglout = kPdgTau; - - // Create a GHepParticle and add it to the event record - event->AddParticle( pdglout, kIStStableFinalState, 0, -1, -1, -1, p4l_o, *(nu->X4()) ); - - int pdgboson = pdg::IsNeutrino(init_state.ProbePdg()) ? kPdgWP : kPdgWM; - - int def61 = fPythia->GetMSTP(61); - int def71 = fPythia->GetMSTP(71); - fPythia->SetMSTP(61,0); // (Default=2) master switch for initial-state QCD and QED radiation. - fPythia->SetMSTP(71,0); // (Default=2) master switch for initial-state QCD and QED radiation. - - fPythia->Py1ent( -1, pdgboson, EW, acosl(costh), kPi/2. ); //k(1,2) = 2 - fPythia->Pyexec(); - - fPythia->SetMSTP(61,def61); - fPythia->SetMSTP(71,def71); - - fPythia->GetPrimaries(); - TClonesArray * pythia_particles = (TClonesArray *) fPythia->ImportParticles("All"); - int np = pythia_particles->GetEntries(); - assert(np>0); - - TMCParticle * particle = 0; - TIter piter(pythia_particles); - while( (particle = (TMCParticle *) piter.Next()) ) { - - int pdgc = particle->GetKF(); - int ks = particle->GetKS(); - - LongLorentzVector p4longo(particle->GetPx(), particle->GetPy(), particle->GetPz(), particle->GetEnergy()); - p4longo.BoostZ(-bz); - p4longo.BoostY(-by); - - TLorentzVector p4o(p4longo.Px(),p4longo.Py(),p4longo.Pz(),p4longo.E()); - p4o.RotateX((double)acosl(by)-kPi/2.); - p4o.RotateZ(phi); - p4o.RotateUz(unit_nu); - - double massPDG = PDGLibrary::Instance()->Find(pdgc)->Mass(); - if ( (ks==1 || ks==4) && p4o.E()LoadConfig(); -} -//____________________________________________________________________________ -void PhotonCOHWdecPythia6::Configure(string config) -{ - Algorithm::Configure(config); - this->LoadConfig(); -} -//____________________________________________________________________________ -void PhotonCOHWdecPythia6::LoadConfig(void) -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - GetParam( "SSBarSuppression", fSSBarSuppression ); - GetParam( "GaussianPt2", fGaussianPt2 ); - GetParam( "NonGaussianPt2Tail", fNonGaussianPt2Tail ); - GetParam( "RemainingEnergyCutoff", fRemainingECutoff ); - GetParam( "DiQuarkSuppression", fDiQuarkSuppression ); - GetParam( "LightVMesonSuppression", fLightVMesonSuppression ); - GetParam( "SVMesonSuppression", fSVMesonSuppression ); - GetParam( "Lunda", fLunda ); - GetParam( "Lundb", fLundb ); - GetParam( "LundaDiq", fLundaDiq ); - - // PYTHIA parameters only valid for HEDIS - double wmin; GetParam( "Xsec-Wmin", wmin ) ; - int warnings; GetParam( "Warnings", warnings ) ; - int errors; GetParam( "Errors", errors ) ; - int qrk_mass; GetParam( "QuarkMass", qrk_mass ) ; - fPythia->SetPARP(2, wmin); //(D = 10. GeV) lowest c.m. energy for the event as a whole that the program will accept to simulate. (bellow 2GeV pythia crashes) - fPythia->SetMSTU(26, warnings); // (Default=10) maximum number of warnings that are printed - fPythia->SetMSTU(22, errors); // (Default=10) maximum number of errors that are printed - fPythia->SetMSTJ(93, qrk_mass); // light (d, u, s, c, b) quark masses are taken from PARF(101) - PARF(105) rather than PMAS(1,1) - PMAS(5,1). Diquark masses are given as sum of quark masses, without spin splitting term. - fPythia->SetPMAS(24,1,kMw); //mass of the W boson (pythia=80.450 // genie=80.385) - fPythia->SetPMAS(24,2,0.); //set to 0 the width of the W boson to avoid problems with energy conservation - fPythia->SetPMAS(6,2,0.); //set to 0 the width of the top to avoid problems with energy conservation - fPythia->SetMDME(192,1,0); // W->dbar+t decay off - fPythia->SetMDME(196,1,0); // W->cbar+t decay off - fPythia->SetMDME(200,1,0); // W->cbar+t decay off - - // PYTHIA tuned parameters - fPythia->SetPARJ(2, fSSBarSuppression ); - fPythia->SetPARJ(21, fGaussianPt2 ); - fPythia->SetPARJ(23, fNonGaussianPt2Tail ); - fPythia->SetPARJ(33, fRemainingECutoff ); - fPythia->SetPARJ(1, fDiQuarkSuppression ); - fPythia->SetPARJ(11, fLightVMesonSuppression ); - fPythia->SetPARJ(12, fSVMesonSuppression ); - fPythia->SetPARJ(41, fLunda ); - fPythia->SetPARJ(42, fLundb ); - fPythia->SetPARJ(45, fLundaDiq ); -#endif - -} -//____________________________________________________________________________ -void PhotonCOHWdecPythia6::Initialize(void) const -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia = TPythia6::Instance(); - - // sync GENIE/PYTHIA6 seed number - RandomGen::Instance(); -#endif - -} diff --git a/src/Physics/HELepton/EventGen/PhotonCOHWdecPythia6.h b/src/Physics/HELepton/EventGen/PhotonCOHWdecPythia6.h deleted file mode 100644 index b6cdad7e6d..0000000000 --- a/src/Physics/HELepton/EventGen/PhotonCOHWdecPythia6.h +++ /dev/null @@ -1,85 +0,0 @@ -//____________________________________________________________________________ -/*! - -\class genie::PhotonCOHWdecPythia6 - -\brief PhotonCOH W decay with pythia6. - -\author Alfonso Garcia - IFIC (Valencia) - -\created Dec 12, 2024 - -\cpright Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - or see $GENIE/LICENSE -*/ -//____________________________________________________________________________ - -#ifndef _PHOTON_COH_WDEC_PYTHIA6_H_ -#define _PHOTON_COH_WDEC_PYTHIA6_H_ - -#include "Framework/EventGen/EventRecordVisitorI.h" -#include "Framework/Conventions/Constants.h" -#include "Framework/Numerical/RandomGen.h" -#include "Framework/Numerical/MathUtils.h" -#include "Framework/GHEP/GHepRecord.h" -#include "Framework/GHEP/GHepParticle.h" -#include "Framework/GHEP/GHepFlags.h" -#include "Framework/ParticleData/PDGCodes.h" -#include "Framework/ParticleData/PDGUtils.h" -#include "Framework/ParticleData/PDGLibrary.h" -#include "Framework/EventGen/EVGThreadException.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#include -#endif - -using namespace genie; -using namespace genie::constants; -using namespace genie::utils::math; - -namespace genie { - -class PhotonCOHWdecPythia6 : public EventRecordVisitorI { - -public : - PhotonCOHWdecPythia6(); - PhotonCOHWdecPythia6(string config); - ~PhotonCOHWdecPythia6(); - - //-- implement the HadronizationModelI interface - void ProcessEventRecord(GHepRecord * event) const; - - //-- overload the Algorithm::Configure() methods to load private data - // members from configuration options - void Configure(const Registry & config); - void Configure(string config); - -private: - - bool Wdecay (GHepRecord * event) const; - - void Initialize (void) const; - void LoadConfig (void); - - // PYTHIA physics configuration parameters used - double fSSBarSuppression; ///< ssbar suppression - double fGaussianPt2; ///< gaussian pt2 distribution width - double fNonGaussianPt2Tail; ///< non gaussian pt2 tail parameterization - double fRemainingECutoff; ///< remaining E cutoff stopping fragmentation - double fDiQuarkSuppression; ///< di-quark suppression parameter - double fLightVMesonSuppression; ///< light vector meson suppression - double fSVMesonSuppression; ///< strange vector meson suppression - double fLunda; ///< Lund a parameter - double fLundb; ///< Lund b parameter - double fLundaDiq; ///< adjustment of Lund a for di-quark - -#ifdef __GENIE_PYTHIA6_ENABLED__ - mutable TPythia6 * fPythia; ///< PYTHIA6 wrapper class -#endif - -}; - -} // genie namespace -#endif // _PHOTON_COH_WDEC_PYTHIA6_H_ diff --git a/src/Physics/HELepton/EventGen/PhotonRESWdecPythia6.cxx b/src/Physics/HELepton/EventGen/PhotonRESWdecPythia6.cxx deleted file mode 100644 index 2f4c22d368..0000000000 --- a/src/Physics/HELepton/EventGen/PhotonRESWdecPythia6.cxx +++ /dev/null @@ -1,326 +0,0 @@ -//____________________________________________________________________________ -/* - Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - - Alfonso Garcia - IFIC (Valencia) -*/ -//____________________________________________________________________________ - -#include "Physics/HELepton/EventGen/PhotonRESWdecPythia6.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,6) -#include -#else -#include -#endif -#endif // __GENIE_PYTHIA6_ENABLED__ - -//___________________________________________________________________________ -PhotonRESWdecPythia6::PhotonRESWdecPythia6() : -EventRecordVisitorI("genie::PhotonRESWdecPythia6") -{ - this->Initialize(); - born = new Born(); -} -//___________________________________________________________________________ -PhotonRESWdecPythia6::PhotonRESWdecPythia6(string config) : -EventRecordVisitorI("genie::PhotonRESWdecPythia6", config) -{ - this->Initialize(); - born = new Born(); -} -//___________________________________________________________________________ -PhotonRESWdecPythia6::~PhotonRESWdecPythia6() -{ - -} -//____________________________________________________________________________ -void PhotonRESWdecPythia6::ProcessEventRecord(GHepRecord * event) const -{ - - if(!this->Wdecay(event)) { - LOG("PhotonRESGenerator", pWARN) << "W decayer failed!"; - event->EventFlags()->SetBitNumber(kHadroSysGenErr, true); - genie::exceptions::EVGThreadException exception; - exception.SetReason("Could not simulate the W decay system"); - exception.SwitchOnFastForward(); - throw exception; - return; - } - -} -//___________________________________________________________________________ -bool PhotonRESWdecPythia6::Wdecay(GHepRecord * -#ifdef __GENIE_PYTHIA6_ENABLED__ - event // avoid unused variable warning if PYTHIA6 is not enabled -#endif -) const -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - Interaction * interaction = event->Summary(); - const InitialState & init_state = interaction->InitState(); - - //incoming v & struck particle & remnant nucleus - GHepParticle * nu = event->Probe(); - GHepParticle * el = event->HitNucleon(); - - GHepParticle * target = event -> TargetNucleus(); - if(target) event->AddParticle(target->Pdg(), kIStFinalStateNuclearRemnant, 1,-1,-1,-1, *(target->P4()), *(target->X4()) ); - - TVector3 unit_nu = nu->P4()->Vect().Unit(); - - int probepdg = init_state.ProbePdg(); - - long double Mtarget = init_state.Tgt().HitNucMass(); - long double mlout = interaction->FSPrimLepton()->Mass(); //mass of charged lepton - - long double Enuin = init_state.ProbeE(kRfLab); - long double s = born->GetS(Mtarget,Enuin); - - long double n1 = interaction->Kine().GetKV(kKVn1); - long double n2 = interaction->Kine().GetKV(kKVn2); - - long double costhCM = n1; - long double sinthCM = sqrtl(1-costhCM*costhCM); - - long double xmin = fQ2PDFmin/2./Enuin/Mtarget; - long double x = expl( logl(xmin) + (logl(1.0)-logl(xmin))*n2 ); - long double s_r = s*x; - - // Boost velocity CM -> LAB - long double EnuinCM = sqrtl(s_r)/2.; - long double beta = (powl(Enuin,2)-powl(EnuinCM,2))/(powl(Enuin,2)+powl(EnuinCM,2)); - - // Final state primary lepton PDG code - int pdgl = interaction->FSPrimLeptonPdg(); - assert(pdgl!=0); - - if ( pdg::IsElectron(TMath::Abs(pdgl)) || pdg::IsMuon(TMath::Abs(pdgl)) || pdg::IsTau(TMath::Abs(pdgl)) ) { - - long double ElpoutCM = (s_r+mlout*mlout)/sqrtl(s_r)/2.; - long double EnuoutCM = (s_r-mlout*mlout)/sqrtl(s_r)/2.; - LongLorentzVector p4_lpout( 0., EnuoutCM*sinthCM, EnuoutCM*costhCM, ElpoutCM ); - LongLorentzVector p4_nuout( 0., -EnuoutCM*sinthCM, -EnuoutCM*costhCM, EnuoutCM ); - - p4_lpout.BoostZ(beta); - p4_nuout.BoostZ(beta); - - TLorentzVector p4lp_o( (double)p4_lpout.Px(), (double)p4_lpout.Py(), (double)p4_lpout.Pz(), (double)p4_lpout.E() ); - TLorentzVector p4nu_o( (double)p4_nuout.Px(), (double)p4_nuout.Py(), (double)p4_nuout.Pz(), (double)p4_nuout.E() ); - - // Randomize transverse components - RandomGen * rnd = RandomGen::Instance(); - double phi = 2* kPi * rnd->RndLep().Rndm(); - p4lp_o.RotateZ(phi); - p4nu_o.RotateZ(phi); - - //rotate from LAB=[0,0,Ev,Ev]->[px,py,pz,E] - p4lp_o.RotateUz(unit_nu); - p4nu_o.RotateUz(unit_nu); - - int pdgvout = 0; - if ( pdg::IsElectron(pdgl) ) pdgvout = kPdgAntiNuE; - else if ( pdg::IsPositron(pdgl) ) pdgvout = kPdgNuE; - else if ( pdg::IsMuon(pdgl) ) pdgvout = kPdgAntiNuMu; - else if ( pdg::IsAntiMuon(pdgl) ) pdgvout = kPdgNuMu; - else if ( pdg::IsTau(pdgl) ) pdgvout = kPdgAntiNuTau; - else if ( pdg::IsAntiTau(pdgl) ) pdgvout = kPdgNuTau; - - int pdgboson = pdg::IsNeutrino(probepdg) ? kPdgWP : kPdgWM; - - // Create a GHepParticle and add it to the event record - event->AddParticle( pdgboson, kIStDecayedState, 0, -1, 5, 6, *nu->P4()+*el->P4(), *(nu->X4()) ); //W [mothers: nuebar_in,e_in][daugthers: nulbar_out,lp_out] - event->AddParticle( pdgl, kIStStableFinalState, 4, -1, -1, -1, p4lp_o, *(nu->X4()) ); - event->AddParticle( pdgvout, kIStStableFinalState, 4, -1, -1, -1, p4nu_o, *(nu->X4()) ); - event->Summary()->KinePtr()->SetFSLeptonP4(p4lp_o); - - } - else { - - char p6frame[10]; - strcpy(p6frame, "CMS" ); - - char p6nu[10], p6tgt[10]; - if (pdg::IsNeutrino(probepdg)) { strcpy(p6nu, "nu_e"); strcpy(p6tgt, "e+"); } - else { strcpy(p6nu, "nu_ebar"); strcpy(p6tgt, "e-"); } - - int def61 = fPythia->GetMSTP(61); - int def71 = fPythia->GetMSTP(71); - int def206 = fPythia->GetMDME(206,1); - int def207 = fPythia->GetMDME(207,1); - int def208 = fPythia->GetMDME(208,1); - fPythia->SetMSTP(61,0); // (Default=2) master switch for initial-state QCD and QED radiation. - fPythia->SetMSTP(71,0); // (Default=2) master switch for initial-state QCD and QED radiation. - fPythia->SetMDME(206,1,0); //swicht off W decay leptonic modes - fPythia->SetMDME(207,1,0); - fPythia->SetMDME(208,1,0); - - fPythia->Pyinit(p6frame, p6nu, p6tgt, sqrtl(s_r)); - fPythia->Pyevnt(); - - fPythia->SetMSTP(61,def61); - fPythia->SetMSTP(71,def71); - fPythia->SetMDME(206,1,def206); - fPythia->SetMDME(207,1,def207); - fPythia->SetMDME(208,1,def208); - - // get LUJETS record - fPythia->GetPrimaries(); - TClonesArray * pythia_particles = (TClonesArray *) fPythia->ImportParticles("All"); - int np = pythia_particles->GetEntries(); - assert(np>0); - - TMCParticle * particle = 0; - TIter piter(pythia_particles); - while( (particle = (TMCParticle *) piter.Next()) ) { - - int pdgc = particle->GetKF(); - int ks = particle->GetKS(); - - if ( ks==21 ) { continue; } //we dont want to save first particles from pythia (init states) - - LongLorentzVector p4longo(particle->GetPx(), particle->GetPy(), particle->GetPz(), particle->GetEnergy()); - p4longo.BoostZ(beta); - - TLorentzVector p4o( (double)p4longo.Px(), (double)p4longo.Py(), (double)p4longo.Pz(), (double)p4longo.E() ); - p4o.RotateUz(unit_nu); - - TParticlePDG * part = PDGLibrary::Instance()->Find(pdgc); - if ( (ks==1 || ks==4) && p4o.E() < part->Mass() ) { - LOG("PhotonRESGenerator", pWARN) << "Putting at rest one stable particle generated by PYTHIA because E < m"; - LOG("PhotonRESGenerator", pWARN) << "PDG = " << pdgc << " // State = " << ks; - LOG("PhotonRESGenerator", pWARN) << "E = " << p4o.E() << " // |p| = " << TMath::Sqrt(p4o.P()); - LOG("PhotonRESGenerator", pWARN) << "p = [ " << p4o.Px() << " , " << p4o.Py() << " , " << p4o.Pz() << " ]"; - LOG("PhotonRESGenerator", pWARN) << "m = " << p4o.M() << " // mpdg = " << part->Mass(); - p4o.SetXYZT(0,0,0,part->Mass()); - } - - // copy final state particles to the event record - GHepStatus_t ist = (ks==1 || ks==4) ? kIStStableFinalState : kIStDISPreFragmHadronicState; - - // fix numbering scheme used for mother/daughter assignments - int firstmother = -1; - int lastmother = -1; - int firstchild = -1; - int lastchild = -1; - - if ( particle->GetParent() < 10 ) { - if ( TMath::Abs(pdgc)<7 ) { //outgoing quarks: mother will be the boson (saved in position 4) - firstmother = 4; - firstchild = particle->GetFirstChild() - 6; - lastchild = particle->GetLastChild() - 6; - } - else if ( TMath::Abs(pdgc)==24 ) { //produced W boson: mother will be the incoming neutrino - firstmother = 0; - firstchild = particle->GetFirstChild() - 6; - lastchild = particle->GetLastChild() - 6; - } - else if ( pdgc==22 ) { //radiative photons: mother will be the incoming electron - firstmother = 2; - } - } - else { //rest - firstmother = particle->GetParent() - 6; //shift to match boson position - firstchild = (particle->GetFirstChild()==0) ? particle->GetFirstChild() - 1 : particle->GetFirstChild() - 6; - lastchild = (particle->GetLastChild()==0) ? particle->GetLastChild() - 1 : particle->GetLastChild() - 6; - } - - double lightspeed = 299792458e3; //c in mm/s. Used for time in PYTHIA t[s]=t_pythia[mm]/c[mm/s] - double vx = nu->X4()->X() + particle->GetVx()*1e12; //pythia gives position in [mm] while genie uses [fm] - double vy = nu->X4()->Y() + particle->GetVy()*1e12; - double vz = nu->X4()->Z() + particle->GetVz()*1e12; - double vt = nu->X4()->T() + particle->GetTime()/lightspeed; - TLorentzVector pos( vx, vy, vz, vt ); - - event->AddParticle(pdgc, ist, firstmother, lastmother, firstchild, lastchild, p4o, pos ); - - } - - delete particle; - pythia_particles->Clear("C"); - - } - - return true; -#else - return false; -#endif - - -} -//___________________________________________________________________________ -void PhotonRESWdecPythia6::Configure(const Registry & config) -{ - Algorithm::Configure(config); - this->LoadConfig(); -} -//____________________________________________________________________________ -void PhotonRESWdecPythia6::Configure(string config) -{ - Algorithm::Configure(config); - this->LoadConfig(); -} -//____________________________________________________________________________ -void PhotonRESWdecPythia6::LoadConfig(void) -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - GetParam( "SSBarSuppression", fSSBarSuppression ); - GetParam( "GaussianPt2", fGaussianPt2 ); - GetParam( "NonGaussianPt2Tail", fNonGaussianPt2Tail ); - GetParam( "RemainingEnergyCutoff", fRemainingECutoff ); - GetParam( "DiQuarkSuppression", fDiQuarkSuppression ); - GetParam( "LightVMesonSuppression", fLightVMesonSuppression ); - GetParam( "SVMesonSuppression", fSVMesonSuppression ); - GetParam( "Lunda", fLunda ); - GetParam( "Lundb", fLundb ); - GetParam( "LundaDiq", fLundaDiq ); - - GetParam( "Q2Grid-Min", fQ2PDFmin ); - - // PYTHIA parameters only valid for HEDIS - double wmin; GetParam( "Xsec-Wmin", wmin ) ; - int warnings; GetParam( "Warnings", warnings ) ; - int errors; GetParam( "Errors", errors ) ; - int qrk_mass; GetParam( "QuarkMass", qrk_mass ) ; - fPythia->SetPARP(2, wmin); //(D = 10. GeV) lowest c.m. energy for the event as a whole that the program will accept to simulate. (bellow 2GeV pythia crashes) - fPythia->SetMSTU(26, warnings); // (Default=10) maximum number of warnings that are printed - fPythia->SetMSTU(22, errors); // (Default=10) maximum number of errors that are printed - fPythia->SetMSTJ(93, qrk_mass); // light (d, u, s, c, b) quark masses are taken from PARF(101) - PARF(105) rather than PMAS(1,1) - PMAS(5,1). Diquark masses are given as sum of quark masses, without spin splitting term. - fPythia->SetPMAS(24,1,kMw); //mass of the W boson (pythia=80.450 // genie=80.385) - fPythia->SetPMAS(24,2,0.); //set to 0 the width of the W boson to avoid problems with energy conservation - fPythia->SetPMAS(6,2,0.); //set to 0 the width of the top to avoid problems with energy conservation - fPythia->SetMDME(192,1,0); // W->dbar+t decay off - fPythia->SetMDME(196,1,0); // W->cbar+t decay off - fPythia->SetMDME(200,1,0); // W->cbar+t decay off - - // PYTHIA tuned parameters - fPythia->SetPARJ(2, fSSBarSuppression ); - fPythia->SetPARJ(21, fGaussianPt2 ); - fPythia->SetPARJ(23, fNonGaussianPt2Tail ); - fPythia->SetPARJ(33, fRemainingECutoff ); - fPythia->SetPARJ(1, fDiQuarkSuppression ); - fPythia->SetPARJ(11, fLightVMesonSuppression ); - fPythia->SetPARJ(12, fSVMesonSuppression ); - fPythia->SetPARJ(41, fLunda ); - fPythia->SetPARJ(42, fLundb ); - fPythia->SetPARJ(45, fLundaDiq ); -#endif // __GENIE_PYTHIA6_ENABLED__ - -} -//____________________________________________________________________________ -void PhotonRESWdecPythia6::Initialize(void) const -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia = TPythia6::Instance(); - - // sync GENIE/PYTHIA6 seed number - RandomGen::Instance(); -#endif - -} \ No newline at end of file diff --git a/src/Physics/HELepton/EventGen/PhotonRESWdecPythia6.h b/src/Physics/HELepton/EventGen/PhotonRESWdecPythia6.h deleted file mode 100644 index 1d5420a122..0000000000 --- a/src/Physics/HELepton/EventGen/PhotonRESWdecPythia6.h +++ /dev/null @@ -1,91 +0,0 @@ -//____________________________________________________________________________ -/*! - -\class genie::PhotonRESWdecPythia6 - -\brief PhotonRES W decay with pythia6. - -\author Alfonso Garcia - IFIC (Valencia) - -\created Dec 12, 2024 - -\cpright Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - or see $GENIE/LICENSE -*/ -//____________________________________________________________________________ - -#ifndef _PHOTON_RES_WDEC_PYTHIA6_H_ -#define _PHOTON_RES_WDEC_PYTHIA6_H_ - -#include "Framework/EventGen/EventRecordVisitorI.h" -#include "Framework/Conventions/Constants.h" -#include "Framework/Numerical/RandomGen.h" -#include "Framework/Numerical/MathUtils.h" -#include "Framework/GHEP/GHepRecord.h" -#include "Framework/GHEP/GHepParticle.h" -#include "Framework/GHEP/GHepFlags.h" -#include "Framework/ParticleData/PDGCodes.h" -#include "Framework/ParticleData/PDGUtils.h" -#include "Framework/ParticleData/PDGLibrary.h" -#include "Framework/EventGen/EVGThreadException.h" -#include "Framework/Utils/StringUtils.h" -#include "Physics/HELepton/XSection/Born.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#include -#endif - -using namespace genie; -using namespace genie::constants; -using namespace genie::utils::math; - -namespace genie { - -class PhotonRESWdecPythia6 : public EventRecordVisitorI { - -public : - PhotonRESWdecPythia6(); - PhotonRESWdecPythia6(string config); - ~PhotonRESWdecPythia6(); - - //-- implement the HadronizationModelI interface - void ProcessEventRecord(GHepRecord * event) const; - - //-- overload the Algorithm::Configure() methods to load private data - // members from configuration options - void Configure(const Registry & config); - void Configure(string config); - -private: - - bool Wdecay (GHepRecord * event) const; - - void Initialize (void) const; - void LoadConfig (void); - - // PYTHIA physics configuration parameters used - double fSSBarSuppression; ///< ssbar suppression - double fGaussianPt2; ///< gaussian pt2 distribution width - double fNonGaussianPt2Tail; ///< non gaussian pt2 tail parameterization - double fRemainingECutoff; ///< remaining E cutoff stopping fragmentation - double fDiQuarkSuppression; ///< di-quark suppression parameter - double fLightVMesonSuppression; ///< light vector meson suppression - double fSVMesonSuppression; ///< strange vector meson suppression - double fLunda; ///< Lund a parameter - double fLundb; ///< Lund b parameter - double fLundaDiq; ///< adjustment of Lund a for di-quark - - double fQ2PDFmin; - - Born * born; - -#ifdef __GENIE_PYTHIA6_ENABLED__ - mutable TPythia6 * fPythia; ///< PYTHIA6 wrapper class -#endif - -}; - -} // genie namespace -#endif // _PHOTON_RES_WDEC_PYTHIA6_H_ diff --git a/src/Physics/Hadronization/AGCharmPythia6Hadro2023.cxx b/src/Physics/Hadronization/AGCharmPythia6Hadro2023.cxx deleted file mode 100644 index 5b3890c9e5..0000000000 --- a/src/Physics/Hadronization/AGCharmPythia6Hadro2023.cxx +++ /dev/null @@ -1,178 +0,0 @@ -//____________________________________________________________________________ -/* - Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - - Costas Andreopoulos - University of Liverpool & STFC Rutherford Appleton Laboratory - - Changes required to implement the GENIE Boosted Dark Matter module - were installed by Josh Berger (Univ. of Wisconsin) -*/ -//____________________________________________________________________________ - -#include -#include -#include -#include - -#include "Framework/Algorithm/AlgConfigPool.h" -#include "Framework/Conventions/Constants.h" -#include "Framework/Conventions/Controls.h" -#include "Framework/GHEP/GHepStatus.h" -#include "Framework/GHEP/GHepParticle.h" -#include "Framework/GHEP/GHepRecord.h" -#include "Framework/GHEP/GHepFlags.h" -#include "Framework/EventGen/EVGThreadException.h" -#include "Framework/Messenger/Messenger.h" -#include "Framework/Numerical/RandomGen.h" -#include "Framework/Numerical/Spline.h" -#include "Framework/ParticleData/PDGCodes.h" -#include "Framework/ParticleData/PDGUtils.h" -#include "Framework/ParticleData/PDGLibrary.h" -#include "Framework/ParticleData/PDGCodeList.h" -#include "Framework/Utils/KineUtils.h" -#include "Framework/Utils/StringUtils.h" -#include "Framework/Utils/PrintUtils.h" -#include "Physics/Hadronization/AGCharmPythia6Hadro2023.h" -#include "Physics/Hadronization/FragmentationFunctionI.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ - #if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,6) - #include - #else - #include - #endif - - #include -#endif - -using namespace genie; -using namespace genie::constants; -using namespace genie::controls; - -#ifdef __GENIE_PYTHIA6_ENABLED__ -extern "C" void py2ent_(int *, int *, int *, double *); -#endif - -//____________________________________________________________________________ -AGCharmPythia6Hadro2023::AGCharmPythia6Hadro2023() : -AGCharmPythiaBaseHadro2023("genie::AGCharmPythia6Hadro2023") -{ - this->Initialize(); -} -//____________________________________________________________________________ -AGCharmPythia6Hadro2023::AGCharmPythia6Hadro2023(string config) : -AGCharmPythiaBaseHadro2023("genie::AGCharmPythia6Hadro2023", config) -{ - this->Initialize(); -} -//____________________________________________________________________________ -AGCharmPythia6Hadro2023::~AGCharmPythia6Hadro2023() -{ - -} -//____________________________________________________________________________ -void AGCharmPythia6Hadro2023::Initialize(void) const -{ - AGCharmPythiaBaseHadro2023::Initialize(); -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia = TPythia6::Instance(); - // sync GENIE/PyTHIA6 seed number - // PYTHIA6 is a singleton, so do this from RandomGen for all - // GENIE algorithms that use PYTHIA6 - RandomGen::Instance(); -#else - LOG("AGCharmPythia6Hadro2023", pFATAL) - << "calling GENIE/PYTHIA6 charm hadronization without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif - -} -//____________________________________________________________________________ - -bool AGCharmPythia6Hadro2023::HadronizeRemnant (int qrkSyst1, int qrkSyst2, - double WR, TLorentzVector p4R, - unsigned int& rpos, TClonesArray * particle_list) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - - // - // Run PYTHIA for the hadronization of remnant system - // - fPythia->SetMDCY(fPythia->Pycomp(kPdgPi0), 1,0); // don't decay pi0 - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaM), 1,1); // decay Delta+ - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_Delta0), 1,1); // decay Delta++ - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaP), 1,1); // decay Delta++ - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaPP), 1,1); // decay Delta++ - // fPythia->SetMDCY(fPythia->Pycomp(kPdgDeltaP), 1,1); // decay Delta+ - // fPythia->SetMDCY(fPythia->Pycomp(kPdgDeltaPP), 1,1); // decay Delta++ - int ip = 0; - py2ent_(&ip, &qrkSyst1, &qrkSyst2, &WR); // hadronize - - fPythia->SetMDCY(fPythia->Pycomp(kPdgPi0),1,1); // restore - - //-- Get PYTHIA's LUJETS event record - TClonesArray * pythia_remnants = 0; - fPythia->GetPrimaries(); - pythia_remnants = dynamic_cast(fPythia->ImportParticles("All")); - - int np = pythia_remnants->GetEntries(); - assert(np>0); - - // PYTHIA performs the hadronization at the *remnant hadrons* centre of mass - // frame (not the hadronic centre of mass frame). - // Boost all hadronic blob fragments to the HCM', fix their mother/daughter - // assignments and add them to the fragmentation record. - - TVector3 rmnbeta = +1 * p4R.BoostVector(); // boost velocity - - TMCParticle * pythia_remn = 0; // remnant - GHepParticle * bremn = 0; // boosted remnant - TIter remn_iter(pythia_remnants); - while( (pythia_remn = (TMCParticle *) remn_iter.Next()) ) { - - // insert and get a pointer to inserted object for mods - bremn = new ((*particle_list)[rpos++]) GHepParticle ( pythia_remn->GetKF(), // pdg - GHepStatus_t(pythia_remn->GetKS()), // status - pythia_remn->GetParent(), // first parent - -1, // second parent - pythia_remn->GetFirstChild(), // first daughter - pythia_remn->GetLastChild(), // second daughter - pythia_remn -> GetPx(), // px - pythia_remn -> GetPy(), // py - pythia_remn -> GetPz(), // pz - pythia_remn -> GetEnergy(), // e - pythia_remn->GetVx(), // x - pythia_remn->GetVy(), // y - pythia_remn->GetVz(), // z - pythia_remn->GetTime() // t - ); - - // boost - bremn -> P4() -> Boost( rmnbeta ) ; - - // handle insertion of charmed hadron - int jp = bremn->FirstMother(); - int ifc = bremn->FirstDaughter(); - int ilc = bremn->LastDaughter(); - - bremn -> SetFirstMother( (jp == 0 ? 1 : jp +1) ); - bremn -> SetFirstDaughter ( (ifc == 0 ? -1 : ifc+1) ); - bremn -> SetLastDaughter ( (ilc == 0 ? -1 : ilc+1) ); - } - return true; -#else - LOG("AGCharmPythia6Hadro2023", pFATAL) - << "calling GENIE/PYTHIA6 charm hadronization without enabling PYTHIA6" - << " qrkSyst " << qrkSyst1 << "," << qrkSyst2 << " WR " << WR; - gAbortingInErr = true; - std::exit(1); - return false; -#endif - - -} - -//____________________________________________________________________________ diff --git a/src/Physics/Hadronization/AGCharmPythia6Hadro2023.h b/src/Physics/Hadronization/AGCharmPythia6Hadro2023.h deleted file mode 100644 index a7a62c4c4f..0000000000 --- a/src/Physics/Hadronization/AGCharmPythia6Hadro2023.h +++ /dev/null @@ -1,65 +0,0 @@ -//____________________________________________________________________________ -/*! - -\class genie::AGCharmPythia6Hadro2023 - -\brief Andreopoulos - Gallagher (AG) GENIE Charm Hadronization model. - - The model relies on empirical charm fragmentation and pT functions, - as well as on experimentally-determined charm fractions, to produce - the ID and 4-momentum of charmed hadron in charm production events. - - The remnant (non-charm) system is hadronised by a call to PYTHIA. - - Is a concrete implementation of the EventRecordVisitorI interface. - -\author Costas Andreopoulos - University of Liverpool & STFC Rutherford Appleton Laboratory - - Hugh Gallagher - Tufts University - -\created August 17, 2004 - -\cpright Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org -*/ -//____________________________________________________________________________ - -#ifndef _AGCHARM_PYTHIA6_HADRONIZATION_H_ -#define _AGCHARM_PYTHIA6_HADRONIZATION_H_ - -#include "Physics/Hadronization/AGCharmPythiaBaseHadro2023.h" - -#include "Framework/Conventions/GBuild.h" -#ifdef __GENIE_PYTHIA6_ENABLED__ -class TPythia6; -#endif - -namespace genie { - -class Spline; -class FragmentationFunctionI; - -class AGCharmPythia6Hadro2023 : public AGCharmPythiaBaseHadro2023 { - -public: - AGCharmPythia6Hadro2023(); - AGCharmPythia6Hadro2023(string config); - virtual ~AGCharmPythia6Hadro2023(); - - -private: - void Initialize (void) const; - bool HadronizeRemnant(int qrkSyst1, int qrkSyst2, double WR, TLorentzVector p4R, - unsigned int& rpos, TClonesArray * particle_list) const; - - -#ifdef __GENIE_PYTHIA6_ENABLED__ - mutable TPythia6 * fPythia; ///< remnant (non-charm) hadronizer -#endif -}; - -} // genie namespace - -#endif // _AGCHARM_PYTHIA6_HADRONIZATION__H_ diff --git a/src/Physics/Hadronization/LeptoHadPythia6.cxx b/src/Physics/Hadronization/LeptoHadPythia6.cxx deleted file mode 100644 index dc513146b9..0000000000 --- a/src/Physics/Hadronization/LeptoHadPythia6.cxx +++ /dev/null @@ -1,508 +0,0 @@ -//____________________________________________________________________________ -/* - Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - - Alfonso Garcia - IFIC (Valencia) -*/ -//____________________________________________________________________________ - -#include "Physics/Hadronization/LeptoHadPythia6.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,6) -#include -#else -#include -#endif -// the actual PYTHIA call -extern "C" { - double pyangl_( double *, double * ); - void pykfdi_( int *, int *, int *, int * ); - void pyzdis_( int *, int *, double *, double * ); - void pyrobo_( int *, int *, double *, double *, double *, double *, double * ); - void pydecy_( int * ); - void py2ent_( int *, int *, int *, double * ); -} -#endif - -//____________________________________________________________________________ -LeptoHadPythia6::LeptoHadPythia6() : -EventRecordVisitorI("genie::LeptoHadPythia6") -{ - this->Initialize(); -} -//____________________________________________________________________________ -LeptoHadPythia6::LeptoHadPythia6(string config) : -EventRecordVisitorI("genie::LeptoHadPythia6", config) -{ - this->Initialize(); -} -//____________________________________________________________________________ -LeptoHadPythia6::~LeptoHadPythia6() -{ - -} -//____________________________________________________________________________ -void LeptoHadPythia6::ProcessEventRecord(GHepRecord * event) const -{ - - if(!this->Hadronize(event)) { - LOG("LeptoHad", pWARN) << "Hadronization failed!"; - event->EventFlags()->SetBitNumber(kHadroSysGenErr, true); - genie::exceptions::EVGThreadException exception; - exception.SetReason("Could not simulate the hadronic system"); - exception.SwitchOnFastForward(); - throw exception; - return; - } - - -} -//___________________________________________________________________________ -bool LeptoHadPythia6::Hadronize(GHepRecord * -#ifdef __GENIE_PYTHIA6_ENABLED__ - event // avoid unused variable warning if PYTHIA6 is not enabled -#endif -) const -{ - -#ifdef __GENIE_PYTHIA6_ENABLED__ - // Compute kinematics of hadronic system with energy/momentum conservation - LongLorentzVector p4v( * event->Probe()->P4() ); - LongLorentzVector p4N( * event->HitNucleon()->P4() ); - LongLorentzVector p4l( * event->FinalStatePrimaryLepton()->P4() ); - LongLorentzVector p4Hadlong( p4v.Px()+p4N.Px()-p4l.Px(), p4v.Py()+p4N.Py()-p4l.Py(), p4v.Pz()+p4N.Pz()-p4l.Pz(), p4v.E()+p4N.E()-p4l.E() ); - - LOG("LeptoHad", pDEBUG) << "v [LAB']: " << p4v.E() << " // " << p4v.M2() << " // [ " << p4v.Dx() << " , " << p4v.Dy() << " , " << p4v.Dz() << " ]"; - LOG("LeptoHad", pDEBUG) << "N [LAB']: " << p4N.E() << " // " << p4N.M2() << " // [ " << p4N.Dx() << " , " << p4N.Dy() << " , " << p4N.Dz() << " ]"; - LOG("LeptoHad", pDEBUG) << "l [LAB']: " << p4l.E() << " // " << p4l.M2() << " // [ " << p4l.Dx() << " , " << p4l.Dy() << " , " << p4l.Dz() << " ]"; - LOG("LeptoHad", pDEBUG) << "H [LAB']: " << p4Hadlong.E() << " // " << p4Hadlong.M2() << " // [ " << p4Hadlong.Dx() << " , " << p4Hadlong.Dy() << " , " << p4Hadlong.Dz() << " ]"; - - // Translate from long double to double - const TLorentzVector & vtx = *( event->Probe()->X4()); - TLorentzVector p4Had( (double)p4Hadlong.Px(), (double)p4Hadlong.Py(), (double)p4Hadlong.Pz(), (double)p4Hadlong.E() ); - event->AddParticle(kPdgHadronicSyst, kIStDISPreFragmHadronicState, event->HitNucleonPosition(),-1,-1,-1, p4Had, vtx); - - const Interaction * interaction = event->Summary(); - interaction->KinePtr()->SetHadSystP4(p4Had); - interaction->KinePtr()->SetW(p4Hadlong.M()); - - double W = interaction->Kine().W(); - if(W < fWmin) { - LOG("LeptoHad", pWARN) << "Low invariant mass, W = " << W << " GeV!!"; - return false; - } - - const XclsTag & xclstag = interaction->ExclTag(); - const Target & target = interaction->InitState().Tgt(); - - assert(target.HitQrkIsSet()); - - bool isp = pdg::IsProton(target.HitNucPdg()); - int hit_quark = target.HitQrkPdg(); - int frag_quark = xclstag.FinalQuarkPdg(); - - LOG("LeptoHad", pDEBUG) << "Hit nucleon pdgc = " << target.HitNucPdg() << ", W = " << W; - LOG("LeptoHad", pDEBUG) << "Selected hit quark pdgc = " << hit_quark << " // Fragmentation quark = " << frag_quark; - - RandomGen * rnd = RandomGen::Instance(); - - // - // Generate the hadron combination to input PYTHIA - // - - //If the hit quark is a d we have these options: - /* uud(->q) => uu + q */ - /* uud d(->q)db => uu + q (d valence and db sea annihilates)*/ - /* udd(->q) => ud + q */ - /* udd d(->q)db => ud + q (d valence and db sea annihilates)*/ - if ( pdg::IsDQuark(hit_quark) ) { - // choose diquark system depending on proton or neutron - int diquark = 0; - if (isp) diquark = kPdgUUDiquarkS1; - else diquark = rnd->RndHadro().Rndm()>0.75 ? kPdgUDDiquarkS1 : kPdgUDDiquarkS0; - // Check that the trasnferred energy is higher than the mass of the produced quarks - double m_frag = PDGLibrary::Instance()->Find(frag_quark)->Mass(); - double m_diquark = PDGLibrary::Instance()->Find(diquark)->Mass(); - if( W <= m_frag + m_diquark + fMinESinglet ) { - LOG("LeptoHad", pWARN) << "Low invariant mass, W = " << W << " GeV! Returning a null list"; - LOG("LeptoHad", pWARN) << "frag_quark = " << frag_quark << " -> m = " << m_frag; - LOG("LeptoHad", pWARN) << "diquark = " << diquark << " -> m = " << m_diquark; - return 0; - } - // Input the two particles to PYTHIA back to back in the CM frame - double e_frag = (W*W - m_diquark*m_diquark + m_frag*m_frag)/2./W; - double e_diquark = (W*W + m_diquark*m_diquark - m_frag*m_frag)/2./W; - fPythia->Py1ent( -1, frag_quark, e_frag, 0., 0. ); //k(1,2) = 2 - // If a top quark is produced we decay it because it does not hadronize - if ( pdg::IsTQuark(frag_quark) ) { - int ip = 1; - pydecy_(&ip); - } - fPythia->Py1ent( fPythia->GetN()+1, diquark, e_diquark, fPythia->GetPARU(1), 0. ); //k(2,2) = 1 - } - - //If the hit quark is a u we have these options: - /* u(->q)ud => ud + q */ - /* uud u(->q)ub => ud + q (u valence and ub sea annihilates)*/ - /* u(->q)dd => dd + q */ - /* udd u(->q)ub => dd + q (u valence and ub sea annihilates)*/ - else if ( pdg::IsUQuark(hit_quark) ) { - // choose diquark system depending on proton or neutron - int diquark = 0; - if (isp) diquark = rnd->RndHadro().Rndm()>0.75 ? kPdgUDDiquarkS1 : kPdgUDDiquarkS0; - else diquark = kPdgDDDiquarkS1; - // Check that the trasnferred energy is higher than the mass of the produced quarks. - double m_frag = PDGLibrary::Instance()->Find(frag_quark)->Mass(); - double m_diquark = PDGLibrary::Instance()->Find(diquark)->Mass(); - if( W <= m_frag + m_diquark + fMinESinglet ) { - LOG("LeptoHad", pWARN) << "Low invariant mass, W = " << W << " GeV! Returning a null list"; - LOG("LeptoHad", pWARN) << "frag_quark = " << frag_quark << " -> m = " << m_frag; - LOG("LeptoHad", pWARN) << "diquark = " << diquark << " -> m = " << m_diquark; - return 0; - } - // Input the two particles to PYTHIA back to back in the CM frame - double e_frag = (W*W - m_diquark*m_diquark + m_frag*m_frag)/2./W; - double e_diquark = (W*W + m_diquark*m_diquark - m_frag*m_frag)/2./W; - fPythia->Py1ent( -1, frag_quark, e_frag, 0., 0. ); //k(1,2) = 2 - fPythia->Py1ent( fPythia->GetN()+1, diquark, e_diquark, fPythia->GetPARU(1), 0. ); //k(2,2) = 1 - } - - - // If the hit quark is not u or d then is more complicated. - // We are using the same procedure use in LEPTO (see lqev.F) - // Our initial systemt will look like this -> qqq + hit_q(->frag_q) + rema_q - // And we have to input PYTHIA something like this -> frag_q + rema + hadron - // These are the posible combinations -> frag_q[q] + meson [qqb] + diquark [qq] - // -> frag_q[qb] + baryon [qqq] + quark [q] - else { - - // Remnant of the hit quark (which is from the sea) will be of opposite charge - int rema_hit_quark = -hit_quark; - - // Check that the trasnfered energy is higher than the mass of the produce quarks plus remnant quark and nucleon - double m_frag = PDGLibrary::Instance()->Find(frag_quark)->Mass(); - double m_rema_hit = PDGLibrary::Instance()->Find(rema_hit_quark)->Mass(); - if (W <= m_frag + m_rema_hit + 0.9 + fMinESinglet ) { - LOG("LeptoHad", pWARN) << "Low invariant mass, W = " << W << " GeV! Returning a null list"; - LOG("LeptoHad", pWARN) << " frag_quark = " << frag_quark << " -> m = " << m_frag; - LOG("LeptoHad", pWARN) << " rema_hit_quark = " << rema_hit_quark << " -> m = " << m_rema_hit; - return 0; - } - - //PDG of the two hadronic particles for the final state - int hadron = 0; - int rema = 0; - - int ntwoq = isp ? 2 : 1; //proton two ups & neutron one up - int counter = 0; - - // Here we select the id and kinematics of the hadron and rema particles - // Some combinations can be kinematically forbiden so we repeat this process - // up to 100 times before the event is discarded. - while( counterRndHadro().Rndm()); - int diquark = 0; - if ( valquark==ntwoq ) diquark = rnd->RndHadro().Rndm()>0.75 ? kPdgUDDiquarkS1 : kPdgUDDiquarkS0; - else diquark = 1000*ntwoq+100*ntwoq+3; - - // Choose flavours using PYTHIA tool - int idum; - if ( rema_hit_quark>0 ) { //create a baryon (qqq) - pykfdi_(&diquark,&rema_hit_quark,&idum,&hadron); - rema = valquark; - } - else { //create a meson (qqbar) - pykfdi_(&valquark,&rema_hit_quark,&idum,&hadron); - rema = diquark; - } - } - - double m_hadron = PDGLibrary::Instance()->Find(hadron)->Mass(); - double m_rema = PDGLibrary::Instance()->Find(rema)->Mass(); - - // Give balancing pT to hadron and rema particles - double pT = fRemnantPT * TMath::Sqrt( -1*TMath::Log( rnd->RndHadro().Rndm() ) ); - double pT2 = TMath::Power(pT,2); - double pr = TMath::Power(m_hadron,2)+pT2; - //to generate the longitudinal scaling variable z in jet fragmentation using PYTHIA function - // Split energy-momentum of remnant using PYTHIA function - // z=E-pz fraction for rema forming jet-system with frag_q - // 1-z=E-pz fraction for hadron - double z; - int kfl1 = 1; - int kfl3 = 0; - pyzdis_(&kfl1,&kfl3,&pr,&z); - - // Energy of trasnfered to the hadron - double tm_hadron = pr / z / W; - double E_hadron = 0.5 * ( z*W + tm_hadron ); //E_hadron - pz = zW - double E_pz = W - tm_hadron; - double WT = (1-z) * W * E_pz - pT2; - - // Check if energy in jet system is enough for fragmentation. - if ( WT > TMath::Power(m_frag+m_rema+fMinESinglet,2) ) { - - // Energy of transfered to the fragmented quark and rema system - // Applying energy conservation - WT = TMath::Sqrt( WT + pT2 ); - double tm_rema = TMath::Power(m_rema,2) + pT2; - double E_frag = 0.5 * ( WT + ( TMath::Power(m_frag,2) - tm_rema)/WT ); //E_frag + E_rema = WT - double E_rema = 0.5 * ( WT + (-TMath::Power(m_frag,2) + tm_rema)/WT ); - double x_rema = -1 * TMath::Sqrt( TMath::Power(E_rema,2) - tm_rema ); - double theta_rema; - theta_rema = pyangl_(&x_rema,&pT); - - // Select a phi angle between between particles randomly - double phi = 2*kPi*rnd->RndHadro().Rndm(); - - double dbez = (E_pz-(1-z)*W)/(E_pz+(1-z)*W); - double pz_hadron = -0.5 * ( z*W - tm_hadron ); - - // Input the three particles to PYTHIA in the CM frame - // If a top quark is produced we decay it because it does not hadronize - - fPythia->Py1ent( -1, frag_quark, E_frag, 0., 0. ); //k(1,2) = 2 - if (TMath::Abs(frag_quark) > 5 ) { - int ip = 1; - pydecy_(&ip); - } - fPythia->Py1ent( fPythia->GetN()+1, rema, E_rema, theta_rema, phi ); //k(2,2) = 1 - - int imin = 0; - int imax = 0; - double the = 0.; double ph = 0.; - double dbex = 0.; double dbey = 0.; - pyrobo_( &imin , &imax, &the, &ph, &dbex, &dbey , &dbez ); - double theta_hadron = pyangl_(&pz_hadron,&pT); - - fPythia->SetMSTU( 10, 1 ); //keep the mass value stored in P(I,5), whatever it is. - fPythia->SetP( fPythia->GetN()+1, 5, m_hadron ); - fPythia->Py1ent( fPythia->GetN()+1, hadron, E_hadron, theta_hadron, phi + kPi ); - fPythia->SetMSTU( 10, 2 ); //find masses according to mass tables as usual. - - // Target remnants required to go backwards in hadronic cms - if ( fPythia->GetP(fPythia->GetN()-1,3)<0 && fPythia->GetP(fPythia->GetN(),3)<0 ) break; //quit the while from line 368 - - LOG("LeptoHad", pINFO) << "Not backward hadron or rema"; - LOG("LeptoHad", pINFO) << "hadron = " << hadron << " -> Pz = " << fPythia->GetP(fPythia->GetN(),3) ; - LOG("LeptoHad", pINFO) << "rema = " << rema << " -> Pz = " << fPythia->GetP(fPythia->GetN()-1,3) ; - - } - else { - LOG("LeptoHad", pINFO) << "Low WT value ... "; - LOG("LeptoHad", pINFO) << "WT = " << TMath::Sqrt(WT) << " // m_frag = " << m_frag << " // m_rema = " << m_rema; - } - - LOG("LeptoHad", pINFO) << "Hadronization paricles not suitable. Trying again... " << counter; - counter++; - if (counter==100) { - LOG("LeptoHad", pWARN) << "Hadronization particles failed after " << counter << " iterations! Returning a null list"; - return 0; - } - - } - - } - - // Introduce a primordial kT system - double pT = fPrimordialKT * TMath::Sqrt( -1*TMath::Log( rnd->RndHadro().Rndm() ) ); - double phi = -2*kPi*rnd->RndHadro().Rndm(); - double theta = 0.; - - int imin = 0; - int imax = 0; - double dbex = 0.; double dbey = 0.; double dbez = 0; - pyrobo_( &imin , &imax, &theta, &phi, &dbex, &dbey , &dbez ); - phi = -1 * phi; - theta = TMath::ATan(2.*pT/W); - pyrobo_( &imin , &imax, &theta, &phi, &dbex, &dbey , &dbez ); - - // Run PYTHIA with the input particles - fPythia->Pyexec(); - // Use for debugging purposes - //fPythia->Pylist(3); - fPythia->GetPrimaries(); - TClonesArray * pythia_particles = (TClonesArray *) fPythia->ImportParticles("All"); - // copy PYTHIA container to a new TClonesArray so as to transfer ownership - // of the container and of its elements to the calling method - int np = pythia_particles->GetEntries(); - assert(np>0); - TClonesArray * particle_list = new TClonesArray("genie::GHepParticle", np); - particle_list->SetOwner(true); - - // Boost velocity HCM -> LAB - long double beta = p4Hadlong.P()/p4Hadlong.E(); - - //fix numbering for events with top - bool isTop = false; - - //-- Translate the fragmentation products from TMCParticles to - // GHepParticles and copy them to the event record. - int mom = event->FinalStateHadronicSystemPosition(); - assert(mom!=-1); - - TMCParticle * p = 0; - TIter particle_iter(pythia_particles); - while( (p = (TMCParticle *) particle_iter.Next()) ) { - - int pdgc = p->GetKF(); - int ks = p->GetKS(); - - // Final state particles can not be quarks or diquarks but colorless - if(ks == 1) { - if( pdg::IsQuark(pdgc) || pdg::IsDiQuark(pdgc) ) { - LOG("LeptoHad", pERROR) << "Hadronization failed! Bare quark/di-quarks appear in final state!"; - return false; - } - } - - // When top quark is produced, it is immidiately decay before hadronization. Then the decayed - // products are hadronized with the hadron remnants. Therefore, we remove the top quark from - // the list of particles so that the mother/daugher assigments is at the same level for decayed - // products and hadron remnants. - if ( pdg::IsTQuark( TMath::Abs(pdgc) ) ) { isTop=true; continue; } - - // fix numbering scheme used for mother/daughter assignments - if ( isTop ) { - (p->GetParent()==0) ? p->SetParent(p->GetParent() - 1) : p->SetParent(p->GetParent() - 2); - p->SetFirstChild (p->GetFirstChild() - 2); - p->SetLastChild (p->GetLastChild() - 2); - } - else { - p->SetParent(p->GetParent() - 1); - p->SetFirstChild (p->GetFirstChild() - 1); - p->SetLastChild (p->GetLastChild() - 1); - } - - LongLorentzVector p4long( p->GetPx(), p->GetPy(), p->GetPz(), p->GetEnergy() ); - p4long.BoostZ(beta); - p4long.Rotate(p4Hadlong); - - // Translate from long double to double - TLorentzVector p4( (double)p4long.Px(), (double)p4long.Py(), (double)p4long.Pz(), (double)p4long.E() ); - - // Somtimes PYTHIA output particles with E smaller than its mass. This is wrong, - // so we assume that the are at rest. - double massPDG = PDGLibrary::Instance()->Find(pdgc)->Mass(); - if ( (ks==1 || ks==4) && p4.E()SetPARP(2, fWmin); // (D = 10. GeV) lowest c.m. energy for the event as a whole that the program will accept to simulate. (bellow 2GeV pythia crashes) - fPythia->SetMSTU(26, warnings); // (Default=10) maximum number of warnings that are printed - fPythia->SetMSTU(22, errors); // (Default=10) maximum number of errors that are printed - fPythia->SetMSTJ(93, qrk_mass); // light (d, u, s, c, b) quark masses are taken from PARF(101) - PARF(105) rather than PMAS(1,1) - PMAS(5,1). Diquark masses are given as sum of quark masses, without spin splitting term. - fPythia->SetPMAS(24,1,kMw); // mass of the W boson (pythia=80.450 // genie=80.385) - fPythia->SetPMAS(24,2,0.); // set to 0 the width of the W boson to avoid problems with energy conservation - fPythia->SetPMAS(6,2,0.); // set to 0 the width of the top to avoid problems with energy conservation - fPythia->SetMDME(192,1,0); // W->dbar+t decay off - fPythia->SetMDME(196,1,0); // W->cbar+t decay off - fPythia->SetMDME(200,1,0); // W->cbar+t decay off - - // PYTHIA tuned parameters - fPythia->SetPARJ(2, fSSBarSuppression ); - fPythia->SetPARJ(21, fGaussianPt2 ); - fPythia->SetPARJ(23, fNonGaussianPt2Tail ); - fPythia->SetPARJ(33, fRemainingECutoff ); - fPythia->SetPARJ(1, fDiQuarkSuppression ); - fPythia->SetPARJ(11, fLightVMesonSuppression ); - fPythia->SetPARJ(12, fSVMesonSuppression ); - fPythia->SetPARJ(41, fLunda ); - fPythia->SetPARJ(42, fLundb ); - fPythia->SetPARJ(45, fLundaDiq ); -#endif - -} -//____________________________________________________________________________ -void LeptoHadPythia6::Initialize(void) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia = TPythia6::Instance(); - - // sync GENIE/PYTHIA6 seed number - RandomGen::Instance(); -#endif - -} diff --git a/src/Physics/Hadronization/LeptoHadPythia6.h b/src/Physics/Hadronization/LeptoHadPythia6.h deleted file mode 100644 index d055dd45c4..0000000000 --- a/src/Physics/Hadronization/LeptoHadPythia6.h +++ /dev/null @@ -1,95 +0,0 @@ -//____________________________________________________________________________ -/*! - -\class genie::LeptoHadPythia6 - -\brief Provides access to the PYTHIA6 hadronization. \n - -\author Alfonso Garcia - IFIC (Valencia) - -\created December 12, 2024 - -\cpright Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - or see $GENIE/LICENSE -*/ -//____________________________________________________________________________ - -#ifndef _LEPTO_HAD_PYTHIA6__H_ -#define _LEPTO_HAD_PYTHIA6__H_ - -#include "Framework/EventGen/EventRecordVisitorI.h" -#include "Framework/Conventions/Constants.h" -#include "Framework/Numerical/RandomGen.h" -#include "Framework/Numerical/MathUtils.h" -#include "Framework/GHEP/GHepRecord.h" -#include "Framework/GHEP/GHepParticle.h" -#include "Framework/GHEP/GHepFlags.h" -#include "Framework/ParticleData/PDGCodes.h" -#include "Framework/ParticleData/PDGUtils.h" -#include "Framework/ParticleData/PDGLibrary.h" -#include "Framework/EventGen/EVGThreadException.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#include -#endif - -using namespace genie; -using namespace genie::constants; -using namespace genie::utils::math; - -namespace genie { - -class GHepParticle; - -class LeptoHadPythia6 : public EventRecordVisitorI { - -public: - LeptoHadPythia6(); - LeptoHadPythia6(string config); - virtual ~LeptoHadPythia6(); - - //-- implement the HadronizationModelI interface - void ProcessEventRecord(GHepRecord * event) const; - - //-- overload the Algorithm::Configure() methods to load private data - // members from configuration options - void Configure(const Registry & config); - void Configure(string config); - -private: - - bool Hadronize (GHepRecord * event) const; - void Initialize (void) const; - void LoadConfig (void); - - //-- configuration parameters - int fMaxIterHad; // Maxmium number of iterations to look for a combination of hadrons - double fPrimordialKT; // Width of Gaussian distribution for the primordial transverse momentum kT of partons in the nucleon. - double fRemnantPT; // Width of Gaussian distribution in transverse momentum when a non-trivial target remnant is split into two particles - double fMinESinglet; // It is, with quark masses added, used to define the minimum allowable energy of a colour-singlet parton system. - double fWmin; // Minimum value of W - - // PYTHIA physics configuration parameters used - double fSSBarSuppression; ///< ssbar suppression - double fGaussianPt2; ///< gaussian pt2 distribution width - double fNonGaussianPt2Tail; ///< non gaussian pt2 tail parameterization - double fRemainingECutoff; ///< remaining E cutoff stopping fragmentation - double fDiQuarkSuppression; ///< di-quark suppression parameter - double fLightVMesonSuppression; ///< light vector meson suppression - double fSVMesonSuppression; ///< strange vector meson suppression - double fLunda; ///< Lund a parameter - double fLundb; ///< Lund b parameter - double fLundaDiq; ///< adjustment of Lund a for di-quark - -#ifdef __GENIE_PYTHIA6_ENABLED__ - mutable TPythia6 * fPythia; ///< PYTHIA6 wrapper class -#endif - -}; - -} // genie namespace - -#endif // _LEPTO_HAD_PYTHIA6__H_ - diff --git a/src/Physics/Hadronization/LinkDef.h b/src/Physics/Hadronization/LinkDef.h index 0fe427534c..f8169ef6fe 100644 --- a/src/Physics/Hadronization/LinkDef.h +++ b/src/Physics/Hadronization/LinkDef.h @@ -9,17 +9,14 @@ //#pragma link C++ namespace genie::utils::fragmrec; #pragma link C++ class genie::PythiaBaseHadro2019; -#pragma link C++ class genie::Pythia6Hadro2019; #pragma link C++ class genie::Pythia8Hadro2019; -#pragma link C++ class genie::LeptoHadPythia6; #pragma link C++ class genie::LeptoHadPythia8; #pragma link C++ class genie::AGKYLowW2019; #pragma link C++ class genie::AGKY2019; #pragma link C++ class genie::AGCharmPythiaBaseHadro2023; -#pragma link C++ class genie::AGCharmPythia6Hadro2023; #pragma link C++ class genie::AGCharmPythia8Hadro2023; #pragma link C++ class genie::FragmentationFunctionI; diff --git a/src/Physics/Hadronization/Pythia6Hadro2019.cxx b/src/Physics/Hadronization/Pythia6Hadro2019.cxx deleted file mode 100644 index 336fb45fb2..0000000000 --- a/src/Physics/Hadronization/Pythia6Hadro2019.cxx +++ /dev/null @@ -1,337 +0,0 @@ -//____________________________________________________________________________ -/* - Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org - - Costas Andreopoulos - University of Liverpool -*/ -//____________________________________________________________________________ - -#include -#include - -#include "Framework/Conventions/Constants.h" -#include "Framework/GHEP/GHepStatus.h" -#include "Framework/GHEP/GHepParticle.h" -#include "Framework/GHEP/GHepRecord.h" -#include "Framework/GHEP/GHepFlags.h" -#include "Framework/EventGen/EVGThreadException.h" -#include "Framework/Interaction/Interaction.h" -#include "Framework/Messenger/Messenger.h" -#include "Framework/Numerical/RandomGen.h" -#include "Framework/ParticleData/PDGCodes.h" -#include "Framework/ParticleData/PDGUtils.h" -#include "Framework/Utils/KineUtils.h" -#include "Physics/Hadronization/Pythia6Hadro2019.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,6) -#include -#else -#include -#endif -#endif // __GENIE_PYTHIA6_ENABLED__ - -using namespace genie; -using namespace genie::constants; - -// the actual PYTHIA call -extern "C" void py2ent_(int *, int *, int *, double *); - -//____________________________________________________________________________ -Pythia6Hadro2019::Pythia6Hadro2019() : -PythiaBaseHadro2019("genie::Pythia6Hadro2019") -{ - this->Initialize(); -} -//____________________________________________________________________________ -Pythia6Hadro2019::Pythia6Hadro2019(string config) : -PythiaBaseHadro2019("genie::Pythia6Hadro2019", config) -{ - this->Initialize(); -} -//____________________________________________________________________________ -Pythia6Hadro2019::~Pythia6Hadro2019() -{ - -} -//____________________________________________________________________________ -void Pythia6Hadro2019::ProcessEventRecord(GHepRecord * - #ifdef __GENIE_PYTHIA6_ENABLED__ - event // avoid unused variable warning if PYTHIA6 is not enabled - #endif -) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - PythiaBaseHadro2019::ProcessEventRecord(event); -#else - LOG("Pythia6Had", pFATAL) - << "Calling GENIE/PYTHIA6 hadronization modules without enabling PYTHIA6"; - gAbortingInErr = true; - std::exit(1); -#endif -} -//____________________________________________________________________________ -bool Pythia6Hadro2019::Hadronize(GHepRecord * -#ifdef __GENIE_PYTHIA6_ENABLED__ - event // avoid unused variable warning if PYTHIA6 is not enabled -#endif -) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - - LOG("Pythia6Had", pNOTICE) << "Running PYTHIA6 hadronizer"; - - const Interaction * interaction = event->Summary(); - const Kinematics & kinematics = interaction->Kine(); - double W = kinematics.W(); - - LOG("Pythia6Had", pNOTICE) - << "Fragmentation: " - << "q = " << fLeadingQuark << ", qq = " << fRemnantDiquark - << ", W = " << W; - - // Hadronize - int ip = 0; - py2ent_(&ip, &fLeadingQuark, &fRemnantDiquark, &W); // hadronizer - - // Get LUJETS record - fPythia->GetPrimaries(); - TClonesArray * pythia_particles = - (TClonesArray *) fPythia->ImportParticles("All"); - - // Copy PYTHIA container to a new TClonesArray so as to transfer ownership - // of the container and of its elements to the calling method - - int np = pythia_particles->GetEntries(); - assert(np>0); - - // Hadronic 4vec - TLorentzVector p4Had = kinematics.HadSystP4(); - - // Vector defining rotation from LAB to LAB' (z:= \vec{phad}) - TVector3 unitvq = p4Had.Vect().Unit(); - - // Boost velocity LAB' -> HCM - TVector3 beta(0,0,p4Had.P()/p4Had.Energy()); - - // Check target and decide appropriate status code for f/s particles - bool is_nucleus = interaction->InitState().Tgt().IsNucleus(); - GHepStatus_t istfin = is_nucleus ? kIStHadronInTheNucleus : kIStStableFinalState ; - - // Get the index of the mother of the hadronic system - int mom = event->FinalStateHadronicSystemPosition(); - assert(mom!=-1); - - // Get the neutrino vertex position (all hadrons positions set to this point) - GHepParticle * neutrino = event->Probe(); - const TLorentzVector & vtx = *(neutrino->X4()); - - // Loop over PYTHIA6 event particles and copy relevant entries - unsigned int i = 0; - TMCParticle * p = 0; - TIter particle_iter(pythia_particles); - while( (p = (TMCParticle *) particle_iter.Next()) ) { - - int particle_pdg_code = p->GetKF(); - int pythia_particle_status = p->GetKS(); - - // Sanity check - if(pythia_particle_status == 1) { - if( pdg::IsQuark (particle_pdg_code) || - pdg::IsDiQuark(particle_pdg_code) ) - { - LOG("Pythia6Had", pERROR) - << "Hadronization failed! Bare quarks appear in final state!"; - return false; - } - } - - // The fragmentation products are generated in the hadronic CM frame - // where the z>0 axis is the \vec{phad} direction. For each particle - // returned by the hadronizer: - // - boost it back to LAB' frame {z:=\vec{phad}} / doesn't affect pT - // - rotate its 3-momentum from LAB' to LAB - TLorentzVector p4o(p->GetPx(), p->GetPy(), p->GetPz(), p->GetEnergy()); - p4o.Boost(beta); - TVector3 p3 = p4o.Vect(); - p3.RotateUz(unitvq); - TLorentzVector p4(p3,p4o.Energy()); - - // Set the proper GENIE status according to a number of things: - // interaction on a nucleus or nucleon, particle type - GHepStatus_t ist = (pythia_particle_status == 1) ? - istfin : kIStDISPreFragmHadronicState; - // Handle gammas, and leptons that might come from internal pythia decays - // mark them as final state particles - bool is_gamma = (particle_pdg_code == kPdgGamma); - bool is_nu = pdg::IsNeutralLepton(particle_pdg_code); - bool is_lchg = pdg::IsChargedLepton(particle_pdg_code); - bool not_hadr = is_gamma || is_nu || is_lchg; - if(not_hadr) { ist = kIStStableFinalState; } - - // Set mother/daugher indices - int mother1 = mom + p->GetParent(); - int mother2 = -1; - int daughter1 = (p->GetFirstChild() <= 0 ) ? -1 : mom + p->GetFirstChild(); - int daughter2 = (p->GetLastChild() <= 0 ) ? -1 : mom + p->GetLastChild(); - - // Create GHepParticle - GHepParticle particle = GHepParticle( - particle_pdg_code, // pdg - ist, // status - mother1, // first parent - mother2, // second parent - daughter1, // first daughter - daughter2, // second daughter - p4.Px(), // px - p4.Py(), // py - p4.Pz(), // pz - p4.Energy(), // e - vtx.X(), // x - vtx.Y(), // y - vtx.Z(), // z - vtx.T() // t - ); - - LOG("Pythia6Had", pDEBUG) - << "Adding final state particle pdgc = " << particle.Pdg() - << " with status = " << particle.Status(); - - // Insert the particle in the list - event->AddParticle(particle); - } - return true; - -#else - return false; -#endif // __GENIE_PYTHIA6_ENABLED__ -} -//____________________________________________________________________________ -void Pythia6Hadro2019::CopyOriginalDecayFlags(void) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - fOriDecayFlag_pi0 = (fPythia->GetMDCY(fPythia->Pycomp(kPdgPi0), 1) == 1); - fOriDecayFlag_K0 = (fPythia->GetMDCY(fPythia->Pycomp(kPdgK0), 1) == 1); - fOriDecayFlag_K0b = (fPythia->GetMDCY(fPythia->Pycomp(kPdgAntiK0), 1) == 1); - fOriDecayFlag_L0 = (fPythia->GetMDCY(fPythia->Pycomp(kPdgLambda), 1) == 1); - fOriDecayFlag_L0b = (fPythia->GetMDCY(fPythia->Pycomp(kPdgAntiLambda), 1) == 1); - fOriDecayFlag_Dm = (fPythia->GetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaM), 1) == 1); - fOriDecayFlag_D0 = (fPythia->GetMDCY(fPythia->Pycomp(kPdgP33m1232_Delta0), 1) == 1); - fOriDecayFlag_Dp = (fPythia->GetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaP), 1) == 1); - fOriDecayFlag_Dpp = (fPythia->GetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaPP), 1) == 1); - -#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ - LOG("Pythia6Had", pDEBUG) - << "Original PYTHIA6 decay flags:" - << "\n pi0 = " << fOriDecayFlag_pi0 - << "\n K0 = " << fOriDecayFlag_K0 - << "\n \bar{K0} = " << fOriDecayFlag_K0b - << "\n Lambda = " << fOriDecayFlag_L0 - << "\n \bar{Lambda0} = " << fOriDecayFlag_L0b - << "\n D- = " << fOriDecayFlag_Dm - << "\n D0 = " << fOriDecayFlag_D0 - << "\n D+ = " << fOriDecayFlag_Dp - << "\n D++ = " << fOriDecayFlag_Dpp; -#endif - -#endif // __GENIE_PYTHIA6_ENABLED__ -} -//____________________________________________________________________________ -void Pythia6Hadro2019::SetDesiredDecayFlags(void) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - - fPythia->SetMDCY(fPythia->Pycomp(kPdgPi0), - 1, (fReqDecayFlag_pi0) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgK0), - 1, (fReqDecayFlag_K0) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgAntiK0), - 1, (fReqDecayFlag_K0b) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgLambda), - 1, (fReqDecayFlag_L0) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgAntiLambda), - 1, (fReqDecayFlag_L0b) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaM), - 1, (fReqDecayFlag_Dm) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_Delta0), - 1, (fReqDecayFlag_D0) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaP), - 1, (fReqDecayFlag_Dp) ? 1 : 0); - fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaPP), - 1, (fReqDecayFlag_Dpp) ? 1 : 0); - -#endif // __GENIE_PYTHIA6_ENABLED__ -} -//____________________________________________________________________________ -void Pythia6Hadro2019::RestoreOriginalDecayFlags(void) const -{ -#ifdef __GENIE_PYTHIA6_ENABLED__ - -fPythia->SetMDCY(fPythia->Pycomp(kPdgPi0), - 1, (fOriDecayFlag_pi0) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgK0), - 1, (fOriDecayFlag_K0) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgAntiK0), - 1, (fOriDecayFlag_K0b) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgLambda), - 1, (fOriDecayFlag_L0) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgAntiLambda), - 1, (fOriDecayFlag_L0b) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaM), - 1, (fOriDecayFlag_Dm) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_Delta0), - 1, (fOriDecayFlag_D0) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaP), - 1, (fOriDecayFlag_Dp) ? 1 : 0); -fPythia->SetMDCY(fPythia->Pycomp(kPdgP33m1232_DeltaPP), - 1, (fOriDecayFlag_Dpp) ? 1 : 0); - -#endif // __GENIE_PYTHIA6_ENABLED__ -} -//____________________________________________________________________________ -void Pythia6Hadro2019::Configure(const Registry & config) -{ - Algorithm::Configure(config); - this->LoadConfig(); -} -//____________________________________________________________________________ -void Pythia6Hadro2019::Configure(string config) -{ - Algorithm::Configure(config); - this->LoadConfig(); -} -//____________________________________________________________________________ -void Pythia6Hadro2019::LoadConfig(void) -{ - PythiaBaseHadro2019::LoadConfig(); - -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia->SetPARJ(2, fSSBarSuppression ); - fPythia->SetPARJ(21, fGaussianPt2 ); - fPythia->SetPARJ(23, fNonGaussianPt2Tail ); - fPythia->SetPARJ(33, fRemainingECutoff ); - fPythia->SetPARJ(1, fDiQuarkSuppression ); - fPythia->SetPARJ(11, fLightVMesonSuppression ); - fPythia->SetPARJ(12, fSVMesonSuppression ); - fPythia->SetPARJ(41, fLunda ); - fPythia->SetPARJ(42, fLundb ); - fPythia->SetPARJ(45, fLundaDiq ); -#endif - - LOG("Pythia6Had", pDEBUG) << this->GetConfig() ; -} -//____________________________________________________________________________ -void Pythia6Hadro2019::Initialize(void) -{ - PythiaBaseHadro2019::Initialize(); -#ifdef __GENIE_PYTHIA6_ENABLED__ - fPythia = TPythia6::Instance(); - // sync GENIE/PYTHIA6 seed number - // PYTHIA6 is a singleton, so do this from RandomGen for all - // GENIE algorithms that use PYTHIA6 - RandomGen::Instance(); -#endif -} -//____________________________________________________________________________ diff --git a/src/Physics/Hadronization/Pythia6Hadro2019.h b/src/Physics/Hadronization/Pythia6Hadro2019.h deleted file mode 100644 index 59b8148ed6..0000000000 --- a/src/Physics/Hadronization/Pythia6Hadro2019.h +++ /dev/null @@ -1,67 +0,0 @@ -//____________________________________________________________________________ -/*! - -\class genie::Pythia6Hadro2019 - -\brief Provides access to the PYTHIA hadronization models. \n - Is a concrete implementation of the EventRecordVisitorI interface. - -\author Costas Andreopoulos - University of Liverpool - -\created August 17, 2004 - -\cpright Copyright (c) 2003-2025, The GENIE Collaboration - For the full text of the license visit http://copyright.genie-mc.org -*/ -//____________________________________________________________________________ - -#ifndef _PYTHIA6_HADRONIZATION_H_ -#define _PYTHIA6_HADRONIZATION_H_ - -#include "Framework/Conventions/GBuild.h" -#include "Framework/Interaction/Interaction.h" -#include "Physics/Hadronization/PythiaBaseHadro2019.h" - -#ifdef __GENIE_PYTHIA6_ENABLED__ -#include -#endif - -namespace genie { - -class GHepParticle; - -class Pythia6Hadro2019 : public PythiaBaseHadro2019 { - -public: - Pythia6Hadro2019(); - Pythia6Hadro2019(string config); - virtual ~Pythia6Hadro2019(); - - // Implement the EventRecordVisitorI interface - void ProcessEventRecord(GHepRecord * event) const; - - // Overload the Algorithm::Configure() methods to load private data - // members from configuration options - void Configure(const Registry & config); - void Configure(string config); - -private: - - bool Hadronize (GHepRecord* event) const; - - void CopyOriginalDecayFlags (void) const; - void SetDesiredDecayFlags (void) const; - void RestoreOriginalDecayFlags (void) const; - - void LoadConfig (void); - void Initialize (void); - -#ifdef __GENIE_PYTHIA6_ENABLED__ - mutable TPythia6 * fPythia; ///< PYTHIA6 wrapper class -#endif -}; - -} // genie namespace - -#endif // _PYTHIA6_HADRONIZATION_H_ diff --git a/src/make/Make.include b/src/make/Make.include index f85c732e58..2c680e2f18 100644 --- a/src/make/Make.include +++ b/src/make/Make.include @@ -157,13 +157,13 @@ endif # APFEL #------------------------------------------------------------------- -APFEL_LIBRARIES = +APFEL_LIBRARIES = APFEL_INCLUDES = -ifeq ($(strip $(GOPT_ENABLE_APFEL)),YES) +ifeq ($(strip $(GOPT_ENABLE_APFEL)),YES) APFEL_INCLUDES = -I$(GOPT_WITH_APFEL_INC) -APFEL_LIBRARIES = -L$(GOPT_WITH_APFEL_LIB) -lAPFEL +APFEL_LIBRARIES = -L$(GOPT_WITH_APFEL_LIB) -lAPFEL endif @@ -230,29 +230,6 @@ ifneq ($(G4INCBASE),"") GEANT4_LIBRARIES := $(shell $(GOPT_WITH_GEANT4_LIB)/../bin/geant4-config --libs-without-gui ) endif -#------------------------------------------------------------------- -# PYTHIA6 -#------------------------------------------------------------------- - -PYTHIA6_LIBRARIES = -PY6ROOT_LIBRARY = - -ifeq ($(strip $(GOPT_ENABLE_PYTHIA6)),YES) - -PYTHIA6_DIR = $(GOPT_WITH_PYTHIA6_LIB) -PYTHIA6_O = $(wildcard $(PYTHIA6_DIR)/pythia*.o) # match all vrs - -PYTHIA6_LIBRARIES = -L$(PYTHIA6_DIR) -lPythia6 $(PYTHIA6_O) - -ifeq ($(strip $(ARCH)),macosx) -PYTHIA6_LIBRARIES = -L$(PYTHIA6_DIR) -lPythia6 -endif - -PY6ROOT_LIBRARY = -lEGPythia6 -else - $(info GOPT_ENABLE_PYTHIA6 is NO) -endif - #------------------------------------------------------------------- # PYTHIA8 #------------------------------------------------------------------- diff --git a/src/scripts/build/ext/build_pythia6.sh b/src/scripts/build/ext/build_pythia6.sh deleted file mode 100755 index 8c9185072f..0000000000 --- a/src/scripts/build/ext/build_pythia6.sh +++ /dev/null @@ -1,666 +0,0 @@ -#!/usr/bin/env bash -# -# A script to download and build pythia6. -# -# Build both a static library for use with fortran and a shared object -# library for use with ROOT. Strips out the dummy routines that would -# hide the real ones found in pdflib. Currently does *not* extract include -# files from the downloaded source, but uses definitions embedded in this -# script. Should work on both Linux and Mac OS X. -# -# Usage: ./build_pythia6 [version] [--dummies=bestry|remove|keep] \ -# [--refetch] [gfortran|g77|g95] [-m32] -# -# where [version] takes a form like "6.4.28", "6428" or "6_428" w/ or -# without an optional leading "v". It will created a subdirectory named -# "v6_428" so it is probably wise to run this in a directory named "pythia6" -# or some such. The --dummies=XYZZY controls whether the dummy PDFSET, -# STRUCTM and STRUCTP routines are removed. The -m32 forces a 32-bit -# build. -# -# Creates directory structure: -# -# pythia6/ - start in this directory -# v6_428/ - created subdirectory -# download/ - code downloaded from remote locations -# inc/ - include files for selected common blocks -# (hardcoded! not from downloaded source) -# lib/ - liblund.a pydata.o libPythia6.so -# src/ - fsplit source (and intermediate .o files) -# tpythia6_build/ - files for building ROOT interface -# -# Questions? Suggestions? Improvements? Offers of insane amounts of cash? -# Write me at: Robert Hatcher -# -# History: -# 2006-10-20: original version created by -# 2007-06-28: strict bash needs -gt to compare an int value, not ">" -# bail out if fetching source fails -# 2007-08-07: version 6.4.11 and beyond are at www.hepforge.org and use -# a different naming convention; support 6409 and earlier -# from old location (6.4.10 is in tar form... punt for now) -# more alternatives for version specification, this is -# needed for different file naming schemes old vs. new -# use wget if possible, curl if not, bail if neither avail -# 2007-10-16: add flags -# --keep-dummies : force the keeping of pdflib dummies -# --refetch : force refetch of source code -# look around for CERNLIB pdflib[804], mathlib, kernlib -# libraries with which to link against in order -# to satisfy removed dummies -# 2007-10-17: change to --dummmies=[besttry|remove|keep] -# besttry (default) means try to link to CERNLIB -# if any of the libraries can't be found then -# don't remove dummmies -# remove always removes dummy routine and tries to link -# to what ever libraries that it can find -# keep always keeps dummy routine -# 2008-01-05: fix "keep" option to actually keep dummy stubs. -# 2009-04-09: choose fortran compiler, if cmd line specified use that -# otherwise first of gfortran or g77 found -# 2010-12-29: addition of -m32 option; default v6_422 -# 2011-01-13: default v6_424; clean up comments -# 2014-07-14: default v6_428; http->https for hepforge -# 2016-05-19: new location for root download -# -############################################################################ -# -version=6.4.28 -doclean=0 -dummyaction="besttry" -refetch=0 -whichftn="unknown" -m32flag="" -while [ $# -gt 0 ] ; do - case $1 in - *clean*) - doclean=1 ;; - *dumm*) - case $1 in - *keep*) - dummyaction="keep" ;; - *remove*) - dummyaction="remove" ;; - *best*) - dummyaction="besttry" ;; - *) - echo "failed to parse $1" ;; - esac ;; - *refetch*) - refetch=1 ;; - *g77*) - whichftn="g77" ;; - *gfortran*) - whichftn="gfortran" ;; - *g95*) - whichftn="g95" ;; - *m32*) - m32flag="-m32" ;; - *) - version=$1 ;; - esac - shift -done - -############################################################################ - export ESCCHAR="\x1B" # or \033 # Mac OS X bash doesn't support \e as esc? - export OUTBLACK="${ESCCHAR}[0;30m" - export OUTBLUE="${ESCCHAR}[0;34m" - export OUTGREEN="${ESCCHAR}[0;32m" - export OUTCYAN="${ESCCHAR}[0;36m" - export OUTRED="${ESCCHAR}[0;31m" - export OUTPURPLE="${ESCCHAR}[0;35m" - export OUTORANGE="${ESCCHAR}[0;33m" # orange, more brownish? - export OUTLTGRAY="${ESCCHAR}[0;37m" - export OUTDKGRAY="${ESCCHAR}[1;30m" - # labelled "light but appear in some cases to show as "bold" - export OUTLTBLUE="${ESCCHAR}[1;34m" - export OUTLTGREEN="${ESCCHAR}[1;32m" - export OUTLTCYAN="${ESCCHAR}[1;36m" - export OUTLTRED="${ESCCHAR}[1;31m" - export OUTLTPURPLE="${ESCCHAR}[1;35m" - export OUTYELLOW="${ESCCHAR}[1;33m" - export OUTWHITE="${ESCCHAR}[1;37m" - export OUTNOCOL="${ESCCHAR}[0m" # No Color -# use as: echo -e "${OUTRED} this is red ${OUTNOCOL}" -############################################################################## - - -############################################################################ -# -# decompose version string which could take any of the forms: -# [v]{Major}.{minor}.{tiny}, [v]{Major}_{minor}{tiny} or -# [v]{Major}{minor}{tiny}, with the assumption that {Major} is always "6" -# and {tiny} is two digits. -# -# remove any "v" in version number -version0=${version#v*} - -major=${version0%%.*} -if [ "${major}" = "6" ] ; then -# in M.m.tt format - foo=${version0#*.} - minor=${foo%%.*} - tiny=${foo##*.} -else - major=${version0%%_*} - if [ "${major}" = "6" ] ; then -# in M_mtt format, convert to Mmtt - version0=${version0/_/} - fi -# assume Mmtt format, could it also be Mmmtt? anticipate it could be. -# ${parmeter:offset:length} doesn't work for negative offsets as advertized - major=${version0:0:1} - foo=`echo $version0 | cut -c2-` - if [ ${foo} -lt 1000 ] ; then - minor=`echo $foo | cut -c1` - tiny=`echo $foo | cut -c2-3` - else - minor=`echo $foo | cut -c1-2` - tiny=`echo $foo | cut -c3-4` - fi -fi - -############################################################################ -# -# script only works for pythia6 -# -if [ "${major}" != "6" ] ; then - echo -e "${OUTRED}sorry this script only works for pythia6, not ${major}${OUTNOCOL}" - exit -fi - -############################################################################ -# -# use the naming conventions v{Major}_{minos}{tiny} for the subdir -# to match that used by UPS at FNAL. -# -topdir=v${major}_${minor}${tiny} -toppath=`pwd`/${topdir} - -echo -e ${OUTCYAN}version $version major $major minor $minor tiny $tiny ${OUTNOCOL} -echo -e ${OUTGREEN}full path: $toppath ${OUTNOCOL} - -if [ ! -d ${topdir} ] ; then - mkdir $topdir -fi -cd $topdir -for subdir in inc lib download src tpythia6_build ; do - if [ ! -d ${subdir} ] ; then - mkdir ${subdir} - fi -done - -############################################################################ -# -# pick a fortran: g77 vs. gfortran vs. g95 -# -if [ "$whichftn" == "unknown" ] ; then -# for now not g95 option ... -# whichg95=`which g95 | grep -v "no g95 in"` - if [ ! -z "${whichg95}" ] ; then - whichftn="g95" - else -# echo "no g95" - whichgfortran=`which gfortran | grep -v "no gfortran in"` - if [ ! -z "${whichgfortran}" ] ; then - whichftn="gfortran" - else -# echo "no gfortran" - whichg77=`which g77 | grep -v "no g77 in"` - if [ ! -z "${whichg77}" ] ; then - whichftn="g77" - else - echo "could not find a fortran compiler (g95, gfortran, g77)" - fi - fi - fi -fi -export FORT=$whichftn -echo -e "${OUTGREEN}using $FORT as fortran compiler${OUTNOCOL}" - -############################################################################ -# -# make "inc" symlink -# (various scripts disagree about where the include files should live) -# -cd src -if [ ! -f inc ] ; then - echo make symlink src/../inc src/inc - ln -sf ../inc ./inc -else - echo src/inc symlink exists -fi -cd ${toppath} -# -# -############################################################################ -# -add2link() -{ - # routine for building up linkage "-Lpath -llibrary" in variable - # given by varname (arg 1) for library (arg 2) in potential locations - # (args 3+). Don't repeat location in string. Look for various extensions - # - varname=$1 - shift - libname=$1 - shift - export foundlib=0 - while [ $# -gt 0 ] ; do - loc=$1 - shift - for ext in .a .so .dylib ; do - fullname=${loc}/lib${libname}${ext} - #echo look for ${fullname} - if [ -f ${fullname} ] ; then - #echo hit it at -L${loc} -l${libname} - foundlib=1 - echo ${!varname} | grep ${loc} 2>&1 > /dev/null - if [ $? -ne 0 ] ; then - export $varname="${!varname} -L${loc} -l${libname}" - else - export $varname="${!varname} -l${libname}" - fi - break; - fi - done - if [ ${foundlib} -ne 0 ] ; then break ; fi - done -} -# -############################################################################ -# -# look for the CERNLIB libraries: pdflib[804], mathlib, kernlib -# these are needed in order to satisfy the removed dummy routines -# if they can't be found then don't remove the dummies -# -CERNLINK="" # -L${CERNLIBS} -lpdflib804 -lmathlib -lkernlib" -if [ "$dummyaction" = "keep" ] ; then - echo requested to keep dummy PDFSET, STRUCTM and STRUCTP -else - missinglib="" - add2link CERNLINK pdflib $CERNLIB $CERNLIBS $CERN_DIR/lib $CERN_ROOT/lib - if [ ${foundlib} -eq 0 ] ; then - add2link CERNLINK pdflib804 $CERNLIB $CERNLIBS $CERN_DIR/lib $CERN_ROOT/lib - if [ ${foundlib} -eq 0 ] ; then - missinglib="$missinglib pdflib[804]" - fi - fi - add2link CERNLINK mathlib $CERNLIB $CERNLIBS $CERN_DIR/lib $CERN_ROOT/lib - if [ ${foundlib} -eq 0 ] ; then - missinglib="$missinglib mathlib" - fi - add2link CERNLINK kernlib $CERNLIB $CERNLIBS $CERN_DIR/lib $CERN_ROOT/lib - if [ ${foundlib} -eq 0 ] ; then - missinglib="$missinglib kernlib" - fi - # didn't find something? - if [ -n "$missinglib" ] ; then - echo "### unable to locate library: ${missinglib} " - if [ "$dummyaction" = "besttry" ] ; then - echo "### revert to keeping dummy PDFSET, STRUCTM and STRUCTP " - CERNLINK="" - dummyaction="keep" - fi - else - dummyaction="remove" - fi - if [ -n "$CERNLINK" ] ; then - echo will attempt to resolve removed dummies with CERNLINK = - echo " $CERNLINK" - fi -fi # user didn't initially request "keep" - -############################################################################ -# -if [ ${doclean} -ne 0 ] ; then - echo clean out old code -fi - -############################################################################ -# -# decide on how to fetch the source files -# -cd ${toppath}/download -# -# wget or curl for retreiving remote files? -# (OS X doesn't generally have wget on it, so fall back on curl in that case) -# -whichfetchit=`which wget | grep -v "no wget in"` -if [ ! -z "${whichfetchit}" ] ; then - echo use \"wget\" for fetching files - fetchit='wget --no-check-certificate ' -else - whichfetchit=`which curl | grep -v "no curl in"` - if [ ! -z "${whichfetchit}" ] ; then - # -f = fail without creating dummy, -O output local named like remoteza - echo use \"curl -f -O\" for fetching files - fetchit='curl -f -O ' - else - echo "Neither wget nor curl available -- can't download files" - exit 1 - fi -fi - -############################################################################ -# -# retrieve the pythia6 fortran soruce file -# naming and location depends on version -# -mt=${minor}${tiny} -if [ $mt -lt 410 ] ; then -# old location, unzip .f file - basef=pythia${major}${minor}${tiny}.f - #location=http://www.thep.lu.se/~torbjorn/pythia - #location=http://home.thep.lu.se/~torbjorn/pythia - gzipped="" -elif [ $mt -eq 410 ] ; then -# not a case we can handle -# there is a .tar.gz file at the new location .. but that's too much work - echo "source files for minor version $minor can't be handled by this script" - exit -else -# new location, .f file is gzipped - basef=pythia${major}${minor}${tiny}.f - #location=hhttp://home.thep.lu.se/~torbjorn/pythia6 - #location=http://home.thep.lu.se/~torbjorn/pythia6 - location=https://pythia.org/download/pythia6 - gzipped="" -fi -# if we don't already have it, fetch the .f file -if [ ! -f ${basef}_with_dummies -o ${refetch} -ne 0 ] ; then - echo -e "${OUTCYAN}${fetchit} ${location}/${basef}${gzipped} ${OUTNOCOL}" - $fetchit ${location}/${basef}${gzipped} - if [ ! ${basef}${gzipped} ] ; then - echo -e "${OUTRED}Sorry could not fetch ${basef}${gzipped} from ${location}${OUTNOCOL}" - exit 1 - fi - if [ -n "${gzipped}" ] ; then - rm -f ${basef} - gzip -d ${basef}${gzipped} - fi - mv ${basef} ${basef}_with_dummies -fi - -############################################################################ -# -# fetch the ROOT interface code -# -if [ ! -f pythia6.tar.gz -o ${refetch} -ne 0 ] ; then - # rooti="ftp://root.cern.ch/root/pythia6.tar.gz" - rooti=https://root.cern.ch/download/pythia6.tar.gz - echo -e "${OUTCYAN}${fetchit} ${rooti}${OUTNOCOL}" - ${fetchit} ${rooti} -fi - -############################################################################ -# -# need to remove PDFSET/STRUCTM/STRUCTP routines from pythia6 code -# if we're using PDFLIB to supply the PDFSET, STRUCTM, STRUCTP routines -# -if [ "$dummyaction" = "keep" ] ; then - cp ${basef}_with_dummies ${basef} - echo not removing dummy routines -else - cat > rm_dummy.awk < ${basef} -fi - -# extract block data routine -#cat > extract_pydata.awk < pydata.f - -############################################################################ -# -# create a Makefile for the pythia6 source code -# -cd ${toppath}/src -cat > Makefile < pyalps.f - fi - rm -f zzz*.f - if [ "$dummyaction" != "keep" ] ; then - for junk in pdfset.f structm.f structp.f ; do - if [ -f ${junk} ] ; then - echo "${junk} in split output, should have been removed" - rm -f ${junk} - fi - done - fi - make all -fi - -############################################################################ -# -# build the ROOT interface library libPythia6.so -# -echo "build ROOT accessable shared library" -cd ${toppath}/tpythia6_build - -tar xzvf ${toppath}/download/pythia6.tar.gz pythia6/tpythia6_called_from_cc.F -tar xzvf ${toppath}/download/pythia6.tar.gz pythia6/pythia6_common_address.c -mv pythia6/* . -rmdir pythia6 -echo 'void MAIN__() {}' > main.c -gcc -c -fPIC -fcommon $m32flag main.c -gcc -c -fPIC -fcommon $m32flag pythia6_common_address.c -$FORT -c -fPIC -fno-second-underscore $m32flag tpythia6_called_from_cc.F - -cd ${toppath}/lib - -arch=`uname` -if [ ${arch} == "Linux" ] ; then - $FORT $m32flag -shared -Wl,-soname,libPythia6.so -o libPythia6.so \ - ${toppath}/tpythia6_build/*.o ${toppath}/src/*.o ${CERNLINK} -fi -if [ ${arch} == "Darwin" ] ; then - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - gcc $m32flag -dynamiclib -flat_namespace -single_module -undefined dynamic_lookup \ - -install_name ${toppath}/lib/libPythia6.dylib -o libPythia6.dylib \ - ${toppath}/tpythia6_build/*.o ${toppath}/src/*.o ${CERNLINK} - if [ $macosx_minor -ge 4 ]; then - ln -sf libPythia6.dylib libPythia6.so - else - gcc $m32flag -bundle -flat_namespace -undefined dynamic_lookup -o libPythia6.so \ - ${toppath}/tpythia6_build/*.o ${toppath}/src/*.o ${CERNLINK} - fi -fi - -############################################################################ -# -# create pythia6 include files for common blocks -# -# here we'd like to automate the extraction of the common common blocks -# into include files but it's non-trivial - -echo "extract include files" -cd ${toppath}/inc - -# define a #include that declares the types of all the pythia functions -cat > pyfunc.inc < pydat1.inc < pydat2.inc < pydat3.inc < pyjets.inc < pypars.inc < pysubs.inc <0) - { print GBLD "#define __GENIE_PYTHIA6_ENABLED__\n"; } -else { print GBLD "//#define __GENIE_PYTHIA6_ENABLED__\n"; } - # pythia8 enabled? # @nret = `grep 'GOPT_ENABLE_PYTHIA8=YES' $GCONF_FILE`;