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

Public Member Functions

 test_ghost_basic (self)
 test_ghost_with_veto (self)
 test_ghost_with_minpt_5arg (self)
 test_ghost_wrong_argcount (self)

Detailed Description

Definition at line 9 of file EventSelectionConfigGhost_unitTest.py.

Member Function Documentation

◆ test_ghost_basic()

python.EventSelectionConfigGhost_unitTest.TestGhost.test_ghost_basic ( self)

Definition at line 10 of file EventSelectionConfigGhost_unitTest.py.

10 def test_ghost_basic(self):
11 for kw, opt, val, tag in [("JET_N_GHOST", "jets", "AnaJets", "NJETGHOST"),
12 ("LJET_N_GHOST", "largeRjets", "AnaLRJets", "NLJETGHOST")]:
13 with self.subTest(kw=kw):
14 algs = named(run(f"{kw} B >= 1", containers={opt: val}), tag)
15 self.assertEqual(len(algs), 1)
16 self.assertEqual(algs[0].getType(), "CP::JetNGhostSelectorAlg")
17 self.assertEqual(prop(algs[0], "ghost"), "GhostBHadronsFinalCount")
18 self.assertEqual(prop(algs[0], "count"), 1)
19
int run(int argc, char *argv[])

◆ test_ghost_with_minpt_5arg()

python.EventSelectionConfigGhost_unitTest.TestGhost.test_ghost_with_minpt_5arg ( self)

Definition at line 25 of file EventSelectionConfigGhost_unitTest.py.

25 def test_ghost_with_minpt_5arg(self):
26 algs = named(run("JET_N_GHOST B 30000 >= 1", containers={"jets": "AnaJets"}), "NJETGHOST")
27 self.assertEqual(prop(algs[0], "minPt"), 30000.0)
28 self.assertEqual(prop(algs[0], "count"), 1)
29

◆ test_ghost_with_veto()

python.EventSelectionConfigGhost_unitTest.TestGhost.test_ghost_with_veto ( self)

Definition at line 20 of file EventSelectionConfigGhost_unitTest.py.

20 def test_ghost_with_veto(self):
21 algs = named(run("JET_N_GHOST B!C >= 1", containers={"jets": "AnaJets"}), "NJETGHOST")
22 self.assertEqual(prop(algs[0], "ghost"), "GhostBHadronsFinalCount")
23 self.assertEqual(prop(algs[0], "veto"), "GhostCHadronsFinalCount")
24

◆ test_ghost_wrong_argcount()

python.EventSelectionConfigGhost_unitTest.TestGhost.test_ghost_wrong_argcount ( self)

Definition at line 30 of file EventSelectionConfigGhost_unitTest.py.

30 def test_ghost_wrong_argcount(self):
31 self.assertRaises(ValueError, run, "JET_N_GHOST B 30000 >= 1 extra",
32 containers={"jets": "AnaJets"})
33
34

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