From 7c0148d4b3fd6cb01a9de034c05005b396616c2a Mon Sep 17 00:00:00 2001 From: Raphaelle Bailhache Date: Mon, 28 Sep 2026 10:37:19 +0200 Subject: [PATCH] remove EvtGen ini file breaking the DQ update --- .../GeneratorHF_bbbarToDDbarToDielectrons.ini | 22 ---- .../ini/GeneratorHF_bbbarToDielectrons.ini | 22 ---- .../ini/GeneratorHF_ccbarToDielectrons.ini | 22 ---- .../GeneratorHF_bbbarToDDbarToDielectrons.C | 90 ------------- .../tests/GeneratorHF_bbbarToDielectrons.C | 86 ------------- .../tests/GeneratorHF_ccbarToDielectrons.C | 119 ------------------ 6 files changed, 361 deletions(-) delete mode 100644 MC/config/PWGEM/ini/GeneratorHF_bbbarToDDbarToDielectrons.ini delete mode 100644 MC/config/PWGEM/ini/GeneratorHF_bbbarToDielectrons.ini delete mode 100644 MC/config/PWGEM/ini/GeneratorHF_ccbarToDielectrons.ini delete mode 100644 MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDDbarToDielectrons.C delete mode 100644 MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDielectrons.C delete mode 100644 MC/config/PWGEM/ini/tests/GeneratorHF_ccbarToDielectrons.C diff --git a/MC/config/PWGEM/ini/GeneratorHF_bbbarToDDbarToDielectrons.ini b/MC/config/PWGEM/ini/GeneratorHF_bbbarToDDbarToDielectrons.ini deleted file mode 100644 index 0201b00b8..000000000 --- a/MC/config/PWGEM/ini/GeneratorHF_bbbarToDDbarToDielectrons.ini +++ /dev/null @@ -1,22 +0,0 @@ -### The setup uses an external event generator -### This part sets the path of the file and the function call to retrieve it - -[GeneratorExternal] -fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/external/generator/GeneratorBeautyToEle_EvtGen.C -funcName = GeneratorBeautyToEle_EvtGen(-1.5,1.5,true,false) - -### The external generator derives from GeneratorPythia8. -### This part configures the bits of the interface: configuration and user hooks - -[GeneratorPythia8] -config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_bbbar.cfg -hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C -hooksFuncName = pythia8_userhooks_bbbar(-1.5,1.5) - -### The setup uses an external even generator trigger which is -### defined in the following file and it is retrieved and configured -### according to the specified function call - -[TriggerExternal] -fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/trigger/selectDaughterFromHFwithinAcc.C -funcName = selectDaughterFromHFwithinAcc(11,kTRUE,-1.,1.,2) diff --git a/MC/config/PWGEM/ini/GeneratorHF_bbbarToDielectrons.ini b/MC/config/PWGEM/ini/GeneratorHF_bbbarToDielectrons.ini deleted file mode 100644 index 9f0de6bdc..000000000 --- a/MC/config/PWGEM/ini/GeneratorHF_bbbarToDielectrons.ini +++ /dev/null @@ -1,22 +0,0 @@ -### The setup uses an external event generator -### This part sets the path of the file and the function call to retrieve it - -[GeneratorExternal] -fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/external/generator/GeneratorBeautyToEle_EvtGen.C -funcName = GeneratorBeautyToEle_EvtGen(-1.5,1.5,true) - -### The external generator derives from GeneratorPythia8. -### This part configures the bits of the interface: configuration and user hooks - -[GeneratorPythia8] -config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_bbbar.cfg -hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C -hooksFuncName = pythia8_userhooks_bbbar(-1.5,1.5) - -### The setup uses an external even generator trigger which is -### defined in the following file and it is retrieved and configured -### according to the specified function call - -[TriggerExternal] -fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/trigger/selectDaughterFromHFwithinAcc.C -funcName = selectDaughterFromHFwithinAcc(11,kFALSE,-1.,1.) diff --git a/MC/config/PWGEM/ini/GeneratorHF_ccbarToDielectrons.ini b/MC/config/PWGEM/ini/GeneratorHF_ccbarToDielectrons.ini deleted file mode 100644 index 6be80e1b8..000000000 --- a/MC/config/PWGEM/ini/GeneratorHF_ccbarToDielectrons.ini +++ /dev/null @@ -1,22 +0,0 @@ -### The setup uses an external event generator -### This part sets the path of the file and the function call to retrieve it - -[GeneratorExternal] -fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/external/generator/GeneratorCharmToEle_EvtGen.C -funcName = GeneratorCharmToEle_EvtGen(-1.5,1.5) - -### The external generator derives from GeneratorPythia8. -### This part configures the bits of the interface: configuration and user hooks - -[GeneratorPythia8] -config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_pp_cr2.cfg -hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C -hooksFuncName = pythia8_userhooks_ccbar(-1.5,1.5) - -### The setup uses an external even generator trigger which is -### defined in the following file and it is retrieved and configured -### according to the specified function call - -[TriggerExternal] -fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGDQ/trigger/selectDaughterFromHFwithinAcc.C -funcName = selectDaughterFromHFwithinAcc(11,kFALSE,-1.,1.) diff --git a/MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDDbarToDielectrons.C b/MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDDbarToDielectrons.C deleted file mode 100644 index 21e68170b..000000000 --- a/MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDDbarToDielectrons.C +++ /dev/null @@ -1,90 +0,0 @@ -int External() -{ - - int checkPdgDecay = 11; - 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"); - std::vector* tracks{}; - tree->SetBranchAddress("MCTrack", &tracks); - - int nLeptons{}; - int nLeptonsInAcceptance{}; - int nLeptonsToBeDone{}; - int nSignalPairs{}; - int nLeptonPairs{}; - int nLeptonPairsInAcceptance{}; - int nLeptonPairsToBeDone{}; - auto nEvents = tree->GetEntries(); - - for (int i = 0; i < nEvents; i++) { - tree->GetEntry(i); - int nleptonseinacc = 0; - int nleptonse = 0; - int nleptonseToBeDone = 0; - int nopenHeavy = 0; - for (auto& track : *tracks) { - auto pdg = track.GetPdgCode(); - auto y = track.GetRapidity(); - if (std::abs(pdg) == checkPdgDecay) { - int igmother = track.getMotherTrackId(); - if (igmother > 0) { - auto gmTrack = (*tracks)[igmother]; - int gmpdg = gmTrack.GetPdgCode(); - if ( int(std::abs(gmpdg)/100.) == 4 || int(std::abs(gmpdg)/1000.) == 4 || int(std::abs(gmpdg)/100.) == 5 || int(std::abs(gmpdg)/1000.) == 5 ) { - nLeptons++; - nleptonse++; - if (-1 < y && y < 1) { - nleptonseinacc++; - nLeptonsInAcceptance++; - } - if (track.getToBeDone()) { - nLeptonsToBeDone++; - nleptonseToBeDone++; - } - } - } - } else if (std::abs(pdg) == 411 || std::abs(pdg) == 421 || std::abs(pdg) == 431 || std::abs(pdg) == 4122 || std::abs(pdg) == 4132 || std::abs(pdg) == 4232 || std::abs(pdg) == 4332 || std::abs(pdg) == 511 || std::abs(pdg) == 521 || std::abs(pdg) == 531 || std::abs(pdg) == 541 || std::abs(pdg) == 5112 || std::abs(pdg) == 5122 || std::abs(pdg) == 5232 || std::abs(pdg) == 5132 || std::abs(pdg) == 5332) { - nopenHeavy++; - } - } - if (nopenHeavy > 1) nSignalPairs++; - if (nleptonse > 1) nLeptonPairs++; - if (nleptonseToBeDone > 1) nLeptonPairsToBeDone++; - if (nleptonseinacc > 1) nLeptonPairsInAcceptance++; - } - std::cout << "#events: " << nEvents << "\n" - << "#leptons in acceptance: " << nLeptonsInAcceptance << "\n" - << "#lepton pairs in acceptance: " << nLeptonPairsInAcceptance << "\n" - << "#leptons: " << nLeptons << "\n" - << "#leptons to be done: " << nLeptonsToBeDone << "\n" - << "#signal pairs: " << nSignalPairs << "\n" - << "#lepton pairs: " << nLeptonPairs << "\n" - << "#lepton pairs to be done: " << nLeptonPairsToBeDone << "\n"; - if (nLeptons == 0) { - std::cerr << "Number of leptons should be greater than 1.\n"; - return 1; - } - if (nLeptonPairs < nSignalPairs) { - std::cerr << "Number of lepton pairs should be at least equaled to the number of open charm hadron pairs\n"; - return 1; - } - if (nLeptonPairsInAcceptance < nEvents) { - std::cerr << "Number of lepton pairs should be at least equaled to the number of events\n"; - return 1; - } - if (nLeptonPairs != nLeptonPairsToBeDone) { - std::cerr << "The number of lepton pairs should be the same as the number of lepton pairs which should be transported.\n"; - return 1; - } - if (nLeptons != nLeptonsToBeDone) { - std::cerr << "The number of leptons should be the same as the number of leptons which should be transported.\n"; - return 1; - } - - return 0; -} diff --git a/MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDielectrons.C b/MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDielectrons.C deleted file mode 100644 index 9fd1cb188..000000000 --- a/MC/config/PWGEM/ini/tests/GeneratorHF_bbbarToDielectrons.C +++ /dev/null @@ -1,86 +0,0 @@ -int External() -{ - - int checkPdgDecay = 11; - 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"); - std::vector* tracks{}; - tree->SetBranchAddress("MCTrack", &tracks); - - int nLeptonsInAcceptance{}; - int nLeptons{}; - int nLeptonsToBeDone{}; - int nSignalPairs{}; - int nLeptonPairs{}; - int nLeptonPairsToBeDone{}; - auto nEvents = tree->GetEntries(); - - for (int i = 0; i < nEvents; i++) { - tree->GetEntry(i); - int nleptonse = 0; - int nleptonseToBeDone = 0; - int nopenHeavy = 0; - for (auto& track : *tracks) { - auto pdg = track.GetPdgCode(); - auto y = track.GetRapidity(); - if (std::abs(pdg) == checkPdgDecay) { - int igmother = track.getMotherTrackId(); - if (igmother > 0) { - auto gmTrack = (*tracks)[igmother]; - int gmpdg = gmTrack.GetPdgCode(); - if (int(std::abs(gmpdg)/100.) == 4 || int(std::abs(gmpdg)/1000.) == 4 || int(std::abs(gmpdg)/100.) == 5 || int(std::abs(gmpdg)/1000.) == 5) { - nLeptons++; - nleptonse++; - if (-1 < y && y < 1) nLeptonsInAcceptance++; - if (track.getToBeDone()) { - nLeptonsToBeDone++; - nleptonseToBeDone++; - } - } - } - } else if (std::abs(pdg) == 411 || std::abs(pdg) == 421 || std::abs(pdg) == 431 || std::abs(pdg) == 4122 || std::abs(pdg) == 4132 || std::abs(pdg) == 4232 || std::abs(pdg) == 4332 || std::abs(pdg) == 511 || std::abs(pdg) == 521 || std::abs(pdg) == 531 || std::abs(pdg) == 541 || std::abs(pdg) == 5112 || std::abs(pdg) == 5122 || std::abs(pdg) == 5232 || std::abs(pdg) == 5132 || std::abs(pdg) == 5332) { - nopenHeavy++; - } - } - if (nopenHeavy > 1) nSignalPairs++; - if (nleptonse > 1) nLeptonPairs++; - if (nleptonseToBeDone > 1) nLeptonPairsToBeDone++; - } - std::cout << "#events: " << nEvents << "\n" - << "#leptons in acceptance: " << nLeptonsInAcceptance << "\n" - << "#leptons: " << nLeptons << "\n" - << "#leptons to be done: " << nLeptonsToBeDone << "\n" - << "#signal pairs: " << nSignalPairs << "\n" - << "#lepton pairs: " << nLeptonPairs << "\n" - << "#lepton pairs to be done: " << nLeptonPairsToBeDone << "\n"; - if (nLeptons == 0) { - std::cerr << "Number of leptons should be greater than 1.\n"; - return 1; - } - if (nLeptonPairs < nSignalPairs) { - std::cerr << "Number of lepton pairs should be at least equaled to the number of open charm hadron pairs\n"; - return 1; - } - if (nLeptonPairs != nLeptonPairsToBeDone) { - std::cerr << "The number of lepton pairs should be the same as the number of lepton pairs which should be transported.\n"; - return 1; - } - if (nLeptons != nLeptonsToBeDone) { - std::cerr << "The number of leptons should be the same as the number of leptons which should be transported.\n"; - return 1; - } - if (nLeptonsInAcceptance < nEvents) { - std::cerr << "The number of leptons in acceptance should be at least equaled to the number of events.\n"; - return 1; - } - if (nLeptonsInAcceptance != nLeptons) { - std::cerr << "The number of leptons in acceptance should be the same as the total number of leptons\n"; - return 1; - } - return 0; -} diff --git a/MC/config/PWGEM/ini/tests/GeneratorHF_ccbarToDielectrons.C b/MC/config/PWGEM/ini/tests/GeneratorHF_ccbarToDielectrons.C deleted file mode 100644 index efe6027a9..000000000 --- a/MC/config/PWGEM/ini/tests/GeneratorHF_ccbarToDielectrons.C +++ /dev/null @@ -1,119 +0,0 @@ -int External() -{ - - int checkPdgDecay = -11; - 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"); - std::vector* tracks{}; - tree->SetBranchAddress("MCTrack", &tracks); - - int nLeptonsInAcceptance{}; - int nLeptons{}; - int nAntileptons{}; - int nAntileptonsInAcceptance{}; - int nLeptonsToBeDone{}; - int nAntileptonsToBeDone{}; - int nSignalPairs{}; - int nLeptonPairs{}; - int nLeptonPairsToBeDone{}; - auto nEvents = tree->GetEntries(); - - for (int i = 0; i < nEvents; i++) { - tree->GetEntry(i); - int nElectrons = 0; - int nPositrons = 0; - int nElectronsToBeDone = 0; - int nPositronsToBeDone = 0; - int nOpenCharmPos = 0; - int nOpenCharmNeg = 0; - for (auto& track : *tracks) { - auto pdg = track.GetPdgCode(); - auto y = track.GetRapidity(); - if (pdg == checkPdgDecay) { - int igmother = track.getMotherTrackId(); - if (igmother > 0) { - auto gmTrack = (*tracks)[igmother]; - int gmpdg = gmTrack.GetPdgCode(); - if (int(std::abs(gmpdg)/100.) == 4 || int(std::abs(gmpdg)/1000.) == 4) { - nLeptons++; - nElectrons++; - if (-1 < y && y < 1) nLeptonsInAcceptance++; - if (track.getToBeDone()) { - nLeptonsToBeDone++; - nElectronsToBeDone++; - } - } - } - } else if (pdg == -checkPdgDecay) { - int igmother = track.getMotherTrackId(); - if (igmother > 0) { - auto gmTrack = (*tracks)[igmother]; - int gmpdg = gmTrack.GetPdgCode(); - if (int(TMath::Abs(gmpdg)/100.) == 4 || int(TMath::Abs(gmpdg)/1000.) == 4) { - nAntileptons++; - nPositrons++; - if (-1 < y && y < 1) nAntileptonsInAcceptance++; - if (track.getToBeDone()) { - nAntileptonsToBeDone++; - nPositronsToBeDone++; - } - } - } - } else if (pdg == 411 || pdg == 421 || pdg == 431 || pdg == 4122 || pdg == 4132 || pdg == 4232 || pdg == 4332) { - nOpenCharmPos++; - } else if (pdg == -411 || pdg == -421 || pdg == -431 || pdg == -4122 || pdg == -4132 || pdg == -4232 || pdg == -4332) { - nOpenCharmNeg++; - } - } - if (nOpenCharmPos > 0 && nOpenCharmNeg > 0) nSignalPairs++; - if (nElectrons > 0 && nPositrons > 0) nLeptonPairs++; - if (nElectronsToBeDone > 0 && nPositronsToBeDone > 0) nLeptonPairsToBeDone++; - } - std::cout << "#events: " << nEvents << "\n" - << "#leptons: " << nLeptons << "\n" - << "#leptons in acceptance: " << nLeptonsInAcceptance << "\n" - << "#antileptons: " << nAntileptons << "\n" - << "#antileptons in acceptance: " << nAntileptonsInAcceptance << "\n" - << "#leptons to be done: " << nLeptonsToBeDone << "\n" - << "#antileptons to be done: " << nAntileptonsToBeDone << "\n" - << "#signal pairs: " << nSignalPairs << "\n" - << "#lepton pairs: " << nLeptonPairs << "\n" - << "#lepton pairs to be done: " << nLeptonPairsToBeDone << "\n"; - int nTotalLeptonsInAcceptance = nLeptonsInAcceptance + nAntileptonsInAcceptance; - if (nLeptons == 0 && nAntileptons == 0) { - std::cerr << "Number of leptons, number of anti-leptons should all be greater than 1.\n"; - return 1; - } - if (nLeptonPairs < nSignalPairs) { - std::cerr << "Number of lepton pairs should be at least equaled to the number of open charm hadron pairs\n"; - return 1; - } - if (nLeptonPairs != nLeptonPairsToBeDone) { - std::cerr << "The number of lepton pairs should be the same as the number of lepton pairs which should be transported.\n"; - return 1; - } - if (nLeptons != nLeptonsToBeDone) { - std::cerr << "The number of leptons should be the same as the number of leptons which should be transported.\n"; - return 1; - } - if (nTotalLeptonsInAcceptance < nEvents) { - std::cerr << "The number of leptons in acceptance should be at least equaled to the number of events.\n"; - return 1; - } - if (nLeptons != nLeptonsInAcceptance) { - std::cerr << "The number of leptons in acceptance should be the same as the number of leptons.\n"; - return 1; - } - if (nAntileptons != nAntileptonsInAcceptance) { - std::cerr << "The number of anti-leptons in acceptance should be the same as the number of anti-leptons.\n"; - return 1; - } - - return 0; -}