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 FASTRACK_CONNECTOR *)
 
 ~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
 

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
 

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 FASTRACK_CONNECTOR 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 
233  for(std::map<int, std::vector<FASTRACK_CONNECTION*> >::const_iterator it = conn->m_connMap.begin();it!=conn->m_connMap.end();++it) {
234 
235  const std::vector<FASTRACK_CONNECTION*>& vConn = (*it).second;
236 
237  for(std::vector<FASTRACK_CONNECTION*>::const_iterator cIt=vConn.begin();cIt!=vConn.end();++cIt) {
238 
239  unsigned int src = (*cIt)->m_src;//n2 : the new connectors
240  unsigned int dst = (*cIt)->m_dst;//n1
241 
244 
245  if (pL1==nullptr) {
246  std::cout << " skipping invalid dst layer " << dst << std::endl;
247  continue;
248  }
249  if (pL2==nullptr) {
250  std::cout << " skipping invalid src layer " << src << std::endl;
251  continue;
252  }
253  int nSrcBins = pL2->m_bins.size();
254  int nDstBins = pL1->m_bins.size();
255 
256  (*cIt)->m_binTable.resize(nSrcBins*nDstBins, 0);
257 
258  for(int b1=0;b1<nDstBins;b1++) {//loop over bins in Layer 1
259  for(int b2=0;b2<nSrcBins;b2++) {//loop over bins in Layer 2
260  if(!pL1->verifyBin(pL2, b1, b2, min_z0, max_z0)) continue;
261  int address = b1 + b2*nDstBins;
262  (*cIt)->m_binTable.at(address) = 1;
263  }
264  }
265  }
266  }
267 }

◆ ~TrigFTF_GNN_Geometry()

TrigFTF_GNN_Geometry::~TrigFTF_GNN_Geometry ( )

Definition at line 269 of file GNN_Geometry.cxx.

269  {
271  delete (*it);
272  }
273  m_layMap.clear();m_layArray.clear();
274 }

Member Function Documentation

◆ addNewLayer()

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

Definition at line 290 of file GNN_Geometry.cxx.

290  {
291 
292  unsigned int layerKey = l.m_subdet;
293 
294  float ew = m_etaBinWidth;
295 
296  TrigFTF_GNN_Layer* pHL = new TrigFTF_GNN_Layer(l, ew, bin0);
297 
298  m_layMap.insert(std::pair<unsigned int, TrigFTF_GNN_Layer*>(layerKey, pHL));
299  m_layArray.push_back(pHL);
300  return pHL;
301 }

◆ getTrigFTF_GNN_LayerByIndex()

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

Definition at line 284 of file GNN_Geometry.cxx.

284  {
285  return m_layArray.at(idx);
286 }

◆ getTrigFTF_GNN_LayerByKey()

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

Definition at line 276 of file GNN_Geometry.cxx.

276  {
277  std::map<unsigned int, TrigFTF_GNN_Layer*>::const_iterator it = m_layMap.find(key);
278  if(it == m_layMap.end()) {
279  return nullptr;
280  }
281  return (*it).second;
282 }

◆ 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_etaBinWidth

float TrigFTF_GNN_Geometry::m_etaBinWidth
protected

Definition at line 65 of file GNN_Geometry.h.

◆ m_layArray

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

Definition at line 68 of file GNN_Geometry.h.

◆ m_layMap

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

Definition at line 67 of file GNN_Geometry.h.

◆ m_nEtaBins

int TrigFTF_GNN_Geometry::m_nEtaBins
protected

Definition at line 70 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
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:276
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:70
TrigFTF_GNN_Geometry::m_layMap
std::map< unsigned int, TrigFTF_GNN_Layer * > m_layMap
Definition: GNN_Geometry.h:67
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:65
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:68
TrigFTF_GNN_Layer
Definition: GNN_Geometry.h:16
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
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:290
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37