ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
TrigFTF_GNN_DataStorage Class Reference

#include <GNN_DataStorage.h>

Collaboration diagram for TrigFTF_GNN_DataStorage:

Public Member Functions

 TrigFTF_GNN_DataStorage (const TrigFTF_GNN_Geometry &)
 
 ~TrigFTF_GNN_DataStorage ()
 
int loadPixelGraphNodes (short, const std::vector< TrigFTF_GNN_Node > &, bool)
 
int loadStripGraphNodes (short, const std::vector< TrigFTF_GNN_Node > &)
 
unsigned int numberOfNodes () const
 
void sortByPhi ()
 
void initializeNodes (bool)
 
void generatePhiIndexing (float)
 
TrigFTF_GNN_EtaBingetEtaBin (int idx)
 

Protected Attributes

const TrigFTF_GNN_Geometrym_geo
 
std::vector< TrigFTF_GNN_EtaBinm_etaBins
 

Detailed Description

Definition at line 81 of file GNN_DataStorage.h.

Constructor & Destructor Documentation

◆ TrigFTF_GNN_DataStorage()

TrigFTF_GNN_DataStorage::TrigFTF_GNN_DataStorage ( const TrigFTF_GNN_Geometry g)

Definition at line 104 of file GNN_DataStorage.cxx.

104  : m_geo(g) {
105  m_etaBins.resize(g.num_bins());
106 }

◆ ~TrigFTF_GNN_DataStorage()

TrigFTF_GNN_DataStorage::~TrigFTF_GNN_DataStorage ( )

Definition at line 108 of file GNN_DataStorage.cxx.

108  {
109 
110 }

Member Function Documentation

◆ generatePhiIndexing()

void TrigFTF_GNN_DataStorage::generatePhiIndexing ( float  dphi)

Definition at line 240 of file GNN_DataStorage.cxx.

240  {
241  for(auto& b : m_etaBins) b.generatePhiIndexing(dphi);
242 }

◆ getEtaBin()

TrigFTF_GNN_EtaBin& TrigFTF_GNN_DataStorage::getEtaBin ( int  idx)
inline

Definition at line 95 of file GNN_DataStorage.h.

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

◆ initializeNodes()

void TrigFTF_GNN_DataStorage::initializeNodes ( bool  useML = false)

Definition at line 192 of file GNN_DataStorage.cxx.

192  {
193 
194  for(auto& b : m_etaBins) {
195  b.initializeNodes();
196  }
197 
198  if(!useML) return;
199 
200  unsigned int nL = m_geo.num_layers();
201 
202  for(unsigned int layerIdx=0;layerIdx<nL;layerIdx++) {
203 
205 
206  if(pL->m_layer.m_subdet < 20000) {//skip strips volumes: layers in range [1200X-1400X]
207  continue;
208  }
209 
210  bool isBarrel = (pL->m_layer.m_type == 0);
211 
212  if(!isBarrel) continue;
213 
214  int nBins = pL->m_bins.size();
215 
216  for(int b=0;b<nBins;b++) {//loop over eta-bins in Layer
217 
218  TrigFTF_GNN_EtaBin& B = m_etaBins.at(pL->m_bins.at(b));
219 
220  if(B.empty()) continue;
221 
222  for(unsigned int nIdx=0;nIdx<B.m_vn.size();nIdx++) {
223 
224  const Trk::SpacePoint* osp = B.m_vn[nIdx]->sp();
225  const InDet::PixelCluster* pCL = dynamic_cast<const InDet::PixelCluster*>(osp->clusterList().first);
226 
227  float cluster_width = pCL->width().widthPhiRZ().y();
228  //adjusting cuts using fitted boundaries of |cot(theta)| vs. cluster z-width distribution
229  float min_tau = 6.7*(cluster_width - 0.2);//linear fit
230  float max_tau = 1.6 + 0.15/(cluster_width + 0.2) + 6.1*(cluster_width - 0.2);//linear fit + correction for short clusters
231 
232  B.m_params[nIdx][0] = min_tau;
233  B.m_params[nIdx][1] = max_tau;
234 
235  }
236  }
237  }
238 }

◆ loadPixelGraphNodes()

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

Definition at line 112 of file GNN_DataStorage.cxx.

