Skip to content

Commit

Permalink
fix: Update full_chain_odd_LRT.py to follow full_chain_odd.py (#3977)
Browse files Browse the repository at this point in the history
In this PR full_chain_odd_LRT.py is updated according to full_chain_odd.py.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a command-line argument `--output-obj` to toggle object output.
  
- **Enhancements**
  - Updated ambiguity resolution configuration to use mathematical constants for `phiMax` and `phiMin`.
  - Added new parameters for seeding and track selection to improve configurability and precision.
  - Changed the vertex fitting method to a more advanced algorithm.

These updates enhance the script's functionality and improve the particle tracking and reconstruction processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
delitez authored Dec 12, 2024
1 parent 72fc7cb commit 2d5ed72
Showing 1 changed file with 45 additions and 6 deletions.
51 changes: 45 additions & 6 deletions Examples/Scripts/Python/full_chain_odd_LRT.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import argparse
import pathlib
import math

import acts
import acts.examples
Expand All @@ -12,6 +13,7 @@
EtaConfig,
PhiConfig,
ParticleConfig,
ParticleSelectorConfig,
addPythia8,
addFatras,
addGeant4,
Expand Down Expand Up @@ -134,6 +136,12 @@
default=True,
action=argparse.BooleanOptionalAction,
)
parser.add_argument(
"--output-obj",
help="Switch obj output on/off",
default=True,
action=argparse.BooleanOptionalAction,
)

args = parser.parse_args()

Expand Down Expand Up @@ -224,7 +232,6 @@
ParticleConfig(
args.gun_particles, acts.PdgParticle.eMuon, randomizeCharge=True
),
outputDirRoot=pathlib.Path("/home/aicha/Atlas/NewVertices"),
vtxGen=acts.examples.GaussianDisplacedVertexPositionGenerator(
rMean=2,
rStdDev=0.0125 * u.mm,
Expand Down Expand Up @@ -278,6 +285,7 @@
),
outputDirRoot=outputDir if args.output_root else None,
outputDirCsv=outputDir if args.output_csv else None,
outputDirObj=outputDir if args.output_obj else None,
rnd=rnd,
killVolume=trackingGeometry.highestTrackingVolume,
killAfterTime=25 * u.ns,
Expand Down Expand Up @@ -306,6 +314,7 @@
enableInteractions=True,
outputDirRoot=outputDir if args.output_root else None,
outputDirCsv=outputDir if args.output_csv else None,
outputDirObj=outputDir if args.output_obj else None,
rnd=rnd,
)

Expand All @@ -324,6 +333,16 @@
s,
trackingGeometry,
field,
initialSigmas=[
1 * u.mm,
1 * u.mm,
1 * u.degree,
1 * u.degree,
0.1 * u.e / u.GeV,
1 * u.ns,
],
initialSigmaPtRel=0.1,
initialVarInflation=[1.0] * 6,
geoSelectionConfigFile=oddSeedingSel,
outputDirRoot=outputDir if args.output_root else None,
outputDirCsv=outputDir if args.output_csv else None,
Expand Down Expand Up @@ -354,12 +373,32 @@
maxOutliers=2,
),
CkfConfig(
chi2CutOffMeasurement=15.0,
chi2CutOffOutlier=25.0,
numMeasurementsCutOff=10,
seedDeduplication=True,
stayOnSeed=True,
pixelVolumes={16, 17, 18},
stripVolumes={23, 24, 25},
pixelVolumes=[16, 17, 18],
stripVolumes=[23, 24, 25],
maxPixelHoles=1,
maxStripHoles=2,
constrainToVolumes=[
2, # beam pipe
32,
4, # beam pip gap
16,
17,
18, # pixel
20, # PST
23,
24,
25, # short strip
26,
8, # long strip gap
28,
29,
30, # long strip
],
),
outputDirRoot=outputDir if args.output_root else None,
outputDirCsv=outputDir if args.output_csv else None,
Expand Down Expand Up @@ -388,8 +427,8 @@
maxSharedTracksPerMeasurement=2,
pTMax=1400,
pTMin=0.5,
phiMax=3.14,
phiMin=-3.14,
phiMax=math.pi,
phiMin=-math.pi,
etaMax=4,
etaMin=-4,
useAmbiguityFunction=False,
Expand All @@ -413,7 +452,7 @@
addVertexFitting(
s,
field,
vertexFinder=VertexFinder.Iterative,
vertexFinder=VertexFinder.AMVF,
outputDirRoot=outputDir if args.output_root else None,
)

Expand Down

0 comments on commit 2d5ed72

Please sign in to comment.