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

#include <GNNR3_DataStorage.h>

Collaboration diagram for TrigFTF_GNNR3_DataStorage:

Public Member Functions

 TrigFTF_GNNR3_DataStorage (const TrigFTF_GNNR3_Geometry &)
 ~TrigFTF_GNNR3_DataStorage ()
int loadPixelGraphNodes (short, const std::vector< TrigFTF_GNNR3_Node > &, bool)
int loadStripGraphNodes (short, const std::vector< TrigFTF_GNNR3_Node > &)
unsigned int numberOfNodes () const
void sortByPhi ()
void initializeNodes (bool)
void generatePhiIndexing (float)
TrigFTF_GNNR3_EtaBingetEtaBin (int idx)

Protected Attributes

const TrigFTF_GNNR3_Geometrym_geo
std::vector< TrigFTF_GNNR3_EtaBinm_etaBins

Detailed Description

Definition at line 79 of file GNNR3_DataStorage.h.

Constructor & Destructor Documentation

◆ TrigFTF_GNNR3_DataStorage()

TrigFTF_GNNR3_DataStorage::TrigFTF_GNNR3_DataStorage ( const TrigFTF_GNNR3_Geometry & g)

Definition at line 95 of file GNNR3_DataStorage.cxx.

95 : m_geo(g) {
96 m_etaBins.resize(g.num_bins());
97}
const TrigFTF_GNNR3_Geometry & m_geo
std::vector< TrigFTF_GNNR3_EtaBin > m_etaBins

◆ ~TrigFTF_GNNR3_DataStorage()

TrigFTF_GNNR3_DataStorage::~TrigFTF_GNNR3_DataStorage ( )

Definition at line 100 of file GNNR3_DataStorage.cxx.

100 {
101
102}

Member Function Documentation

◆ generatePhiIndexing()

void TrigFTF_GNNR3_DataStorage::generatePhiIndexing ( float dphi)

Definition at line 226 of file GNNR3_DataStorage.cxx.

226 {
227 for(auto& b : m_etaBins) b.generatePhiIndexing(dphi);
228}

◆ getEtaBin()

TrigFTF_GNNR3_EtaBin & TrigFTF_GNNR3_DataStorage::getEtaBin ( int idx)
inline

Definition at line 93 of file GNNR3_DataStorage.h.

93 {
94 if(idx >= static_cast<int>(m_etaBins.size())) idx = idx-1;
95 return m_etaBins.at(idx);
96 }

◆ initializeNodes()

void TrigFTF_GNNR3_DataStorage::initializeNodes ( bool useML)

Definition at line 182 of file GNNR3_DataStorage.cxx.

182 {
183
184 for(auto& b : m_etaBins) {
185 b.initializeNodes();
186 }
187
188 if(!useML) return;
189
190 unsigned int nL = m_geo.num_layers();
191
192 for(unsigned int layerIdx=0;layerIdx<nL;layerIdx++) {
193
194 const TrigFTF_GNNR3_Layer* pL = m_geo.getTrigFTF_GNNR3_LayerByIndex(layerIdx);
195
196 if(pL->m_layer.m_subdet < 20000) {//skip strips volumes: layers in range [1200X-1400X]
197 continue;
198 }
199
200 bool isBarrel = (pL->m_layer.m_type == 0);
201
202 if(!isBarrel) continue;
203
204 int nBins = pL->m_bins.size();
205
206 for(int b=0;b<nBins;b++) {//loop over eta-bins in Layer
207
208 TrigFTF_GNNR3_EtaBin& B = m_etaBins.at(pL->m_bins.at(b));
209
210 if(B.empty()) continue;
211
212 for(unsigned int nIdx=0;nIdx<B.m_vn.size();nIdx++) {
213 float cluster_width = B.m_vn[nIdx]->pixelClusterWidth();
214 //adjusting cuts using fitted boundaries of |cot(theta)| vs. cluster z-width distribution
215 float min_tau = 6.7*(cluster_width - 0.2);//linear fit
216 float max_tau = 1.6 + 0.15/(cluster_width + 0.2) + 6.1*(cluster_width - 0.2);//linear fit + correction for short clusters
217
218 B.m_params[nIdx][0] = min_tau;
219 B.m_params[nIdx][1] = max_tau;
220
221 }
222 }
223 }
224}
const TrigInDetSiLayer & m_layer
std::vector< int > m_bins

◆ loadPixelGraphNodes()

int TrigFTF_GNNR3_DataStorage::loadPixelGraphNodes ( short layerIndex,
const std::vector< TrigFTF_GNNR3_Node > & coll,
bool useML )

Definition at line 104 of file GNNR3_DataStorage.cxx.

104 {
105
106 int nLoaded = 0;
107
108 const TrigFTF_GNNR3_Layer* pL = m_geo.getTrigFTF_GNNR3_LayerByIndex(layerIndex);
109
110 if(pL == nullptr) {
111 return -1;
112 }
113
114 bool isBarrel = (pL->m_layer.m_type == 0);
115
116 for(const auto& node : coll) {
117
118 int binIndex = pL->getEtaBin(node.z(), node.r());
119
120 if(binIndex == -1) {
121 continue;
122 }
123
124 if(isBarrel) {
125 m_etaBins.at(binIndex).m_vn.push_back(&node);
126 }
127 else {
128 if (useML) {
129 float cluster_width = node.pixelClusterWidth();
130 if(cluster_width > 0.2) continue;
131 }
132 m_etaBins.at(binIndex).m_vn.push_back(&node);
133 }
134
135 nLoaded++;
136
137 }
138
139 return nLoaded;
140}
int getEtaBin(float, float) const
unsigned int binIndex(const T &val, const std::vector< T > &partitions)
general utility function to return bin index given a value and the upper endpoints of each bin

◆ loadStripGraphNodes()

int TrigFTF_GNNR3_DataStorage::loadStripGraphNodes ( short layerIndex,
const std::vector< TrigFTF_GNNR3_Node > & coll )

Definition at line 142 of file GNNR3_DataStorage.cxx.

142 {
143
144 int nLoaded = 0;
145
146 const TrigFTF_GNNR3_Layer* pL = m_geo.getTrigFTF_GNNR3_LayerByIndex(layerIndex);
147
148 if(pL == nullptr) {
149 return -1;
150 }
151
152 for(const auto& node : coll) {
153
154 int binIndex = pL->getEtaBin(node.z(), node.r());
155
156 if(binIndex == -1) {
157 continue;
158 }
159
160 m_etaBins.at(binIndex).m_vn.push_back(&node);
161 nLoaded++;
162 }
163
164 return nLoaded;
165}

◆ numberOfNodes()

unsigned int TrigFTF_GNNR3_DataStorage::numberOfNodes ( ) const

Definition at line 167 of file GNNR3_DataStorage.cxx.

167 {
168
169 unsigned int n=0;
170
171 for(const auto& b : m_etaBins) {
172 n += b.m_vn.size();
173 }
174 return n;
175}

◆ sortByPhi()

void TrigFTF_GNNR3_DataStorage::sortByPhi ( )

Definition at line 177 of file GNNR3_DataStorage.cxx.

177 {
178
179 for(auto& b : m_etaBins) b.sortByPhi();
180}

Member Data Documentation

◆ m_etaBins

std::vector<TrigFTF_GNNR3_EtaBin> TrigFTF_GNNR3_DataStorage::m_etaBins
protected

Definition at line 102 of file GNNR3_DataStorage.h.

◆ m_geo

const TrigFTF_GNNR3_Geometry& TrigFTF_GNNR3_DataStorage::m_geo
protected

Definition at line 100 of file GNNR3_DataStorage.h.


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