Skip to content

Commit

Permalink
reverting non c++ files to before clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosie-Hasan committed Aug 18, 2023
1 parent cad9190 commit 9935609
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 79 deletions.
9 changes: 7 additions & 2 deletions Core/src/TrackFinding/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
target_sources(ActsCore PRIVATE CombinatorialKalmanFilterError
.cpp MeasurementSelector.cpp FasTrackConnector.cpp)
target_sources(
ActsCore
PRIVATE
CombinatorialKalmanFilterError.cpp
MeasurementSelector.cpp
FasTrackConnector.cpp
)
43 changes: 28 additions & 15 deletions Examples/Algorithms/TrackFinding/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
add_library(ActsExamplesTrackFinding SHARED src /
AmbiguityResolutionAlgorithm.cpp src / SeedingAlgorithm.cpp src /
SeedingOrthogonalAlgorithm.cpp src / SpacePointMaker.cpp src /
TrackFindingAlgorithm.cpp src /
TrackFindingAlgorithmFunction.cpp src /
HoughTransformSeeder.cpp src /
TrackParamsEstimationAlgorithm.cpp src / SeedingFTFAlgorithm.cpp)
add_library(
ActsExamplesTrackFinding SHARED
src/AmbiguityResolutionAlgorithm.cpp
src/SeedingAlgorithm.cpp
src/SeedingOrthogonalAlgorithm.cpp
src/SpacePointMaker.cpp
src/TrackFindingAlgorithm.cpp
src/TrackFindingAlgorithmFunction.cpp
src/HoughTransformSeeder.cpp
src/TrackParamsEstimationAlgorithm.cpp
src/SeedingFTFAlgorithm.cpp
)

target_include_directories(
ActsExamplesTrackFinding PUBLIC
$<BUILD_INTERFACE : ${CMAKE_CURRENT_SOURCE_DIR} / include>)
target_include_directories(
ActsExamplesTrackFinding
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)

target_link_libraries(
ActsExamplesTrackFinding PUBLIC ActsCore ActsExamplesFramework
ActsExamplesIoJson ActsExamplesMagneticField)
target_link_libraries(
ActsExamplesTrackFinding
PUBLIC
ActsCore
ActsExamplesFramework
ActsExamplesIoJson
ActsExamplesMagneticField
)

