12 ParticleSelectorConfig,
20 addAmbiguityResolution,
21 AmbiguityResolutionConfig,
22 addAmbiguityResolutionML,
23 AmbiguityResolutionMLConfig,
27 from common
import getOpenDataDetectorDirectory
30 parser = argparse.ArgumentParser(description=
"Full chain with the OpenDataDetector")
32 parser.add_argument(
"--events",
"-n", help=
"Number of events", type=int, default=100)
34 "--geant4", help=
"Use Geant4 instead of fatras", action=
"store_true"
38 help=
"Use Pythia8 (ttbar, pile-up 200) instead of particle gun",
43 help=
"Use the Ml Ambiguity Solver instead of the classical one",
47 args = vars(parser.parse_args())
50 g4_simulation = args[
"geant4"]
51 ambiguity_MLSolver = args[
"MLSolver"]
52 u = acts.UnitConstants
54 outputDir = pathlib.Path.cwd() /
"odd_output"
57 oddMaterialMap = geoDir /
"data/odd-material-maps.root"
58 oddDigiConfig = geoDir /
"config/odd-digi-smearing-config.json"
59 oddSeedingSel = geoDir /
"config/odd-seeding-config.json"
60 oddMaterialDeco = acts.IMaterialDecorator.fromFile(oddMaterialMap)
63 geoDir, mdecorator=oddMaterialDeco
65 field = acts.ConstantBField(acts.Vector3(0.0, 0.0, 2.0 * u.T))
66 rnd = acts.examples.RandomNumbers(seed=42)
69 events=args[
"events"],
71 outputDir=
str(outputDir),
81 vtxGen=acts.examples.GaussianVertexGenerator(
82 mean=acts.Vector4(0, 0, 0, 0),
83 stddev=acts.Vector4(0.0125 * u.mm, 0.0125 * u.mm, 55.5 * u.mm, 1.0 * u.ns),
91 hardProcess=[
"Top:qqbar2ttbar=on"],
93 vtxGen=acts.examples.GaussianVertexGenerator(
94 mean=acts.Vector4(0, 0, 0, 0),
95 stddev=acts.Vector4(0.0125 * u.mm, 0.0125 * u.mm, 55.5 * u.mm, 5.0 * u.ns),
98 outputDirRoot=outputDir,
102 if s.config.numThreads != 1:
103 raise ValueError(
"Geant 4 simulation does not support multi-threading")
114 rho=(0.0, 24 * u.mm),
115 absZ=(0.0, 1.0 * u.m),
117 pt=(150 * u.MeV,
None),
120 outputDirRoot=outputDir,
123 killVolume=trackingGeometry.worldVolume,
124 killAfterTime=25 * u.ns,
132 rho=(0.0, 24 * u.mm),
133 absZ=(0.0, 1.0 * u.m),
135 pt=(150 * u.MeV,
None),
140 enableInteractions=
True,
141 outputDirRoot=outputDir,
150 digiConfigFile=oddDigiConfig,
151 outputDirRoot=outputDir,
160 TruthSeedRanges(pt=(1.0 * u.GeV,
None), eta=(-3.0, 3.0), nHits=(9,
None))
163 geoSelectionConfigFile=oddSeedingSel,
164 outputDirRoot=outputDir,
172 pt=(1.0 * u.GeV
if ttbar
else 0.0,
None),
174 loc0=(-4.0 * u.mm, 4.0 * u.mm),
177 outputDirRoot=outputDir,
182 if ambiguity_MLSolver:
186 maximumSharedHits=3, maximumIterations=1000000, nMeasurementsMin=7
188 outputDirRoot=outputDir,
190 onnxModelFile=os.path.dirname(__file__)
191 +
"/MLAmbiguityResolution/duplicateClassifier.onnx",
197 maximumSharedHits=3, maximumIterations=1000000, nMeasurementsMin=7
199 outputDirRoot=outputDir,
207 vertexFinder=VertexFinder.Iterative,
208 outputDirRoot=outputDir,