ATLAS Offline Software
Loading...
Searching...
No Matches
python.EventSelectionConfigDilepton_unitTest.TestCharge Class Reference
Inheritance diagram for python.EventSelectionConfigDilepton_unitTest.TestCharge:
Collaboration diagram for python.EventSelectionConfigDilepton_unitTest.TestCharge:

Public Member Functions

 test_os_ss (self)
 test_truth_routing (self)
 test_missing_input (self)
 test_subset_selector (self)

Detailed Description

Definition at line 57 of file EventSelectionConfigDilepton_unitTest.py.

Member Function Documentation

◆ test_missing_input()

python.EventSelectionConfigDilepton_unitTest.TestCharge.test_missing_input ( self)

Definition at line 69 of file EventSelectionConfigDilepton_unitTest.py.

69 def test_missing_input(self):
70 self.assertRaises(ValueError, run, "OS")
71

◆ test_os_ss()

python.EventSelectionConfigDilepton_unitTest.TestCharge.test_os_ss ( self)

Definition at line 58 of file EventSelectionConfigDilepton_unitTest.py.

58 def test_os_ss(self):
59 for kw, osmode in [("OS", True), ("SS", False)]:
60 with self.subTest(kw=kw):
61 algs = named(run(kw, containers=ELMU), f"_{kw}_")
62 self.assertEqual(algs[0].getType(), "CP::ChargeSelectorAlg")
63 self.assertEqual(prop(algs[0], "OS"), osmode)
64
int run(int argc, char *argv[])

◆ test_subset_selector()

python.EventSelectionConfigDilepton_unitTest.TestCharge.test_subset_selector ( self)

Definition at line 72 of file EventSelectionConfigDilepton_unitTest.py.

72 def test_subset_selector(self):
73 # "OS el" restricts the charge computation to electrons only
74 algs = named(run("OS el", containers=ELMU), "_OS_")
75 self.assertNotEqual(prop(algs[0], "electrons", ""), "")
76 self.assertEqual(prop(algs[0], "muons", ""), "")
77
78

◆ test_truth_routing()

python.EventSelectionConfigDilepton_unitTest.TestCharge.test_truth_routing ( self)

Definition at line 65 of file EventSelectionConfigDilepton_unitTest.py.

65 def test_truth_routing(self):
66 algs = named(run("OS", containers={"electrons": "AnaTruthElectrons"}), "_OS_")
67 self.assertNotEqual(prop(algs[0], "truthElectrons", ""), "")
68

The documentation for this class was generated from the following file: