ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
EFTracking
FPGATrackSim
FPGATrackSimBanks
FPGATrackSimBanks
FPGATrackSimSectorSlice.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
#ifndef FPGATrackSimSectorSlice_h
4
#define FPGATrackSimSectorSlice_h
5
21
22
#include "
FPGATrackSimObjects/FPGATrackSimTrackPars.h
"
23
#include "
FPGATrackSimObjects/FPGATrackSimTypes.h
"
//typedef for sector_t
24
#include <vector>
25
#include <utility>
//for std::pair
26
class
TClonesArray;
27
28
29
30
31
class
FPGATrackSimSectorSlice
32
{
33
public
:
34
35
// Create blank bitvectors for writing new slice file
36
FPGATrackSimSectorSlice
(
size_t
nSectors,
37
FPGATrackSimTrackParsI
const
& nBins,
FPGATrackSimTrackPars
const
&
min
,
FPGATrackSimTrackPars
const
&
max
);
38
// Read from file
39
FPGATrackSimSectorSlice
(
const
std::string & filepath);
40
41
FPGATrackSimSectorSlice
(
const
FPGATrackSimSectorSlice
&) =
delete
;
42
FPGATrackSimSectorSlice
&
operator=
(
const
FPGATrackSimSectorSlice
&) =
delete
;
43
44
45
// Slice writing functions
46
void
addSectorToSlice
(
sector_t
sector,
FPGATrackSimTrackParsI
const
&
bins
);
47
void
saveSlices
(
const
std::string & filepath);
48
49
50
// Finds the parameter boundaries for where bitmasks are non-empty.
51
// Returns (min, max).
52
std::pair<FPGATrackSimTrackPars, FPGATrackSimTrackPars>
getBoundaries
()
const
;
53
54
// Returns a list of sectors that contain pars.
55
std::vector<sector_t>
searchSectors
(
FPGATrackSimTrackPars
const
& pars)
const
;
56
57
private
:
58
59
// TBits bitmask arrays. The use of TClonesArray is probably overkill but whatever, kept from FTK.
60
// I wish ROOT would update these classes to use templating X(
61
TClonesArray *
m_bits_phi
=
nullptr
;
62
TClonesArray *
m_bits_c
=
nullptr
;
63
TClonesArray *
m_bits_d0
=
nullptr
;
64
TClonesArray *
m_bits_z0
=
nullptr
;
65
TClonesArray *
m_bits_eta
=
nullptr
;
66
67
// Number of bins for each parameter, size of arrays above
68
FPGATrackSimTrackParsI
m_nBins
;
69
70
// Min and max parameters found out in the slice file
71
FPGATrackSimTrackPars
m_min
;
72
FPGATrackSimTrackPars
m_max
;
73
74
// Step sizes, (max - min) / nbins
75
FPGATrackSimTrackPars
m_step
;
76
77
// Helper functions
78
void
calcDependentVals
();
79
void
getBoundary
(
const
TClonesArray *bitmasks,
double
x_min,
double
x_max,
80
double
&autoMin,
double
&autoMax,
bool
wraps,
const
char
*
debug
)
const
;
81
bool
checkTrackPars
(
FPGATrackSimTrackPars
const
& pars)
const
;
82
};
83
84
#endif
// FPGATrackSimSectorSlice_h
85
FPGATrackSimTrackPars.h
Structs that store the 5 track parameters.
FPGATrackSimTypes.h
sector_t
int32_t sector_t
Definition
FPGATrackSimTypes.h:21
debug
const bool debug
Definition
MakeUncertaintyPlots.cxx:53
bins
static const std::vector< std::string > bins
Definition
MuonTriggerSFFilesTest.cxx:22
min
#define min(a, b)
Definition
cfImp.cxx:40
max
#define max(a, b)
Definition
cfImp.cxx:41
FPGATrackSimSectorSlice::getBoundary
void getBoundary(const TClonesArray *bitmasks, double x_min, double x_max, double &autoMin, double &autoMax, bool wraps, const char *debug) const
Given a range [x_min, x_max] split in bins corresponding to the size of bitmasks, finds a tighter ran...
Definition
FPGATrackSimSectorSlice.cxx:276
FPGATrackSimSectorSlice::m_max
FPGATrackSimTrackPars m_max
Definition
FPGATrackSimSectorSlice.h:72
FPGATrackSimSectorSlice::FPGATrackSimSectorSlice
FPGATrackSimSectorSlice(const FPGATrackSimSectorSlice &)=delete
FPGATrackSimSectorSlice::getBoundaries
std::pair< FPGATrackSimTrackPars, FPGATrackSimTrackPars > getBoundaries() const
Definition
FPGATrackSimSectorSlice.cxx:252
FPGATrackSimSectorSlice::m_bits_phi
TClonesArray * m_bits_phi
Definition
FPGATrackSimSectorSlice.h:61
FPGATrackSimSectorSlice::addSectorToSlice
void addSectorToSlice(sector_t sector, FPGATrackSimTrackParsI const &bins)
Definition
FPGATrackSimSectorSlice.cxx:135
FPGATrackSimSectorSlice::searchSectors
std::vector< sector_t > searchSectors(FPGATrackSimTrackPars const &pars) const
Definition
FPGATrackSimSectorSlice.cxx:216
FPGATrackSimSectorSlice::m_nBins
FPGATrackSimTrackParsI m_nBins
Definition
FPGATrackSimSectorSlice.h:68
FPGATrackSimSectorSlice::m_min
FPGATrackSimTrackPars m_min
Definition
FPGATrackSimSectorSlice.h:71
FPGATrackSimSectorSlice::m_bits_d0
TClonesArray * m_bits_d0
Definition
FPGATrackSimSectorSlice.h:63
FPGATrackSimSectorSlice::m_bits_eta
TClonesArray * m_bits_eta
Definition
FPGATrackSimSectorSlice.h:65
FPGATrackSimSectorSlice::saveSlices
void saveSlices(const std::string &filepath)
Definition
FPGATrackSimSectorSlice.cxx:156
FPGATrackSimSectorSlice::checkTrackPars
bool checkTrackPars(FPGATrackSimTrackPars const &pars) const
Definition
FPGATrackSimSectorSlice.cxx:197
FPGATrackSimSectorSlice::m_step
FPGATrackSimTrackPars m_step
Definition
FPGATrackSimSectorSlice.h:75
FPGATrackSimSectorSlice::m_bits_z0
TClonesArray * m_bits_z0
Definition
FPGATrackSimSectorSlice.h:64
FPGATrackSimSectorSlice::m_bits_c
TClonesArray * m_bits_c
Definition
FPGATrackSimSectorSlice.h:62
FPGATrackSimSectorSlice::calcDependentVals
void calcDependentVals()
Definition
FPGATrackSimSectorSlice.cxx:121
FPGATrackSimSectorSlice::operator=
FPGATrackSimSectorSlice & operator=(const FPGATrackSimSectorSlice &)=delete
FPGATrackSimSectorSlice::FPGATrackSimSectorSlice
FPGATrackSimSectorSlice(size_t nSectors, FPGATrackSimTrackParsI const &nBins, FPGATrackSimTrackPars const &min, FPGATrackSimTrackPars const &max)
Definition
FPGATrackSimSectorSlice.cxx:39
FPGATrackSimTrackParsI
Definition
FPGATrackSimTrackPars.h:56
FPGATrackSimTrackPars
Definition
FPGATrackSimTrackPars.h:22
Generated on
for ATLAS Offline Software by
1.17.0