Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete Pythia8 singleton (rebased & ready to go) #420

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b357565
don't explicitly set __GENIE_PYTHIA6_ENABLED__, rather rely on Framew…
nusense Jul 20, 2023
6ed5ed3
make pythia6 symmetric with pythia8
nusense Jul 20, 2023
49a96dc
make GOPT_ENABLE_PYTHIA6 control setting pythia6 variables; make incl…
nusense Jul 20, 2023
cd6eb87
make --disable-pythia6 an option that can be set (enabled by default)
nusense Jul 20, 2023
2142f7f
don't explicitly set __GENIE_PYTHIA6_ENABLED__, rather rely on Framew…
nusense Jul 24, 2023
5d3aba6
whitespace cleanup
nusense Jul 26, 2023
63fc80e
hide pythia6 externs when not using Pythia6 ; whitespace cleanup
nusense Jul 26, 2023
fd81765
factorization of AGCharm2019 to AGCharmPythiaXHadro2023
nusense Jul 26, 2023
374b0bb
change AGCharm2019 to AGCharmPythia6Hadro2023; whitespace cleanup
nusense Jul 26, 2023
1263230
move AGCharm2019.xml to AGCharm2023.xml
nusense Jul 26, 2023
64a1b88
hide pythia6 interface if not enabled
nusense Jul 26, 2023
7d7dbb6
add AGCharmPythia8Hadro2023; not yet fully converted to use Pythia8
nusense Jul 26, 2023
685a81e
AGCharm2019 is now AGCharmPythia[Base|6|8]Hadro2023
nusense Jul 26, 2023
0087993
fail hard if not built with Pythia6; but buildable
nusense Jul 26, 2023
890fad1
fail hard if not built with Pythia6; but buildable
nusense Jul 26, 2023
7a0c322
PythiaDecayer moved to Pythia6Decayer2023; buildable without pythia6 …
nusense Jul 26, 2023
9939dcd
PythiaDecayer moved to Pythia6Decayer2023
nusense Jul 26, 2023
0a52316
pythia6 enable/disable just like pythia8; no longer try to depend on …
nusense Jul 27, 2023
65c291f
reflect new factorization
nusense Jul 27, 2023
cabdbd5
header order matters
nusense Jul 27, 2023
2bc7768
include GBuild.h for PYTHIA6 enabled flag
nusense Jul 27, 2023
270fd4a
small comment typo
nusense Jul 27, 2023
6eb7396
include GBuild.h ; header order matters
nusense Jul 27, 2023
df2cf90
refactor HadronizeRemnant to avoid TMCParticle class in any but pythi…
nusense Sep 15, 2023
ec4e8bc
fix typo
nusense Sep 15, 2023
f28ecd5
first go at Pythia8 decayer
nusense Dec 21, 2023
51e79eb
first pass at Pythia8 charm hadronizer
nusense Dec 21, 2023
7009f52
don't list pythia event before processing
nusense Jan 25, 2024
58bf3a0
remove spurious include for pythia6
nusense Jan 25, 2024
e5298c0
protect cases of include TMCParticle when there is no pythia6
nusense Jan 25, 2024
84496c3
need GBuild.h to define (or not) __GENIE_PYTHIA6_ENABLED__
nusense Jan 25, 2024
8ea4b07
need GBuild.h to define (or not) __GENIE_PYTHIA6_ENABLED__
nusense Jan 25, 2024
2817780
create a singleton instance of Pythia8 to use
nusense Jun 18, 2024
5c93209
don't link to pythia6 libraries here
nusense Jun 18, 2024
9d6a7de
do pythia8 decays through singleton instance
nusense Jun 18, 2024
b104930
do pythia8 hadronization through singleton instance
nusense Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/AGCharm2019.xml → config/AGCharm2023.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PTFunction string No Function in form of a string for
P_t distribution of the Charmed hadron
The variable as to be x

CharmFrac-E vec-double No values of the energy points for
CharmFrac-E vec-double No values of the energy points for
ChramFraction splines
CharmFrac-D0 vec-double No fractions for D0 meson
the number of elements must be the same as in
Expand All @@ -30,7 +30,7 @@ CharmFrac-Ds vec-double No fractions for D_s meson
<alg_conf>

