From dfd17b004671b8a583b3f6d5ea656d53934c8147 Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Tue, 21 Jan 2025 12:37:15 +0100 Subject: [PATCH 1/5] add cfg and ini for deuteron production --- .../PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini | 5 +++++ .../PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini | 5 +++++ .../generator/pythia8_inel_136tev_wDeCoal.cfg | 21 +++++++++++++++++++ .../generator/pythia8_inel_136tev_wDeInel.cfg | 19 +++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini create mode 100644 MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini create mode 100644 MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg create mode 100644 MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeInel.cfg diff --git a/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini new file mode 100644 index 000000000..c3de81875 --- /dev/null +++ b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini @@ -0,0 +1,5 @@ +[GeneratorExternal] +fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C + +[GeneratorPythia8] +config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg \ No newline at end of file diff --git a/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini new file mode 100644 index 000000000..8d41623e5 --- /dev/null +++ b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini @@ -0,0 +1,5 @@ +[GeneratorExternal] +fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C + +[GeneratorPythia8] +config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeInel.cfg \ No newline at end of file diff --git a/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg b/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg new file mode 100644 index 000000000..18a1c7405 --- /dev/null +++ b/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg @@ -0,0 +1,21 @@ +### Specify beams +Beams:idA = 2212 +Beams:idB = 2212 +Beams:eCM = 13600. ### energy + +Beams:frameType = 1 +ParticleDecays:limitTau0 = on +ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c + +### processes +SoftQCD:inelastic = on # all inelastic processes + +# default: do nothing, Monash 2013 will do its thing +Tune:pp = 14 + +Random:setSeed = on + +# enable deuteron production by coalescence collisions +HadronLevel:DeuteronProduction = on +DeuteronProduction:channels = {2212 2112 > 22} +DeuteronProduction:models = {0} diff --git a/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeInel.cfg b/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeInel.cfg new file mode 100644 index 000000000..939ba24cd --- /dev/null +++ b/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeInel.cfg @@ -0,0 +1,19 @@ +### Specify beams +Beams:idA = 2212 +Beams:idB = 2212 +Beams:eCM = 13600. ### energy + +Beams:frameType = 1 +ParticleDecays:limitTau0 = on +ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c + +### processes +SoftQCD:inelastic = on # all inelastic processes + +# default: do nothing, Monash 2013 will do its thing +Tune:pp = 14 + +Random:setSeed = on + +# enable deuteron production by inelastic collisions +HadronLevel:DeuteronProduction = on From 67d5a8fbb9bd927a59cd03064cb24b476169ae8e Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Tue, 21 Jan 2025 14:06:20 +0100 Subject: [PATCH 2/5] Add macro for ini --- MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini | 1 + MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini | 1 + MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C | 8 ++++++++ MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C | 8 ++++++++ 4 files changed, 18 insertions(+) create mode 100644 MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C create mode 100644 MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C diff --git a/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini index c3de81875..83f8c26d7 100644 --- a/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini +++ b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeCoal.ini @@ -1,5 +1,6 @@ [GeneratorExternal] fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C +funcName=generator_pythia8_ALICE3() [GeneratorPythia8] config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg \ No newline at end of file diff --git a/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini index 8d41623e5..cd07f445d 100644 --- a/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini +++ b/MC/config/PWGLF/ini/GeneratorLF_pp1360_wDeInel.ini @@ -1,5 +1,6 @@ [GeneratorExternal] fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C +funcName=generator_pythia8_ALICE3() [GeneratorPythia8] config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeInel.cfg \ No newline at end of file diff --git a/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C new file mode 100644 index 000000000..49c15680f --- /dev/null +++ b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C @@ -0,0 +1,8 @@ +int External() { + return 0; +} + +int Pythia8() +{ + return External(); +} \ No newline at end of file diff --git a/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C new file mode 100644 index 000000000..49c15680f --- /dev/null +++ b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C @@ -0,0 +1,8 @@ +int External() { + return 0; +} + +int Pythia8() +{ + return External(); +} \ No newline at end of file From de3419235ffb8d434e2cbbeee40df6b8b2412580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Thu, 23 Jan 2025 09:52:12 +0100 Subject: [PATCH 3/5] Update pythia8_inel_136tev_wDeCoal.cfg --- .../PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg b/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg index 18a1c7405..c35111bfb 100644 --- a/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg +++ b/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev_wDeCoal.cfg @@ -19,3 +19,5 @@ Random:setSeed = on HadronLevel:DeuteronProduction = on DeuteronProduction:channels = {2212 2112 > 22} DeuteronProduction:models = {0} +DeuteronProduction:norm = 1 +DeuteronProduction:parms = {0.195 1} From 5ea414ee2722687eea99bcf89ff4c7f89900cea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 27 Jan 2025 13:18:35 +0100 Subject: [PATCH 4/5] Update GeneratorLF_pp1360_wDeCoal.C --- .../ini/tests/GeneratorLF_pp1360_wDeCoal.C | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C index 49c15680f..ab7eeb695 100644 --- a/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C +++ b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeCoal.C @@ -1,8 +1,28 @@ -int External() { +int External() +{ + std::string path{"o2sim_Kine.root"}; + + TFile file(path.c_str(), "READ"); + if (file.IsZombie()) + { + std::cerr << "Cannot open ROOT file " << path << "\n"; + return 1; + } + + auto tree = (TTree *)file.Get("o2sim"); + if (!tree) + { + std::cerr << "Cannot find tree o2sim in file " << path << "\n"; + return 1; + } + std::vector *tracks{}; + tree->SetBranchAddress("MCTrack", &tracks); + + auto nEvents = tree->GetEntries(); + if (nEvents < 1) + { + std::cerr << "No events actually generated: not OK!"; + return 1; + } return 0; } - -int Pythia8() -{ - return External(); -} \ No newline at end of file From 859fc250b4de24419b8a0328c7b7b69f793113c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 27 Jan 2025 13:18:57 +0100 Subject: [PATCH 5/5] Update GeneratorLF_pp1360_wDeInel.C --- .../ini/tests/GeneratorLF_pp1360_wDeInel.C | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C index 49c15680f..ab7eeb695 100644 --- a/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C +++ b/MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C @@ -1,8 +1,28 @@ -int External() { +int External() +{ + std::string path{"o2sim_Kine.root"}; + + TFile file(path.c_str(), "READ"); + if (file.IsZombie()) + { + std::cerr << "Cannot open ROOT file " << path << "\n"; + return 1; + } + + auto tree = (TTree *)file.Get("o2sim"); + if (!tree) + { + std::cerr << "Cannot find tree o2sim in file " << path << "\n"; + return 1; + } + std::vector *tracks{}; + tree->SetBranchAddress("MCTrack", &tracks); + + auto nEvents = tree->GetEntries(); + if (nEvents < 1) + { + std::cerr << "No events actually generated: not OK!"; + return 1; + } return 0; } - -int Pythia8() -{ - return External(); -} \ No newline at end of file