forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'LSP' of https://github.com/Rosie-Hasan/acts into LSP
- Loading branch information
Showing
5 changed files
with
270 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
#!/usr/bin/env python3 | ||
import pathlib, acts, acts.examples, acts.examples.itk | ||
from acts.examples.simulation import ( | ||
addParticleGun, | ||
MomentumConfig, | ||
EtaConfig, | ||
ParticleConfig, | ||
addPythia8, | ||
addFatras, | ||
ParticleSelectorConfig, | ||
addDigitization, | ||
) | ||
from acts.examples.reconstruction import ( | ||
addSeeding, | ||
SeedingAlgorithm, | ||
TruthSeedRanges, | ||
addCKFTracks, | ||
CKFPerformanceConfig, | ||
TrackSelectorRanges, | ||
addAmbiguityResolution, | ||
AmbiguityResolutionConfig, | ||
addVertexFitting, | ||
VertexFinder, | ||
) | ||
|
||
ttbar_pu200 = False | ||
u = acts.UnitConstants | ||
geo_dir = pathlib.Path("acts-itk") | ||
outputDir = pathlib.Path.cwd() / "itk_output" | ||
# acts.examples.dump_args_calls(locals()) # show acts.examples python binding calls | ||
|
||
detector, trackingGeometry, decorators = acts.examples.itk.buildITkGeometry(geo_dir) | ||
field = acts.examples.MagneticFieldMapXyz(str(geo_dir / "bfield/ATLAS-BField-xyz.root")) | ||
rnd = acts.examples.RandomNumbers(seed=42) | ||
|
||
s = acts.examples.Sequencer(events=100, numThreads=1, outputDir=str(outputDir)) | ||
|
||
if not ttbar_pu200: | ||
addParticleGun( | ||
s, | ||
MomentumConfig(1.0 * u.GeV, 10.0 * u.GeV, transverse=True), | ||
EtaConfig(-4.0, 4.0, uniform=True), | ||
ParticleConfig(2, acts.PdgParticle.eMuon, randomizeCharge=True), | ||
rnd=rnd, | ||
) | ||
else: | ||
addPythia8( | ||
s, | ||
hardProcess=["Top:qqbar2ttbar=on"], | ||
npileup=200, | ||
vtxGen=acts.examples.GaussianVertexGenerator( | ||
stddev=acts.Vector4(0.0125 * u.mm, 0.0125 * u.mm, 55.5 * u.mm, 5.0 * u.ns), | ||
mean=acts.Vector4(0, 0, 0, 0), | ||
), | ||
rnd=rnd, | ||
outputDirRoot=outputDir, | ||
) | ||
|
||
addFatras( | ||
s, | ||
trackingGeometry, | ||
field, | ||
rnd=rnd, | ||
preSelectParticles=ParticleSelectorConfig( | ||
eta=(-4.0, 4.0), pt=(150 * u.MeV, None), removeNeutral=True | ||
) | ||
if ttbar_pu200 | ||
else ParticleSelectorConfig(), | ||
outputDirRoot=outputDir, | ||
) | ||
|
||
addDigitization( | ||
s, | ||
trackingGeometry, | ||
field, | ||
digiConfigFile=geo_dir / "itk-hgtd/itk-smearing-config.json", #change this file to make it do digitization | ||
outputDirRoot=outputDir, | ||
rnd=rnd, | ||
) | ||
|
||
addSeeding( | ||
s, | ||
trackingGeometry, | ||
field, | ||
TruthSeedRanges(pt=(1.0 * u.GeV, None), eta=(-4.0, 4.0), nHits=(9, None)) | ||
if ttbar_pu200 | ||
else TruthSeedRanges(), | ||
seedingAlgorithm=SeedingAlgorithm.FTF, | ||
*acts.examples.itk.itkSeedingAlgConfig( | ||
acts.examples.itk.InputSpacePointsType.PixelSpacePoints | ||
), | ||
geoSelectionConfigFile=geo_dir / "itk-hgtd/geoSelection-ITk.json", | ||
layerMappingConfigFile = geo_dir / "itk-hgtd/ACTS_FTF_mapinput.csv", | ||
fastrack_inputConfigFile = geo_dir / "itk-hgtd/binTables_ITK_RUN4.txt", | ||
outputDirRoot=outputDir, | ||
) | ||
|
||
# addCKFTracks( | ||
# s, | ||
# trackingGeometry, | ||
# field, | ||
# CKFPerformanceConfig(ptMin=1.0 * u.GeV if ttbar_pu200 else 0.0, nMeasurementsMin=6), | ||
# TrackSelectorRanges(pt=(1.0 * u.GeV, None), absEta=(None, 4.0)), | ||
# outputDirRoot=outputDir, | ||
# ) | ||
|
||
# addAmbiguityResolution( | ||
# s, | ||
# AmbiguityResolutionConfig(maximumSharedHits=3), | ||
# CKFPerformanceConfig(ptMin=1.0 * u.GeV if ttbar_pu200 else 0.0, nMeasurementsMin=6), | ||
# outputDirRoot=outputDir, | ||
# ) | ||
|
||
# addVertexFitting( | ||
# s, | ||
# field, | ||
# vertexFinder=VertexFinder.Iterative, | ||
# outputDirRoot=outputDir, | ||
# ) | ||
|
||
s.run() |