Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/external/generator/generator_py
funcName=GeneratorPythia8GapTriggeredBeauty(1, -1.5, 1.5, -1.5, 1.5, {4332})

[GeneratorPythia8]
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_Omegac_to_Omega.cfg
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_OmegaC_NoDecay.cfg
includePartonEvent=true
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ int External() {
int checkPdgQuarkOne = 5;

int checkPdgHadron{4332};
int checkHadronDecays{3334};
int checkHadronDecays{0};

TFile file(path.c_str(), "READ");
if (file.IsZombie()) {
Expand All @@ -19,7 +19,7 @@ int External() {
tree->SetBranchAddress("MCEventHeader.", &eventHeader);

int nEventsInj{};
int nQuarks{}, nSignals{}, nSignalGoodDecay{};
int nQuarks{}, nSignals{};
auto nEvents = tree->GetEntries();

for (int i = 0; i < nEvents; i++) {
Expand All @@ -44,10 +44,8 @@ int External() {
nSignals++; // count signal PDG

for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) {
auto pdgDau = tracks->at(j).GetPdgCode();
if (std::abs(pdgDau) == checkHadronDecays) {
nSignalGoodDecay;
break;
if (j >= 0) {
checkHadronDecays += 1;
}
}
}
Expand All @@ -59,7 +57,7 @@ int External() {
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";
std::cout <<"# signal hadrons decaying : " << checkHadronDecays << "\n";

if (nEventsInj < nEvents) {
std::cerr << "Number of generated events with triggered events different than expected\n";
Expand All @@ -76,9 +74,8 @@ int External() {
return 1;
}

float fracForcedDecays = float(nSignalGoodDecay) / nSignals;
if (fracForcedDecays < 0.9) { // we put some tolerance (it should not happen, but to be conservative)
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";
if (checkHadronDecays > 0) {
std::cerr << "Decayed OmegaC, it should never decay\n";
return 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,3 @@ BeamRemnants:saturation 5

### switch off OmegaC decays
4332:onMode = off

### Omega_c -> Omega + X
4332:onIfAny = 3334
Loading