<param_set name="Default">

<param type="alg" name="FragmentationFunc"> genie::PetersonFragm/Default </param>
<param type="bool" name="HadronizeRemnants"> true </param>

Expand Down
165 changes: 82 additions & 83 deletions config/AGKYLowW2019.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ KNO-ProbKplusKminus double No probability for K+K- pair
KNO-ProbK0K0bar double No probability for K0 K0bar pair KNO-ProbK0K0bar
KNO-ProbPi0Eta double No probability for Pi0 Eta pair KNO-ProbPi0Eta
KNO-ProbEtaEta double No Probability for Eta Eta pair KNO-ProbEtaEta
ForceDecays bool Yes force decays of unstable particles false
ForceDecays bool Yes force decays of unstable particles false
Decayer alg Dep decayer to be used if decayes are forced
ForceMinMultiplicity bool Yes force a minimum multiplicity of 2 true
GenerateWeighted bool Yes generate weighted events false
Expand All @@ -77,112 +77,111 @@ KNO-PhaseSpDec-ReweightParm double Yes parameter controlling the reweig
-->

<alg_conf>
<param_set name="Default">
<param type="string" name="CommonParam"> NonResBackground </param>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling the average charged hadron multiplicities in the AGKY/KNO model
(paramerers a,b entering in the empirical expression: <n> = a + b * lnW^2 )
See Nucl.Instrum.Meth.A614:87-104,2010 and Eur.Phys.J.C63:1-10,2009.
<param_set name="Default">

<param type="string" name="CommonParam"> NonResBackground </param>

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling the average charged hadron multiplicities in the AGKY/KNO model
(paramerers a,b entering in the empirical expression: <n> = a + b * lnW^2 )
See Nucl.Instrum.Meth.A614:87-104,2010 and Eur.Phys.J.C63:1-10,2009.
-->
<param type="double" name="KNO-Alpha-vp"> 0.40 </param>
<param type="double" name="KNO-Alpha-vn"> -0.20 </param>
<param type="double" name="KNO-Alpha-vbp"> 0.02 </param>
<param type="double" name="KNO-Alpha-vbn"> 0.80 </param>
<param type="double" name="KNO-Beta-vp"> 1.42 </param>
<param type="double" name="KNO-Beta-vn"> 1.42 </param>
<param type="double" name="KNO-Beta-vbp"> 1.28 </param>
<param type="double" name="KNO-Beta-vbn"> 0.95 </param>

<param type="double" name="KNO-EM-Alpha-vp"> 0.40 </param>
<param type="double" name="KNO-EM-Alpha-vn"> -0.20 </param>
<param type="double" name="KNO-EM-Alpha-vbp"> 0.02 </param>
<param type="double" name="KNO-EM-Alpha-vbn"> 0.80 </param>
<param type="double" name="KNO-EM-Beta-vp"> 1.42 </param>
<param type="double" name="KNO-EM-Beta-vn"> 1.42 </param>
<param type="double" name="KNO-EM-Beta-vbp"> 1.28 </param>
<param type="double" name="KNO-EM-Beta-vbn"> 0.95 </param>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling the probability of producing a strange baryon via associated production.
(paramerers a,b entering in the empirical expression: P_{hyperon} = a + b * lnW^2 )
Determined from a fit to \Lambda production data.
See Nucl.Instrum.Meth.A614:87-104,2010 and Eur.Phys.J.C63:1-10,2009.
<param type="double" name="KNO-Alpha-vp"> 0.40 </param>
<param type="double" name="KNO-Alpha-vn"> -0.20 </param>
<param type="double" name="KNO-Alpha-vbp"> 0.02 </param>
<param type="double" name="KNO-Alpha-vbn"> 0.80 </param>
<param type="double" name="KNO-Beta-vp"> 1.42 </param>
<param type="double" name="KNO-Beta-vn"> 1.42 </param>
<param type="double" name="KNO-Beta-vbp"> 1.28 </param>
<param type="double" name="KNO-Beta-vbn"> 0.95 </param>

