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

Public Member Functions

 test_dR (self)
 test_bjet_btag_applied (self)
 test_mass_of_sum (self)
 test_dphi_met (self)
 test_whitespace_insensitive (self)

Detailed Description

Definition at line 20 of file EventSelectionConfigExpr_unitTest.py.

Member Function Documentation

◆ test_bjet_btag_applied()

python.EventSelectionConfigExpr_unitTest.TestExprHappyPath.test_bjet_btag_applied ( self)

Definition at line 30 of file EventSelectionConfigExpr_unitTest.py.

30 def test_bjet_btag_applied(self):
31 alg = named(run("EXPR pt(bjet[0]) > 30000", containers=ALL), "EXPR")[0]
32 self.assertIn("btag", list(prop(alg, "selections"))[0])
33
int run(int argc, char *argv[])

◆ test_dphi_met()

python.EventSelectionConfigExpr_unitTest.TestExprHappyPath.test_dphi_met ( self)

Definition at line 40 of file EventSelectionConfigExpr_unitTest.py.

40 def test_dphi_met(self):
41 alg = named(run("EXPR dPhi(met, jet[0]) > 2.0", containers=ALL), "EXPR")[0]
42 self.assertEqual(list(prop(alg, "operandKinds")), ["MET", "PARTICLE"])
43 self.assertEqual(prop(alg, "metTerm"), "Final")
44 bare = [c.replace("_%SYS%", "") for c in prop(alg, "collections")]
45 self.assertEqual(bare, ["AnaJets"])
46

◆ test_dR()

python.EventSelectionConfigExpr_unitTest.TestExprHappyPath.test_dR ( self)

Definition at line 21 of file EventSelectionConfigExpr_unitTest.py.

21 def test_dR(self):
22 alg = named(run("EXPR dR(jet[0], jet[1]) < 1.0", containers=ALL), "EXPR")[0]
23 self.assertEqual(alg.getType(), "CP::ObjectKinematicSelectorAlg")
24 self.assertEqual(prop(alg, "variable"), "dR")
25 self.assertEqual(prop(alg, "sign"), "LT")
26 self.assertEqual(prop(alg, "refValue"), 1.0)
27 self.assertEqual(list(prop(alg, "operandKinds")), ["PARTICLE", "PARTICLE"])
28 self.assertEqual(list(prop(alg, "indices")), [0, 1])
29

◆ test_mass_of_sum()

python.EventSelectionConfigExpr_unitTest.TestExprHappyPath.test_mass_of_sum ( self)

Definition at line 34 of file EventSelectionConfigExpr_unitTest.py.

34 def test_mass_of_sum(self):
35 alg = named(run("EXPR m(el[0]+mu[0]) > 80000", containers=ALL), "EXPR")[0]
36 self.assertEqual(prop(alg, "variable"), "m")
37 bare = [c.replace("_%SYS%", "") for c in prop(alg, "collections")]
38 self.assertEqual(bare, ["AnaElectrons", "AnaMuons"])
39

◆ test_whitespace_insensitive()

python.EventSelectionConfigExpr_unitTest.TestExprHappyPath.test_whitespace_insensitive ( self)

Definition at line 47 of file EventSelectionConfigExpr_unitTest.py.

47 def test_whitespace_insensitive(self):
48 a = named(run("EXPR dR(jet[0], jet[1]) < 1.0", containers=ALL), "EXPR")[0]
49 b = named(run("EXPR dR(jet[0],jet[1])<1.0", containers=ALL), "EXPR")[0]
50 self.assertEqual(prop(a, "variable"), prop(b, "variable"))
51 self.assertEqual(list(prop(a, "indices")), list(prop(b, "indices")))
52
53

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