From 637fb38e9d87a3d0ba424ef8ebc41c391b22952b Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Sun, 26 Oct 2025 19:00:16 +0100 Subject: [PATCH 1/3] MC/PWGEM: add cfg and ini for VM2ll --- MC/config/PWGEM/ini/pythia8_OO_536_VM2ll.ini | 9 ++++++++ .../PWGEM/ini/tests/pythia8_OO_536_VM2ll.C | 8 +++++++ .../generator/pythia8_OO_536_VM2ll.cfg | 21 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 MC/config/PWGEM/ini/pythia8_OO_536_VM2ll.ini create mode 100644 MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C create mode 100644 MC/config/PWGEM/pythia8/generator/pythia8_OO_536_VM2ll.cfg diff --git a/MC/config/PWGEM/ini/pythia8_OO_536_VM2ll.ini b/MC/config/PWGEM/ini/pythia8_OO_536_VM2ll.ini new file mode 100644 index 000000000..953d909ce --- /dev/null +++ b/MC/config/PWGEM/ini/pythia8_OO_536_VM2ll.ini @@ -0,0 +1,9 @@ +[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_OO_536_VM2ll.cfg diff --git a/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C new file mode 100644 index 000000000..49c15680f --- /dev/null +++ b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C @@ -0,0 +1,8 @@ +int External() { + return 0; +} + +int Pythia8() +{ + return External(); +} \ No newline at end of file diff --git a/MC/config/PWGEM/pythia8/generator/pythia8_OO_536_VM2ll.cfg b/MC/config/PWGEM/pythia8/generator/pythia8_OO_536_VM2ll.cfg new file mode 100644 index 000000000..596a85beb --- /dev/null +++ b/MC/config/PWGEM/pythia8/generator/pythia8_OO_536_VM2ll.cfg @@ -0,0 +1,21 @@ +### OO beams +Beams:idA = 1000080160 +Beams:idB = 1000080160 +Beams:eCM = 5360.0 ### energy + +Beams:frameType = 1 +ParticleDecays:limitTau0 = on +ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c + +### Save some CPU at init of jobs +### To avoid refitting, add the following lines to your configuration file: +HeavyIon:SigFitNGen = 0 +HeavyIon:SigFitDefPar = 2.15,18.42,0.33 + +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 From f15f3a243c1651056ea56a5a81cdc0073eff7213 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Fri, 7 Nov 2025 16:00:26 +0100 Subject: [PATCH 2/3] Comment out Pythia8 function Comment out the Pythia8 function to disable it. --- MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C index 49c15680f..1fdafa6d3 100644 --- a/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C +++ b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() -{ - return External(); -} \ No newline at end of file +//int Pythia8() +//{ +// return External(); +//} From c079f769fef652a9e9863d1720bbfefa1fbca402 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Mon, 10 Nov 2025 17:37:14 +0100 Subject: [PATCH 3/3] Update pythia8_OO_536_VM2ll.C --- .../PWGEM/ini/tests/pythia8_OO_536_VM2ll.C | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C index 1fdafa6d3..9250232c0 100644 --- a/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C +++ b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C @@ -1,5 +1,53 @@ int External() { - return 0; + 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()