20 <output>muon-KLMValidation.root</output>
21 <contact>Laura.Salutari@uniroma3.it</contact>
22 <description>Create events with 1 muon track for BKLM and EKLM validation.</description>
28 import simulation
as sim
29 import reconstruction
as rec
31 basf2.set_random_seed(981543)
32 basf2.set_log_level(basf2.LogLevel.ERROR)
34 output_filename =
'../muon-KLMValidation.root'
35 basf2.B2INFO(
'The output file name is ' + output_filename)
37 main_path = basf2.create_path()
39 main_path.add_module(
'EventInfoSetter', evtNumList=2000)
41 main_path.add_module(
'Progress')
42 main_path.add_module(
'ProgressBar')
44 main_path.add_module(
'ParticleGun',
48 momentumGeneration=
'uniform',
49 momentumParams=[0.5, 5.0],
50 thetaGeneration=
'uniformCos',
51 thetaParams=[18., 155.],
52 phiGeneration=
'uniform',
54 vertexGeneration=
'fixed',
59 sim.add_simulation(path=main_path)
60 rec.add_reconstruction(path=main_path)
62 main_path.add_module(
'RootOutput',
63 outputFileName=output_filename,
64 branchNames=[
'MCParticles',
'KLMMuidLikelihoods',
'KLMDigits',
'KLMHit2ds',
'EventT0'])
66 main_path.add_module(
'Progress')
67 basf2.process(main_path)
68 print(basf2.statistics)