14from ROOT
import gROOT, Belle2
15gROOT.ProcessLine(
"gErrorIgnoreLevel = 4000;")
18Compare the CDCTrigger2DFitterModule output with the old TRGCDCModule,
19to confirm that the behaviour of the new code is correct.
31 'pdgCodes': [-13, 13],
33 'momentumGeneration':
'inversePt',
34 'momentumParams': [0.3, 10.],
35 'thetaGeneration':
'uniform',
36 'thetaParams': [35, 123],
37 'phiGeneration':
'uniform',
38 'phiParams': [0, 360],
39 'vertexGeneration':
'fixed',
40 'xVertexParams': [0.],
41 'yVertexParams': [0.],
42 'zVertexParams': [0.]}
44bkgdir =
'/sw/belle2/bkg/'
51basf2.set_random_seed(seed)
53basf2.set_log_level(basf2.LogLevel.ERROR)
55main = basf2.create_path()
57main.add_module(
'EventInfoSetter', evtNumList=evtnum)
58main.add_module(
'Progress')
59main.add_module(
'Gearbox')
60main.add_module(
'Geometry', components=[
'CDC',
61 'MagneticFieldConstant4LimitedRCDC'])
62particlegun = basf2.register_module(
'ParticleGun')
63particlegun.param(particlegun_params)
64main.add_module(particlegun)
65main.add_module(
'FullSim')
67 bkgmixer = basf2.register_module(
'BeamBkgMixer')
68 bkgfiles = glob.glob(os.path.join(bkgdir,
'*[!(PXD)(ECL)]??.root'))
69 bkgmixer.param(
'backgroundFiles', bkgfiles)
70 bkgmixer.param(
'components', [
'CDC'])
71 main.add_module(bkgmixer)
72cdcdigitizer = basf2.register_module(
'CDCDigitizer')
74 cdcdigitizer.param(
'TrigTimeJitter', 32.)
75main.add_module(cdcdigitizer)
81trgcdc = basf2.register_module(
'TRGCDC')
90 'FastSimulationMode': simMode,
94trgcdc.param(trgcdc_params)
96 trgcdc.param(
'inputCollection',
'CDCHits4Trg')
97main.add_module(trgcdc)
100main.add_module(
'CDCTriggerETF')
109 test module to compare the output of TRGCDC and CDCTriggerETF
114 give info for both modules
and warnings
in the case of mismatches
118 newT0 =
Belle2.PyStoreObj(
"BinnedEventT0").obj().getBinnedEventT0(Belle2.Const.CDC)
122 basf2.B2INFO(f
"T0 {int(oldT0)}")
124 basf2.B2WARNING(f
"old T0 {int(oldT0)}, new T0 {int(newT0)}")
127main.add_module(
TestModule(), logLevel=basf2.LogLevel.INFO)
133print(basf2.statistics)
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
a (simplified) python wrapper for StoreObjPtr.