Skip to content

Commit 2f89efc

Browse files
committed
fix attempted and accepted events in header
1 parent b3b7401 commit 2f89efc

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

MC/config/PWGGAJE/external/generator/generator_pythia8_gaptrigger_jets_hook.C

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,14 @@ public:
130130
LOG(info) << "Info sigmaGen = " << pythiaObject.info.sigmaGen();
131131
LOG(info) << "Info sigmaErr = " << pythiaObject.info.sigmaErr();
132132

133-
134133
// Set event scale and nMPI
135134
LOG(info) << "Info QRen = " << pythiaObject.info.QRen();
136135
LOG(info) << "Info nMPI = " << pythiaObject.info.nMPI();
137136

137+
// Set accepted and attempted values
138+
LOG(info) << "Info accepted = " << pythiaObject.info.nAccepted();
139+
LOG(info) << "Info attempted = " << pythiaObject.info.nTried();
140+
138141
// Set weights (overrides cross-section for each weight)
139142
size_t iw = 0;
140143
auto xsecErr = pythiaObject.info.weightContainerPtr->getTotalXsecErr();
@@ -176,6 +179,11 @@ public:
176179
// Set event scale and nMPI
177180
eventHeader->putInfo<float>(Key::eventScale, QRen);
178181
eventHeader->putInfo<int>(Key::mpi, nMPI);
182+
183+
// Set accepted and attempted events
184+
eventHeader->putInfo<int>(Key::acceptedEvents, accepted);
185+
eventHeader->putInfo<int>(Key::attemptedEvents, attempted);
186+
179187
LOG(info) << "--- updated header weight = " << weight;
180188

181189
// The following is also set in the base class updateHeader function
@@ -214,6 +222,9 @@ public:
214222
// Set event scale and nMPI
215223
QRen = info.QRen();
216224
nMPI = info.nMPI();
225+
// Set accepted and attempted events
226+
accepted = info.nAccepted();
227+
attempted = info.nTried();
217228
}
218229

219230
private:
@@ -249,7 +260,9 @@ private:
249260
// event scale and nMPI
250261
float QRen;
251262
int nMPI;
252-
263+
// accepted and attempted events
264+
int accepted;
265+
int attempted;
253266
};
254267

255268
} // namespace eventgen

0 commit comments

Comments
 (0)