From afcd6ac55033e3e6c480f710cd48981682676915 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Thu, 22 Jan 2026 21:58:05 +0100 Subject: [PATCH] MC/PWGEM: add cfg and init for vm2ll in pp/PbPb --- .../PWGEM/ini/pythia8_PbPb_5360_VM2ll.ini | 10 ++++ .../PWGEM/ini/pythia8_pp_13600_VM2ll.ini | 10 ++++ MC/config/PWGEM/ini/pythia8_pp_5360_VM2ll.ini | 10 ++++ .../PWGEM/ini/tests/pythia8_PbPb_5360_VM2ll.C | 56 +++++++++++++++++++ .../PWGEM/ini/tests/pythia8_pp_13600_VM2ll.C | 56 +++++++++++++++++++ .../PWGEM/ini/tests/pythia8_pp_5360_VM2ll.C | 56 +++++++++++++++++++ .../generator/pythia8_PbPb_5360_VM2ll.cfg | 23 ++++++++ .../generator/pythia8_pp_13600_VM2ll.cfg | 23 ++++++++ .../generator/pythia8_pp_5360_VM2ll.cfg | 23 ++++++++ 9 files changed, 267 insertions(+) create mode 100644 MC/config/PWGEM/ini/pythia8_PbPb_5360_VM2ll.ini create mode 100644 MC/config/PWGEM/ini/pythia8_pp_13600_VM2ll.ini create mode 100644 MC/config/PWGEM/ini/pythia8_pp_5360_VM2ll.ini create mode 100644 MC/config/PWGEM/ini/tests/pythia8_PbPb_5360_VM2ll.C create mode 100644 MC/config/PWGEM/ini/tests/pythia8_pp_13600_VM2ll.C create mode 100644 MC/config/PWGEM/ini/tests/pythia8_pp_5360_VM2ll.C create mode 100644 MC/config/PWGEM/pythia8/generator/pythia8_PbPb_5360_VM2ll.cfg create mode 100644 MC/config/PWGEM/pythia8/generator/pythia8_pp_13600_VM2ll.cfg create mode 100644 MC/config/PWGEM/pythia8/generator/pythia8_pp_5360_VM2ll.cfg diff --git a/MC/config/PWGEM/ini/pythia8_PbPb_5360_VM2ll.ini b/MC/config/PWGEM/ini/pythia8_PbPb_5360_VM2ll.ini new file mode 100644 index 000000000..503e77188 --- /dev/null +++ b/MC/config/PWGEM/ini/pythia8_PbPb_5360_VM2ll.ini @@ -0,0 +1,10 @@ +#NEV_TEST> 5 +[Diamond] +width[2]=6.0 + +[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/PWGEM/pythia8/generator/pythia8_PbPb_5360_VM2ll.cfg diff --git a/MC/config/PWGEM/ini/pythia8_pp_13600_VM2ll.ini b/MC/config/PWGEM/ini/pythia8_pp_13600_VM2ll.ini new file mode 100644 index 000000000..e261498c4 --- /dev/null +++ b/MC/config/PWGEM/ini/pythia8_pp_13600_VM2ll.ini @@ -0,0 +1,10 @@ +#NEV_TEST> 5 +[Diamond] +width[2]=6.0 + +[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/PWGEM/pythia8/generator/pythia8_pp_13600_VM2ll.cfg diff --git a/MC/config/PWGEM/ini/pythia8_pp_5360_VM2ll.ini b/MC/config/PWGEM/ini/pythia8_pp_5360_VM2ll.ini new file mode 100644 index 000000000..49be058cf --- /dev/null +++ b/MC/config/PWGEM/ini/pythia8_pp_5360_VM2ll.ini @@ -0,0 +1,10 @@ +#NEV_TEST> 5 +[Diamond] +width[2]=6.0 + +[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/PWGEM/pythia8/generator/pythia8_pp_5360_VM2ll.cfg diff --git a/MC/config/PWGEM/ini/tests/pythia8_PbPb_5360_VM2ll.C b/MC/config/PWGEM/ini/tests/pythia8_PbPb_5360_VM2ll.C new file mode 100644 index 000000000..b00728e80 --- /dev/null +++ b/MC/config/PWGEM/ini/tests/pythia8_PbPb_5360_VM2ll.C @@ -0,0 +1,56 @@ +int External() { + std::string path{"o2sim_Kine.root"}; + // Check that file exists, can be opened and has the correct tree + 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); + + // Check if all events are filled + auto nEvents = tree->GetEntries(); + for (Long64_t i = 0; i < nEvents; ++i) + { + tree->GetEntry(i); + if (tracks->empty()) + { + std::cerr << "Empty entry found at event " << i << "\n"; + return 1; + } + } + // check if each event has at least two oxygen ions + for (int i = 0; i < nEvents; i++) + { + auto check = tree->GetEntry(i); + int count = 0; + for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack) + { + auto track = tracks->at(idxMCTrack); + if (track.GetPdgCode() == 1000822080) + { + count++; + } + } + if (count < 2) + { + std::cerr << "Event " << i << " has less than 2 lead ions\n"; + return 1; + } + } + + return 0; +} + +int pythia8() +{ + return External(); +} diff --git a/MC/config/PWGEM/ini/tests/pythia8_pp_13600_VM2ll.C b/MC/config/PWGEM/ini/tests/pythia8_pp_13600_VM2ll.C new file mode 100644 index 000000000..aaee11ffc --- /dev/null +++ b/MC/config/PWGEM/ini/tests/pythia8_pp_13600_VM2ll.C @@ -0,0 +1,56 @@ +int External() { + std::string path{"o2sim_Kine.root"}; + // Check that file exists, can be opened and has the correct tree + 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); + + // Check if all events are filled + auto nEvents = tree->GetEntries(); + for (Long64_t i = 0; i < nEvents; ++i) + { + tree->GetEntry(i); + if (tracks->empty()) + { + std::cerr << "Empty entry found at event " << i << "\n"; + return 1; + } + } + // // check if each event has at least two oxygen ions + // for (int i = 0; i < nEvents; i++) + // { + // auto check = tree->GetEntry(i); + // int count = 0; + // for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack) + // { + // auto track = tracks->at(idxMCTrack); + // if (track.GetPdgCode() == 1000080160) + // { + // count++; + // } + // } + // if (count < 2) + // { + // std::cerr << "Event " << i << " has less than 2 oxygen ions\n"; + // return 1; + // } + // } + + return 0; +} + +int pythia8() +{ + return External(); +} diff --git a/MC/config/PWGEM/ini/tests/pythia8_pp_5360_VM2ll.C b/MC/config/PWGEM/ini/tests/pythia8_pp_5360_VM2ll.C new file mode 100644 index 000000000..aaee11ffc --- /dev/null +++ b/MC/config/PWGEM/ini/tests/pythia8_pp_5360_VM2ll.C @@ -0,0 +1,56 @@ +int External() { + std::string path{"o2sim_Kine.root"}; + // Check that file exists, can be opened and has the correct tree + 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); + + // Check if all events are filled + auto nEvents = tree->GetEntries(); + for (Long64_t i = 0; i < nEvents; ++i) + { + tree->GetEntry(i); + if (tracks->empty()) + { + std::cerr << "Empty entry found at event " << i << "\n"; + return 1; + } + } + // // check if each event has at least two oxygen ions + // for (int i = 0; i < nEvents; i++) + // { + // auto check = tree->GetEntry(i); + // int count = 0; + // for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack) + // { + // auto track = tracks->at(idxMCTrack); + // if (track.GetPdgCode() == 1000080160) + // { + // count++; + // } + // } + // if (count < 2) + // { + // std::cerr << "Event " << i << " has less than 2 oxygen ions\n"; + // return 1; + // } + // } + + return 0; +} + +int pythia8() +{ + return External(); +} diff --git a/MC/config/PWGEM/pythia8/generator/pythia8_PbPb_5360_VM2ll.cfg b/MC/config/PWGEM/pythia8/generator/pythia8_PbPb_5360_VM2ll.cfg new file mode 100644 index 000000000..d356956f7 --- /dev/null +++ b/MC/config/PWGEM/pythia8/generator/pythia8_PbPb_5360_VM2ll.cfg @@ -0,0 +1,23 @@ +### Specify beams +Beams:idA = 1000822080 +Beams:idB = 1000822080 +Beams:eCM = 5360.0 ### energy + +Beams:frameType = 1 +ParticleDecays:limitTau0 = on +ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c + +### Initialize the Angantyr model to fit the total and semi-includive +### cross sections in Pythia within some tolerance. +HeavyIon:SigFitErr = 0.02,0.02,0.1,0.05,0.05,0.0,0.1,0.0 + +### These parameters are typicall suitable for sqrt(S_NN)=5TeV +HeavyIon:SigFitDefPar = 17.24,2.15,0.33,0.0,0.0,0.0,0.0,0.0 + +Random:setSeed = on + +# change omega, phi meson's BR below +223:oneChannel = 1 0.5 0 -11 11 +223:addChannel = 1 0.5 0 -13 13 +333:oneChannel = 1 0.5 0 -11 11 +333:addChannel = 1 0.5 0 -13 13 diff --git a/MC/config/PWGEM/pythia8/generator/pythia8_pp_13600_VM2ll.cfg b/MC/config/PWGEM/pythia8/generator/pythia8_pp_13600_VM2ll.cfg new file mode 100644 index 000000000..b8a0c3923 --- /dev/null +++ b/MC/config/PWGEM/pythia8/generator/pythia8_pp_13600_VM2ll.cfg @@ -0,0 +1,23 @@ +### 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 + +# change eta, omega, phi meson's BR below +221:oneChannel = 1 0.5 0 -13 13 +223:oneChannel = 1 0.5 0 -11 11 +223:addChannel = 1 0.5 0 -13 13 +333:oneChannel = 1 0.5 0 -11 11 +333:addChannel = 1 0.5 0 -13 13 diff --git a/MC/config/PWGEM/pythia8/generator/pythia8_pp_5360_VM2ll.cfg b/MC/config/PWGEM/pythia8/generator/pythia8_pp_5360_VM2ll.cfg new file mode 100644 index 000000000..6d9191759 --- /dev/null +++ b/MC/config/PWGEM/pythia8/generator/pythia8_pp_5360_VM2ll.cfg @@ -0,0 +1,23 @@ +### Specify beams +Beams:idA = 2212 +Beams:idB = 2212 +Beams:eCM = 5360. ### 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 + +# change eta, omega, phi meson's BR below +221:oneChannel = 1 0.5 0 -13 13 +223:oneChannel = 1 0.5 0 -11 11 +223:addChannel = 1 0.5 0 -13 13 +333:oneChannel = 1 0.5 0 -11 11 +333:addChannel = 1 0.5 0 -13 13