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
ImpactPointEstimator.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ImpactPointEstimator.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019-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
#pragma once
10
11
#include "
Acts/EventData/TrackParameters.hpp
"
12
#include "
Acts/Geometry/GeometryContext.hpp
"
13
#include "
Acts/MagneticField/MagneticFieldContext.hpp
"
14
#include "
Acts/MagneticField/MagneticFieldProvider.hpp
"
15
#include "
Acts/MagneticField/NullBField.hpp
"
16
#include "
Acts/Propagator/Propagator.hpp
"
17
#include "
Acts/Utilities/Result.hpp
"
18
#include "
Acts/Vertexing/TrackAtVertex.hpp
"
19
#include "
Acts/Vertexing/Vertex.hpp
"
20
21
namespace
Acts {
22
23
struct
ImpactParametersAndSigma
{
24
// Impact parameters ...
25
double
d0
= 0.;
26
double
z0
= 0.;
27
// ... and their standard deviations wrt a vertex, e.g.:
28
// sigmaD0 = sqrt(Var(X) + Var(Y) + Var(d0)),
29
// where X and Y are the x- and y-coordinate of the vertex
30
double
sigmaD0
= 0.;
31
double
sigmaZ0
= 0.;
32
// Absolute difference in time between the vertex and the track at the 2D PCA
33
// ...
34
std::optional<double>
deltaT
= std::nullopt;
35
// ... and standard deviation wrt a vertex
36
std::optional<double>
sigmaDeltaT
= std::nullopt;
37
};
38
45
template
<
typename
input_track_t,
typename
propagator_t
,
46
typename
propagator_options_t =
PropagatorOptions<>
>
47
class
ImpactPointEstimator
{
48
public
:
50
struct
State
{
54
State
(
MagneticFieldProvider::Cache
fieldCacheIn)
55
:
fieldCache
(std::
move
(fieldCacheIn)) {}
57
MagneticFieldProvider::Cache
fieldCache
;
58
};
59
60
struct
Config
{
65
Config
(std::shared_ptr<const MagneticFieldProvider> bIn,
66
std::shared_ptr<const propagator_t> prop)
67
:
bField
(std::
move
(bIn)),
propagator
(std::
move
(prop)) {}
68
73
Config
(std::shared_ptr<propagator_t> prop)
74
:
bField
{std::make_shared<NullBField>()},
propagator
(
std::move
(prop)) {}
75
77
std::shared_ptr<const MagneticFieldProvider>
bField
;
79
std::shared_ptr<const propagator_t>
propagator
;
81
int
maxIterations
= 20;
83
double
precision
= 1.e-10;
84
};
85
89
ImpactPointEstimator
(
const
Config
&
cfg
) :
m_cfg
(cfg) {}
90
99
Result<double>
calculateDistance
(
const
GeometryContext
&
gctx
,
100
const
BoundTrackParameters
& trkParams,
101
const
Vector3
& vtxPos, State&
state
)
const
;
102
118
Result<BoundTrackParameters>
estimate3DImpactParameters
(
119
const
GeometryContext
&
gctx
,
const
Acts::MagneticFieldContext
& mctx,
120
const
BoundTrackParameters
& trkParams,
const
Vector3
& vtxPos,
121
State&
state
)
const
;
122
137
template
<
unsigned
int
nDim>
138
Result<double>
getVertexCompatibility
(
139
const
GeometryContext
&
gctx
,
const
BoundTrackParameters
* trkParams,
140
const
ActsVector<nDim>
& vertexPos)
const
;
141
156
template
<
unsigned
int
nDim>
157
Result<std::pair<Acts::ActsVector<nDim>
,
Acts::Vector3
>>
158
getDistanceAndMomentum
(
const
GeometryContext
&
gctx
,
159
const
BoundTrackParameters
& trkParams,
160
const
ActsVector<nDim>
& vtxPos, State&
state
)
const
;
161
171
Result<ImpactParametersAndSigma>
getImpactParameters
(
172
const
BoundTrackParameters
& track,
const
Vertex<input_track_t>
& vtx,
173
const
GeometryContext
&
gctx
,
const
MagneticFieldContext
& mctx,
174
bool
calculateTimeIP =
false
)
const
;
175
188
Result<std::pair<double, double>
>
getLifetimeSignOfTrack
(
189
const
BoundTrackParameters
& track,
const
Vertex<input_track_t>
& vtx,
190
const
Acts::Vector3
& direction,
const
GeometryContext
&
gctx
,
191
const
MagneticFieldContext
& mctx)
const
;
192
203
Result<double>
get3DLifetimeSignOfTrack
(
204
const
BoundTrackParameters
& track,
const
Vertex<input_track_t>
& vtx,
205
const
Acts::Vector3
& direction,
const
GeometryContext
&
gctx
,
206
const
MagneticFieldContext
& mctx)
const
;
207
208
private
:
210
const
Config
m_cfg
;
211
224
Result<double>
performNewtonOptimization
(
const
Vector3
& helixCenter,
225
const
Vector3
& vtxPos,
double
phi
,
226
double
theta
,
double
rho
)
const
;
227
};
228
229
}
// namespace Acts
230
231
#include "
Acts/Vertexing/ImpactPointEstimator.ipp
"
acts
blob
sPHENIX
Core
include
Acts
Vertexing
ImpactPointEstimator.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:35
using
1.8.2 with
sPHENIX GitHub integration