Skip to content
Snippets Groups Projects
Commit cc992a53 authored by Xiaocong Ai's avatar Xiaocong Ai Committed by FASER Reco
Browse files

use plane surface for starting parameters

parent 29c44c1a
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,6 @@ atlas_add_component(FaserActsKalmanFilter
#todo src/SPSeedBasedInitialParameterTool.cxx
#todo src/SPSimpleInitialParameterTool.cxx
# src/ProtoTrackWriterTool.cxx
#todo src/TrackFindingAlgorithmFunction.cxx
#todo src/TrajectoryWriterTool.cxx
src/TruthBasedInitialParameterTool.cxx
src/SummaryPlotTool.cxx
......
......@@ -53,12 +53,11 @@ public:
const Acts::CalibrationContext& /*cctx*/,
const Acts::SourceLink& sourceLink,
Acts::VectorMultiTrajectory::TrackStateProxy& trackState) const {
trackState.setUncalibratedSourceLink(sourceLink);
const IndexSourceLink& idxSourceLink = sourceLink.get<IndexSourceLink>();
assert((idxSourceLink.index() < measurements.size()) and
"Source link index is outside the container bounds");
trackState.setUncalibratedSourceLink(sourceLink);
std::visit(
[&trackState](const auto& meas) {
......
......@@ -368,7 +368,7 @@ Acts::BoundTrackParameters CircleFitTrackSeedTool::Seed::get_params(double origi
size_t size = positions.size();
pos = positions[size-1] + (origin - positions[size-1].z())/direction.z() * direction;
}
auto perigee = Acts::Surface::makeShared<Acts::PerigeeSurface>(pos);
auto refPlane = Acts::Surface::makeShared<Acts::PlaneSurface>(pos, direction.normalized());
//@todo make the particle hypothesis configurable
return Acts::BoundTrackParameters(perigee, params, cov, Acts::ParticleHypothesis::muon());
return Acts::BoundTrackParameters(refPlane, params, cov, Acts::ParticleHypothesis::muon());
}
#include "CombinatorialKalmanFilterAlg.h"
#include "FaserActsGeometry/FASERMagneticFieldWrapper.h"
#include "Acts/Propagator/EigenStepper.hpp"
#include "Acts/Propagator/Navigator.hpp"
#include "Acts/Propagator/Propagator.hpp"
#include "Acts/TrackFitting/GainMatrixSmoother.hpp"
#include "Acts/TrackFitting/GainMatrixUpdater.hpp"
namespace {
using Updater = Acts::GainMatrixUpdater;
using Smoother = Acts::GainMatrixSmoother;
using Stepper = Acts::EigenStepper<>;
using Navigator = Acts::Navigator;
using Propagator = Acts::Propagator<Stepper, Navigator>;
using CKF = Acts::CombinatorialKalmanFilter<Propagator, Updater, Smoother>;
using TrackParametersContainer = std::vector<CombinatorialKalmanFilterAlg::TrackParameters>;
struct TrackFinderFunctionImpl
: public CombinatorialKalmanFilterAlg::TrackFinderFunction {
CKF trackFinder;
TrackFinderFunctionImpl(CKF&& f) : trackFinder(std::move(f)) {}
CombinatorialKalmanFilterAlg::TrackFinderResult operator()(
const IndexSourceLinkContainer& sourcelinks,
const TrackParametersContainer& initialParameters,
const CombinatorialKalmanFilterAlg::TrackFinderOptions& options)
const override {
return trackFinder.findTracks(sourcelinks, initialParameters, options);
};
};
} // namespace
std::shared_ptr<CombinatorialKalmanFilterAlg::TrackFinderFunction>
CombinatorialKalmanFilterAlg::makeTrackFinderFunction(
std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
bool resolvePassive, bool resolveMaterial, bool resolveSensitive) {
auto magneticField = std::make_shared<FASERMagneticFieldWrapper>();
Stepper stepper(std::move(magneticField));
Navigator::Config cfg{trackingGeometry};
cfg.resolvePassive = resolvePassive;
cfg.resolveMaterial = resolveMaterial;
cfg.resolveSensitive = resolveSensitive;
Navigator navigator(cfg);
Propagator propagator(std::move(stepper), std::move(navigator));
CKF trackFinder(std::move(propagator));
// build the track finder functions. owns the track finder object.
return std::make_shared<TrackFinderFunctionImpl>(std::move(trackFinder));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment