ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimMatrixReader Class Reference

#include <FPGATrackSimMatrixIO.h>

Collaboration diagram for FPGATrackSimMatrixReader:

Public Member Functions

 FPGATrackSimMatrixReader (TTree *tree, size_t nLayers, size_t nCoords)
 ~FPGATrackSimMatrixReader ()
void setEntry (size_t entry)
size_t getEntry () const
bool nextEntry ()
void readEntry (size_t entry)
std::vector< module_t > & getModules ()
FPGATrackSimMatrixAccumulatorgetAccumulator ()

Private Attributes

TTree * m_tree
size_t m_entry
size_t m_nEntries
std::vector< module_tm_modules
FPGATrackSimMatrixAccumulator m_acc
std::vector< short > m_bins_QoP
std::vector< short > m_bins_phi
std::vector< short > m_bins_d0
std::vector< short > m_bins_z0
std::vector< short > m_bins_eta
std::vector< short > * m_pQoP
std::vector< short > * m_pphi
std::vector< short > * m_pd0
std::vector< short > * m_pz0
std::vector< short > * m_peta

Detailed Description

Definition at line 40 of file FPGATrackSimMatrixIO.h.

Constructor & Destructor Documentation

◆ FPGATrackSimMatrixReader()

FPGATrackSimMatrixReader::FPGATrackSimMatrixReader ( TTree * tree,
size_t nLayers,
size_t nCoords )

Definition at line 15 of file FPGATrackSimMatrixIO.cxx.

15 :
16 m_tree(tree),
17 m_entry(0),
18 m_nEntries(tree->GetEntries()),
19 m_modules(nLayers),
20 m_acc(nLayers, nCoords),
26{
27 tree->SetBranchAddress("sectorID", m_acc.FTK_modules.data());
28 tree->SetBranchAddress("hashID", m_modules.data());
29
30 tree->SetBranchAddress("tmpC", &m_acc.pars.qOverPt);
31 tree->SetBranchAddress("tmpD", &m_acc.pars.d0);
32 tree->SetBranchAddress("tmpPhi", &m_acc.pars.phi);
33 tree->SetBranchAddress("tmpCoto", &m_acc.pars.eta);
34 tree->SetBranchAddress("tmpZ", &m_acc.pars.z0);
35
36 tree->SetBranchAddress("Vec", m_acc.hit_coords.data());
37 tree->SetBranchAddress("VecG", m_acc.hit_coordsG.data());
38 tree->SetBranchAddress("tmpxC", m_acc.hit_x_QoP.data());
39 tree->SetBranchAddress("tmpxGC", m_acc.hit_xG_HIP.data());
40 tree->SetBranchAddress("tmpxD", m_acc.hit_x_d0.data());
41 tree->SetBranchAddress("tmpxPhi", m_acc.hit_x_phi.data());
42 tree->SetBranchAddress("tmpxCoto", m_acc.hit_x_eta.data());
43 tree->SetBranchAddress("tmpxGCoto", m_acc.hit_xG_eta.data());
44 tree->SetBranchAddress("tmpxZ", m_acc.hit_x_z0.data());
45 tree->SetBranchAddress("tmpcovx", m_acc.covariance.data());
46 tree->SetBranchAddress("tmpcovxG", m_acc.covarianceG.data());
47
48 tree->SetBranchAddress("tmpintc", &m_pQoP);
49 tree->SetBranchAddress("tmpintphi", &m_pphi);
50 tree->SetBranchAddress("tmpintd0", &m_pd0);
51 tree->SetBranchAddress("tmpintz0", &m_pz0);
52 tree->SetBranchAddress("tmpinteta", &m_peta);
53}
FPGATrackSimMatrixAccumulator m_acc
std::vector< short > * m_pz0
std::vector< module_t > m_modules
std::vector< short > m_bins_QoP
std::vector< short > m_bins_phi
std::vector< short > * m_pphi
std::vector< short > m_bins_eta
std::vector< short > m_bins_z0
std::vector< short > * m_peta
std::vector< short > m_bins_d0
std::vector< short > * m_pQoP
std::vector< short > * m_pd0
TChain * tree

◆ ~FPGATrackSimMatrixReader()

FPGATrackSimMatrixReader::~FPGATrackSimMatrixReader ( )
inline

Definition at line 45 of file FPGATrackSimMatrixIO.h.

45{ m_tree->ResetBranchAddresses(); }

Member Function Documentation

◆ getAccumulator()

