Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-07-16 08:07:26

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 
0014 namespace Acts::Experimental {
0015 
0016 /// @brief Interface concept to define the straw measurement calibrator used by the FastStrawLineFitter.
0017 ///         The basic assumption is that the straw radii are reconstructed from
0018 ///         a time measurement which is converted into a drift-radius using a
0019 ///         differentiable r-t relation. Due to e.g. late arrival of the
0020 ///         particle, the drift time may be subject to corrections which is
0021 ///         summarized by a general time shift t0. This shift can be estimated
0022 ///         during a straight line fit. The calibrator returns the updated drift
0023 ///         radius & the first and second derivative of the r-t relation called
0024 ///         driftVelocity and driftAcceleration, respectively.
0025 template <typename Calibrator_t, typename SpacePoint_t>
0026 concept CompositeSpacePointFastCalibrator =
0027     CompositeSpacePoint<SpacePoint_t> &&
0028     requires(const Calibrator_t calibrator, const Acts::CalibrationContext& ctx,
0029              const SpacePoint_t& spacePoint, const double t0) {
0030       /// @brief Returns the drift velocity of the straw measurement's radius - time relation
0031       ///        which is defined as the first derivative of the relation.
0032       /// @param ctx: Calibration context to access the calibration constants (Experiment specific)
0033       /// @param spacePoint: Reference to the calibrated space point
0034       { calibrator.driftVelocity(ctx, spacePoint, t0) } -> std::same_as<double>;
0035       /// @brief Returns the drift acceleration of the straw measurement's radius - time relation
0036       ///        which is defined as the second derivative of the relation
0037       /// @param ctx: Calibration context to access the calibration constants (Experiment specific)
0038       /// @param spacePoint: Reference to the calibrated space point
0039       {
0040         calibrator.driftAcceleration(ctx, spacePoint, t0)
0041       } -> std::same_as<double>;
0042 
0043       { calibrator.driftRadius(ctx, spacePoint, t0) } -> std::same_as<double>;
0044     };
0045 
0046 /// @brief Interface concept for a CompositeSpacePointCalibrator. The space point
0047 ///        container is parsed to the interface together with a reference track
0048 ///        position, direction and the time offset, all expressed at the
0049 ///        reference plane z=0.
0050 template <typename Calibrator_t, typename UnCalibCont_t, typename CalibCont_t>
0051 concept CompositeSpacePointCalibrator =
0052     CompositeSpacePointContainer<UnCalibCont_t> &&
0053     CompositeSpacePointContainer<CalibCont_t> &&
0054     requires(const Calibrator_t calibrator, const UnCalibCont_t& uncalibCont,
0055              CalibCont_t& calibCont, const Vector3& trackPos,
0056              const Vector3& trackDir, const double trackT0,
0057              const CalibrationContext& ctx,
0058              const Acts::RemovePointer_t<typename CalibCont_t::value_type>&
0059                  measurement) {
0060       ///  @brief Calibrate the entire input space point container using the external track parameters
0061       ///  @param ctx: Calibration context to access the calibration constants (Experiment specific)
0062       ///  @param trackPos: Position of the track / segment
0063       ///  @param trackDir: Direction of the track / segment
0064       ///  @param trackT0: Time offset w.r.t. the nominal time of flight calculated by (globPos) / c
0065       ///  @param uncalibCont: Const reference to the calibrated input container to calibrate
0066       {
0067         calibrator.calibrate(ctx, trackPos, trackDir, trackT0, uncalibCont)
0068       } -> std::same_as<CalibCont_t>;
0069       /// @brief Update the signs of each straw measurement according to whether the measurement is on the
0070       ///        left or on the right-hand side of the given line
0071       ///  @param trackPos: Position of the track / segment
0072       ///  @param trackDir: Direction of the track / segment
0073       ///  @param calibCont: Mutable reference to the calibrate composite space point container
0074       {
0075         calibrator.updateSigns(trackPos, trackDir, calibCont)
0076       } -> std::same_as<void>;
0077       /// @brief Returns the drift velocity of the straw measurement's radius - time relation
0078       ///        which is defined as the first derivative of the relation.
0079       ///  @param ctx: Calibration context to access the calibration constants (Experiment specific)
0080       ///  @param measurement: Reference to the calibrated space point
0081       { calibrator.driftVelocity(ctx, measurement) } -> std::same_as<double>;
0082       /// @brief Returns the drift acceleration of the straw measurement's radius - time relation
0083       ///        which is defined as the second derivative of the relation
0084       ///  @param ctx: Calibration context to access the calibration constants (Experiment specific)
0085       ///  @param measurement: Reference to the calibrated space point
0086       {
0087         calibrator.driftAcceleration(ctx, measurement)
0088       } -> std::same_as<double>;
0089     };
0090 
0091 }  // namespace Acts::Experimental