ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkFitter
TrkGaussianSumFilterUtils
TrkGaussianSumFilterUtils
MultiComponentStateAssembler.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
20
21
#ifndef MultiComponentStateAssembler_H
22
#define MultiComponentStateAssembler_H
23
24
#include "
TrkGaussianSumFilterUtils/GsfConstants.h
"
25
#include "
TrkParameters/ComponentParameters.h
"
26
#include <vector>
27
28
namespace
Trk
{
29
34
namespace
MultiComponentStateAssembler
{
35
struct
Cache
{
36
Cache
() {
37
multiComponentState
.reserve(
GSFConstants::maxNumberofStateComponents
);
38
}
39
Trk::MultiComponentState
multiComponentState
{};
40
double
validWeightSum
= 0;
41
double
invalidWeightSum
= 0;
42
static
constexpr
double
minimumValidFraction
= 0.01;
43
static
constexpr
double
minimumFractionalWeight
= 1e-09;
44
};
45
48
void
49
addComponent
(
50
MultiComponentStateAssembler::Cache
&
cache
,
51
ComponentParameters
&& multiComponentState);
52
55
void
56
addMultiState
(
57
MultiComponentStateAssembler::Cache
&
cache
,
58
Trk::MultiComponentState
&& multiComponentState);
59
63
MultiComponentState
64
assembledState
(
MultiComponentStateAssembler::Cache
&&
cache
);
65
66
}
// End MultiComponentStateAssembler namespace
67
68
}
// End Trk namepace
69
70
// inline methods
71
inline
void
Trk::MultiComponentStateAssembler::addComponent
(
72
Cache
&
cache
,
ComponentParameters
&& componentParameters) {
73
74
cache
.validWeightSum += componentParameters.weight;
75
cache
.multiComponentState.push_back({std::move(componentParameters.params),
76
componentParameters.weight});
77
}
78
79
inline
void
Trk::MultiComponentStateAssembler::addMultiState
(
80
Cache
&
cache
,
Trk::MultiComponentState
&& multiComponentState) {
81
82
double
sumW(0.);
83
for
(
auto
& component : multiComponentState) {
84
sumW += component.weight;
85
cache
.multiComponentState.push_back({std::move(component.params),
86
component.weight});
87
}
88
cache
.validWeightSum += sumW;
89
}
90
91
#endif
ComponentParameters.h
Definition of component parameters for use in a mixture of many components. In this regime each track...
GsfConstants.h
GSFConstants::maxNumberofStateComponents
constexpr int8_t maxNumberofStateComponents
The state is described by N Gaussian components The Beth Heitler Material effect are also described b...
Definition
GsfConstants.h:43
Trk::MultiComponentStateAssembler
Helper struct representing a cache of the Multicomponent state under assembly.
Definition
MultiComponentStateAssembler.h:34
Trk::MultiComponentStateAssembler::addMultiState
void addMultiState(MultiComponentStateAssembler::Cache &cache, Trk::MultiComponentState &&multiComponentState)
Method to add a new Trk::MultiComponentState to the cached Trk::MultiComponentState object under cons...
Definition
MultiComponentStateAssembler.h:79
Trk::MultiComponentStateAssembler::assembledState
MultiComponentState assembledState(MultiComponentStateAssembler::Cache &&cache)
Method to return the cached state object - it performs a reweighting before returning the object base...
Definition
MultiComponentStateAssembler.cxx:120
Trk::MultiComponentStateAssembler::addComponent
void addComponent(MultiComponentStateAssembler::Cache &cache, ComponentParameters &&multiComponentState)
Method to add a single set of Trk::ComponentParameters to the cached Trk::MultiComponentState object ...
Definition
MultiComponentStateAssembler.h:71
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::MultiComponentState
std::vector< ComponentParameters > MultiComponentState
Definition
ComponentParameters.h:27
Trk::cache
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.
Trk::ComponentParameters
Definition
ComponentParameters.h:22
Trk::MultiComponentStateAssembler::Cache
Definition
MultiComponentStateAssembler.h:35
Trk::MultiComponentStateAssembler::Cache::validWeightSum
double validWeightSum
Definition
MultiComponentStateAssembler.h:40
Trk::MultiComponentStateAssembler::Cache::Cache
Cache()
Definition
MultiComponentStateAssembler.h:36
Trk::MultiComponentStateAssembler::Cache::minimumFractionalWeight
static constexpr double minimumFractionalWeight
Definition
MultiComponentStateAssembler.h:43
Trk::MultiComponentStateAssembler::Cache::multiComponentState
Trk::MultiComponentState multiComponentState
Definition
MultiComponentStateAssembler.h:39
Trk::MultiComponentStateAssembler::Cache::invalidWeightSum
double invalidWeightSum
Definition
MultiComponentStateAssembler.h:41
Trk::MultiComponentStateAssembler::Cache::minimumValidFraction
static constexpr double minimumValidFraction
Definition
MultiComponentStateAssembler.h:42
Generated on
for ATLAS Offline Software by
1.17.0