FPGATrackSimMatrixAccumulator & FPGATrackSimMatrixReader::getAccumulator ( )
inline

Definition at line 56 of file FPGATrackSimMatrixIO.h.

56{ return m_acc; }

◆ getEntry()

size_t FPGATrackSimMatrixReader::getEntry ( ) const
inline

Definition at line 48 of file FPGATrackSimMatrixIO.h.

48{ return m_entry - 1; } // last read entry number

◆ getModules()

std::vector< module_t > & FPGATrackSimMatrixReader::getModules ( )
inline

Definition at line 55 of file FPGATrackSimMatrixIO.h.

55{ return m_modules; }

◆ nextEntry()

bool FPGATrackSimMatrixReader::nextEntry ( )

Definition at line 73 of file FPGATrackSimMatrixIO.cxx.

74{
75 if (m_entry >= m_nEntries) return false;
76
78 m_entry++;
79 return true;
80}

◆ readEntry()

void FPGATrackSimMatrixReader::readEntry ( size_t entry)

Definition at line 56 of file FPGATrackSimMatrixIO.cxx.

57{
58 m_tree->GetEntry(entry);
59
60 m_acc.track_bins.clear();
61 for (size_t j = 0; j < m_bins_QoP.size(); j++)
62 {
63 FPGATrackSimTrackParsI bins;
64 bins.qOverPt = m_bins_QoP[j];
65 bins.phi = m_bins_phi[j];
66 bins.d0 = m_bins_d0[j];
67 bins.z0 = m_bins_z0[j];
68 bins.eta = m_bins_eta[j];
69 m_acc.track_bins.push_back(bins);
70 }
71}
static const std::vector< std::string > bins

◆ setEntry()

void FPGATrackSimMatrixReader::setEntry ( size_t entry)
inline

Definition at line 47 of file FPGATrackSimMatrixIO.h.

47{ m_entry = entry; }

Member Data Documentation

◆ m_acc

FPGATrackSimMatrixAccumulator FPGATrackSimMatrixReader::m_acc
private

Definition at line 66 of file FPGATrackSimMatrixIO.h.

◆ m_bins_d0

std::vector<short> FPGATrackSimMatrixReader::m_bins_d0
private

Definition at line 70 of file FPGATrackSimMatrixIO.h.

◆ m_bins_eta

std::vector<short> FPGATrackSimMatrixReader::m_bins_eta
private

Definition at line 72 of file FPGATrackSimMatrixIO.h.

◆ m_bins_phi

std::vector<short> FPGATrackSimMatrixReader::m_bins_phi
private

Definition at line 69 of file FPGATrackSimMatrixIO.h.

◆ m_bins_QoP

std::vector<short> FPGATrackSimMatrixReader::m_bins_QoP
private

Definition at line 68 of file FPGATrackSimMatrixIO.h.

◆ m_bins_z0

std::vector<short> FPGATrackSimMatrixReader::m_bins_z0
private

Definition at line 71 of file FPGATrackSimMatrixIO.h.

◆ m_entry

size_t FPGATrackSimMatrixReader::m_entry
private

Definition at line 62 of file FPGATrackSimMatrixIO.h.

◆ m_modules

std::vector<module_t> FPGATrackSimMatrixReader::m_modules
private

Definition at line 65 of file FPGATrackSimMatrixIO.h.

◆ m_nEntries

size_t FPGATrackSimMatrixReader::m_nEntries
private

Definition at line 63 of file FPGATrackSimMatrixIO.h.

◆ m_pd0

std::vector<short>* FPGATrackSimMatrixReader::m_pd0
private

Definition at line 77 of file FPGATrackSimMatrixIO.h.

◆ m_peta

std::vector<short>* FPGATrackSimMatrixReader::m_peta
private

Definition at line 79 of file FPGATrackSimMatrixIO.h.

◆ m_pphi

std::vector<short>* FPGATrackSimMatrixReader::m_pphi
private

Definition at line 76 of file FPGATrackSimMatrixIO.h.

◆ m_pQoP

std::vector<short>* FPGATrackSimMatrixReader::m_pQoP
private

Definition at line 75 of file FPGATrackSimMatrixIO.h.

◆ m_pz0

std::vector<short>* FPGATrackSimMatrixReader::m_pz0
private

Definition at line 78 of file FPGATrackSimMatrixIO.h.

◆ m_tree

TTree* FPGATrackSimMatrixReader::m_tree
private

Definition at line 60 of file FPGATrackSimMatrixIO.h.


The documentation for this class was generated from the following files: