コード例 #1
0
 def test_analysis(self):
     '''Check for an almost perfect match with reference.
     Will fail if physics algorithms are modified,
     so should probably be removed from test suite,
     or better: be made optional. 
     '''
     self.looper.loop()
     self.looper.write()
     rootfile = '/'.join([self.outdir,
                         'heppy.analyzers.GlobalEventTreeProducer.GlobalEventTreeProducer_1/tree.root'])
     mean, sigma = plot(rootfile)
     self.assertAlmostEqual(mean, 93.6, 1)
     self.assertAlmostEqual(sigma, 11.2, 1)
コード例 #2
0
ファイル: test_analysis_ee_Z.py プロジェクト: jlingema/heppy
 def test_analysis(self):
     '''Check for an almost perfect match with reference.
     Will fail if physics algorithms are modified,
     so should probably be removed from test suite,
     or better: be made optional. 
     '''
     self.looper.loop()
     self.looper.write()
     rootfile = '/'.join([self.outdir,
                         'heppy.analyzers.GlobalEventTreeProducer.GlobalEventTreeProducer_1/tree.root'])
     mean, sigma = plot(rootfile)
     self.assertAlmostEqual(mean, 90.13, 1)
     self.assertAlmostEqual(sigma, 10.54, 1)
コード例 #3
0
ファイル: test_analysis_ee_Z.py プロジェクト: dciangot/heppy
 def test_z_mumu_clic(self):
     '''Check for an almost perfect match with reference.
     Will fail if physics algorithms are modified,
     so should probably be removed from test suite,
     or better: be made optional. 
     '''
     from heppy.papas.detectors.CLIC import clic
     fname = '/'.join([os.environ['HEPPY'], 'test/data/ee_Z_mumu.root'])
     config.components[0].files = [fname]
     config.sequence[2].detector = clic
     self.looper = Looper(self.outdir, config, nEvents=500, nPrint=0)
     self.looper.loop()
     self.looper.write()
     rootfile = '/'.join([
         self.outdir,
         'heppy.analyzers.GlobalEventTreeProducer.GlobalEventTreeProducer_1/tree.root'
     ])
     mean, sigma = plot(rootfile, nbins=400)
     self.assertAlmostEqual(mean, 90.84, 1)
     self.assertAlmostEqual(sigma, 1.32, 1)