Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
SeedingToolBase Class Reference

#include <SeedingToolBase.h>

Inheritance diagram for SeedingToolBase:
Collaboration diagram for SeedingToolBase:

Public Member Functions

 SeedingToolBase (const std::string &t, const std::string &n, const IInterface *p)
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Types

typedef TrigFTF_GNN_Node GNN_Node
 
typedef TrigFTF_GNN_DataStorage GNN_DataStorage
 
typedef TrigFTF_GNN_Edge GNN_Edge
 

Protected Member Functions

virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
std::pair< int, int > buildTheGraph (const IRoiDescriptor &, const std::unique_ptr< GNN_DataStorage > &, std::vector< GNN_Edge > &) const
 
int runCCA (int, std::vector< GNN_Edge > &) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

ToolHandle< ITrigL2LayerNumberToolm_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberToolITk"}
 
const AtlasDetectorIDm_atlasId = nullptr
 
const SCT_IDm_sctId = nullptr
 
const PixelIDm_pixelId = nullptr
 
BooleanProperty m_filter_phi {this, "DoPhiFiltering", true}
 
BooleanProperty m_useBeamTilt {this, "UseBeamTilt", false}
 
BooleanProperty m_LRTmode {this, "LRTMode",false}
 
BooleanProperty m_useML {this, "useML", true}
 
UnsignedIntegerProperty m_nMaxPhiSlice {this, "nMaxPhiSlice", 53}
 
BooleanProperty m_doubletFilterRZ {this, "Doublet_FilterRZ", true}
 
BooleanProperty m_useEtaBinning {this, "UseEtaBinning", true}
 
BooleanProperty m_matchBeforeCreate {this, "MatchBeforeCreate", false}
 
FloatProperty m_minPt {this, "pTmin", 1000.0}
 
IntegerProperty m_nMaxEdges {this, "MaxGraphEdges", 2000000}
 
StringProperty m_connectionFile {this, "ConnectionFileName", "binTables_ITK_RUN4_UPD_10_APR_2025.txt"}
 
float m_phiSliceWidth = 0.
 
std::unique_ptr< GNN_FasTrackConnectorm_connector = nullptr
 
std::vector< TrigInDetSiLayerm_layerGeometry
 
std::unique_ptr< const TrigFTF_GNN_Geometrym_geo = nullptr
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 26 of file SeedingToolBase.h.

Member Typedef Documentation

◆ GNN_DataStorage

Definition at line 33 of file SeedingToolBase.h.

◆ GNN_Edge

Definition at line 34 of file SeedingToolBase.h.

◆ GNN_Node

Definition at line 32 of file SeedingToolBase.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SeedingToolBase()

SeedingToolBase::SeedingToolBase ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)
inline

Definition at line 28 of file SeedingToolBase.h.

28 : AthAlgTool(t,n,p){}

Member Function Documentation

◆ buildTheGraph()

std::pair< int, int > SeedingToolBase::buildTheGraph ( const IRoiDescriptor roi,
const std::unique_ptr< GNN_DataStorage > &  storage,
std::vector< GNN_Edge > &  edgeStorage 
) const
protected

Definition at line 68 of file SeedingToolBase.cxx.

