diff --git a/Generators/EvgenJobTransforms/share/skel.ABtoEVGEN.py b/Generators/EvgenJobTransforms/share/skel.ABtoEVGEN.py index 3a5ea571681cc5c6fe85668eca3b2376f9796414..e87359112229fa7fd6f0dc9e866ebbc7b8af93ee 100644 --- a/Generators/EvgenJobTransforms/share/skel.ABtoEVGEN.py +++ b/Generators/EvgenJobTransforms/share/skel.ABtoEVGEN.py @@ -325,6 +325,12 @@ else: postSeq.CountHepMC.RequestedOutput = evgenConfig.nEventsPerJob if runArgs.maxEvents == -1 else runArgs.maxEvents evgenLog.info('Requested output events = '+str(postSeq.CountHepMC.RequestedOutput)) + # Special case of N<100: adjust TestHepMC. We will allow _one_ event to fail the checks. + # This means the minimum efficiency is N/N+1 for N generated events. Note that if N<100, + # each failed event costs us more than 1% of efficiency. + if hasattr(testSeq, "TestHepMC") and postSeq.CountHepMC.RequestedOutput<100: + testSeq.TestHepMC.EffFailThreshold = postSeq.CountHepMC.RequestedOutput/(postSeq.CountHepMC.RequestedOutput+1) - 0.01 + ## Check that the keywords are in the list of allowed words (and exit if processing an official JO) if evgenConfig.keywords: from GeneratorConfig.GenConfigHelpers import checkKeywords diff --git a/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py b/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py index f58a9f231a771b90a096938e16a66a29493ca683..a3f8687cf1103b7df7434f267d6b33dd41f3c84c 100644 --- a/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py +++ b/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py @@ -372,6 +372,12 @@ else: postSeq.CountHepMC.RequestedOutput = evgenConfig.nEventsPerJob if runArgs.maxEvents == -1 else runArgs.maxEvents evgenLog.info('Requested output events = '+str(postSeq.CountHepMC.RequestedOutput)) + # Special case of N<100: adjust TestHepMC. We will allow _one_ event to fail the checks. + # This means the minimum efficiency is N/N+1 for N generated events. Note that if N<100, + # each failed event costs us more than 1% of efficiency. + if hasattr(testSeq, "TestHepMC") and postSeq.CountHepMC.RequestedOutput<100: + testSeq.TestHepMC.EffFailThreshold = postSeq.CountHepMC.RequestedOutput/(postSeq.CountHepMC.RequestedOutput+1) - 0.01 + ## Check that the keywords are in the list of allowed words (and exit if processing an official JO) if evgenConfig.keywords: from GeneratorConfig.GenConfigHelpers import checkKeywords