<param type="double" name="KNO-EM-Alpha-vp"> 0.40 </param>
<param type="double" name="KNO-EM-Alpha-vn"> -0.20 </param>
<param type="double" name="KNO-EM-Alpha-vbp"> 0.02 </param>
<param type="double" name="KNO-EM-Alpha-vbn"> 0.80 </param>
<param type="double" name="KNO-EM-Beta-vp"> 1.42 </param>
<param type="double" name="KNO-EM-Beta-vn"> 1.42 </param>
<param type="double" name="KNO-EM-Beta-vbp"> 1.28 </param>
<param type="double" name="KNO-EM-Beta-vbn"> 0.95 </param>

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling the probability of producing a strange baryon via associated production.
(paramerers a,b entering in the empirical expression: P_{hyperon} = a + b * lnW^2 )
Determined from a fit to \Lambda production data.
See Nucl.Instrum.Meth.A614:87-104,2010 and Eur.Phys.J.C63:1-10,2009.
-->
<param type="double" name="KNO-Alpha-Hyperon"> 0.021951447 </param>
<param type="double" name="KNO-Beta-Hyperon"> 0.041969985 </param>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Levy function (KNO parameterization) parameter c at kno(z) = 2*exp(-c)*pow(c,cz+1)/Gamma(cz+1)
v+p : 7.93 +/- 0.34 source: Tingjun's fit
v+n : 5.22 +/- 0.15 source: Tingjun's fit
vbar+p : same as vn
vbar+n : same as vp
<param type="double" name="KNO-Alpha-Hyperon"> 0.021951447 </param>
<param type="double" name="KNO-Beta-Hyperon"> 0.041969985 </param>

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Levy function (KNO parameterization) parameter c at kno(z) = 2*exp(-c)*pow(c,cz+1)/Gamma(cz+1)
v+p : 7.93 +/- 0.34 source: Tingjun's fit
v+n : 5.22 +/- 0.15 source: Tingjun's fit
vbar+p : same as vn
vbar+n : same as vp
-->
<param type="double" name="KNO-LevyC-vp"> 7.93 </param>
<param type="double" name="KNO-LevyC-vn"> 5.22 </param>
<param type="double" name="KNO-LevyC-vbp"> 5.22 </param>
<param type="double" name="KNO-LevyC-vbn"> 7.93 </param>
<param type="double" name="KNO-EM-LevyC-vp"> 7.93 </param>
<param type="double" name="KNO-EM-LevyC-vn"> 5.22 </param>
<param type="double" name="KNO-EM-LevyC-vbp"> 5.22 </param>
<param type="double" name="KNO-EM-LevyC-vbn"> 7.93 </param>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AGKY/KNO hadronization model probabilities for producing hadron pairs.
See Nucl.Instrum.Meth.A614:87-104,2010 and Eur.Phys.J.C63:1-10,2009.
Values below are modified values following strange hadron production tuning (see gDocDB-890-v1).
Previous values were P(pi0 pi0) = 0.30, P(pi+ pi-) = 0.60, P(K+ K-) = 0.05, P(K0 \barK0) = 0.05.
<param type="double" name="KNO-LevyC-vp"> 7.93 </param>
<param type="double" name="KNO-LevyC-vn"> 5.22 </param>
<param type="double" name="KNO-LevyC-vbp"> 5.22 </param>
<param type="double" name="KNO-LevyC-vbn"> 7.93 </param>

