Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RefittingCalibrator.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RefittingCalibrator.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2023 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#include "
ActsExamples/TrackFitting/RefittingCalibrator.hpp
"
10
11
#include "
Acts/Definitions/Algebra.hpp
"
12
#include "
Acts/EventData/MeasurementHelpers.hpp
"
13
#include "
Acts/EventData/SourceLink.hpp
"
14
#include "
Acts/Utilities/CalibrationContext.hpp
"
15
16
namespace
ActsExamples {
17
18
void
RefittingCalibrator::calibrate
(
const
Acts::GeometryContext
&
/*gctx*/
,
19
const
Acts::CalibrationContext
&
/*cctx*/
,
20
const
Acts::SourceLink
& sourceLink,
21
Proxy
trackState)
const
{
22
const
auto
sl = sourceLink.
get
<
RefittingSourceLink
>();
23
24
// Reset the original uncalibrated sourcelink on this track state
25
trackState.
setUncalibratedSourceLink
(sl.state.getUncalibratedSourceLink());
26
27
// Here we construct a measurement by extracting the information available
28
// in the state
29
Acts::visit_measurement
(sl.state.calibratedSize(), [&](
auto
N
) {
30
using namespace
Acts;
31
constexpr
int
Size
= decltype(
N
)::
value
;
32
33
trackState.
allocateCalibrated
(
Size
);
34
trackState.template calibrated<Size>() =
35
sl.state.template calibrated<Size>();
36
trackState.template calibratedCovariance<Size>() =
37
sl.state.template calibratedCovariance<Size>();
38
});
39
40
trackState.
setProjectorBitset
(sl.state.projectorBitset());
41
}
42
43
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
TrackFitting
src
RefittingCalibrator.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:37
using
1.8.2 with
sPHENIX GitHub integration