EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GaussianGridTrackDensity.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file GaussianGridTrackDensity.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020 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
#include "
Acts/EventData/TrackParameters.hpp
"
11
#include "
Acts/Utilities/Definitions.hpp
"
12
#include "
Acts/Utilities/Result.hpp
"
13
14
namespace
Acts {
29
template
<
int
mainGr
id
Size = 2000,
int
trkGr
id
Size = 15>
30
class
GaussianGridTrackDensity
{
31
// Assert odd trkGridSize
32
static_assert(trkGridSize % 2);
33
// Assert bigger main grid than track grid
34
static_assert(mainGridSize > trkGridSize);
35
36
public
:
38
struct
Config
{
43
Config
(
float
zMinMax_ = 100) :
zMinMax
(zMinMax_) {
44
binSize
= 2. *
zMinMax
/ mainGridSize;
45
}
46
// Min and max z value of big grid
47
float
zMinMax
;
// mm
48
49
// Z size of one single bin in grid
50
float
binSize
;
// mm
51
52
// Do NOT use just the z-bin with the highest
53
// track density, but instead check the (up to)
54
// first three density maxima (only those that have
55
// a maximum relative deviation of 'relativeDensityDev'
56
// from the main maximum) and take the z-bin of the
57
// maximum with the highest surrounding density sum
58
bool
useHighestSumZPosition
=
false
;
59
60
// The maximum relative density deviation from the main
61
// maximum to consider the second and third maximum for
62
// the highest-sum approach from above
63
float
maxRelativeDensityDev
= 0.01;
64
};
65
66
GaussianGridTrackDensity
(
const
Config
& cfg) :
m_cfg
(cfg) {}
67
73
Result<float>
getMaxZPosition
(
ActsVectorF<mainGridSize>
& mainGrid)
const
;
74
81
Result<std::pair<float, float>
>
getMaxZPositionAndWidth
(
82
ActsVectorF<mainGridSize>
& mainGrid)
const
;
83
92
std::pair<int, ActsVectorF<trkGridSize>>
addTrack
(
93
const
BoundTrackParameters
& trk,
94
ActsVectorF<mainGridSize>
& mainGrid)
const
;
95
102
void
removeTrackGridFromMainGrid
(
int
zBin,
103
const
ActsVectorF<trkGridSize>
& trkGrid,
104
ActsVectorF<mainGridSize>
& mainGrid)
const
;
105
106
private
:
113
void
addTrackGridToMainGrid
(
int
zBin,
const
ActsVectorF<trkGridSize>
& trkGrid,
114
ActsVectorF<mainGridSize>
& mainGrid)
const
;
115
124
void
modifyMainGridWithTrackGrid
(
int
zBin,
125
const
ActsVectorF<trkGridSize>
& trkGrid,
126
ActsVectorF<mainGridSize>
& mainGrid,
127
int
modifyModeSign)
const
;
128
139
ActsVectorF<trkGridSize>
createTrackGrid
(
int
offset
,
const
SymMatrix2D
&
cov
,
140
float
distCtrD,
141
float
distCtrZ)
const
;
142
150
Result<float>
estimateSeedWidth
(
ActsVectorF<mainGridSize>
& mainGrid,
151
float
maxZ)
const
;
152
154
float
normal2D
(
float
d
,
float
z
,
const
SymMatrix2D
&
cov
)
const
;
155
164
int
getHighestSumZPosition
(
ActsVectorF<mainGridSize>
& mainGrid)
const
;
165
173
double
getDensitySum
(
const
ActsVectorF<mainGridSize>
& mainGrid,
174
int
pos
)
const
;
175
176
Config
m_cfg
;
177
};
178
179
}
// namespace Acts
180
181
#include "
Acts/Vertexing/GaussianGridTrackDensity.ipp
"
acts
blob
sPHENIX
Core
include
Acts
Vertexing
GaussianGridTrackDensity.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration