Skip to content

Commit

Permalink
a few more changes for clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyyugo committed Sep 15, 2024
1 parent 35f4685 commit 11d98d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 40 deletions.
34 changes: 0 additions & 34 deletions Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,11 @@ class TrackExtrapolatorTool {
std::optional<Acts::BoundTrackParameters> extrapolate(
const Acts::BoundTrackParameters pars,
const std::shared_ptr<Acts::Surface>& 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<Acts::StepperPlainOptions,
// Acts::Navigator,ActionList, AbortList> 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;
Expand Down Expand Up @@ -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,
Expand All @@ -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<Acts::StepperPlainOptions,
// Acts::Navigator,ActionList, AbortList> pOptions(gctx_, mctx_);
// pOptions.direction = Acts::Direction::Forward;

auto result =
propagator_.propagate(state_parameters, *target_surface, pOptions);

Expand Down
6 changes: 3 additions & 3 deletions Tracking/include/Tracking/Sim/MeasurementCalibrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<ActsExamples::IndexSourceLink>()};
assert(m_measurements and
Expand All @@ -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();
Expand Down
5 changes: 2 additions & 3 deletions Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> strategy = {9,10,11,12,13};
std::vector<int> 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
/*
Expand Down Expand Up @@ -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] =
Expand Down

0 comments on commit 11d98d3

Please sign in to comment.