13 a test of the EventKinematics variables using the small test file for running quickly
17 from basf2
import set_random_seed, create_path, process
21 set_random_seed(
"1337")
24 fsps = [
'gamma',
'e+',
'mu+',
'pi+',
'K+',
'p+',
28 testpath = create_path()
29 testpath.add_module(
'RootInput', inputFileNames=testinput)
30 testpath.add_module(
'ParticleLoader', decayStrings=fsps,
31 addDaughters=
True, skipNonPrimaryDaughters=
True, useMCParticles=
True)
33 testpath.add_module(
'ParticleListManipulator', outputListName=fsp,
34 inputListNames=[fsp +
':MC'], cut=
'mcPrimary > 0 and nDaughters == 0')
38 'genMissingMass2OfEvent',
39 'genMissingEnergyOfEventCMS',
40 'genMissingMomentumOfEventCMS',
41 'genTotalPhotonsEnergyOfEvent',
42 'genVisibleEnergyOfEventCMS',
45 testpath.add_module(
'EventKinematics', particleLists=fsps, usingMC=
True)
47 testpath.add_module(
'ParticlePrinter', listName=
'', fullPrint=
False,
48 variables=event_kinematics)
def configure_logging_for_tests(user_replacements=None)
def require_file(filename, data_type="", py_case=None)