68  {
69 
70  const float M_2PI = 2.0*M_PI;
71 
72  const float cut_dphi_max = m_LRTmode ? 0.07 : 0.012;
73  const float cut_dcurv_max = m_LRTmode ? 0.015 : 0.001;
74  const float cut_tau_ratio_max = m_LRTmode ? 0.015 : 0.007;
75  const float min_z0 = m_LRTmode ? -600.0 : roi.zedMinus();
76  const float max_z0 = m_LRTmode ? 600.0 : roi.zedPlus();
77  const float min_deltaPhi = m_LRTmode ? 0.01f : 0.001f;
78 
79  const float maxOuterRadius = m_LRTmode ? 1050.0 : 550.0;
80 
81  const float cut_zMinU = min_z0 + maxOuterRadius*roi.dzdrMinus();
82  const float cut_zMaxU = max_z0 + maxOuterRadius*roi.dzdrPlus();
83 
84  const float ptCoeff = 0.29997*1.9972/2.0;// ~0.3*B/2 - assuming nominal field of 2*T
85 
86  float tripletPtMin = 0.8*m_minPt;//correction due to limited pT resolution
87 
88  float maxCurv = ptCoeff/tripletPtMin;
89 
90  const float maxKappa_high_eta = m_LRTmode ? 1.0*maxCurv : std::sqrt(0.8)*maxCurv;
91  const float maxKappa_low_eta = m_LRTmode ? 1.0*maxCurv : std::sqrt(0.6)*maxCurv;
92  const float dphi_coeff = m_LRTmode ? 1.0*maxCurv : 0.68*maxCurv;
93 
94  const float minDeltaRadius = 2.0;
95 
96  float deltaPhi = 0.5f*m_phiSliceWidth;//the default sliding window along phi
97 
98  unsigned int nConnections = 0;
99 
100  edgeStorage.reserve(m_nMaxEdges);
101 
102  int nEdges = 0;
103 
104  for(const auto& bg : m_geo->bin_groups()) {//loop over bin groups
105 
106  TrigFTF_GNN_EtaBin& B1 = storage->getEtaBin(bg.first);
107 
108  if(B1.empty()) continue;
109 
110  float rb1 = B1.getMinBinRadius();
111 
112  for(const auto& b2_idx : bg.second) {
113 
114  const TrigFTF_GNN_EtaBin& B2 = storage->getEtaBin(b2_idx);
115 
116  if(B2.empty()) continue;
117 
118  float rb2 = B2.getMaxBinRadius();
119 
120  if(m_useEtaBinning) {
121  deltaPhi = min_deltaPhi + dphi_coeff*std::fabs(rb2-rb1);
122  }
123 
124  unsigned int first_it = 0;
125 
126  for(unsigned int n1Idx = 0;n1Idx<B1.m_vn.size();n1Idx++) {//loop over nodes in Layer 1
127 
128  std::vector<unsigned int>& v1In = B1.m_in[n1Idx];
129 
130  if(v1In.size() >= MAX_SEG_PER_NODE) continue;
131 
132  const std::array<float, 5>& n1pars = B1.m_params[n1Idx];
133 
134  float phi1 = n1pars[2];
135  float r1 = n1pars[3];
136  float z1 = n1pars[4];
137 
138  //sliding window phi1 +/- deltaPhi
139 
140  float minPhi = phi1 - deltaPhi;
141  float maxPhi = phi1 + deltaPhi;
142 
143  for(unsigned int n2PhiIdx = first_it; n2PhiIdx<B2.m_vPhiNodes.size();n2PhiIdx++) {//sliding window over nodes in Layer 2
144 
145  float phi2 = B2.m_vPhiNodes[n2PhiIdx].first;
146 
147  if(phi2 < minPhi) {
148  first_it = n2PhiIdx;
149  continue;
150  }
151  if(phi2 > maxPhi) break;
152 
153  unsigned int n2Idx = B2.m_vPhiNodes[n2PhiIdx].second;
154 
155  const std::vector<unsigned int>& v2In = B2.m_in[n2Idx];
156 
157  if(v2In.size() >= MAX_SEG_PER_NODE) continue;
158 
159  const std::array<float, 5>& n2pars = B2.m_params[n2Idx];
160 
161  float r2 = n2pars[3];
162 
163  float dr = r2 - r1;
164 
165  if(dr < minDeltaRadius) {
166  continue;
167  }
168 
169  float z2 = n2pars[4];
170 
171  float dz = z2 - z1;
172  float tau = dz/dr;
173  float ftau = std::fabs(tau);
174  if (ftau > 36.0) {
175  continue;
176  }
177 
178  if(ftau < n1pars[0]) continue;
179  if(ftau > n1pars[1]) continue;
180 
181  if(ftau < n2pars[0]) continue;
182  if(ftau > n2pars[1]) continue;
183 
184  if (m_doubletFilterRZ) {
185 
186  float z0 = z1 - r1*tau;
187 
188  if(z0 < min_z0 || z0 > max_z0) continue;
189 
190  float zouter = z0 + maxOuterRadius*tau;
191 
192  if(zouter < cut_zMinU || zouter > cut_zMaxU) continue;
193  }
194 
195  float curv = (phi2-phi1)/dr;
196  float abs_curv = std::abs(curv);
197 
198  if(ftau < 4.0) {//eta = 2.1
199  if(abs_curv > maxKappa_low_eta) {
200  continue;
201  }
202  }
203  else {
204  if(abs_curv > maxKappa_high_eta) {
205  continue;
206  }
207  }
208 
209  float exp_eta = std::sqrt(1+tau*tau)-tau;
210 
211  if (m_matchBeforeCreate) {//match edge candidate against edges incoming to n2
212 
213  bool isGood = v2In.size() <= 2;//we must have enough incoming edges to decide
214 
215  if(!isGood) {
216 
217  float uat_1 = 1.0f/exp_eta;
218 
219  for(const auto& n2_in_idx : v2In) {
220 
221  float tau2 = edgeStorage.at(n2_in_idx).m_p[0];
222  float tau_ratio = tau2*uat_1 - 1.0f;
223 
224  if(std::fabs(tau_ratio) > cut_tau_ratio_max){//bad match
225  continue;
226  }
227  isGood = true;//good match found
228  break;
229  }
230  }
231 
232  if(!isGood) {//no match found, skip creating [n1 <- n2] edge
233  continue;
234  }
235  }
236 
237  float dPhi2 = curv*r2;
238  float dPhi1 = curv*r1;
239 
240  if(nEdges < m_nMaxEdges) {
241 
242  edgeStorage.emplace_back(B1.m_vn[n1Idx], B2.m_vn[n2Idx], exp_eta, curv, phi1 + dPhi1);
243 
244  if(v1In.size() < MAX_SEG_PER_NODE) v1In.push_back(nEdges);
245 
246  int outEdgeIdx = nEdges;
247 
248  float uat_2 = 1/exp_eta;
249  float Phi2 = phi2 + dPhi2;
250  float curv2 = curv;
251 
252  for(const auto& inEdgeIdx : v2In) {//looking for neighbours of the new edge
253 
254  TrigFTF_GNN_Edge* pS = &(edgeStorage.at(inEdgeIdx));
255 
256  if(pS->m_nNei >= N_SEG_CONNS) continue;
257 
258  float tau_ratio = pS->m_p[0]*uat_2 - 1.0f;
259 
260  if(std::abs(tau_ratio) > cut_tau_ratio_max){//bad match
261  continue;
262  }
263 
264  float dPhi = Phi2 - pS->m_p[2];
265 
266  if(dPhi<-M_PI) dPhi += M_2PI;
267  else if(dPhi>M_PI) dPhi -= M_2PI;
268 
269  if(dPhi < -cut_dphi_max || dPhi > cut_dphi_max) {
270  continue;
271  }
272 
273  float dcurv = curv2 - pS->m_p[1];
274 
275  if(dcurv < -cut_dcurv_max || dcurv > cut_dcurv_max) {
276  continue;
277  }
278 
279  pS->m_vNei[pS->m_nNei++] = outEdgeIdx;
280 
281  nConnections++;
282 
283  }
284  nEdges++;
285  }
286  } //loop over n2 (outer) nodes
287  } //loop over n1 (inner) nodes
288  } //loop over bins in Layer 2
289  } //loop over bin groups
290 
291  return std::make_pair(nEdges, nConnections);
292 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode SeedingToolBase::finalize ( )
protectedvirtual

Reimplemented in TrigInDetTrackSeedingTool, and Gbts2ActsSeedingTool.

Definition at line 63 of file SeedingToolBase.cxx.

63  {
65  return sc;
66 }

◆ initialize()

StatusCode SeedingToolBase::initialize ( )
protectedvirtual

Reimplemented in TrigInDetTrackSeedingTool, and Gbts2ActsSeedingTool.

Definition at line 19 of file SeedingToolBase.cxx.

19  {
21 
22  ATH_CHECK(m_layerNumberTool.retrieve());
23 
24 
25  ATH_CHECK(detStore()->retrieve(m_atlasId, "AtlasID"));
26 
27  ATH_CHECK(detStore()->retrieve(m_pixelId, "PixelID"));
28 
29  ATH_CHECK(detStore()->retrieve(m_sctId, "SCT_ID"));
30 
31  std::string conn_fileName = PathResolver::find_file(m_connectionFile, "DATAPATH");
32  if (conn_fileName.empty()) {
33  ATH_MSG_FATAL("Cannot find layer connections file " << conn_fileName);
34  return StatusCode::FAILURE;
35  }
36  else {
37 
38  std::ifstream ifs(conn_fileName.c_str());
39 
40  m_connector = std::make_unique<GNN_FASTRACK_CONNECTOR>(ifs, m_LRTmode);
41 
42  ATH_MSG_INFO("Layer connections are initialized from file " << conn_fileName);
43  }
44 
45  const std::vector<TrigInDetSiLayer>* pVL = m_layerNumberTool->layerGeometry();
46 
47  std::copy(pVL->begin(),pVL->end(), std::back_inserter(m_layerGeometry));
48 
49  m_geo = std::make_unique<TrigFTF_GNN_Geometry>(m_layerGeometry, m_connector);
50 
52 
53  ATH_MSG_INFO("SeedingToolBase initialized ");
54 
55  ATH_MSG_DEBUG("Property useML "<< m_useML);
56  ATH_MSG_DEBUG("Property DoPhiFiltering "<<m_filter_phi);
57  ATH_MSG_DEBUG("Property pTmin "<<m_minPt);
58  ATH_MSG_DEBUG("Property LRTmode "<<m_LRTmode);
59 
60  return StatusCode::SUCCESS;
61 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ runCCA()

int SeedingToolBase::runCCA ( int  nEdges,
std::vector< GNN_Edge > &  edgeStorage 
) const
protected

Definition at line 294 of file SeedingToolBase.cxx.

294  {
295 
296  const int maxIter = 15;
297 
298  int maxLevel = 0;
299 
300  int iter = 0;
301 
302  std::vector<TrigFTF_GNN_Edge*> v_old;
303 
304  for(int edgeIndex=0;edgeIndex<nEdges;edgeIndex++) {
305 
306  TrigFTF_GNN_Edge* pS = &(edgeStorage[edgeIndex]);
307  if(pS->m_nNei == 0) continue;
308 
309  v_old.push_back(pS);//TO-DO: increment level for segments as they already have at least one neighbour
310  }
311 
312  for(;iter<maxIter;iter++) {
313 
314  //generate proposals
315  std::vector<TrigFTF_GNN_Edge*> v_new;
316  v_new.clear();
317  v_new.reserve(v_old.size());
318 
319  for(auto pS : v_old) {
320 
321  int next_level = pS->m_level;
322 
323  for(int nIdx=0;nIdx<pS->m_nNei;nIdx++) {
324 
325  unsigned int nextEdgeIdx = pS->m_vNei[nIdx];
326 
327  TrigFTF_GNN_Edge* pN = &(edgeStorage[nextEdgeIdx]);
328 
329  if(pS->m_level == pN->m_level) {
330  next_level = pS->m_level + 1;
331  v_new.push_back(pS);
332  break;
333  }
334  }
335 
336  pS->m_next = next_level;//proposal
337  }
338 
339  //update
340 
341  int nChanges = 0;
342 
343  for(auto pS : v_new) {
344  if(pS->m_next != pS->m_level) {
345  nChanges++;
346  pS->m_level = pS->m_next;
347  if(maxLevel < pS->m_level) maxLevel = pS->m_level;
348  }
349  }
350 
351  if(nChanges == 0) break;
352 
353 
354  v_old = std::move(v_new);
355  v_new.clear();
356  }
357 
358  return maxLevel;
359 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_atlasId

const AtlasDetectorID* SeedingToolBase::m_atlasId = nullptr
protected

Definition at line 45 of file SeedingToolBase.h.

◆ m_connectionFile

StringProperty SeedingToolBase::m_connectionFile {this, "ConnectionFileName", "binTables_ITK_RUN4_UPD_10_APR_2025.txt"}
protected

Definition at line 60 of file SeedingToolBase.h.

◆ m_connector

std::unique_ptr<GNN_FasTrackConnector> SeedingToolBase::m_connector = nullptr
protected

Definition at line 64 of file SeedingToolBase.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doubletFilterRZ

BooleanProperty SeedingToolBase::m_doubletFilterRZ {this, "Doublet_FilterRZ", true}
protected

Definition at line 55 of file SeedingToolBase.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_filter_phi

BooleanProperty SeedingToolBase::m_filter_phi {this, "DoPhiFiltering", true}
protected

Definition at line 49 of file SeedingToolBase.h.

◆ m_geo

std::unique_ptr<const TrigFTF_GNN_Geometry> SeedingToolBase::m_geo = nullptr
protected

Definition at line 66 of file SeedingToolBase.h.

◆ m_layerGeometry

std::vector<TrigInDetSiLayer> SeedingToolBase::m_layerGeometry
protected

Definition at line 65 of file SeedingToolBase.h.

◆ m_layerNumberTool

ToolHandle<ITrigL2LayerNumberTool> SeedingToolBase::m_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberToolITk"}
protected

Definition at line 43 of file SeedingToolBase.h.

◆ m_LRTmode

BooleanProperty SeedingToolBase::m_LRTmode {this, "LRTMode",false}
protected

Definition at line 51 of file SeedingToolBase.h.

◆ m_matchBeforeCreate

BooleanProperty SeedingToolBase::m_matchBeforeCreate {this, "MatchBeforeCreate", false}
protected

Definition at line 57 of file SeedingToolBase.h.

◆ m_minPt

FloatProperty SeedingToolBase::m_minPt {this, "pTmin", 1000.0}
protected

Definition at line 58 of file SeedingToolBase.h.

◆ m_nMaxEdges

IntegerProperty SeedingToolBase::m_nMaxEdges {this, "MaxGraphEdges", 2000000}
protected

Definition at line 59 of file SeedingToolBase.h.

◆ m_nMaxPhiSlice

UnsignedIntegerProperty SeedingToolBase::m_nMaxPhiSlice {this, "nMaxPhiSlice", 53}
protected

Definition at line 54 of file SeedingToolBase.h.

◆ m_phiSliceWidth

float SeedingToolBase::m_phiSliceWidth = 0.
protected

Definition at line 62 of file SeedingToolBase.h.

◆ m_pixelId

const PixelID* SeedingToolBase::m_pixelId = nullptr
protected

Definition at line 47 of file SeedingToolBase.h.

◆ m_sctId

const SCT_ID* SeedingToolBase::m_sctId = nullptr
protected

Definition at line 46 of file SeedingToolBase.h.

◆ m_useBeamTilt

BooleanProperty SeedingToolBase::m_useBeamTilt {this, "UseBeamTilt", false}
protected

Definition at line 50 of file SeedingToolBase.h.

◆ m_useEtaBinning

BooleanProperty SeedingToolBase::m_useEtaBinning {this, "UseEtaBinning", true}
protected

Definition at line 56 of file SeedingToolBase.h.

◆ m_useML

BooleanProperty SeedingToolBase::m_useML {this, "useML", true}
protected

Definition at line 52 of file SeedingToolBase.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
TrigFTF_GNN_EtaBin
Definition: GNN_DataStorage.h:40
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SeedingToolBase::m_matchBeforeCreate
BooleanProperty m_matchBeforeCreate
Definition: SeedingToolBase.h:57
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
TrigFTF_GNN_EtaBin::m_in
std::vector< std::vector< unsigned int > > m_in
Definition: GNN_DataStorage.h:72
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SeedingToolBase::m_pixelId
const PixelID * m_pixelId
Definition: SeedingToolBase.h:47
StandaloneBunchgroupHandler.bg
bg
Definition: StandaloneBunchgroupHandler.py:243
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
initialize
void initialize()
Definition: run_EoverP.cxx:894
TrigFTF_GNN_Edge::m_vNei
unsigned int m_vNei[N_SEG_CONNS]
Definition: GNN_DataStorage.h:133
SeedingToolBase::m_nMaxEdges
IntegerProperty m_nMaxEdges
Definition: SeedingToolBase.h:59
SeedingToolBase::m_connector
std::unique_ptr< GNN_FasTrackConnector > m_connector
Definition: SeedingToolBase.h:64
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
SeedingToolBase::m_sctId
const SCT_ID * m_sctId
Definition: SeedingToolBase.h:46
SeedingToolBase::m_filter_phi
BooleanProperty m_filter_phi
Definition: SeedingToolBase.h:49
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MCP::ScaleSmearParam::r2
@ r2
IRoiDescriptor::dzdrMinus
virtual double dzdrMinus() const =0
return the gradients
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
IRoiDescriptor::dzdrPlus
virtual double dzdrPlus() const =0
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
N_SEG_CONNS
#define N_SEG_CONNS
Definition: GNN_DataStorage.h:14
TrigFTF_GNN_EtaBin::empty
bool empty() const
Definition: GNN_DataStorage.h:56
TrigFTF_GNN_Edge::m_next
signed char m_next
Definition: GNN_DataStorage.h:128
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
SeedingToolBase::m_LRTmode
BooleanProperty m_LRTmode
Definition: SeedingToolBase.h:51
TrigFTF_GNN_Edge
Definition: GNN_DataStorage.h:106
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigFTF_GNN_EtaBin::m_vPhiNodes
std::vector< std::pair< float, unsigned int > > m_vPhiNodes
Definition: GNN_DataStorage.h:71
TrigFTF_GNN_Edge::m_level
signed char m_level
Definition: GNN_DataStorage.h:128
SeedingToolBase::m_minPt
FloatProperty m_minPt
Definition: SeedingToolBase.h:58
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SeedingToolBase::m_layerGeometry
std::vector< TrigInDetSiLayer > m_layerGeometry
Definition: SeedingToolBase.h:65
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:548
SeedingToolBase::m_atlasId
const AtlasDetectorID * m_atlasId
Definition: SeedingToolBase.h:45
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MAX_SEG_PER_NODE
#define MAX_SEG_PER_NODE
Definition: GNN_DataStorage.h:13
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
TrigFTF_GNN_DataStorage::getEtaBin
TrigFTF_GNN_EtaBin & getEtaBin(int idx)
Definition: GNN_DataStorage.h:93
SeedingToolBase::m_connectionFile
StringProperty m_connectionFile
Definition: SeedingToolBase.h:60
TrigFTF_GNN_EtaBin::getMaxBinRadius
float getMaxBinRadius() const
Definition: GNN_DataStorage.h:66
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SeedingToolBase::m_doubletFilterRZ
BooleanProperty m_doubletFilterRZ
Definition: SeedingToolBase.h:55
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
SeedingToolBase::m_useEtaBinning
BooleanProperty m_useEtaBinning
Definition: SeedingToolBase.h:56
SeedingToolBase::m_geo
std::unique_ptr< const TrigFTF_GNN_Geometry > m_geo
Definition: SeedingToolBase.h:66
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SeedingToolBase::m_phiSliceWidth
float m_phiSliceWidth
Definition: SeedingToolBase.h:62
TrigFTF_GNN_Edge::m_nNei
unsigned char m_nNei
Definition: GNN_DataStorage.h:130
a
TList * a
Definition: liststreamerinfos.cxx:10
h
IRoiDescriptor::zedPlus
virtual double zedPlus() const =0
the zed and eta values at the most forward and most rear ends of the RoI
TrigFTF_GNN_Edge::m_p
float m_p[3]
Definition: GNN_DataStorage.h:131
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
IRoiDescriptor::zedMinus
virtual double zedMinus() const =0
SeedingToolBase::m_useML
BooleanProperty m_useML
Definition: SeedingToolBase.h:52
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
calibdata.copy
bool copy
Definition: calibdata.py:27
M_2PI
#define M_2PI
Definition: CaloGpuGeneral_fnc.cxx:8
MCP::ScaleSmearParam::r1
@ r1
TrigFTF_GNN_EtaBin::m_vn
std::vector< const TrigFTF_GNN_Node * > m_vn
Definition: GNN_DataStorage.h:70
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
SeedingToolBase::m_layerNumberTool
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
Definition: SeedingToolBase.h:43
SeedingToolBase::m_nMaxPhiSlice
UnsignedIntegerProperty m_nMaxPhiSlice
Definition: SeedingToolBase.h:54
fitman.k
k
Definition: fitman.py:528
TrigFTF_GNN_EtaBin::getMinBinRadius
float getMinBinRadius() const
Definition: GNN_DataStorage.h:62
TrigFTF_GNN_EtaBin::m_params
std::vector< std::array< float, 5 > > m_params
Definition: GNN_DataStorage.h:73