13 Forbid users from using the Best Candidate Selection module to remove candidates from particle lists with protected identifiers.
17 from basf2
import create_path, set_random_seed
18 import modularAnalysis
as ma
22 set_random_seed(
'1337')
26 badpath_all = create_path()
27 badpath_all.add_module(
'RootInput', inputFileNames=testinput)
28 badpath_all.add_module(
'ParticleLoader', decayStrings=[
'e+:all'])
29 ma.rankByLowest(
"e+:all",
"px", numBest=0, path=badpath_all)
30 ma.rankByLowest(
"e+:all",
"px", numBest=1, path=badpath_all)
34 badpath_MC = create_path()
35 badpath_MC.add_module(
'RootInput', inputFileNames=testinput)
36 ma.fillParticleListFromMC(
"e-:MC",
"", path=badpath_MC)
37 ma.rankByLowest(
"e+:MC",
"px", numBest=0, path=badpath_MC)
38 ma.rankByLowest(
"e+:MC",
"px", numBest=1, path=badpath_MC)
42 badpath_V0 = create_path()
43 badpath_V0.add_module(
'RootInput', inputFileNames=testinput)
44 ma.fillParticleList(
'K_S0:V0 -> pi+ pi-',
'',
True, path=badpath_V0)
45 ma.rankByLowest(
"K_S0:V0",
"px", numBest=0, path=badpath_V0)
46 ma.rankByLowest(
"K_S0:V0",
"px", numBest=1, path=badpath_V0)
def configure_logging_for_tests(user_replacements=None)
def require_file(filename, data_type="", py_case=None)
def safe_process(*args, **kwargs)