ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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),
23  m_pd0(&m_bins_d0),
24  m_pz0(&m_bins_z0),
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 }

◆ ~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  {
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 }

◆ 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:
FPGATrackSimMatrixAccumulator::hit_x_QoP
std::vector< double > hit_x_QoP
Definition: FPGATrackSimMatrixAccumulator.h:77
FPGATrackSimMatrixAccumulator::hit_x_phi
std::vector< double > hit_x_phi
Definition: FPGATrackSimMatrixAccumulator.h:83
FPGATrackSimTrackPars::phi
double phi
Definition: FPGATrackSimTrackPars.h:24
FPGATrackSimMatrixReader::m_bins_eta
std::vector< short > m_bins_eta
Definition: FPGATrackSimMatrixIO.h:72
python.App.bins
bins
Definition: App.py:410
FPGATrackSimTrackPars::qOverPt
double qOverPt
Definition: FPGATrackSimTrackPars.h:25
FPGATrackSimMatrixAccumulator::covarianceG
std::vector< double > covarianceG
Definition: FPGATrackSimMatrixAccumulator.h:85
tree
TChain * tree
Definition: tile_monitor.h:30
FPGATrackSimTrackPars::d0
double d0
Definition: FPGATrackSimTrackPars.h:26
FPGATrackSimMatrixReader::m_tree
TTree * m_tree
Definition: FPGATrackSimMatrixIO.h:60
FPGATrackSimMatrixReader::m_pz0
std::vector< short > * m_pz0
Definition: FPGATrackSimMatrixIO.h:78
FPGATrackSimMatrixReader::m_pphi
std::vector< short > * m_pphi
Definition: FPGATrackSimMatrixIO.h:76
FPGATrackSimMatrixAccumulator::hit_x_d0
std::vector< double > hit_x_d0
Definition: FPGATrackSimMatrixAccumulator.h:79
FPGATrackSimMatrixAccumulator::track_bins
std::vector< FPGATrackSimTrackParsI > track_bins
Definition: FPGATrackSimMatrixAccumulator.h:91
FPGATrackSimMatrixAccumulator::hit_coordsG
std::vector< double > hit_coordsG
Definition: FPGATrackSimMatrixAccumulator.h:76
FPGATrackSimTrackPars::eta
double eta
Definition: FPGATrackSimTrackPars.h:28
FPGATrackSimMatrixReader::m_bins_z0
std::vector< short > m_bins_z0
Definition: FPGATrackSimMatrixIO.h:71
FPGATrackSimMatrixAccumulator::hit_x_eta
std::vector< double > hit_x_eta
Definition: FPGATrackSimMatrixAccumulator.h:81
FPGATrackSimMatrixAccumulator::hit_xG_HIP
std::vector< double > hit_xG_HIP
Definition: FPGATrackSimMatrixAccumulator.h:78
FPGATrackSimMatrixReader::m_modules
std::vector< module_t > m_modules
Definition: FPGATrackSimMatrixIO.h:65
FPGATrackSimMatrixAccumulator::hit_coords
std::vector< double > hit_coords
Definition: FPGATrackSimMatrixAccumulator.h:75
FPGATrackSimMatrixAccumulator::covariance
std::vector< double > covariance
Definition: FPGATrackSimMatrixAccumulator.h:84
FPGATrackSimMatrixReader::m_acc
FPGATrackSimMatrixAccumulator m_acc
Definition: FPGATrackSimMatrixIO.h:66
FPGATrackSimMatrixReader::m_bins_d0
std::vector< short > m_bins_d0
Definition: FPGATrackSimMatrixIO.h:70
FPGATrackSimMatrixReader::m_pd0
std::vector< short > * m_pd0
Definition: FPGATrackSimMatrixIO.h:77
FPGATrackSimMatrixReader::m_bins_QoP
std::vector< short > m_bins_QoP
Definition: FPGATrackSimMatrixIO.h:68
FPGATrackSimMatrixReader::m_entry
size_t m_entry
Definition: FPGATrackSimMatrixIO.h:62
FPGATrackSimMatrixAccumulator::hit_x_z0
std::vector< double > hit_x_z0
Definition: FPGATrackSimMatrixAccumulator.h:80
FPGATrackSimMatrixAccumulator::FTK_modules
std::vector< module_t > FTK_modules
Definition: FPGATrackSimMatrixAccumulator.h:56
FPGATrackSimMatrixAccumulator::hit_xG_eta
std::vector< double > hit_xG_eta
Definition: FPGATrackSimMatrixAccumulator.h:82
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
FPGATrackSimMatrixReader::m_bins_phi
std::vector< short > m_bins_phi
Definition: FPGATrackSimMatrixIO.h:69
FPGATrackSimMatrixAccumulator::pars
FPGATrackSimTrackPars pars
Definition: FPGATrackSimMatrixAccumulator.h:70
FPGATrackSimMatrixReader::readEntry
void readEntry(size_t entry)
Definition: FPGATrackSimMatrixIO.cxx:56
FPGATrackSimTrackPars::z0
double z0
Definition: FPGATrackSimTrackPars.h:27
FPGATrackSimMatrixReader::m_peta
std::vector< short > * m_peta
Definition: FPGATrackSimMatrixIO.h:79
FPGATrackSimMatrixReader::m_nEntries
size_t m_nEntries
Definition: FPGATrackSimMatrixIO.h:63
FPGATrackSimMatrixReader::m_pQoP
std::vector< short > * m_pQoP
Definition: FPGATrackSimMatrixIO.h:75
FPGATrackSimTrackParsI
Definition: FPGATrackSimTrackPars.h:56