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
AlignmentAlgorithm.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file AlignmentAlgorithm.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019 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
#pragma once
10
11
#include "
Acts/TrackFitting/KalmanFitter.hpp
"
12
#include "
ActsAlignment/Kernel/Alignment.hpp
"
13
#include "
ActsExamples/EventData/IndexSourceLink.hpp
"
14
#include "
ActsExamples/EventData/Measurement.hpp
"
15
#include "
ActsExamples/EventData/ProtoTrack.hpp
"
16
#include "
ActsExamples/EventData/Track.hpp
"
17
#include "
ActsExamples/Framework/DataHandle.hpp
"
18
#include "
ActsExamples/Framework/IAlgorithm.hpp
"
19
#include "
ActsExamples/MagneticField/MagneticField.hpp
"
20
21
#include <functional>
22
#include <memory>
23
#include <vector>
24
25
namespace
ActsExamples {
26
27
class
AlignmentAlgorithm
final :
public
IAlgorithm
{
28
public
:
29
using
AlignmentResult
=
Acts::Result<ActsAlignment::AlignmentResult>
;
30
using
AlignmentParameters
=
31
std::unordered_map<Acts::DetectorElementBase*, Acts::Transform3>;
35
using
TrackFitterOptions
=
36
Acts::KalmanFitterOptions<Acts::VectorMultiTrajectory>
;
37
41
class
AlignmentFunction
{
42
public
:
43
virtual
~AlignmentFunction
() =
default
;
44
virtual
AlignmentResult
operator()
(
45
const
std::vector<std::vector<IndexSourceLink>>&,
46
const
TrackParametersContainer
&,
47
const
ActsAlignment::AlignmentOptions<TrackFitterOptions>
&)
const
= 0;
48
};
49
54
static
std::shared_ptr<AlignmentFunction>
makeAlignmentFunction
(
55
std::shared_ptr<const Acts::TrackingGeometry>
trackingGeometry
,
56
std::shared_ptr<const Acts::MagneticFieldProvider>
magneticField
);
57
58
struct
Config
{
60
std::string
inputMeasurements
;
62
std::string
inputSourceLinks
;
64
std::string
inputProtoTracks
;
66
std::string
inputInitialTrackParameters
;
68
std::string
outputAlignmentParameters
;
70
std::shared_ptr<AlignmentFunction>
align
;
72
ActsAlignment::AlignedTransformUpdater
alignedTransformUpdater
;
74
std::vector<Acts::DetectorElementBase*>
alignedDetElements
;
76
std::map<unsigned int, std::bitset<6>>
iterationState
;
78
double
chi2ONdfCutOff
= 0.10;
80
std::pair<size_t, double>
deltaChi2ONdfCutOff
= {10, 0.00001};
82
size_t
maxNumIterations
= 100;
84
int
maxNumTracks
= -1;
85
};
86
91
AlignmentAlgorithm
(
Config
cfg
,
Acts::Logging::Level
lvl);
92
97
ActsExamples::ProcessCode
execute
(
98
const
ActsExamples::AlgorithmContext
& ctx)
const override
;
99
100
private
:
101
Config
m_cfg
;
102
103
ReadDataHandle<MeasurementContainer>
m_inputMeasurements
{
this
,
104
"InputMeasurements"
};
105
ReadDataHandle<IndexSourceLinkContainer>
m_inputSourceLinks
{
106
this
,
"InputSourceLinks"
};
107
ReadDataHandle<TrackParametersContainer>
m_inputInitialTrackParameters
{
108
this
,
"InputInitialTrackParameters"
};
109
ReadDataHandle<ProtoTrackContainer>
m_inputProtoTracks
{
this
,
110
"InputProtoTracks"
};
111
WriteDataHandle<AlignmentParameters>
m_outputAlignmentParameters
{
112
this
,
"OutputAlignmentParameters"
};
113
};
114
115
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
Alignment
include
ActsExamples
Alignment
AlignmentAlgorithm.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:36
using
1.8.2 with
sPHENIX GitHub integration