From 1d75d2a37622af1ca6b62a49880ca7a1da697426 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Mon, 8 Jul 2024 17:54:22 +0200 Subject: [PATCH 1/8] PWGHF: add ini for B-forced MCs for pp collisions --- .../GeneratorHF_D2H_bbbar_Bforced_gap5.ini | 8 + ...GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C | 115 ++++++++++++ ...thia8_beautyhadronic_with_decays_Mode2.cfg | 174 ++++++++++++++++++ 3 files changed, 297 insertions(+) create mode 100755 MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini create mode 100644 MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C create mode 100644 MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg diff --git a/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini b/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini new file mode 100755 index 000000000..03f55c41c --- /dev/null +++ b/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini @@ -0,0 +1,8 @@ +### The external generator derives from GeneratorPythia8. +[GeneratorExternal] +fileName=${O2DPG_ROOT}/MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C +funcName=GeneratorPythia8GapTriggeredBeauty(5, -1.5, 1.5) + +[GeneratorPythia8] +config=${O2DPG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays.cfg +includePartonEvent=true diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C new file mode 100644 index 000000000..22c76e124 --- /dev/null +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C @@ -0,0 +1,115 @@ +int External() { + std::string path{"o2sim_Kine.root"}; + + int checkPdgQuark{5}; + float ratioTrigger = 1./5; // one event triggered out of 5 + + std::vector checkPdgHadron{411, 421, 431, 4122, 4132, 4232, 4332}; + std::map>> checkHadronDecays{ // sorted pdg of daughters + {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ + {421, {{-321, 211}, {-321, 111, 211}}}, // D0 + {431, {{211, 333}, {-313, 321}}}, // Ds+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4132, {{211, 3312}}}, // Xic0 + {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ + {4332, {{211, 3334}}}, // Omegac+ + {511, {{-411, 211}, {-413, 211}, {-411, 213}, {431, -211}}}, // B0 + {521, {{-421, 211}, {-423, 211}, {-421, 213}}}, // B+ + {531, {{-431, 211}, {-433, 211}, {-431, 213}}}, // Bs0 + {5122, {{4122, -211}, {4122, -213}, {4122, 211, -211, -211}, {4212, -211}}} // Lb0 + }; + + 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"); + std::vector *tracks{}; + tree->SetBranchAddress("MCTrack", &tracks); + o2::dataformats::MCEventHeader *eventHeader = nullptr; + tree->SetBranchAddress("MCEventHeader.", &eventHeader); + + int nEventsMB{}, nEventsInj{}; + int nQuarks{}, nSignals{}, nSignalGoodDecay{}; + auto nEvents = tree->GetEntries(); + + for (int i = 0; i < nEvents; i++) { + tree->GetEntry(i); + + // check subgenerator information + if (eventHeader->hasInfo(o2::mcgenid::GeneratorProperty::SUBGENERATORID)) { + bool isValid = false; + int subGeneratorId = eventHeader->getInfo(o2::mcgenid::GeneratorProperty::SUBGENERATORID, isValid); + if (subGeneratorId == 0) { + nEventsMB++; + } else if (subGeneratorId == checkPdgQuark) { + nEventsInj++; + } + } + + for (auto &track : *tracks) { + auto pdg = track.GetPdgCode(); + if (std::abs(pdg) == checkPdgQuark) { + nQuarks++; + continue; + } + if (std::find(checkPdgHadron.begin(), checkPdgHadron.end(), std::abs(pdg)) != checkPdgHadron.end()) { // found signal + nSignals++; // count signal PDG + + std::vector pdgsDecay{}; + std::vector pdgsDecayAntiPart{}; + for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) { + auto pdgDau = tracks->at(j).GetPdgCode(); + pdgsDecay.push_back(pdgDau); + if (pdgDau != 333) { // phi is antiparticle of itself + pdgsDecayAntiPart.push_back(-pdgDau); + } else { + pdgsDecayAntiPart.push_back(pdgDau); + } + } + + std::sort(pdgsDecay.begin(), pdgsDecay.end()); + std::sort(pdgsDecayAntiPart.begin(), pdgsDecayAntiPart.end()); + + for (auto &decay : checkHadronDecays[std::abs(pdg)]) { + if (pdgsDecay == decay || pdgsDecayAntiPart == decay) { + nSignalGoodDecay++; + break; + } + } + } + } + } + + std::cout << "--------------------------------\n"; + std::cout << "# Events: " << nEvents << "\n"; + std::cout << "# MB events: " << nEventsMB << "\n"; + std::cout << Form("# events injected with %d quark pair: ", checkPdgQuark) << nEventsInj << "\n"; + std::cout << Form("# %d (anti)quarks: ", checkPdgQuark) << nQuarks << "\n"; + std::cout <<"# signal hadrons: " << nSignals << "\n"; + std::cout <<"# signal hadrons decaying in the correct channel: " << nSignalGoodDecay << "\n"; + + if (nEventsMB < nEvents * (1 - ratioTrigger) * 0.95 || nEventsMB > nEvents * (1 - ratioTrigger) * 1.05) { // we put some tolerance since the number of generated events is small + std::cerr << "Number of generated MB events different than expected\n"; + return 1; + } + if (nEventsInj < nEvents * ratioTrigger * 0.5 * 0.95 || nEventsInj > nEvents * ratioTrigger * 0.5 * 1.05) { + std::cerr << "Number of generated events injected with " << checkPdgQuark << " different than expected\n"; + return 1; + } + + if (nQuarks < nEvents * ratioTrigger) { // we expect anyway more because the same quark is repeated several time, after each gluon radiation + std::cerr << "Number of generated (anti)quarks " << checkPdgQuark << " lower than expected\n"; + return 1; + } + + float fracForcedDecays = float(nSignalGoodDecay) / nSignals; + if (fracForcedDecays < 0.9) { // we put some tolerance (e.g. due to oscillations which might change the final state) + std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n"; + return 1; + } + + return 0; +} diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg new file mode 100644 index 000000000..5f300a9ba --- /dev/null +++ b/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg @@ -0,0 +1,174 @@ +### authors: Fabrizio Grosa (fabrizio.grosa@cern.ch) +### Cristina Terrevoli (cristina.terrevoli@cern.ch) +### Fabio Catalano (fabio.catalano@cern.ch) +### last update: November 2023 + +### beams +Beams:idA 2212 # proton +Beams:idB 2212 # proton +Beams:eCM 13600. # GeV + +### processes +SoftQCD:inelastic on # all inelastic processes + +### decays +ParticleDecays:limitTau0 on +ParticleDecays:tau0Max 10. + +### switching on Pythia Mode2 +ColourReconnection:mode 1 +ColourReconnection:allowDoubleJunRem off +ColourReconnection:m0 0.3 +ColourReconnection:allowJunctions on +ColourReconnection:junctionCorrection 1.20 +ColourReconnection:timeDilationMode 2 +ColourReconnection:timeDilationPar 0.18 +StringPT:sigma 0.335 +StringZ:aLund 0.36 +StringZ:bLund 0.56 +StringFlav:probQQtoQ 0.078 +StringFlav:ProbStoUD 0.2 +StringFlav:probQQ1toQQ0join 0.0275,0.0275,0.0275,0.0275 +MultiPartonInteractions:pT0Ref 2.15 +BeamRemnants:remnantMode 1 +BeamRemnants:saturation 5 + +# Correct decay lengths (wrong in PYTHIA8 decay table) +# Lb +5122:tau0 = 0.4390 +# Xic0 +4132:tau0 = 0.0455 +# OmegaC +4332:tau0 = 0.0803 + +### Force golden charm hadrons decay modes for D2H studies +### add D+ decays absent in PYTHIA8 decay table and set BRs from PDG for other +411:oneChannel = 1 0.0752 0 -321 211 211 +411:addChannel = 1 0.0104 0 -313 211 +411:addChannel = 1 0.0156 0 311 211 +411:addChannel = 1 0.0752 0 333 211 # to have the same amount of D+->KKpi and D+->Kpipi +## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other +4122:oneChannel = 1 0.0196 100 2212 -313 +4122:addChannel = 1 0.0108 100 2224 -321 +4122:addChannel = 1 0.022 100 102134 211 +4122:addChannel = 1 0.035 0 2212 -321 211 +4122:addChannel = 1 0.0159 0 2212 311 +### add Xic+ decays absent in PYTHIA8 decay table +4232:addChannel = 1 0.2 0 2212 -313 +4232:addChannel = 1 0.2 0 2212 -321 211 +4232:addChannel = 1 0.2 0 3324 211 +4232:addChannel = 1 0.2 0 3312 211 211 +### add Xic0 decays absent in PYTHIA8 decay table +4132:addChannel = 1 0.0143 0 3312 211 +### add OmegaC decays absent in PYTHIA8 decay table +4332:addChannel = 1 0.5 0 3334 211 +4332:addChannel = 1 0.5 0 3312 211 + +### K* -> K pi +313:onMode = off +313:onIfAll = 321 211 +### for Ds -> Phi pi+ +333:onMode = off +333:onIfAll = 321 321 +### for D0 -> rho0 pi+ k- +113:onMode = off +113:onIfAll = 211 211 +### for Lambda_c -> Delta++ K- +2224:onMode = off +2224:onIfAll = 2212 211 +### for Lambda_c -> Lambda(1520) K- +102134:onMode = off +102134:onIfAll = 2212 321 +### for Xic0 -> pi Xi -> pi pi Lambda -> pi pi pi p +### and Omega_c -> pi Xi -> pi pi Lambda -> pi pi pi p +3312:onMode = off +3312:onIfAll = 3122 -211 +3122:onMode = off +3122:onIfAll = 2212 -211 +### for Omega_c -> pi Omega -> pi K Lambda -> pi K pi p +3334:onMode = off +3334:onIfAll = 3122 -321 + +### switch off all decay channels +411:onMode = off +421:onMode = off +431:onMode = off +4112:onMode = off +4122:onMode = off +4232:onMode = off +4132:onMode = off +443:onMode = off +4332:onMode = off +511:onMode = off +521:onMode = off +531:onMode = off +5122:onMode = off + +### D0 -> K pi +421:onIfMatch = 321 211 + +### D+/- -> K pi pi +411:onIfMatch = 321 211 211 +### D+/- -> K* pi +411:onIfMatch = 313 211 +### D+/- -> phi pi +411:onIfMatch = 333 211 + +### D_s -> K K* +431:onIfMatch = 321 313 +### D_s -> Phi pi +431:onIfMatch = 333 211 + +### Lambda_c -> p K* +4122:onIfMatch = 2212 313 +### Lambda_c -> Delta K +4122:onIfMatch = 2224 321 +### Lambda_c -> Lambda(1520) pi +4122:onIfMatch = 102134 211 +### Lambda_c -> p K pi +4122:onIfMatch = 2212 321 211 +### Lambda_c -> pK0s +4122:onIfMatch = 2212 311 + +### Xic+ -> pK*0 +4232:onIfMatch = 2212 313 +### Xic+ -> p K- pi+ +4232:onIfMatch = 2212 321 211 +### Xic+ -> Xi*0 pi+, Xi*->Xi- pi+ +4232:onIfMatch = 3324 211 +### Xic+ -> Xi- pi+ pi+ +4232:onIfMatch = 3312 211 211 + +### Xic0 -> Xi- pi+ +4132:onIfMatch = 3312 211 + +### Omega_c -> Omega pi +4332:onIfMatch = 3334 211 +### Omega_c -> Xi pi +4332:onIfMatch = 3312 211 + +### Force also golden beauty hadrons decay modes for D2H studies +### add B0 decays +511:oneChannel = 1 0.4 0 -411 211 +511:addChannel = 1 0.3 0 -413 211 +511:addChannel = 1 0.2 0 431 -211 +### add B+ decays +521:oneChannel = 1 0.8 0 -421 211 +### add Bs0 decays +531:oneChannel = 1 0.8 0 -431 211 +### add Lb decays +5122:oneChannel = 1 0.8 0 4122 -211 + +### we also add channels useful for study of partly reconstructed decays / correlated backgrounds +### add B0 decays +511:oneChannel = 1 0.1 0 -411 213 +### add B+ decays +521:oneChannel = 1 0.1 0 -421 213 +521:oneChannel = 1 0.1 0 -423 211 +### add Bs0 decays +531:oneChannel = 1 0.1 0 -431 213 +531:oneChannel = 1 0.1 0 -433 211 +### add Lb decays +5122:oneChannel = 1 0.1 0 4122 -213 +5122:oneChannel = 1 0.05 0 4122 211 -211 -211 +5122:oneChannel = 1 0.05 0 4212 -211 From 8cda046c1190df4d729e49fe00ed778513d02fb8 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 9 Jul 2024 09:54:54 +0200 Subject: [PATCH 2/8] Fix typo --- MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini b/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini index 03f55c41c..80dbde592 100755 --- a/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini +++ b/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini @@ -4,5 +4,5 @@ fileName=${O2DPG_ROOT}/MC/config/PWGHF/external/generator/generator_pythia8_gapt funcName=GeneratorPythia8GapTriggeredBeauty(5, -1.5, 1.5) [GeneratorPythia8] -config=${O2DPG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays.cfg +config=${O2DPG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg includePartonEvent=true From 7f824a1f63c602ff0e3e7d936ceaabcb33e099d8 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 9 Jul 2024 10:57:37 +0200 Subject: [PATCH 3/8] Add onIfMatch commands --- ...thia8_beautyhadronic_with_decays_Mode2.cfg | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg index 5f300a9ba..ec06fcb84 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg @@ -161,14 +161,46 @@ BeamRemnants:saturation 5 ### we also add channels useful for study of partly reconstructed decays / correlated backgrounds ### add B0 decays -511:oneChannel = 1 0.1 0 -411 213 +511:addChannel = 1 0.1 0 -411 213 ### add B+ decays -521:oneChannel = 1 0.1 0 -421 213 -521:oneChannel = 1 0.1 0 -423 211 +521:addChannel = 1 0.1 0 -421 213 +521:addChannel = 1 0.1 0 -423 211 ### add Bs0 decays -531:oneChannel = 1 0.1 0 -431 213 -531:oneChannel = 1 0.1 0 -433 211 +531:addChannel = 1 0.1 0 -431 213 +531:addChannel = 1 0.1 0 -433 211 ### add Lb decays -5122:oneChannel = 1 0.1 0 4122 -213 -5122:oneChannel = 1 0.05 0 4122 211 -211 -211 -5122:oneChannel = 1 0.05 0 4212 -211 +5122:addChannel = 1 0.1 0 4122 -213 +5122:addChannel = 1 0.05 0 4122 211 -211 -211 +5122:addChannel = 1 0.05 0 4212 -211 + +### B0 -> D pi +511:onIfMatch = 411 211 +### B0 -> D* pi +511:onIfMatch = 413 211 +### B0 -> Ds pi +511:onIfMatch = 431 211 +### B0 -> D rho +511:onIfMatch = 411 213 + +### B+ -> D0 pi +521:onIfMatch = 421 211 +### B+ -> D0 rho +521:onIfMatch = 421 213 +### B+ -> D0* pi +521:onIfMatch = 423 211 + +### Bs -> Ds pi +531:onIfMatch = 431 211 +### Bs -> Ds rho +531:onIfMatch = 431 213 +### Bs -> Ds* pi +531:onIfMatch = 433 211 + +### Lb -> Lc pi +5122:onIfMatch = 4122 211 +### Lb -> Lc rho +5122:onIfMatch = 4122 213 +### Lb -> Lc pi pi pi +5122:onIfMatch = 4122 211 211 211 +### Lb -> Lc pi pi pi +5122:onIfMatch = 4212 211 From c60ff03d9a73a991c17b7fc1ec62b734c4b7e5ef Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 9 Jul 2024 10:59:25 +0200 Subject: [PATCH 4/8] Fix typo --- .../generator/pythia8_beautyhadronic_with_decays_Mode2.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg index ec06fcb84..31a3b7684 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_beautyhadronic_with_decays_Mode2.cfg @@ -159,7 +159,7 @@ BeamRemnants:saturation 5 ### add Lb decays 5122:oneChannel = 1 0.8 0 4122 -211 -### we also add channels useful for study of partly reconstructed decays / correlated backgrounds +### we also add channels useful for studies of partly reconstructed decays / correlated backgrounds ### add B0 decays 511:addChannel = 1 0.1 0 -411 213 ### add B+ decays @@ -202,5 +202,5 @@ BeamRemnants:saturation 5 5122:onIfMatch = 4122 213 ### Lb -> Lc pi pi pi 5122:onIfMatch = 4122 211 211 211 -### Lb -> Lc pi pi pi +### Lb -> Sc pi 5122:onIfMatch = 4212 211 From 186d25d0c3bede80d550ad61eee2e791650a157b Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 9 Jul 2024 11:15:11 +0200 Subject: [PATCH 5/8] Add pdg codes of B hadrons to check in test macro --- .../PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C index 22c76e124..f6682c918 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C @@ -4,7 +4,7 @@ int External() { int checkPdgQuark{5}; float ratioTrigger = 1./5; // one event triggered out of 5 - std::vector checkPdgHadron{411, 421, 431, 4122, 4132, 4232, 4332}; + std::vector checkPdgHadron{411, 421, 431, 4122, 4132, 4232, 4332, 511, 521, 531, 5122}; std::map>> checkHadronDecays{ // sorted pdg of daughters {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 From 834b51ff683d31829d5001a5257654c34849c0ea Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 9 Jul 2024 11:37:01 +0200 Subject: [PATCH 6/8] Rename ini file --- ...rced_gap5.ini => GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.ini} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename MC/config/PWGHF/ini/{GeneratorHF_D2H_bbbar_Bforced_gap5.ini => GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.ini} (100%) diff --git a/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini b/MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.ini similarity index 100% rename from MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5.ini rename to MC/config/PWGHF/ini/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.ini From 19a4c152223ca07f96275dae2c9b288296174803 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 9 Jul 2024 11:53:20 +0200 Subject: [PATCH 7/8] Fix test --- .../PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C index f6682c918..750b2807d 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C @@ -95,7 +95,7 @@ int External() { std::cerr << "Number of generated MB events different than expected\n"; return 1; } - if (nEventsInj < nEvents * ratioTrigger * 0.5 * 0.95 || nEventsInj > nEvents * ratioTrigger * 0.5 * 1.05) { + if (nEventsInj < nEvents * ratioTrigger * 0.95 || nEventsInj > nEvents * ratioTrigger * 1.05) { std::cerr << "Number of generated events injected with " << checkPdgQuark << " different than expected\n"; return 1; } From 270f43f7e7e3e48b12bf8f4cc5202506f1f40be9 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Tue, 9 Jul 2024 11:55:04 +0200 Subject: [PATCH 8/8] Fix test --- .../PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C index 750b2807d..b5264c370 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_Bforced_gap5_Mode2.C @@ -106,7 +106,7 @@ int External() { } float fracForcedDecays = float(nSignalGoodDecay) / nSignals; - if (fracForcedDecays < 0.9) { // we put some tolerance (e.g. due to oscillations which might change the final state) + if (fracForcedDecays < 0.85) { // we put some tolerance (e.g. due to oscillations which might change the final state) std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n"; return 1; }