<param type="double" name="KNO-EM-LevyC-vp"> 7.93 </param>
<param type="double" name="KNO-EM-LevyC-vn"> 5.22 </param>
<param type="double" name="KNO-EM-LevyC-vbp"> 5.22 </param>
<param type="double" name="KNO-EM-LevyC-vbn"> 7.93 </param>

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AGKY/KNO hadronization model probabilities for producing hadron pairs.
See Nucl.Instrum.Meth.A614:87-104,2010 and Eur.Phys.J.C63:1-10,2009.
Values below are modified values following strange hadron production tuning (see gDocDB-890-v1).
Previous values were P(pi0 pi0) = 0.30, P(pi+ pi-) = 0.60, P(K+ K-) = 0.05, P(K0 \barK0) = 0.05.
-->
<param type="double" name="KNO-ProbPi0Pi0"> 0.3133 </param>
<param type="double" name="KNO-ProbPiplusPiminus"> 0.6267 </param>
<param type="double" name="KNO-ProbKplusKminus"> 0.03 </param>
<param type="double" name="KNO-ProbK0K0bar"> 0.03 </param>
<param type="double" name="KNO-ProbPi0Eta"> 0.0 </param>
<param type="double" name="KNO-ProbPi0Eta"> 0.0 </param>
<param type="double" name="KNO-ProbEtaEta"> 0.0 </param>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling whether to reweight the KNO phase space decay reweighting and the actual
reweighting function.
See: A.B.Clegg, A.Donnachie, A Description of Jet Structure by pT-limited Phase Space.

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling whether to reweight the KNO phase space decay reweighting and the actual
reweighting function.
See: A.B.Clegg, A.Donnachie, A Description of Jet Structure by pT-limited Phase Space.
-->
<param type="bool" name="KNO-PhaseSpDec-Reweight"> true </param>
<param type="double" name="KNO-PhaseSpDec-ReweightParm"> 3.5 </param>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling whether to use the baryon xF and pT2 pdfs in the KNO hadronization.
The option to use isotropic, non-reweighted 2-body phase space decays is used for compatibility
with neugen/daikon.
<param type="double" name="KNO-PhaseSpDec-ReweightParm"> 3.5 </param>

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters controlling whether to use the baryon xF and pT2 pdfs in the KNO hadronization.
The option to use isotropic, non-reweighted 2-body phase space decays is used for compatibility
with neugen/daikon.
-->
<param type="bool" name="KNO-UseBaryonPdfs-xFpT2"> true </param>
<param type="bool" name="KNO-UseIsotropic2BodyDec"> true </param>

</param_set>
<param_set name="Default-Decaying">
<param type="bool" name="ForceDecays"> true </param>
<param type="alg" name="Decayer"> genie::PythiaDecayer/Default </param>

<param_set name="Default-Decaying">
<param type="bool" name="ForceDecays"> true </param>
<param type="alg" name="Decayer"> genie::Pythia6Decayer2023/Default </param>
</param_set>
<param_set name="Old">

<param_set name="Old">
<param type="bool" name="KNO-UseBaryonPdfs-xFpT2"> false </param>
<param type="bool" name="KNO-PhaseSpDec-Reweight"> false </param>
</param_set>

<param_set name="Old-Decaying">
<param_set name="Old-Decaying">
<param type="bool" name="ForceDecays"> true </param>
<param type="alg" name="Decayer"> genie::PythiaDecayer/Default </param>
<param type="alg" name="Decayer"> genie::Pythia6Decayer2023/Default </param>
<param type="bool" name="KNO-UseBaryonPdfs-xFpT2"> false </param>
<param type="bool" name="KNO-PhaseSpDec-Reweight"> false </param>
</param_set>

</alg_conf>

29 changes: 14 additions & 15 deletions config/DISHadronicSystemGenerator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,40 @@ Algorithm Configurable Parameters:
.......................................................................................................................
Name Type Opt Comment Default
.......................................................................................................................
Hadronizer alg No
Hadronizer alg No
PreTransportDecayer alg No
FilterPreFragm bool No
FZONE-ct0pion double No
FZONE-ct0nucleon double No
FZONE-Kpt2 double No
FZONE-ct0pion double No
FZONE-ct0nucleon double No
FZONE-Kpt2 double No
NUCL-R0 double No CommonParam[NUCL]
NUCL-NR double No CommonParam[NUCL]
-->

<param_set name="Default">
<param_set name="Default">
<param type="string" name="CommonParam"> NUCL </param>

