17import simulation
as si
18import reconstruction
as re
22parser = argparse.ArgumentParser(description=
"Generates nbar events and save TOP timing fits to neutral clusters")
23parser.add_argument(
'--mom', default=1, help=
'Momentum of nbars to generate [GeV/c]')
24parser.add_argument(
'--saveFits', action=
'store_true', default=
False, help=
'Flag to save plots of RooFits')
25parser.add_argument(
'--minClusterE', type=float, default=0.5, help=
'Minimum (incl.) clusterE to be considered for timing')
26parser.add_argument(
'--minNphotons', type=int, default=2, help=
'Minimum (incl.) no. of Cherenkov photons for fit')
27parser.add_argument(
'--minClusterNHits', type=float, default=1, help=
'Minimum (incl.) no. of crystals in cluster required')
28parser.add_argument(
'--includeSlotsWithTracks', action=
'store_true', default=
False, help=
'Flag to save plots of RooFits')
29parser.add_argument(
'--saveMoreFitParams', action=
'store_true', default=
False,
30 help=
'Development flag to save more RooFit params (e.g. RooFit errors, fit params)')
32args = parser.parse_args()
34path = b2.create_path()
36path.add_module(
"EventInfoSetter", evtNumList=100)
37path.add_module(
"EventInfoPrinter")
44 momentumGeneration=
"fixed",
46 thetaGeneration=
"fixed",
48 phiGeneration=
"fixed",
50 vertexGeneration=
"fixed",
54 independentVertices=
False,
62 momentumGeneration=
"fixed",
63 momentumParams=[float(args.mom)],
64 thetaGeneration=
"uniform",
66 phiGeneration=
"uniform",
68 vertexGeneration=
"fixed",
72 independentVertices=
False,
73).set_name(
"AntiNeutronGun")
76si.add_simulation(path=path)
77re.add_reconstruction(path=path)
80path.add_module(
"TOPBackSplashTiming",
81 saveFits=args.saveFits,
82 minClusterE=args.minClusterE,
83 minNphotons=args.minNphotons,
84 minClusterNHits=args.minClusterNHits,
85 includeSlotsWithTracks=args.includeSlotsWithTracks,
86 saveMoreFitParams=args.saveMoreFitParams,
92path.add_module(
"Progress")
94b2.process(path, calculateStatistics=
True)
add_mdst_output(path, mc=True, filename='mdst.root', additionalBranches=[], dataDescription=None)