112  {
113 
114  int nLoaded = 0;
115 
116  const TrigFTF_GNN_Layer* pL = m_geo.getTrigFTF_GNN_LayerByIndex(layerIndex);
117 
118  if(pL == nullptr) {
119  return -1;
120  }
121 
122  bool isBarrel = (pL->m_layer.m_type == 0);
123 
124  for(const auto& node : coll) {
125 
126  int binIndex = pL->getEtaBin(node.z(), node.r());
127 
128  if(binIndex == -1) {
129  continue;
130  }
131 
132  if(isBarrel) {
133  m_etaBins.at(binIndex).m_vn.push_back(&node);
134  }
135  else {
136  if (useML) {
137  const InDet::PixelCluster* pCL = dynamic_cast<const InDet::PixelCluster*>(node.sp()->clusterList().first);
138  float cluster_width = pCL->width().widthPhiRZ().y();
139  if(cluster_width > 0.2) continue;
140  }
141  m_etaBins.at(binIndex).m_vn.push_back(&node);
142  }
143 
144  nLoaded++;
145 
146  }
147 
148  return nLoaded;
149 }

◆ loadStripGraphNodes()

int TrigFTF_GNN_DataStorage::loadStripGraphNodes ( short  layerIndex,
const std::vector< TrigFTF_GNN_Node > &  coll 
)

Definition at line 151 of file GNN_DataStorage.cxx.

151  {
152 
153  int nLoaded = 0;
154 
155  const TrigFTF_GNN_Layer* pL = m_geo.getTrigFTF_GNN_LayerByIndex(layerIndex);
156 
157  if(pL == nullptr) {
158  return -1;
159  }
160 
161  for(const auto& node : coll) {
162 
163  int binIndex = pL->getEtaBin(node.z(), node.r());
164 
165  if(binIndex == -1) {
166  continue;
167  }
168 
169  m_etaBins.at(binIndex).m_vn.push_back(&node);
170  nLoaded++;
171  }
172 
173  return nLoaded;
174 }

◆ numberOfNodes()

unsigned int TrigFTF_GNN_DataStorage::numberOfNodes ( ) const

Definition at line 177 of file GNN_DataStorage.cxx.

177  {
178 
179  unsigned int n=0;
180 
181  for(const auto& b : m_etaBins) {
182  n += b.m_vn.size();
183  }
184  return n;
185 }

◆ sortByPhi()

void TrigFTF_GNN_DataStorage::sortByPhi ( )

Definition at line 187 of file GNN_DataStorage.cxx.

187  {
188 
189  for(auto& b : m_etaBins) b.sortByPhi();
190 }

Member Data Documentation

◆ m_etaBins

std::vector<TrigFTF_GNN_EtaBin> TrigFTF_GNN_DataStorage::m_etaBins
protected

Definition at line 104 of file GNN_DataStorage.h.

◆ m_geo

const TrigFTF_GNN_Geometry& TrigFTF_GNN_DataStorage::m_geo
protected

Definition at line 102 of file GNN_DataStorage.h.


The documentation for this class was generated from the following files:
TrigFTF_GNN_EtaBin
Definition: GNN_DataStorage.h:42
Trk::SpacePoint::clusterList
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList() const
return the pair of cluster pointers by reference
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:127
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
TrigFTF_GNN_Geometry::num_layers
unsigned int num_layers() const
Definition: GNN_Geometry.h:59
InDet::SiWidth::widthPhiRZ
const Amg::Vector2D & widthPhiRZ() const
Definition: SiWidth.h:121
TrigFTF_GNN_Layer::m_bins
std::vector< int > m_bins
Definition: GNN_Geometry.h:31
TrigFTF_GNN_DataStorage::m_etaBins
std::vector< TrigFTF_GNN_EtaBin > m_etaBins
Definition: GNN_DataStorage.h:104
beamspotman.n
n
Definition: beamspotman.py:731
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
TrigFTF_GNN_Layer::m_layer
const TrigInDetSiLayer & m_layer
Definition: GNN_Geometry.h:30
IDPVM::binIndex
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
Definition: InDetPhysValMonitoringUtilities.h:43
TrigInDetSiLayer::m_type
int m_type
Definition: TrigInDetSiLayer.h:11
TrigFTF_GNN_Geometry::getTrigFTF_GNN_LayerByIndex
const TrigFTF_GNN_Layer * getTrigFTF_GNN_LayerByIndex(int) const
Definition: GNN_Geometry.cxx:301
dumpTgcDigiJitter.nBins
list nBins
Definition: dumpTgcDigiJitter.py:29
TrigFTF_GNN_Layer
Definition: GNN_Geometry.h:16
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
InDet::SiCluster::width
const InDet::SiWidth & width() const
return width class reference
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
TrigFTF_GNN_DataStorage::m_geo
const TrigFTF_GNN_Geometry & m_geo
Definition: GNN_DataStorage.h:102
TrigFTF_GNN_Layer::getEtaBin
int getEtaBin(float, float) const
Definition: GNN_Geometry.cxx:184
node
Definition: memory_hooks-stdcmalloc.h:74
TrigInDetSiLayer::m_subdet
int m_subdet
Definition: TrigInDetSiLayer.h:10