2 #include "StjTrgMock.hh"
4 #include <StjTrgRaiseThresholdEtJP.h>
6 #include "StjTrgRaiseThresholdEtJPTest.hh"
11 void StjTrgRaiseThresholdEtJPTest::setUp()
16 void StjTrgRaiseThresholdEtJPTest::tearDown()
21 void StjTrgRaiseThresholdEtJPTest::testOneJetPatchPass()
24 trgSrc._runNumber = 1;
26 trgSrc._passed =
true;
29 trgSrc._jetPatches.push_back(1);
30 trgSrc._jetPatchDsmAdc.push_back(0);
31 trgSrc._jetPatchAdc.push_back(0);
32 trgSrc._jetPatchEnergy.push_back(0);
33 trgSrc._jetPatchEt.push_back(3.4);
37 CPPUNIT_ASSERT( trg.passed() );
38 CPPUNIT_ASSERT( trg.hard() );
39 CPPUNIT_ASSERT( trg.soft() );
40 CPPUNIT_ASSERT_EQUAL( (
size_t)1, trg.jetPatches().size() );
41 CPPUNIT_ASSERT_EQUAL( 1, trg.jetPatches()[0] );
42 CPPUNIT_ASSERT_EQUAL( 3.4, trg.jetPatchEt()[0] );
45 void StjTrgRaiseThresholdEtJPTest::testOneJetPatchNotPass()
48 trgSrc._runNumber = 1;
50 trgSrc._passed =
true;
53 trgSrc._jetPatches.push_back(1);
54 trgSrc._jetPatchDsmAdc.push_back(0);
55 trgSrc._jetPatchAdc.push_back(0);
56 trgSrc._jetPatchEnergy.push_back(0);
57 trgSrc._jetPatchEt.push_back(3.4);
61 CPPUNIT_ASSERT( ! trg.passed() );
62 CPPUNIT_ASSERT( trg.hard() );
63 CPPUNIT_ASSERT( ! trg.soft() );
64 CPPUNIT_ASSERT_EQUAL( (
size_t)0, trg.jetPatches().size() );
67 void StjTrgRaiseThresholdEtJPTest::testTwoJetPatchesPass()
70 trgSrc._runNumber = 1;
72 trgSrc._passed =
true;
76 trgSrc._jetPatches.push_back(1);
77 trgSrc._jetPatchDsmAdc.push_back(0);
78 trgSrc._jetPatchAdc.push_back(0);
79 trgSrc._jetPatchEnergy.push_back(0);
80 trgSrc._jetPatchEt.push_back(3.4);
82 trgSrc._jetPatches.push_back(3);
83 trgSrc._jetPatchDsmAdc.push_back(0);
84 trgSrc._jetPatchAdc.push_back(0);
85 trgSrc._jetPatchEnergy.push_back(0);
86 trgSrc._jetPatchEt.push_back(2.5);
90 CPPUNIT_ASSERT( trg.passed() );
91 CPPUNIT_ASSERT( trg.hard() );
92 CPPUNIT_ASSERT( trg.soft() );
93 CPPUNIT_ASSERT_EQUAL( (
size_t)1, trg.jetPatches().size() );
94 CPPUNIT_ASSERT_EQUAL( 1, trg.jetPatches()[0] );
95 CPPUNIT_ASSERT_EQUAL( 3.4, trg.jetPatchEt()[0] );
98 void StjTrgRaiseThresholdEtJPTest::testTwoJetPatchesNotPass()
101 trgSrc._runNumber = 1;
103 trgSrc._passed =
true;
107 trgSrc._jetPatches.push_back(1);
108 trgSrc._jetPatchDsmAdc.push_back(0);
109 trgSrc._jetPatchAdc.push_back(0);
110 trgSrc._jetPatchEnergy.push_back(0);
111 trgSrc._jetPatchEt.push_back(3.4);
113 trgSrc._jetPatches.push_back(3);
114 trgSrc._jetPatchDsmAdc.push_back(0);
115 trgSrc._jetPatchAdc.push_back(0);
116 trgSrc._jetPatchEnergy.push_back(0);
117 trgSrc._jetPatchEt.push_back(2.5);
121 CPPUNIT_ASSERT( ! trg.passed() );
122 CPPUNIT_ASSERT( trg.hard() );
123 CPPUNIT_ASSERT( ! trg.soft() );
124 CPPUNIT_ASSERT_EQUAL( (
size_t)0, trg.jetPatches().size() );