forked from cbernet/fcc-ee-higgs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_analysis_ee_ZH_nunubb.py
53 lines (38 loc) · 1.34 KB
/
test_analysis_ee_ZH_nunubb.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import unittest
import tempfile
import copy
import os
import shutil
import heppy.framework.context as context
if context.name == 'fcc':
from analysis_ee_ZH_nunubb_cfg import config, test_filename
from heppy.framework.looper import Looper
from ROOT import TFile
import logging
logging.getLogger().setLevel(logging.ERROR)
import heppy.statistics.rrandom as random
class TestAnalysis_ee_ZH_nunubb(unittest.TestCase):
def setUp(self):
random.seed(0xdeadbeef)
self.outdir = tempfile.mkdtemp()
import logging
logging.disable(logging.CRITICAL)
def tearDown(self):
shutil.rmtree(self.outdir)
logging.disable(logging.NOTSET)
def test_1(self):
'''Check that the ZH->nunubb analysis runs
'''
from heppy.papas.detectors.CMS import cms
config.components[0].files = [test_filename]
for s in config.sequence:
if hasattr( s,'detector'):
s.detector = cms
self.looper = Looper( self.outdir,
config,
nEvents=10,
nPrint=0 )
self.looper.loop()
self.looper.write()
if __name__ == '__main__':
unittest.main()