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

#include <GNN_Geometry.h>

Collaboration diagram for TrigFTF_GNN_Geometry:

Public Member Functions

 TrigFTF_GNN_Geometry (const std::vector< TrigInDetSiLayer > &, const std::unique_ptr< GNN_FasTrackConnector > &)
 
 ~TrigFTF_GNN_Geometry ()
 
const TrigFTF_GNN_LayergetTrigFTF_GNN_LayerByKey (unsigned int) const
 
const TrigFTF_GNN_LayergetTrigFTF_GNN_LayerByIndex (int) const
 
int num_bins () const
 
unsigned int num_layers () const
 
const std::vector< std::pair< int, std::vector< int > > > & bin_groups () const
 

Protected Member Functions

const TrigFTF_GNN_LayeraddNewLayer (const TrigInDetSiLayer &, int)
 

Protected Attributes

float m_etaBinWidth
 
std::map< unsigned int, TrigFTF_GNN_Layer * > m_layMap
 
std::vector< TrigFTF_GNN_Layer * > m_layArray
 
int m_nEtaBins
 
std::vector< std::pair< int, std::vector< int > > > m_binGroups
 

Detailed Description

Definition at line 50 of file GNN_Geometry.h.

Constructor & Destructor Documentation

◆ TrigFTF_GNN_Geometry()

TrigFTF_GNN_Geometry::TrigFTF_GNN_Geometry ( const std::vector< TrigInDetSiLayer > &  layers,
const std::unique_ptr< GNN_FasTrackConnector > &  conn 
)

Definition at line 219 of file GNN_Geometry.cxx.

219  : m_nEtaBins(0) {
220 
221  const float min_z0 = -168.0;
222  const float max_z0 = 168.0;
223 
224  m_etaBinWidth = conn->m_etaBin;
225 
226  for(const auto& layer : layers) {
228  m_nEtaBins += pL->num_bins();
229  }
230 
231  //calculating bin tables in the connector...
232  //calculate bin pairs for graph edge building
233 
234  int lastBin1 = -1;
235 
236  for(std::map<int, std::vector<GNN_FASTRACK_CONNECTION*> >::const_iterator it = conn->m_connMap.begin();it!=conn->m_connMap.end();++it) {
237 
238  const std::vector<GNN_FASTRACK_CONNECTION*>& vConn = (*it).second;
239 
240  for(std::vector<GNN_FASTRACK_CONNECTION*>::const_iterator cIt=vConn.begin();cIt!=vConn.end();++cIt) {
241 
242  unsigned int src = (*cIt)->m_src;//n2 : the new connectors
243  unsigned int dst = (*cIt)->m_dst;//n1
244 
247 
248  if (pL1==nullptr) {
249  std::cout << " skipping invalid dst layer " << dst << std::endl;
250  continue;
251  }
252  if (pL2==nullptr) {
253  std::cout << " skipping invalid src layer " << src << std::endl;
254  continue;
255  }
256  int nSrcBins = pL2->m_bins.size();
257  int nDstBins = pL1->m_bins.size();
258 
259  (*cIt)->m_binTable.resize(nSrcBins*nDstBins, 0);
260 
261  for(int b1=0;b1<nDstBins;b1++) {//loop over bins in Layer 1
262  for(int b2=0;b2<nSrcBins;b2++) {//loop over bins in Layer 2
263  if(!pL1->verifyBin(pL2, b1, b2, min_z0, max_z0)) continue;
264  int address = b1 + b2*nDstBins;
265  (*cIt)->m_binTable.at(address) = 1;
266 
267  int bin1_idx = pL1->m_bins.at(b1);
268  int bin2_idx = pL2->m_bins.at(b2);
269 
270  if(bin1_idx != lastBin1) {//adding a new group
271 
272  std::vector<int> v2(1, bin2_idx);
273  m_binGroups.push_back(std::make_pair(bin1_idx, v2));
274 
275  }
276  else {//extend the last group
277  (*m_binGroups.rbegin()).second.push_back(bin2_idx);
278  }
279  }
280  }
281  }
282  }
283 }

◆ ~TrigFTF_GNN_Geometry()

TrigFTF_GNN_Geometry::~TrigFTF_GNN_Geometry ( )

Definition at line 286 of file GNN_Geometry.cxx.

286  {
288  delete (*it);
289  }
290  m_layMap.clear();m_layArray.clear();
291 }

Member Function Documentation

◆ addNewLayer()

const TrigFTF_GNN_Layer * TrigFTF_GNN_Geometry::addNewLayer ( const TrigInDetSiLayer l,
int  bin0 
)
protected

Definition at line 307 of file GNN_Geometry.cxx.

