Skip to content

Commit 44b3ab3

Browse files
committed
fix bug in generator
1 parent c5277ab commit 44b3ab3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

MC/config/PWGDQ/external/generator/generator_pythia8_StarlightTriggered_withGap.C

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ protected:
5959
bool found = false;
6060
while (!found) {
6161
mGeneratorParam->generateEvent();
62+
mGeneratorParam->importParticles();
6263
found = findSignalInAcceptance();
64+
mGeneratorParam->clearParticles();
6365
}
6466
}
6567
notifySubGenerator(1);
@@ -82,6 +84,7 @@ protected:
8284
if ((mGeneratedEvents-1) % mInverseTriggerRatio == 0){ // add injected prompt signals to the stack
8385
mGeneratorParam->importParticles();
8486
int originalSize = mParticles.size();
87+
std::cout<<"adding "<<mGeneratorParam->getParticles().size()<<" particles to the stack"<<std::endl;
8588
for(int ipart=0; ipart < mGeneratorParam->getParticles().size(); ipart++){
8689
TParticle part = TParticle(mGeneratorParam->getParticles().at(ipart));
8790
if(part.GetFirstMother() >= 0) part.SetFirstMother(part.GetFirstMother() + originalSize);

0 commit comments

Comments
 (0)