From 11d98d39b775395681e2b9c48ac296834218441e Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Sun, 15 Sep 2024 09:02:58 -0700 Subject: [PATCH] a few more changes for clang-format --- .../Tracking/Reco/TrackExtrapolatorTool.h | 34 ------------------- .../Tracking/Sim/MeasurementCalibrator.h | 6 ++-- .../src/Tracking/Reco/SeedFinderProcessor.cxx | 5 ++- 3 files changed, 5 insertions(+), 40 deletions(-) diff --git a/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h b/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h index 086215559..d06d06f71 100644 --- a/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h +++ b/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h @@ -57,25 +57,11 @@ class TrackExtrapolatorTool { std::optional extrapolate( const Acts::BoundTrackParameters pars, const std::shared_ptr& target_surface) { - // Just to make it explicit - // bool boundaryCheck = false; - - // auto intersection = target_surface->intersect( - // gctx_, pars.position(gctx_), pars.unitDirection(), boundaryCheck); - // mg ... Aug 2024 ... ACTs in v36 wants a BoundaryTolerence object now - // instead of boolean - // ... but by default the tolerance is inf , so just remove argument auto intersection = target_surface->intersect(gctx_, pars.position(gctx_), pars.direction()); PropagatorOptions pOptions(gctx_, mctx_); - // Acts::PropagatorOptions pOptions(gctx_, mctx_); - // pOptions.direction = intersection.intersection.pathLength >= 0 - // mg Aug 2024 .. this is a MultiInterection object now in v36, so uses - // .interections which returns a vector ...so might need to pick one - // (probably first) pOptions.direction = intersection.intersections()[0].pathLength() >= 0 ? Acts::Direction::Forward : Acts::Direction::Backward; @@ -151,15 +137,6 @@ class TrackExtrapolatorTool { std::cout << "HasSmoothed::" << hasSmoothed << std::endl; std::cout << "Filtered::" << filtered.transpose() << std::endl; } -/* - Acts::ActsScalar q; - if (hasSmoothed) - q = smoothed[Acts::eBoundQOverP] > 0 ? 1 * Acts::UnitConstants::e - : -1 * Acts::UnitConstants::e; - else - q = filtered[Acts::eBoundQOverP] > 0 ? 1 * Acts::UnitConstants::e - : -1 * Acts::UnitConstants::e; -*/ // mg Aug 2024 ... v36 takes the particle...assume electron auto partHypo{Acts::SinglyChargedParticleHypothesis::electron()}; Acts::BoundTrackParameters sp(surface.getSharedPtr(), smoothed, cov, @@ -182,25 +159,14 @@ class TrackExtrapolatorTool { const auto& cov = (ts_last).smoothedCovariance(); // Get the BoundTrackStateParameters - - // Acts::ActsScalar q = smoothed[Acts::eBoundQOverP] > 0 - // ? 1 * Acts::UnitConstants::e - // : -1 * Acts::UnitConstants::e; // assume electron for now auto partHypo{Acts::SinglyChargedParticleHypothesis::electron()}; - // Acts::BoundTrackParameters state_parameters(surface.getSharedPtr(), - // smoothed, q, cov); Acts::BoundTrackParameters state_parameters(surface.getSharedPtr(), smoothed, cov, partHypo); // One can also use directly the extrapolate method - PropagatorOptions pOptions(gctx_, mctx_); - // Acts::PropagatorOptions pOptions(gctx_, mctx_); - // pOptions.direction = Acts::Direction::Forward; - auto result = propagator_.propagate(state_parameters, *target_surface, pOptions); diff --git a/Tracking/include/Tracking/Sim/MeasurementCalibrator.h b/Tracking/include/Tracking/Sim/MeasurementCalibrator.h index 9d5e5bd26..9e08ef0f8 100644 --- a/Tracking/include/Tracking/Sim/MeasurementCalibrator.h +++ b/Tracking/include/Tracking/Sim/MeasurementCalibrator.h @@ -58,7 +58,7 @@ class LdmxMeasurementCalibrator { void calibrate(const Acts::GeometryContext& /*gctx*/, const Acts::CalibrationContext& /*cctx*/, const Acts::SourceLink& genericSourceLink /*sourceLink*/, - typename traj_t::TrackStateProxy trackState) const { + typename traj_t::TrackStateProxy trackState) const { ActsExamples::IndexSourceLink sourceLink{ genericSourceLink.get()}; assert(m_measurements and @@ -79,8 +79,8 @@ class LdmxMeasurementCalibrator { local_cov(0, 0) = meas.getLocalCovariance()[0]; local_cov(1, 1) = meas.getLocalCovariance()[1]; tsCalCov.setZero(); - // make tsCalCov 2x2 block the local_cov we just set - tsCalCov.block(0, 0, 2, 2) = local_cov; + // make tsCalCov 2x2 block the local_cov we just set + tsCalCov.block(0, 0, 2, 2) = local_cov; Acts::ActsMatrix<2, 6> projector; projector.setZero(); diff --git a/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx b/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx index c71ba0d33..d2e62fdaf 100644 --- a/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx +++ b/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx @@ -156,13 +156,12 @@ void SeedFinderProcessor::produce(framework::Event& event) { groups_map.clear(); // set the seeding strategy // strategy is a list of layers from which to make the seed - // this must include 5 layers; layer numbering starts at 0. + // this must include 5 layers; layer numbering starts at 0. // std::vector strategy = {9,10,11,12,13}; std::vector strategy = {0, 1, 2, 3, 4}; bool success = GroupStrips(measurements, strategy); if (success) FindSeedsFromMap(seed_tracks, target_pseudo_meas); - // currently, we only use a single strategy but eventually // we will use more. Below is an example of how to add them /* @@ -355,7 +354,7 @@ ldmx::Track SeedFinderProcessor::SeedTracker( Acts::BoundVector stddev; // sigma set to 75% of momentum - double sigma_p = 0.75 * p * Acts::UnitConstants::GeV; + double sigma_p = 0.75 * p * Acts::UnitConstants::GeV; stddev[Acts::eBoundLoc0] = inflate_factors_[Acts::eBoundLoc0] * 2 * Acts::UnitConstants::mm; stddev[Acts::eBoundLoc1] =