ATLAS Offline Software
Trigger
EFTracking
FPGATrackSim
FPGATrackSimBankGen
src
FPGATrackSimMatrixAccumulator.cxx
Go to the documentation of this file.
1
// Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
10
#include "
FPGATrackSimMatrixAccumulator.h
"
11
12
22
bool
accumulate
(
AccumulateMap
& map, std::vector<module_t>
const
& modules,
FPGATrackSimMatrixAccumulator
const
&
acc
)
23
{
24
auto
it
= map.find(modules);
25
if
(
it
== map.end())
// Create new entry
26
{
27
map.insert({ modules,
acc
});
28
return
true
;
29
}
30
else
// Add/append entries
31
{
32
33
for
(
unsigned
i
= 0;
i
<
FPGATrackSimTrackPars::NPARS
;
i
++)
34
it
->second.pars[
i
] +=
acc
.pars[
i
];
35
36
size_t
nDim =
acc
.hit_coords.size();
37
for
(
unsigned
i
= 0;
i
< nDim;
i
++)
38
{
39
it
->second.hit_coords[
i
] +=
acc
.hit_coords[
i
];
40
it
->second.hit_x_QoP[
i
] +=
acc
.hit_x_QoP[
i
];
41
it
->second.hit_xG_HIP[
i
] +=
acc
.hit_xG_HIP[
i
];
42
it
->second.hit_x_d0[
i
] +=
acc
.hit_x_d0[
i
];
43
it
->second.hit_x_z0[
i
] +=
acc
.hit_x_z0[
i
];
44
it
->second.hit_x_eta[
i
] +=
acc
.hit_x_eta[
i
];
45
it
->second.hit_xG_eta[
i
] +=
acc
.hit_xG_eta[
i
];
46
it
->second.hit_x_phi[
i
] +=
acc
.hit_x_phi[
i
];
47
48
for
(
unsigned
j =
i
; j < nDim; j++)
49
it
->second.covariance[
i
* nDim + j] +=
acc
.covariance[
i
* nDim + j];
50
}
51
52
it
->second.track_bins.insert(
it
->second.track_bins.end(),
acc
.track_bins.begin(),
acc
.track_bins.end());
53
return
false
;
54
}
55
}
56
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition:
FPGATrackSimMatrixAccumulator.cxx:22
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
lumiFormat.i
int i
Definition:
lumiFormat.py:85
FPGATrackSimMatrixAccumulator
Definition:
FPGATrackSimMatrixAccumulator.h:36
AthenaPoolTestRead.acc
acc
Definition:
AthenaPoolTestRead.py:16
FPGATrackSimMatrixAccumulator.h
Helper struct for accumulating sector information for matrix generation.
FPGATrackSimTrackPars::NPARS
@ NPARS
Definition:
FPGATrackSimTrackPars.h:49
AccumulateMap
std::unordered_map< std::vector< module_t >, FPGATrackSimMatrixAccumulator, container_hash< std::vector< module_t > > > AccumulateMap
Definition:
FPGATrackSimMatrixAccumulator.h:108
Generated on Sun Dec 22 2024 21:10:38 for ATLAS Offline Software by
1.8.18