From 00c052b11baf24eeb2d46bbe2d04d8d8462a4ad9 Mon Sep 17 00:00:00 2001 From: Bong-Hwi Lim Date: Sat, 23 Mar 2024 16:19:43 +0100 Subject: [PATCH] Add other resonances (#1540) --- .../GeneratorLF_ExoticResonances_pp1360.ini | 10 ++ .../GeneratorLF_ExoticResonances_pp1360.C | 144 ++++++++++++++++++ .../ini/tests/GeneratorLF_Resonances_pp1360.C | 26 ++-- .../ini/tests/GeneratorLF_Resonances_pp900.C | 26 ++-- .../pythia8/generator/exoticresonancegun.json | 56 +++++++ .../pythia8/generator/resonancelistgun.json | 36 +++++ .../PWGLF/pythia8/generator/resonances.cfg | 73 +++++++-- 7 files changed, 323 insertions(+), 48 deletions(-) create mode 100644 MC/config/PWGLF/ini/GeneratorLF_ExoticResonances_pp1360.ini create mode 100644 MC/config/PWGLF/ini/tests/GeneratorLF_ExoticResonances_pp1360.C create mode 100644 MC/config/PWGLF/pythia8/generator/exoticresonancegun.json diff --git a/MC/config/PWGLF/ini/GeneratorLF_ExoticResonances_pp1360.ini b/MC/config/PWGLF/ini/GeneratorLF_ExoticResonances_pp1360.ini new file mode 100644 index 000000000..c610bc3ef --- /dev/null +++ b/MC/config/PWGLF/ini/GeneratorLF_ExoticResonances_pp1360.ini @@ -0,0 +1,10 @@ +[GeneratorExternal] +fileName=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_LF.C +funcName=generateLF("${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/exoticresonancegun.json", true, 4) + +# [GeneratorPythia8] # if triggered then this will be used as the background event +# config=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev.cfg + +[DecayerPythia8] # after for transport code! +config[0]=${O2DPG_ROOT}/MC/config/common/pythia8/decayer/base.cfg +config[1]=${O2DPG_ROOT}/MC/config/PWGLF/pythia8/generator/resonances.cfg \ No newline at end of file diff --git a/MC/config/PWGLF/ini/tests/GeneratorLF_ExoticResonances_pp1360.C b/MC/config/PWGLF/ini/tests/GeneratorLF_ExoticResonances_pp1360.C new file mode 100644 index 000000000..c0a789557 --- /dev/null +++ b/MC/config/PWGLF/ini/tests/GeneratorLF_ExoticResonances_pp1360.C @@ -0,0 +1,144 @@ +int External() +{ + std::string path{"o2sim_Kine.root"}; + int numberOfInjectedSignalsPerEvent{1}; + int numberOfGapEvents{4}; + int numberOfEventsProcessed{0}; + int numberOfEventsProcessedWithoutInjection{0}; + std::vector injectedPDGs = { + 20223, // f_1(1285) + 20333, // f_1(1420) + 9030221, // f_0(1500) + 10331, // f_0(1710) + 335, // f_2(1525) + 10221 // f_0(1370) + }; + std::vector> decayDaughters = { + {310, -321, 211}, // f_1(1285) + {310, -321, 211}, // f_1(1420) + {310, 310}, // f_0(1500) + {310, 310}, // f_0(1710) + {310, 310}, // f_2(1525) + {310, 310} // f_0(1370) + }; + + auto nInjection = injectedPDGs.size(); + + 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); + + std::vector nSignal; + for (int i = 0; i < nInjection; i++) + { + nSignal.push_back(0); + } + std::vector> nDecays; + std::vector nNotDecayed; + for (int i = 0; i < nInjection; i++) + { + std::vector nDecay; + for (int j = 0; j < decayDaughters[i].size(); j++) + { + nDecay.push_back(0); + } + nDecays.push_back(nDecay); + nNotDecayed.push_back(0); + } + auto nEvents = tree->GetEntries(); + bool hasInjection = false; + for (int i = 0; i < nEvents; i++) + { + hasInjection = false; + numberOfEventsProcessed++; + auto check = tree->GetEntry(i); + for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack) + { + auto track = tracks->at(idxMCTrack); + auto pdg = track.GetPdgCode(); + auto it = std::find(injectedPDGs.begin(), injectedPDGs.end(), pdg); + int index = std::distance(injectedPDGs.begin(), it); // index of injected PDG + if (it != injectedPDGs.end()) // found + { + // count signal PDG + nSignal[index]++; + if(track.getFirstDaughterTrackId() < 0) + { + nNotDecayed[index]++; + continue; + } + for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) + { + auto pdgDau = tracks->at(j).GetPdgCode(); + bool foundDau= false; + // count decay PDGs + for (int idxDaughter = 0; idxDaughter < decayDaughters[index].size(); ++idxDaughter) + { + if (pdgDau == decayDaughters[index][idxDaughter]) + { + nDecays[index][idxDaughter]++; + foundDau= true; + hasInjection = true; + break; + } + } + if (!foundDau) { + std::cerr << "Decay daughter not found: " << pdg << " -> " << pdgDau << "\n"; + } + } + } + } + if (!hasInjection) + { + numberOfEventsProcessedWithoutInjection++; + } + } + std::cout << "--------------------------------\n"; + std::cout << "# Events: " << nEvents << "\n"; + for (int i = 0; i < nInjection; i++) + { + std::cout << "# Mother \n"; + std::cout << injectedPDGs[i] << " generated: " << nSignal[i] << ", " << nNotDecayed[i] << " did not decay\n"; + if (nSignal[i] == 0){ + std::cerr << "No generated: " << injectedPDGs[i] << "\n"; + // return 1; // At least one of the injected particles should be generated + } + for (int j = 0; j < decayDaughters[i].size(); j++) + { + std::cout << "# Daughter " << decayDaughters[i][j] << ": " << nDecays[i][j] << "\n"; + } + // if (nSignal[i] != nEvents * numberOfInjectedSignalsPerEvent) + // { + // std::cerr << "Number of generated: " << injectedPDGs[i] << ", lower than expected\n"; + // // return 1; // Don't need to return 1, since the number of generated particles is not the same for each event + // } + } + std::cout << "--------------------------------\n"; + std::cout << "Number of events processed: " << numberOfEventsProcessed << "\n"; + std::cout << "Number of input for the gap events: " << numberOfGapEvents << "\n"; + std::cout << "Number of events processed without injection: " << numberOfEventsProcessedWithoutInjection << "\n"; + // injected event + numberOfGapEvents*gap events + injected event + numberOfGapEvents*gap events + ... + // total fraction of the gap event: numberOfEventsProcessedWithoutInjection/numberOfEventsProcessed + float ratioOfNormalEvents = numberOfEventsProcessedWithoutInjection/numberOfEventsProcessed; + if (ratioOfNormalEvents > 0.75) + { + std::cout << "The number of injected event is loo low!!" << std::endl; + return 1; + } + + return 0; +} + +void GeneratorLF_ExoticResonances_pp1360() { External(); } diff --git a/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp1360.C b/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp1360.C index 121db3d0b..facf80ba5 100644 --- a/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp1360.C +++ b/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp1360.C @@ -25,15 +25,12 @@ int External() 2224, // Delta(1232)+ -2224, // Delta(1232)bar- 2114, // Delta(1232)0 - -2114 // Delta(1232)0bar + -2114, // Delta(1232)0bar + 123314, // Xi(1820)- + -123314, // Xi(1820)+ + 123324, // Xi(1820)0 + -123324 // Xi(1820)0bar }; - // TODO: add decay daughters - // 9030221, // f_0(1500) - // 10331, // f_0(1710) - // 123314, // Xi(1820)- - // -123314, // Xi(1820)+ - // 123324, // Xi(1820)0 - // -123324 // Xi(1820)0bar std::vector> decayDaughters = { {311, 211}, // K*+- {-311, -211}, // K*bar+- @@ -54,15 +51,12 @@ int External() {2212, 211}, // Delta(1232)+ {-2212, -211}, // Delta(1232)bar- {2212, -211}, // Delta(1232)- - {-2212, 211} // Delta(1232)bar+ + {-2212, 211}, // Delta(1232)bar+ + {3122, -311}, // Xi(1820)- + {3122, 311}, // Xi(1820)+ + {3122, 310}, // Xi(1820)0 + {-3122, 310} // Xi(1820)0bar }; - // TODO: add decay daughters - // {211, 211}, // f_0(1500) - // {211, 211}, // f_0(1710) - // {211, 211, 111}, // Xi(1820)- - // {-211, -211, -111}, // Xi(1820)+ - // {211, 211, 111}, // Xi(1820)0 - // {-211, -211, -111} // Xi(1820)0bar auto nInjection = injectedPDGs.size(); diff --git a/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp900.C b/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp900.C index 64463dcbe..a7864016f 100644 --- a/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp900.C +++ b/MC/config/PWGLF/ini/tests/GeneratorLF_Resonances_pp900.C @@ -25,15 +25,12 @@ int External() 2224, // Delta(1232)+ -2224, // Delta(1232)bar- 2114, // Delta(1232)0 - -2114 // Delta(1232)0bar + -2114, // Delta(1232)0bar + 123314, // Xi(1820)- + -123314, // Xi(1820)+ + 123324, // Xi(1820)0 + -123324 // Xi(1820)0bar }; - // TODO: add decay daughters - // 9030221, // f_0(1500) - // 10331, // f_0(1710) - // 123314, // Xi(1820)- - // -123314, // Xi(1820)+ - // 123324, // Xi(1820)0 - // -123324 // Xi(1820)0bar std::vector> decayDaughters = { {311, 211}, // K*+- {-311, -211}, // K*bar+- @@ -54,15 +51,12 @@ int External() {2212, 211}, // Delta(1232)+ {-2212, -211}, // Delta(1232)bar- {2212, -211}, // Delta(1232)- - {-2212, 211} // Delta(1232)bar+ + {-2212, 211}, // Delta(1232)bar+ + {3122, -311}, // Xi(1820)- + {3122, 311}, // Xi(1820)+ + {3122, 310}, // Xi(1820)0 + {-3122, 310} // Xi(1820)0bar }; - // TODO: add decay daughters - // {211, 211}, // f_0(1500) - // {211, 211}, // f_0(1710) - // {211, 211, 111}, // Xi(1820)- - // {-211, -211, -111}, // Xi(1820)+ - // {211, 211, 111}, // Xi(1820)0 - // {-211, -211, -111} // Xi(1820)0bar auto nInjection = injectedPDGs.size(); diff --git a/MC/config/PWGLF/pythia8/generator/exoticresonancegun.json b/MC/config/PWGLF/pythia8/generator/exoticresonancegun.json new file mode 100644 index 000000000..a2d964c1a --- /dev/null +++ b/MC/config/PWGLF/pythia8/generator/exoticresonancegun.json @@ -0,0 +1,56 @@ +{ + "f_1(1285)" : { + "pdg": 20223, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "f_1(1420)" : { + "pdg": 20333, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "f_0(1500)" : { + "pdg": 9030221, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "f_0(1710)" : { + "pdg": 10331, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "f_2(1525)" : { + "pdg": 335, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "f_0(1370)" : { + "pdg": 10221, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + } +} diff --git a/MC/config/PWGLF/pythia8/generator/resonancelistgun.json b/MC/config/PWGLF/pythia8/generator/resonancelistgun.json index 2d2ae56ef..b8c248b16 100644 --- a/MC/config/PWGLF/pythia8/generator/resonancelistgun.json +++ b/MC/config/PWGLF/pythia8/generator/resonancelistgun.json @@ -178,5 +178,41 @@ "etaMin": -1.2, "etaMax": 1.2, "genDecayed": true + }, + "Xi(1820)0" : { + "pdg": 123314, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "Anti-Xi(1820)0" : { + "pdg": -123314, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "Xi(1820)-" : { + "pdg": 123324, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true + }, + "Xi(1820)+" : { + "pdg": -123324, + "n": 1, + "ptMin": 0.0, + "ptMax": 20, + "etaMin": -1.2, + "etaMax": 1.2, + "genDecayed": true } } diff --git a/MC/config/PWGLF/pythia8/generator/resonances.cfg b/MC/config/PWGLF/pythia8/generator/resonances.cfg index 7153511c8..628ba85e2 100644 --- a/MC/config/PWGLF/pythia8/generator/resonances.cfg +++ b/MC/config/PWGLF/pythia8/generator/resonances.cfg @@ -2,21 +2,18 @@ ProcessLevel:all = off # will not look for the 'process' # id::all = name antiName spinType chargeType colType m0 mWidth mMin mMax tau0 -102134:all = Lambda1520 Lambda1520bar 0 0 0 1.5195 0.01560 0.06240 0.00000E+00 0 1 +102134:all = Lambda1520 Lambda1520bar 4 0 0 1.51950 0.01560 1.47 1.60 0 ### add Resonance decays absent in PYTHIA8 decay table and set BRs from PDG for other -102134:oneChannel = 1 0.223547 0 2212 -321 -102134:addChannel = 1 0.223547 0 2112 -311 -102134:addChannel = 1 0.139096 0 3222 -211 -102134:addChannel = 1 0.139096 0 3212 111 -102134:addChannel = 1 0.139096 0 3112 211 -102134:addChannel = 1 0.028780 0 3224 -211 -102134:addChannel = 1 0.028780 0 3214 111 -102134:addChannel = 1 0.028780 0 3114 211 -102134:addChannel = 1 0.019373 0 3212 22 -102134:addChannel = 1 0.014638 0 3122 211 -102134:addChannel = 1 0.007948 0 3122 22 -102134:addChannel = 1 0.007319 0 3122 111 +102134:oneChannel = 1 0.229944 5 2212 -321 +102134:addChannel = 1 0.229944 5 2112 -311 +102134:addChannel = 1 0.143076 5 3222 -211 +102134:addChannel = 1 0.143076 5 3212 111 +102134:addChannel = 1 0.143076 5 3112 211 +102134:addChannel = 1 0.034066 4 3224 -211 +102134:addChannel = 1 0.034066 4 3214 111 +102134:addChannel = 1 0.034066 4 3114 211 +102134:addChannel = 1 0.008687 3 3122 22 102134:onMode = off @@ -28,7 +25,51 @@ ProcessLevel:all = off # will not look for the 'process' 102134:onIfMatch = 3224 -211 102134:onIfMatch = 3214 111 102134:onIfMatch = 3114 211 -102134:onIfMatch = 3212 22 -102134:onIfMatch = 3122 211 102134:onIfMatch = 3122 22 -102134:onIfMatch = 3122 111 + +### Xi1820 +123324:all = Xi1820 Xi1820bar 0 0 0 1.8234 0.0 0.0 0.0 0 +123324:oneChannel = 1 1.000 0 3122 310 +123324:onMode = off +123324:onIfMatch = 3122 310 + +123314:all = Xi1820Minus Xi1820Plus 0 -1 0 1.8234 0.0 0.0 0.0 0 +123314:oneChannel = 1 1.000 0 3122 -321 +123314:onMode = off +123314:onIfMatch = 3122 -321 + +### f1 study +20223:all = f_1(1285) f_1(1285) 3 0 0 1.28210 0.02420 1.20000 1.50000 0 +20223:oneChannel = 1 0.5 0 310 -321 211 +20223:addChannel = 1 0.5 0 310 321 -211 +20223:onMode = off +20223:onIfMatch = 310 -321 211 +20223:onIfMatch = 310 321 -211 + +20333:all = f_1(1420) f_1(1420) 3 0 0 1.42640 0.05490 1.40000 1.80000 0 +20333:oneChannel = 1 0.5 0 310 -321 211 +20333:addChannel = 1 0.5 0 310 321 -211 +20333:onMode = off +20333:onIfMatch = 310 -321 211 +20333:onIfMatch = 310 321 -211 + +### glueball hunting +9030221:all = f_0(1500) f_0(1500) 3 0 0 1.50600 0.11200 1.40000 1.60000 0 +9030221:oneChannel = 1 1.000 0 310 310 +9030221:onMode = off +9030221:onIfMatch = 310 310 + +10331:all = f_0(1710) f_0(1710) 3 0 0 1.72000 0.13500 1.10000 2.40000 0 +10331:oneChannel = 1 1.000 0 310 310 +10331:onMode = off +10331:onIfMatch = 310 310 + +335:all = f_2(1525) f_2(1525) 5 0 0 1.52500 0.07300 1.10000 2.00000 0 +335:oneChannel = 1 1.000 0 310 310 +335:onMode = off +335:onIfMatch = 310 310 + +10221:all = f_0(1370) f_0(1370) 3 0 0 1.35000 0.20000 0.80000 2.00000 0 +10221:oneChannel = 1 1.000 0 310 310 +10221:onMode = off +10221:onIfMatch = 310 310