<param type="alg" name="Hadronizer"> genie::AGKY2019/Default </param>
<param type="alg" name="PreTransportDecayer"> genie::UnstableParticleDecayer/BeforeHadronTransport </param>
<param type="bool" name="FilterPreFragm"> false </param>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters relevant to formation zone simulation
- ct0 is the formation time times the speed of light (given in fm)
- KPt2 is the parameter multiplying pT2 in formation zone calc.

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parameters relevant to formation zone simulation
- ct0 is the formation time times the speed of light (given in fm)
- KPt2 is the parameter multiplying pT2 in formation zone calc.
-->
<param type="double" name="FZONE-ct0pion"> 0.342 </param>
<param type="double" name="FZONE-ct0nucleon"> 2.300 </param>
<param type="double" name="FZONE-KPt2"> 0.0 </param>

</param_set>

<param_set name="Charm">
<param type="alg" name="Hadronizer"> genie::AGCharm2019/Default </param>
<param_set name="Charm">
<param type="alg" name="Hadronizer"> genie::AGCharmPythia6Hadro2023/Default </param>
<param type="alg" name="PreTransportDecayer"> genie::UnstableParticleDecayer/BeforeHadronTransport </param>
<param type="bool" name="FilterPreFragm"> false </param>

</param_set>

</alg_conf>

8 changes: 4 additions & 4 deletions config/UnstableParticleDecayer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ Configurable Parameters:
Name Type Optional Comment Default
.......................................................................................................
-->

<param_set name="BeforeHadronTransport">
<param type="int" name="NDecayers"> 2 </param>
<param type="alg" name="Decayer-0"> genie::PythiaDecayer/BeforeHadronTransport </param>
<param type="alg" name="Decayer-0"> genie::Pythia6Decayer2023/BeforeHadronTransport </param>
<param type="alg" name="Decayer-1"> genie::BaryonResonanceDecayer/BeforeHadronTransport </param>
</param_set>

<param_set name="AfterHadronTransport">
<param type="int" name="NDecayers"> 2 </param>
<param type="alg" name="Decayer-0"> genie::PythiaDecayer/AfterHadronTransport </param>
<param type="alg" name="Decayer-0"> genie::Pythia6Decayer2023/AfterHadronTransport </param>
<param type="alg" name="Decayer-1"> genie::BaryonResonanceDecayer/AfterHadronTransport </param>
</param_set>

<param_set name="DarkSector">
<param type="int" name="NDecayers"> 3 </param>
<param type="alg" name="Decayer-0"> genie::PythiaDecayer/AfterHadronTransport </param>
<param type="alg" name="Decayer-0"> genie::Pythia6Decayer2023/AfterHadronTransport </param>
<param type="alg" name="Decayer-1"> genie::BaryonResonanceDecayer/AfterHadronTransport </param>
<param type="alg" name="Decayer-2"> genie::DarkSectorDecayer/Default </param>
</param_set>
Expand Down
5 changes: 3 additions & 2 deletions config/master_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<config alg="genie::AGKY2019"> AGKY2019.xml </config>
<config alg="genie::Pythia6Hadro2019"> Pythia6Hadro2019.xml </config>
<config alg="genie::Pythia8Hadro2019"> Pythia8Hadro2019.xml </config>
<config alg="genie::AGCharm2019"> AGCharm2019.xml </config>
<config alg="genie::AGCharmPythiaBaseHadro2023"> AGCharm2023.xml </config>
<config alg="genie::LeptoHadronization"> LeptoHadronization.xml </config>

<!-- ****** CONFIGURATION FOR PARTON DENSITY FUNCTION ALGORITHMS ****** -->
Expand All @@ -124,7 +124,8 @@
<config alg="genie::BYPDF"> BYPDF.xml </config>

<!-- ****** CONFIGURATION FOR PARTICLE DECAY ALGORITHMS****** -->
<config alg="genie::PythiaDecayer"> PythiaDecayer.xml </config>
<config alg="genie::Pythia6Decayer2023"> PythiaDecayer.xml </config>
<config alg="genie::Pythia8Decayer2023"> PythiaDecayer.xml </config>
<config alg="genie::BaryonResonanceDecayer"> BaryonResonanceDecayer.xml </config>
<config alg="genie::DarkSectorDecayer"> DarkSectorDecayer.xml </config>

Expand Down
Loading