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