You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOG(info) << "Using configuration " << mConfigToUse << " out of " << getNGuns() << ", of which " << mGunConfigs.size() << " are transport decayed and " << mGunConfigsGenDecayed.size() << " are generator decayed";
232
239
233
-
boolinjectedForThisEvent= false;
234
240
intnConfig=mGunConfigs.size(); // We start counting from the configurations of the transport decayed particles
235
241
for (constConfigContainer&cfg : mGunConfigsGenDecayed) {
236
242
nConfig++;
@@ -239,10 +245,8 @@ class GeneratorPythia8LFRapidity : public o2::eventgen::GeneratorPythia8
239
245
}
240
246
LOG(info) << "Using config container ";
241
247
cfg.print();
242
-
if (mUseTriggering) { // Do the triggering
243
-
booldoSignal{mEventCounter % (mGapBetweenInjection+1) ==0}; // Do signal or gap
244
-
245
-
if (doSignal) {
248
+
if (mUseTriggering) { // Do the triggering
249
+
if (mDoSignalThisEvent) {
246
250
LOG(info) << "Generating triggered signal event for particle";
247
251
cfg.print();
248
252
boolsatisfiesTrigger= false;
@@ -347,8 +351,6 @@ class GeneratorPythia8LFRapidity : public o2::eventgen::GeneratorPythia8
347
351
348
352
mPythia.event.append(p);
349
353
}
350
-
351
-
injectedForThisEvent= true;
352
354
}
353
355
354
356
// For purely trivial injection (no generator decay needed in loop or just transport decay), we still might have injection flag
@@ -369,66 +371,67 @@ class GeneratorPythia8LFRapidity : public o2::eventgen::GeneratorPythia8
@@ -631,12 +642,13 @@ class GeneratorPythia8LFRapidity : public o2::eventgen::GeneratorPythia8
631
642
// Configuration
632
643
constboolmOneInjectionPerEvent= true; // if true, only one injection per event is performed, i.e. if multiple PDG (including antiparticles) are requested to be injected only one will be done per event
633
644
constboolmUseTriggering= false; // if true, use triggering instead of injection
634
-
constintmGapBetweenInjection=0; // Gap between two signal events. 0 means injection at every event
645
+
constintmGapBetweenInjection=0; // 0/1: signal every event; N>1: signal every Nth event
635
646
constboolmUseRapidity= false; // if true, use rapidity instead of eta
636
647
637
648
// Running variables
638
649
intmConfigToUse=-1; // Index of the configuration to use
639
650
intmEventCounter=0; // Event counter
651
+
boolmDoSignalThisEvent= true;
640
652
boolmVerbose= true; // Verbosity flag
641
653
642
654
std::vector<ConfigContainer>mGunConfigs; // List of gun configurations to use
0 commit comments