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 addSpacePoint (const TrigSiSpacePointBase *, bool)
 
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 49 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 69 of file GNN_DataStorage.cxx.

69  : m_geo(g) {
70  m_etaBins.resize(g.num_bins());
71 }

◆ ~TrigFTF_GNN_DataStorage()

TrigFTF_GNN_DataStorage::~TrigFTF_GNN_DataStorage ( )

Definition at line 73 of file GNN_DataStorage.cxx.

73 {}

Member Function Documentation

◆ addSpacePoint()

int TrigFTF_GNN_DataStorage::addSpacePoint ( const TrigSiSpacePointBase sp,
bool  useML = false 
)

Definition at line 75 of file GNN_DataStorage.cxx.

75  {
76 
78 
79  if(pL==nullptr) return -1;
80 
81  int binIndex = pL->getEtaBin(sp->z(), sp->r());
82 
83  if(binIndex == -1) {
84  return -2;
85  }
86 
87  bool isStrip = sp->offlineSpacePoint()->clusterList().second != nullptr;
88 
89  if(isStrip) {
90  m_etaBins.at(binIndex).m_vn.push_back(sp);
91  return 0;
92  }
93 
94  bool isBarrel = (pL->m_layer.m_type == 0);
95 
96  if(isBarrel) {
97  m_etaBins.at(binIndex).m_vn.push_back(sp);
98  }
99  else {
100  if (useML) {
101  const Trk::SpacePoint* osp = sp->offlineSpacePoint();
102  const InDet::PixelCluster* pCL = dynamic_cast<const InDet::PixelCluster*>(osp->clusterList().first);
103  float cluster_width = pCL->width().widthPhiRZ().y();
104  if(cluster_width > 0.2) return -3;
105  }
106  m_etaBins.at(binIndex).m_vn.push_back(sp);
107 
108  }
109 
110  return 0;
111 }

◆ generatePhiIndexing()

void TrigFTF_GNN_DataStorage::generatePhiIndexing ( float  dphi)

Definition at line 174 of file GNN_DataStorage.cxx.

174  {
175  for(auto& b : m_etaBins) b.generatePhiIndexing(dphi);
176 }

◆ getEtaBin()

TrigFTF_GNN_EtaBin& TrigFTF_GNN_DataStorage::getEtaBin ( int  idx)
inline

Definition at line 61 of file GNN_DataStorage.h.

61  {
62  if(idx >= static_cast<int>(m_etaBins.size())) idx = idx-1;
63  return m_etaBins.at(idx);
64  }

◆ initializeNodes()

void TrigFTF_GNN_DataStorage::initializeNodes ( bool  useML = false)

Definition at line 127 of file GNN_DataStorage.cxx.

127  {
128  for(auto& b : m_etaBins) {
129  b.initializeNodes();
130  }
131 
132  if(!useML) return;
133 
134  unsigned int nL = m_geo.num_layers();
135 
136  for(unsigned int layerIdx=0;layerIdx<nL;layerIdx++) {
137 
139 
140  if(pL->m_layer.m_subdet < 20000) {//skip strips volumes: layers in range [1200X-1400X]
141  continue;
142  }
143 
144  bool isBarrel = (pL->m_layer.m_type == 0);
145 
146  if(!isBarrel) continue;
147 
148  int nBins = pL->m_bins.size();
149 
150  for(int b=0;b<nBins;b++) {//loop over eta-bins in Layer
151 
152  TrigFTF_GNN_EtaBin& B = m_etaBins.at(pL->m_bins.at(b));
153 
154  if(B.empty()) continue;
155 
156  for(unsigned int nIdx=0;nIdx<B.m_vn.size();nIdx++) {
157 
158  const Trk::SpacePoint* osp = B.m_vn[nIdx]->offlineSpacePoint();
159  const InDet::PixelCluster* pCL = dynamic_cast<const InDet::PixelCluster*>(osp->clusterList().first);
160 
161  float cluster_width = pCL->width().widthPhiRZ().y();
162  //adjusting cuts using fitted boundaries of |cot(theta)| vs. cluster z-width distribution
163  float min_tau = 6.7*(cluster_width - 0.2);//linear fit
164  float max_tau = 1.6 + 0.15/(cluster_width + 0.2) + 6.1*(cluster_width - 0.2);//linear fit + correction for short clusters
165 
166  B.m_params[nIdx][0] = min_tau;
167  B.m_params[nIdx][1] = max_tau;
168 
169  }
170  }
171  }
172 }

◆ numberOfNodes()

unsigned int TrigFTF_GNN_DataStorage::numberOfNodes ( ) const

Definition at line 113 of file GNN_DataStorage.cxx.

113  {
114 
115  unsigned int n=0;
116 
117  for(auto& b : m_etaBins) {
118  n += b.m_vn.size();
119  }
120  return n;
121 }

◆ sortByPhi()

void TrigFTF_GNN_DataStorage::sortByPhi ( )

Definition at line 123 of file GNN_DataStorage.cxx.

123  {
124  for(auto& b : m_etaBins) b.sortByPhi();
125 }

Member Data Documentation

◆ m_etaBins

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

Definition at line 70 of file GNN_DataStorage.h.

◆ m_geo

const TrigFTF_GNN_Geometry& TrigFTF_GNN_DataStorage::m_geo
protected

Definition at line 68 of file GNN_DataStorage.h.


The documentation for this class was generated from the following files:
TrigFTF_GNN_EtaBin
Definition: GNN_DataStorage.h:21
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
TrigSiSpacePointBase::offlineSpacePoint
const Trk::SpacePoint * offlineSpacePoint() const
Definition: TrigSiSpacePointBase.h:81
TrigSiSpacePointBase::z
void z(const double z)
Definition: TrigSiSpacePointBase.h:53
TrigSiSpacePointBase::layer
long layer() const
Definition: TrigSiSpacePointBase.h:68
TrigSiSpacePointBase::r
void r(const double r)
Definition: TrigSiSpacePointBase.h:51
TrigFTF_GNN_DataStorage::m_etaBins
std::vector< TrigFTF_GNN_EtaBin > m_etaBins
Definition: GNN_DataStorage.h:70
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:284
dumpTgcDigiJitter.nBins
list nBins
Definition: dumpTgcDigiJitter.py:29
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
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:68
TrigFTF_GNN_Layer::getEtaBin
int getEtaBin(float, float) const
Definition: GNN_Geometry.cxx:184
TrigInDetSiLayer::m_subdet
int m_subdet
Definition: TrigInDetSiLayer.h:10