15 from ROOT
import gROOT, Belle2
16 gROOT.ProcessLine(
"gErrorIgnoreLevel = 4000;")
19 Compare the CDCTrigger2DFitterModule output with the old TRGCDCModule,
20 to confirm that the behaviour of the new code is correct.
31 particlegun_params = {
32 'pdgCodes': [-13, 13],
34 'momentumGeneration':
'inversePt',
35 'momentumParams': [0.3, 10.],
36 'thetaGeneration':
'uniform',
37 'thetaParams': [35, 123],
38 'phiGeneration':
'uniform',
39 'phiParams': [0, 360],
40 'vertexGeneration':
'fixed',
41 'xVertexParams': [0.],
42 'yVertexParams': [0.],
43 'zVertexParams': [0.]}
45 bkgdir =
'/sw/belle2/bkg/'
52 basf2.set_random_seed(seed)
54 basf2.set_log_level(basf2.LogLevel.ERROR)
56 main = basf2.create_path()
58 main.add_module(
'EventInfoSetter', evtNumList=evtnum)
59 main.add_module(
'Progress')
60 main.add_module(
'Gearbox')
61 main.add_module(
'Geometry', components=[
'CDC',
62 'MagneticFieldConstant4LimitedRCDC'])
63 particlegun = basf2.register_module(
'ParticleGun')
64 particlegun.param(particlegun_params)
65 main.add_module(particlegun)
66 main.add_module(
'FullSim')
68 bkgmixer = basf2.register_module(
'BeamBkgMixer')
69 bkgfiles = glob.glob(os.path.join(bkgdir,
'*[!(PXD)(ECL)]??.root'))
70 bkgmixer.param(
'backgroundFiles', bkgfiles)
71 bkgmixer.param(
'components', [
'CDC'])
72 main.add_module(bkgmixer)
73 cdcdigitizer = basf2.register_module(
'CDCDigitizer')
75 cdcdigitizer.param(
'TrigTimeJitter', 32.)
76 main.add_module(cdcdigitizer)
82 trgcdc = basf2.register_module(
'TRGCDC')
91 'FastSimulationMode': simMode,
95 trgcdc.param(trgcdc_params)
97 trgcdc.param(
'inputCollection',
'CDCHits4Trg')
98 main.add_module(trgcdc)
101 main.add_module(
'CDCTriggerETF')
110 test module to compare the output of TRGCDC and CDCTriggerETF
115 give info for both modules and warnings in the case of mismatches
119 newT0 =
Belle2.PyStoreObj(
"BinnedEventT0").obj().getBinnedEventT0(Belle2.Const.CDC)
123 basf2.B2INFO(
"T0 %d" % oldT0)
125 basf2.B2WARNING(
"old T0 %d, new T0 %d" % (oldT0, newT0))
128 main.add_module(
TestModule(), logLevel=basf2.LogLevel.INFO)
134 print(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.