|
ATLAS Offline Software
|
Go to the documentation of this file.
3 #ifndef FPGATrackSimMATRIXREADER_H
4 #define FPGATrackSimMATRIXREADER_H
156 template<
typename Iter>
160 std::vector<Iter> sorted_sectors;
162 for (Iter
i =
begin;
i !=
end;
i++) sorted_sectors.push_back(
i);
164 std::sort(sorted_sectors.begin(), sorted_sectors.end(), [](Iter
const &
a, Iter
const &
b)
165 { return a->second.track_bins.size() > b->second.track_bins.size(); }
172 for (Iter & sector_info : sorted_sectors)
173 writer.fill(sector_info->first, sector_info->second);
size_t fill(std::vector< module_t > modules, FPGATrackSimMatrixAccumulator &acc)
FPGATrackSimMatrixReader(TTree *tree, size_t nLayers, size_t nCoords)
std::vector< short > m_bins_eta
std::vector< short > * m_pz0
std::vector< short > * m_pz0
std::vector< short > * m_pphi
~FPGATrackSimMatrixReader()
void setEntry(size_t entry)
std::vector< short > m_bins_eta
std::vector< short > * m_pd0
std::vector< short > m_bins_phi
std::vector< short > m_bins_z0
std::vector< module_t > m_modules
FPGATrackSimMatrixWriter(TTree *tree, int nLayers, int nCoords)
void fillTree(Iter begin, Iter end, TTree *tree, int nLayers, int nCoords)
Writes the contents of an AccumulateMap into the supplied tree (one entry per sector).
std::vector< short > * m_pQoP
FPGATrackSimMatrixAccumulator & getAccumulator()
FPGATrackSimMatrixAccumulator m_acc
std::vector< short > m_bins_d0
std::vector< short > * m_pd0
std::vector< short > * m_pphi
std::vector< short > m_bins_QoP
std::vector< short > m_bins_z0
Helper struct for accumulating sector information for matrix generation.
std::vector< short > m_bins_phi
std::vector< module_t > & getModules()
void readEntry(size_t entry)
std::vector< short > m_bins_d0
void readTree(AccumulateMap &map, TTree *tree, size_t nLayers, size_t nCoords)
Reads a matrix tree, accumulating its entries into a map.
std::vector< short > * m_peta
std::vector< short > * m_pQoP
std::unordered_map< std::vector< module_t >, FPGATrackSimMatrixAccumulator, container_hash< std::vector< module_t > > > AccumulateMap
std::vector< short > m_bins_QoP
writer
show summary of content
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
std::vector< short > * m_peta