Skip to content

Commit

Permalink
refactor: Replace magic seeding field in Examples (#2577)
Browse files Browse the repository at this point in the history
I believe this is not accurate anymore since we switched out the magic
number in the seeding

#2132

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
andiwand and kodiakhq[bot] committed Oct 26, 2023
1 parent df34a3a commit 0027d4c
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 13 deletions.
Binary file modified CI/physmon/reference/performance_amvf_gridseeder_ttbar_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_ttbar_hist.root
Binary file not shown.
2 changes: 1 addition & 1 deletion CI/physmon/workflows/physmon_track_finding_ttbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
minPt=500 * u.MeV,
impactMax=3 * u.mm,
),
SeedFinderOptionsArg(bFieldInZ=1.99724 * u.T, beamPos=(0.0, 0.0)),
SeedFinderOptionsArg(bFieldInZ=2 * u.T, beamPos=(0.0, 0.0)),
TruthEstimatedSeedingAlgorithmConfigArg(deltaR=(10.0 * u.mm, None)),
seedingAlgorithm=SeedingAlgorithm.Default,
geoSelectionConfigFile=setup.geoSel,
Expand Down
2 changes: 1 addition & 1 deletion Examples/Run/Reconstruction/Common/RecCKFTracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ int runRecCKFTracks(
seedingCfg.gridConfig.minPt = 500._MeV;
seedingCfg.seedFinderConfig.minPt = seedingCfg.gridConfig.minPt;

seedingCfg.gridOptions.bFieldInZ = 1.99724_T;
seedingCfg.gridOptions.bFieldInZ = 2_T;

seedingCfg.seedFinderOptions.bFieldInZ = seedingCfg.gridOptions.bFieldInZ;
seedingCfg.seedFinderOptions.beamPos = {0_mm, 0_mm};
Expand Down
2 changes: 1 addition & 1 deletion Examples/Run/Reconstruction/Common/SeedingExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int runSeedingExample(
seedingCfg.gridConfig.minPt = 500._MeV;
seedingCfg.seedFinderConfig.minPt = seedingCfg.gridConfig.minPt;

seedingCfg.gridOptions.bFieldInZ = 1.99724_T;
seedingCfg.gridOptions.bFieldInZ = 2_T;

seedingCfg.seedFinderOptions.bFieldInZ = seedingCfg.gridOptions.bFieldInZ;
seedingCfg.seedFinderOptions.beamPos = {0_mm, 0_mm};
Expand Down
3 changes: 1 addition & 2 deletions Examples/Scripts/Optimization/ckf.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def runCKFTracks(
DeltaRMin=1.0,
DeltaRMax=60.0,
):

from acts.examples.simulation import (
addParticleGun,
EtaConfig,
Expand Down Expand Up @@ -204,7 +203,7 @@ def runCKFTracks(
minPt=500 * u.MeV,
impactMax=ImpactMax * u.mm,
),
SeedFinderOptionsArg(bFieldInZ=1.99724 * u.T, beamPos=(0.0, 0, 0)),
SeedFinderOptionsArg(bFieldInZ=2 * u.T, beamPos=(0.0, 0, 0)),
TruthEstimatedSeedingAlgorithmConfigArg(deltaR=(10.0 * u.mm, None)),
seedingAlgorithm=SeedingAlgorithm.TruthSmeared
if truthSmearedSeeded
Expand Down
3 changes: 1 addition & 2 deletions Examples/Scripts/Python/ckf_tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def runCKFTracks(
inputParticlePath: Optional[Path] = None,
s=None,
):

from acts.examples.simulation import (
addParticleGun,
EtaConfig,
Expand Down Expand Up @@ -107,7 +106,7 @@ def runCKFTracks(
minPt=500 * u.MeV,
impactMax=3 * u.mm,
),
SeedFinderOptionsArg(bFieldInZ=1.99724 * u.T, beamPos=(0.0, 0.0)),
SeedFinderOptionsArg(bFieldInZ=2 * u.T, beamPos=(0.0, 0.0)),
TruthEstimatedSeedingAlgorithmConfigArg(deltaR=(10.0 * u.mm, None)),
seedingAlgorithm=SeedingAlgorithm.TruthSmeared
if truthSmearedSeeded
Expand Down
4 changes: 2 additions & 2 deletions Examples/Scripts/Python/seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

u = acts.UnitConstants


# Graciously taken from https://stackoverflow.com/a/60750535/4280680
class EnumAction(argparse.Action):
"""
Expand Down Expand Up @@ -50,7 +51,6 @@ def runSeeding(
s=None,
seedingAlgorithm=SeedingAlgorithm.Default,
):

from acts.examples.simulation import (
addParticleGun,
EtaConfig,
Expand Down Expand Up @@ -122,7 +122,7 @@ def runSeeding(
impactMax=3 * u.mm,
),
SeedFinderOptionsArg(
bFieldInZ=1.99724 * u.T,
bFieldInZ=2 * u.T,
),
acts.logging.VERBOSE,
seedingAlgorithm=seedingAlgorithm,
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/Core/Seeding/SeedFinderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int main(int argc, char** argv) {

Acts::SeedFinderOptions options;
options.beamPos = {-.5_mm, -.5_mm};
options.bFieldInZ = 1.99724_T;
options.bFieldInZ = 2_T;

int numPhiNeighbors = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int main(int argc, char** argv) {
config = config.toInternalUnits();

Acts::SeedFinderOptions options;
options.bFieldInZ = 1.99724_T;
options.bFieldInZ = 2_T;
options.beamPos = {-.5_mm, -.5_mm};
options = options.toInternalUnits().calculateDerivedQuantities(config);

Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/Plugins/Cuda/Seeding2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) {
sfConfig.minPt = 500._MeV;
sfConfig.impactMax = 10._mm;
Acts::SeedFinderOptions sfOptions;
sfOptions.bFieldInZ = 1.99724_T;
sfOptions.bFieldInZ = 2_T;
sfOptions.beamPos = {-.5_mm, -.5_mm};

// Use a size slightly smaller than what modern GPUs are capable of. This is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ auto setupSeedFinderConfiguration()

auto setupSeedFinderOptions() {
Acts::SeedFinderOptions options;
options.bFieldInZ = 1.99724_T;
options.bFieldInZ = 2_T;
options.beamPos = {-.5_mm, -.5_mm};
return options;
}
Expand Down

0 comments on commit 0027d4c

Please sign in to comment.