16print(
"The input HEPEvt files needed to run SR MC sim are located in @kekcc:~igal/src/beast/SR")
19 print(
"Usage: requires 2 arguments")
20 print(
"Argument 1: (SynchRad_HER | SynchRad_LER | test)")
21 print(
"Argument 2: file number")
22 print(
"Argument 3: ROOT output directory path")
32outputfilename = output_dir +
"/output_" + name +
"_" + num +
".root"
46b2.set_log_level(b2.LogLevel.ERROR)
55eventinfosetter = b2.register_module(
'EventInfoSetter')
56hepevtreader = b2.register_module(
'HepevtInput')
61if name ==
"SynchRad_HER":
64 FileIn =
"Ph2_dt_4_8HER21445M.HEPEvt"
66 hepevtreader.param(
'inputFileList', [FileIn] * 2340)
67elif name ==
"SynchRad_LER":
70 FileIn =
"Ph2_dt_4_8LER35124M.HEPEvt"
72 hepevtreader.param(
'inputFileList', [FileIn] * 2340)
77 FileIn =
"Ph2_dt_4_8HER21445MK2M.HEPEvt"
79 hepevtreader.param(
'inputFileList', [FileIn] * 5)
86gearbox = b2.register_module(
'Gearbox')
87geometry = b2.register_module(
'Geometry')
88simulation = b2.register_module(
'FullSim')
89tagSetter = b2.register_module(
'BeamBkgTagSetter')
90progress = b2.register_module(
'Progress')
95eventinfosetter.param(
'evtNumList', [1000000000])
96eventinfosetter.param(
'runList', [1])
97eventinfosetter.param(
'expList', [1])
100gearbox.param(
'fileName',
'/geometry/Beast2_phase2.xml')
106geometry.set_log_level(b2.LogLevel.INFO)
109simulation.param(
'PhysicsList',
"QGSP_BERT_EMV")
111simulation.param(
'UICommandsAtIdle', [
"/process/inactivate nKiller"])
112simulation.param(
"StoreAllSecondaries",
True)
114simulation.param(
"SecondariesEnergyCut", 0.000001)
116main = b2.create_path()
118main.add_module(eventinfosetter)
119main.add_module(progress)
120main.add_module(hepevtreader)
122main.add_module(gearbox)
123main.add_module(geometry)
124main.add_module(simulation)
127tagSetter.param(
'backgroundType', tagname)
128tagSetter.param(
'realTime', realTime)
129main.add_module(tagSetter)
130emptyPath = b2.create_path()
131tagSetter.if_false(emptyPath)
132b2.print_params(tagSetter)
135rootoutput = b2.register_module(
'RootOutput')
136rootoutput.param(
'outputFileName', outputfilename)
137rootoutput.param(
'updateFileCatalog',
False)
141rootoutput.param(
'branchNames',
144 "SVDTrueHitsToSVDSimHits",
146 "MCParticleToPXDSimHits",
163MIP_to_PE = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]
164he3digi = b2.register_module(
'He3Digitizer')
165he3digi.param(
'conversionFactor', 0.303132019)
166he3digi.param(
'useMCParticles',
False)
167main.add_module(he3digi)
168diadigi = b2.register_module(
'BeamDigitizer')
169diadigi.param(
'WorkFunction', 13.25)
170diadigi.param(
'FanoFactor', 0.382)
171main.add_module(diadigi)
172pindigi = b2.register_module(
'PinDigitizer')
173pindigi.param(
'WorkFunction', 3.64)
174pindigi.param(
'FanoFactor', 0.13)
175main.add_module(pindigi)
176clawsdigi = b2.register_module(
'ClawsDigitizer')
177clawsdigi.param(
'ScintCell', 16)
178clawsdigi.param(
'C_keV_to_MIP', 457.114)
179clawsdigi.param(
'C_MIP_to_PE', MIP_to_PE)
180clawsdigi.param(
'PEthres', 1.0)
181main.add_module(clawsdigi)
182qcssdigi = b2.register_module(
'QcsmonitorDigitizer')
183qcssdigi.param(
'ScintCell', 40)
184qcssdigi.param(
'C_keV_to_MIP', 1629.827)
185qcssdigi.param(
'C_MIP_to_PE', 15.0)
186qcssdigi.param(
'MIPthres', 0.5)
187main.add_module(qcssdigi)
188fangsdigi = b2.register_module(
'FANGSDigitizer')
189main.add_module(fangsdigi)
190tpcdigi = b2.register_module(
'TpcDigitizer')
191main.add_module(tpcdigi)
193main.add_module(rootoutput)