307  {
308 
309  unsigned int layerKey = l.m_subdet;
310 
311  float ew = m_etaBinWidth;
312 
313  TrigFTF_GNN_Layer* pHL = new TrigFTF_GNN_Layer(l, ew, bin0);
314 
315  m_layMap.insert(std::pair<unsigned int, TrigFTF_GNN_Layer*>(layerKey, pHL));
316  m_layArray.push_back(pHL);
317  return pHL;
318 }

◆ bin_groups()

const std::vector<std::pair<int, std::vector<int> > >& TrigFTF_GNN_Geometry::bin_groups ( ) const
inline

Definition at line 60 of file GNN_Geometry.h.

60 {return m_binGroups;}

◆ getTrigFTF_GNN_LayerByIndex()

const TrigFTF_GNN_Layer * TrigFTF_GNN_Geometry::getTrigFTF_GNN_LayerByIndex ( int  idx) const

Definition at line 301 of file GNN_Geometry.cxx.

301  {
302  return m_layArray.at(idx);
303 }

◆ getTrigFTF_GNN_LayerByKey()

const TrigFTF_GNN_Layer * TrigFTF_GNN_Geometry::getTrigFTF_GNN_LayerByKey ( unsigned int  key) const

Definition at line 293 of file GNN_Geometry.cxx.

293  {
294  std::map<unsigned int, TrigFTF_GNN_Layer*>::const_iterator it = m_layMap.find(key);
295  if(it == m_layMap.end()) {
296  return nullptr;
297  }
298  return (*it).second;
299 }

◆ num_bins()

int TrigFTF_GNN_Geometry::num_bins ( ) const
inline

Definition at line 58 of file GNN_Geometry.h.

58 {return m_nEtaBins;}

◆ num_layers()

unsigned int TrigFTF_GNN_Geometry::num_layers ( ) const
inline

Definition at line 59 of file GNN_Geometry.h.

59 {return m_layArray.size();}

Member Data Documentation

◆ m_binGroups

std::vector<std::pair<int, std::vector<int> > > TrigFTF_GNN_Geometry::m_binGroups
protected

Definition at line 73 of file GNN_Geometry.h.

◆ m_etaBinWidth

float TrigFTF_GNN_Geometry::m_etaBinWidth
protected

Definition at line 66 of file GNN_Geometry.h.

◆ m_layArray

std::vector<TrigFTF_GNN_Layer*> TrigFTF_GNN_Geometry::m_layArray
protected

Definition at line 69 of file GNN_Geometry.h.

◆ m_layMap

std::map<unsigned int, TrigFTF_GNN_Layer*> TrigFTF_GNN_Geometry::m_layMap
protected

Definition at line 68 of file GNN_Geometry.h.

◆ m_nEtaBins

int TrigFTF_GNN_Geometry::m_nEtaBins
protected

Definition at line 71 of file GNN_Geometry.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
TrigFTF_GNN_Geometry::getTrigFTF_GNN_LayerByKey
const TrigFTF_GNN_Layer * getTrigFTF_GNN_LayerByKey(unsigned int) const
Definition: GNN_Geometry.cxx:293
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TrigFTF_GNN_Geometry::m_nEtaBins
int m_nEtaBins
Definition: GNN_Geometry.h:71
TrigFTF_GNN_Geometry::m_layMap
std::map< unsigned int, TrigFTF_GNN_Layer * > m_layMap
Definition: GNN_Geometry.h:68
TrigFTF_GNN_Layer::m_bins
std::vector< int > m_bins
Definition: GNN_Geometry.h:31
TrigFTF_GNN_Geometry::m_etaBinWidth
float m_etaBinWidth
Definition: GNN_Geometry.h:66
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TrigFTF_GNN_Geometry::m_layArray
std::vector< TrigFTF_GNN_Layer * > m_layArray
Definition: GNN_Geometry.h:69
TrigFTF_GNN_Geometry::m_binGroups
std::vector< std::pair< int, std::vector< int > > > m_binGroups
Definition: GNN_Geometry.h:73
TrigFTF_GNN_Layer
Definition: GNN_Geometry.h:16
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
TrigFTF_GNN_Layer::num_bins
int num_bins() const
Definition: GNN_Geometry.h:26
TrigFTF_GNN_Layer::verifyBin
bool verifyBin(const TrigFTF_GNN_Layer *, int, int, float, float) const
Definition: GNN_Geometry.cxx:124
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
TrigFTF_GNN_Geometry::addNewLayer
const TrigFTF_GNN_Layer * addNewLayer(const TrigInDetSiLayer &, int)
Definition: GNN_Geometry.cxx:307
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37