Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-13 08:15:29

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/EventData/CompositeSpacePoint.hpp"
0012 #include "Acts/Utilities/CalibrationContext.hpp"
0013 namespace Acts::Experimental {
0014 
0015 /// @brief Interface concept to define the straw measurement calibrator used by the FastStrawLineFitter.
0016 ///         The basic assumption is that the straw radii are reconstructed from
0017 ///         a time measurement which is converted into a drift-radius using a
0018 ///         differentiable r-t relation. Due to e.g. late arrival of the
0019 ///         particle, the drift time may be subject to corrections which is
0020 ///         summarized by a general time shift t0. This shift can be estimated
0021 ///         during a straight line fit. The calibrator returns the updated drift
0022 ///         radius & the first and second derivative of the r-t relation called
0023 ///         driftVelocity and driftAcceleration, respectively.
0024 template <typename Calibrator_t, typename SpacePoint_t>
0025 concept CompositeSpacePointFastCalibrator =
0026     CompositeSpacePoint<SpacePoint_t> &&
0027     requires(const Calibrator_t calibrator, const Acts::CalibrationContext& ctx,
0028              const SpacePoint_t& spacePoint, const double t0) {
0029       /// @brief Returns the drift velocity of the straw measurement's radius - time relation
0030       ///        which is defined as the first derivative of the relation.
0031       /// @param ctx: Calibration context to access the calibration constants (Experiment specific)
0032       /// @param spacePoint: Reference to the calibrated space point
0033       { calibrator.driftVelocity(ctx, spacePoint, t0) } -> std::same_as<double>;
0034       /// @brief Returns the drift acceleration of the straw measurement's radius - time relation
0035       ///        which is defined as the second derivative of the relation
0036       /// @param ctx: Calibration context to access the calibration constants (Experiment specific)
0037       /// @param spacePoint: Reference to the calibrated space point
0038       {
0039         calibrator.driftAcceleration(ctx, spacePoint, t0)
0040       } -> std::same_as<double>;
0041 
0042       { calibrator.driftRadius(ctx, spacePoint, t0) } -> std::same_as<double>;
0043     };
0044 
0045 /// @brief Interface concept for a CompositeSpacePointCalibrator. The space point
0046 ///        container is parsed to the interface together with a reference track
0047 ///        position, direction and the time offset, all expressed at the
0048 ///        reference plane z=0.
0049 template <typename Calibrator_t, typename UnCalibCont_t, typename CalibCont_t>
0050 concept CompositeSpacePointCalibrator =
0051     CompositeSpacePointContainer<UnCalibCont_t> &&
0052     CompositeSpacePointContainer<CalibCont_t> &&
0053     requires(const Calibrator_t calibrator, const UnCalibCont_t& uncalibCont,
0054              CalibCont_t& calibCont, const Vector3& trackPos,
0055              const Vector3& trackDir, const double trackT0,
0056              const CalibrationContext& ctx) {
0057       ///  @brief Calibrate the entire input space point container using the external track parameters
0058       ///  @param ctx: Calibration context to access the calibration constants (Experiment specific)
0059       ///  @param trackPos: Position of the track / segment
0060       ///  @param trackDir: Direction of the track / segment
0061       ///  @param trackT0: Time offset w.r.t. the nominal time of flight calculated by (globPos) / c
0062       ///  @param uncalibCont: Const reference to the calibrated input container to calibrate
0063       {
0064         calibrator.calibrate(ctx, trackPos, trackDir, trackT0, uncalibCont)
0065       } -> std::same_as<CalibCont_t>;
0066       /// @brief Update the signs of each straw measurement according to whether the measurement is on the
0067       ///        left or on the right-hand side of the given line
0068       ///  @param trackPos: Position of the track / segment
0069       ///  @param trackDir: Direction of the track / segment
0070       ///  @param calibCont: Mutable reference to the calibrate composite space point container
0071       {
0072         calibrator.updateSigns(trackPos, trackDir, calibCont)
0073       } -> std::same_as<void>;
0074     };
0075 
0076 }  // namespace Acts::Experimental