Skip to content

Commit e7f3d4f

Browse files
committed
PWGHF: Exclude parton event in Ds reso triggered config
1 parent 4c05962 commit e7f3d4f

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

MC/config/PWGHF/ini/GeneratorHF_D2H_ccbar_and_bbbar_gap5_DResoTrigger.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ funcName=GeneratorPythia8GapTriggeredCharmAndBeauty(5, -1.5, 1.5, -1.5, 1.5, {10
55

66
[GeneratorPythia8]
77
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_DResoTrigger.cfg
8-
includePartonEvent=true
8+
includePartonEvent=false # not needed for jet studies, hence no need to keep parton event

MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5_DResoTrigger.C

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int External() {
3737
tree->SetBranchAddress("MCEventHeader.", &eventHeader);
3838

3939
int nEventsMB{}, nEventsInjOne{}, nEventsInjTwo{};
40-
int nQuarksOne{}, nQuarksTwo{}, nSignals{}, nSignalGoodDecay{};
40+
int nSignals{}, nSignalGoodDecay{};
4141
auto nEvents = tree->GetEntries();
4242

4343
for (int i = 0; i < nEvents; i++) {
@@ -60,14 +60,6 @@ int External() {
6060
for (auto &track : *tracks) {
6161
auto pdg = track.GetPdgCode();
6262
auto absPdg = std::abs(pdg);
63-
if (absPdg == checkPdgQuarkOne) {
64-
nQuarksOne++;
65-
continue;
66-
}
67-
if (absPdg == checkPdgQuarkTwo) {
68-
nQuarksTwo++;
69-
continue;
70-
}
7163
if (std::find(checkPdgHadron.begin(), checkPdgHadron.end(), absPdg) != checkPdgHadron.end()) { // found signal
7264
nSignals++; // count signal PDG
7365

@@ -115,8 +107,6 @@ int External() {
115107
std::cout << "# MB events: " << nEventsMB << "\n";
116108
std::cout << Form("# events injected with %d quark pair: ", checkPdgQuarkOne) << nEventsInjOne << "\n";
117109
std::cout << Form("# events injected with %d quark pair: ", checkPdgQuarkTwo) << nEventsInjTwo << "\n";
118-
std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkOne) << nQuarksOne << "\n";
119-
std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkTwo) << nQuarksTwo << "\n";
120110
std::cout <<"# signal hadrons: " << nSignals << "\n";
121111
std::cout <<"# signal hadrons decaying in the correct channel: " << nSignalGoodDecay << "\n";
122112

@@ -133,15 +123,6 @@ int External() {
133123
return 1;
134124
}
135125

136-
if (nQuarksOne < nEvents * ratioTrigger) { // we expect anyway more because the same quark is repeated several time, after each gluon radiation
137-
std::cerr << "Number of generated (anti)quarks " << checkPdgQuarkOne << " lower than expected\n";
138-
return 1;
139-
}
140-
if (nQuarksTwo < nEvents * ratioTrigger) { // we expect anyway more because the same quark is repeated several time, after each gluon radiation
141-
std::cerr << "Number of generated (anti)quarks " << checkPdgQuarkTwo << " lower than expected\n";
142-
return 1;
143-
}
144-
145126
float fracForcedDecays = float(nSignalGoodDecay) / nSignals;
146127
if (fracForcedDecays < 0.9) { // we put some tolerance (e.g. due to oscillations which might change the final state)
147128
std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n";

0 commit comments

Comments
 (0)