install(TARGETS ActsExamplesTrackFinding LIBRARY DESTINATION ${
CMAKE_INSTALL_LIBDIR})
install(
TARGETS ActsExamplesTrackFinding
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
59 changes: 31 additions & 28 deletions Examples/Python/python/acts/examples/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def addSeeding(
else:
selectedParticles = inputParticles

#Create starting parameters from either particle smearing or combined seed
#finding and track parameters estimation
# Create starting parameters from either particle smearing or combined seed
# finding and track parameters estimation
if seedingAlgorithm == SeedingAlgorithm.TruthSmeared:
logger.info("Using smeared truth particles for seeding")
addTruthSmearedSeeding(
Expand All @@ -263,7 +263,7 @@ def addSeeding(
spacePoints = addSpacePointsMaking(
s, trackingGeometry, geoSelectionConfigFile, logLevel
)
#Run either : truth track finding or seeding
# Run either: truth track finding or seeding
if seedingAlgorithm == SeedingAlgorithm.TruthEstimated:
logger.info("Using truth track finding from space points for seeding")
seeds = addTruthEstimatedSeeding(
Expand Down Expand Up @@ -308,7 +308,7 @@ def addSeeding(
)
elif seedingAlgorithm == SeedingAlgorithm.FTF:
logger.info("Using FTF seeding")
#output of algs changed, only one output now
#output of algs changed, only one output now
seeds = addFTFSeeding(
s,
spacePoints,
Expand Down Expand Up @@ -409,13 +409,13 @@ def addTruthSmearedSeeding(
"""

rnd = rnd or acts.examples.RandomNumbers(seed=42)
#Run particle smearing
# Run particle smearing
ptclSmear = acts.examples.ParticleSmearing(
level=logLevel,
inputParticles=selectedParticles,
outputTrackParameters="estimatedparameters",
randomNumbers=rnd,
#gaussian sigmas to smear particle parameters
# gaussian sigmas to smear particle parameters
**acts.examples.defaultKWArgs(
sigmaD0=particleSmearingSigmas.d0,
sigmaD0PtA=particleSmearingSigmas.d0PtA,
Expand Down Expand Up @@ -759,6 +759,8 @@ def addHoughTransformSeeding(
logLevel = acts.examples.defaultLogging(sequence, logLevel)()
ht = acts.examples.HoughTransformSeeder(config=config, level=logLevel)
sequence.addAlgorithm(ht)
# potentially HT can be extended to also produce seeds, but it is not yet implemented yet
# configuration option (outputSeeds) exists
return config.outputProtoTracks, ""

def addFTFSeeding(
Expand Down Expand Up @@ -814,6 +816,7 @@ def addFTFSeeding(
numSeedIncrement=seedFilterConfigArg.numSeedIncrement,
seedWeightIncrement=seedFilterConfigArg.seedWeightIncrement,
seedConfirmation=seedFilterConfigArg.seedConfirmation,
#curvatureSortingInFilter=seedFilterConfigArg.curvatureSortingInFilter,
maxSeedsPerSpMConf=seedFilterConfigArg.maxSeedsPerSpMConf,
maxQualitySeedsPerSpMConf=seedFilterConfigArg.maxQualitySeedsPerSpMConf,
useDeltaRorTopRadius=seedFilterConfigArg.useDeltaRorTopRadius,
Expand Down Expand Up @@ -1024,9 +1027,9 @@ def addCKFTracks(

customLogLevel = acts.examples.defaultLogging(s, logLevel)

#Setup the track finding algorithm with CKF
#It takes all the source links created from truth hit smearing, seeds from
#truth particle smearing and source link selection config
# Setup the track finding algorithm with CKF
# It takes all the source links created from truth hit smearing, seeds from
# truth particle smearing and source link selection config
trackFinder = acts.examples.TrackFindingAlgorithm(
level=customLogLevel(),
measurementSelectorCfg=acts.MeasurementSelector.Config(
Expand Down Expand Up @@ -1113,14 +1116,14 @@ def addTrajectoryWriters(
outputDirRoot.mkdir()

if writeStates:
#write track states from CKF
# write track states from CKF
trackStatesWriter = acts.examples.RootTrajectoryStatesWriter(
level=customLogLevel(),
inputTrajectories=trajectories,
#@note The full particles collection is used here to avoid lots of warnings
#since the unselected CKF track might have a majority particle not in the
#filtered particle collection.This could be avoided when a seperate track
#selection algorithm is used.
# @note The full particles collection is used here to avoid lots of warnings
# since the unselected CKF track might have a majority particle not in the
# filtered particle collection. This could be avoided when a seperate track
# selection algorithm is used.
inputParticles="particles_selected",
inputSimHits="simhits",
inputMeasurementParticlesMap="measurement_particles_map",
Expand All @@ -1131,14 +1134,14 @@ def addTrajectoryWriters(
s.addWriter(trackStatesWriter)

if writeSummary:
#write track summary from CKF
# write track summary from CKF
trackSummaryWriter = acts.examples.RootTrajectorySummaryWriter(
level=customLogLevel(),
inputTrajectories=trajectories,
#@note The full particles collection is used here to avoid lots of warnings
#since the unselected CKF track might have a majority particle not in the
#filtered particle collection.This could be avoided when a seperate track
#selection algorithm is used.
# @note The full particles collection is used here to avoid lots of warnings
# since the unselected CKF track might have a majority particle not in the
# filtered particle collection. This could be avoided when a seperate track
# selection algorithm is used.
inputParticles="particles_selected",
inputMeasurementParticlesMap="measurement_particles_map",
filePath=str(outputDirRoot / f"tracksummary_{name}.root"),
Expand All @@ -1147,14 +1150,14 @@ def addTrajectoryWriters(
s.addWriter(trackSummaryWriter)

if writeCKFperformance:
#Write CKF performance data
# Write CKF performance data
ckfPerfWriter = acts.examples.CKFPerformanceWriter(
level=customLogLevel(),
inputParticles="truth_seeds_selected",
inputTrajectories=trajectories,
inputMeasurementParticlesMap="measurement_particles_map",
**acts.examples.defaultKWArgs(
#The bottom seed could be the first, second or third hits on the truth track
# The bottom seed could be the first, second or third hits on the truth track
nMeasurementsMin=ckfPerformanceConfig.nMeasurementsMin,
ptMin=ckfPerformanceConfig.ptMin,
truthMatchProbMin=ckfPerformanceConfig.truthMatchProbMin,
Expand Down Expand Up @@ -1261,10 +1264,10 @@ def addExaTrkX(
) -> None:
customLogLevel = acts.examples.defaultLogging(s, logLevel)

#Run the particle selection
#The pre - selection will select truth particles satisfying provided criteria
#from all particles read in by particle reader for further processing.It
#has no impact on the truth hits themselves
# Run the particle selection
# The pre-selection will select truth particles satisfying provided criteria
# from all particles read in by particle reader for further processing. It
# has no impact on the truth hits themselves
s.addAlgorithm(
acts.examples.TruthSeedSelector(
level=customLogLevel(),
Expand All @@ -1276,7 +1279,7 @@ def addExaTrkX(
)
)

#Create space points
# Create space points
s.addAlgorithm(
acts.examples.SpacePointMaker(
level=customLogLevel(),
Expand All @@ -1290,7 +1293,7 @@ def addExaTrkX(
)
)

#For now we don't configure only the common options so this works
# For now we don't configure only the common options so this works
exaTrkxModule = (
acts.examples.ExaTrkXTrackFindingTorch
if backend == ExaTrkXBackend.Torch
Expand All @@ -1315,7 +1318,7 @@ def addExaTrkX(
)
)

#Write truth track finding / seeding performance
# Write truth track finding / seeding performance
if outputDirRoot is not None:
s.addWriter(
acts.examples.TrackFinderPerformanceWriter(
Expand Down
Loading

0 comments on commit 9935609

Please sign in to comment.