Skip to content

Commit

Permalink
Change 2*sigma to 3*sigma in gen efficiency check (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinasr authored Nov 28, 2018
1 parent e51ba68 commit 64811d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mcm/json_layer/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2151,7 +2151,7 @@ def check_gen_efficiency(self, geninfo, events_produced, events_ran):
if sigma < 0.025:
sigma = 0.025

two_sigma = sigma * 2
three_sigma = sigma * 3
subject = 'Runtest for %s: efficiency is incorrect' % (self.get_attribute('prepid'))
if measured_efficiency > 1:
message = ('For the request %s measured efficiency was more than 1.\n'
Expand All @@ -2170,7 +2170,7 @@ def check_gen_efficiency(self, geninfo, events_produced, events_ran):
self.notify(subject, message, accumulate=True)
raise Exception(message)

if measured_efficiency < user_efficiency - two_sigma or measured_efficiency > user_efficiency + two_sigma:
if measured_efficiency < user_efficiency - three_sigma or measured_efficiency > user_efficiency + three_sigma:
message = ('For the request %s measured efficiency was not withing set threshold.\n'
'McM validation test measured %.4f efficiency.\n'
'There were %s trial events, of which %s passed filter/matching.\n'
Expand All @@ -2184,7 +2184,7 @@ def check_gen_efficiency(self, geninfo, events_produced, events_ran):
geninfo['match_efficiency'],
user_efficiency,
user_efficiency,
two_sigma)
three_sigma)

self.notify(subject, message, accumulate=True)
raise Exception(message)
Expand Down

0 comments on commit 64811d7

Please sign in to comment.