Skip to content

Commit

Permalink
fix: orthogonal seeding configuration with Python bindings (#1605)
Browse files Browse the repository at this point in the history
The `SeedingOrthogonalAlgorithm` configuration is overwriting the configuration from the Python modules in `reconstruction.py`. I do not think the configuration needs to be defined in `SeedingOrthogonalAlgorithm.hpp` as well, since it is already defined in `SeedFinderOrthogonalConfig.hpp`. 

Also, I removed from `reconstruction.py` some features that are not yet available in orthogonal seeding or that will not be inplemented (for example, features related to the grid).
  • Loading branch information
LuisFelipeCoelho authored Oct 24, 2022
1 parent f20738e commit 4b9d9c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,6 @@ class SeedingOrthogonalAlgorithm final : public BareAlgorithm {

Acts::SeedFilterConfig seedFilterConfig;
Acts::SeedFinderOrthogonalConfig<SimSpacePoint> seedFinderConfig;

float rMax = 200.;
float deltaRMinTopSP = 1.;
float deltaRMaxTopSP = 60.;
float deltaRMinBottomSP = 1.;
float deltaRMaxBottomSP = 60.;
float collisionRegionMin = -250;
float collisionRegionMax = 250.;
float zMin = -2000.;
float zMax = 2000.;
float maxSeedsPerSpM = 1;
float cotThetaMax = 7.40627; // 2.7 eta
float sigmaScattering = 5;
float radLengthPerSeed = 0.1;
float minPt = 500.;
float bFieldInZ = 0.00199724;
float beamPosX = 0;
float beamPosY = 0;
float impactMax = 3.;
};

/// Construct the seeding algorithm.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,15 @@ ActsExamples::SeedingOrthogonalAlgorithm::SeedingOrthogonalAlgorithm(
if (m_cfg.outputSeeds.empty()) {
throw std::invalid_argument("Missing seeds output collection");
}
if (m_cfg.seedFilterConfig.maxSeedsPerSpM !=
m_cfg.seedFinderConfig.maxSeedsPerSpM) {
throw std::invalid_argument("Inconsistent config maxSeedsPerSpM");
}

// construct seed filter
Acts::SeedFilterConfig filterCfg;
filterCfg.maxSeedsPerSpM = m_cfg.maxSeedsPerSpM;
m_cfg.seedFinderConfig.seedFilter =
std::make_unique<Acts::SeedFilter<SimSpacePoint>>(
Acts::SeedFilter<SimSpacePoint>(filterCfg));

m_cfg.seedFinderConfig.rMax = m_cfg.rMax;
m_cfg.seedFinderConfig.deltaRMinTopSP = m_cfg.deltaRMinTopSP;
m_cfg.seedFinderConfig.deltaRMaxTopSP = m_cfg.deltaRMaxTopSP;
m_cfg.seedFinderConfig.deltaRMinBottomSP = m_cfg.deltaRMinBottomSP;
m_cfg.seedFinderConfig.deltaRMaxBottomSP = m_cfg.deltaRMaxBottomSP;
m_cfg.seedFinderConfig.collisionRegionMin = m_cfg.collisionRegionMin;
m_cfg.seedFinderConfig.collisionRegionMax = m_cfg.collisionRegionMax;
m_cfg.seedFinderConfig.zMin = m_cfg.zMin;
m_cfg.seedFinderConfig.zMax = m_cfg.zMax;
m_cfg.seedFinderConfig.maxSeedsPerSpM = m_cfg.maxSeedsPerSpM;
m_cfg.seedFinderConfig.cotThetaMax = m_cfg.cotThetaMax;
m_cfg.seedFinderConfig.sigmaScattering = m_cfg.sigmaScattering;
m_cfg.seedFinderConfig.radLengthPerSeed = m_cfg.radLengthPerSeed;
m_cfg.seedFinderConfig.minPt = m_cfg.minPt;
m_cfg.seedFinderConfig.bFieldInZ = m_cfg.bFieldInZ;
m_cfg.seedFinderConfig.beamPos =
Acts::Vector2(m_cfg.beamPosX, m_cfg.beamPosY);
m_cfg.seedFinderConfig.impactMax = m_cfg.impactMax;
Acts::SeedFilter<SimSpacePoint>(m_cfg.seedFilterConfig));

// calculation of scattering using the highland formula
// convert pT to p once theta angle is known
Expand Down
10 changes: 0 additions & 10 deletions Examples/Python/python/acts/examples/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,6 @@ def addSeeding(
if seedFinderConfigArg.deltaRBottomSP[1] is None
else seedFinderConfigArg.deltaRBottomSP[1]
),
deltaRMiddleMinSPRange=seedFinderConfigArg.deltaRMiddleSPRange[0],
deltaRMiddleMaxSPRange=seedFinderConfigArg.deltaRMiddleSPRange[1],
collisionRegionMin=seedFinderConfigArg.collisionRegion[0],
collisionRegionMax=seedFinderConfigArg.collisionRegion[1],
zMin=seedFinderConfigArg.z[0],
Expand All @@ -462,16 +460,8 @@ def addSeeding(
bFieldInZ=seedFinderConfigArg.bFieldInZ,
impactMax=seedFinderConfigArg.impactMax,
interactionPointCut=seedFinderConfigArg.interactionPointCut,
arithmeticAverageCotTheta=seedFinderConfigArg.arithmeticAverageCotTheta,
deltaZMax=seedFinderConfigArg.deltaZMax,
maxPtScattering=seedFinderConfigArg.maxPtScattering,
zBinEdges=seedFinderConfigArg.zBinEdges,
skipPreviousTopSP=seedFinderConfigArg.skipPreviousTopSP,
zBinsCustomLooping=seedFinderConfigArg.zBinsCustomLooping,
rRangeMiddleSP=seedFinderConfigArg.rRangeMiddleSP,
useVariableMiddleSPRange=seedFinderConfigArg.useVariableMiddleSPRange,
binSizeR=seedFinderConfigArg.binSizeR,
forceRadialSorting=seedFinderConfigArg.forceRadialSorting,
seedConfirmation=seedFinderConfigArg.seedConfirmation,
beamPos=(
None
Expand Down

0 comments on commit 4b9d9c4

Please sign in to comment.