ATLAS Offline Software
TrigInDetAccelerationSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
12 
19 #include "GaudiKernel/ConcurrencyFlags.h"
20 
21 #include <dlfcn.h>
22 
26 
27 TrigInDetAccelerationSvc::TrigInDetAccelerationSvc( const std::string& name, ISvcLocator* pSvcLocator) :
28  base_class( name, pSvcLocator ),
29  m_nDCs(12),
30  m_moduleName("libTrigInDetCUDA.so"),
31  m_useITkGeometry(false),
32  m_libHandle(0),
33  m_pWF(0),
34  m_detStore("DetectorStore", name),
35  m_evtStore("StoreGateSvc",name),
36  m_factoryConfigured(false) {
37 
38  declareProperty( "NumberOfDCs", m_nDCs = 8 );
39  declareProperty( "ModuleName", m_moduleName = "libTrigInDetCUDA.so");
40  declareProperty( "useITkGeometry", m_useITkGeometry = false);
41  declareProperty( "MiddleSpacePointLayers", m_middleSpacePointLayers = std::vector<int>(), "Global IDs of layers that can contain middle spacepoints of track seeds" );
42 }
43 
44 
48 
50 
51  ATH_MSG_INFO("TrigInDetAccelerationSvc: initialize");
52 
53  ATH_CHECK (m_evtStore.retrieve() );
54  ATH_CHECK (m_detStore.retrieve() );
55 
56  //load the OffloadFactory library
57 
58  m_libHandle = dlopen(m_moduleName.c_str(), RTLD_LAZY);
59 
60  if(!m_libHandle) {
61  ATH_MSG_INFO("TrigInDetAccelerationSvc: cannot load the factory library, error:"<<dlerror());
62  return StatusCode::SUCCESS;
63  }
64 
65  dlerror();
66 
67  //declare library interface methods
68  TrigAccel::Module* (*getModule)();
69 
70  getModule = (TrigAccel::Module* (*)()) dlsym(m_libHandle, "getModule");
71 
72  m_module = getModule();
73 
74  int factory_id_to_load = 0;
75 
76  if(m_useITkGeometry){
77  factory_id_to_load = TrigAccel::TrigITkModuleID_CUDA;
78  }else{
79  factory_id_to_load = TrigAccel::TrigInDetModuleID_CUDA;
80  }
81 
82  m_pWF = m_module->getFactoryById(factory_id_to_load);
83 
84  if(m_pWF == nullptr){
85  ATH_MSG_INFO("OffloadFactory with id "<<std::hex<<factory_id_to_load<<" not available from the module");
86  m_factoryConfigured = false;
87  return StatusCode::SUCCESS;
88  }
89 
90  bool cfgResult = m_pWF->configure();
91 
92  if(!cfgResult) {
93  ATH_MSG_INFO("OffloadFactory config failed");
94  m_factoryConfigured = false;
95  return StatusCode::SUCCESS;
96  }
97 
98  m_factoryConfigured = true;
99 
100  for(int i=0;i<3;i++) m_layerInfo[i].clear();
101 
102  ATH_MSG_INFO("TrigInDetAccelerationSvc: created OffloadFactory, factory id = "<<std::hex<<m_pWF->getFactoryId()<<std::dec);
103 
104  /*
105  * Ask to be informed at the beginning of a new run so that we
106  * can collect geometry, conditions, etc. and copy them to on-GPU data structures
107  * For athenaHLT this should be UpdateAfterFork
108  */
109 
110  IIncidentSvc* incsvc;
111  StatusCode sc = service("IncidentSvc", incsvc);
112  int priority = 100;
113  if( sc.isSuccess() ) {
114  const bool is_multiprocess = (Gaudi::Concurrency::ConcurrencyFlags::numProcs() > 0);
115  if (is_multiprocess) {
116  incsvc->addListener( this, AthenaInterprocess::UpdateAfterFork::type(), priority);
117  }
118  else {
119  incsvc->addListener( this, "BeginRun", priority);
120  }
121  }
122 
123  return StatusCode::SUCCESS;
124 }
125 
130 
131  delete m_pWF;
132 
133  dlclose(m_libHandle);
134 
135  return StatusCode::SUCCESS;
136 }
137 
138 
142 
143 void TrigInDetAccelerationSvc::handle(const Incident&) {
144 
145  ATH_MSG_INFO("OnBeginRun ");
146 
147  if (m_useITkGeometry) {
148  // barrel ec, subdetector id, itk volume id, itk layer disk id
149  std::map<std::tuple<short,short, int, int>,std::vector<PhiEtaHash> > hashMap;
150  if(!extractITkGeometryInformation(hashMap)) {
151  ATH_MSG_INFO("ITk Geometry extraction failed");
152  return;
153  }
154 
155  if(!exportITkGeometryInformation(hashMap)) {
156  ATH_MSG_INFO("ITk Geometry export failed");
157  }
158 
159  } else {
160  // subdetector id, barrel ec, layer disk
161  std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> > hashMap;
162 
163  if(!extractGeometryInformation(hashMap)) {
164  ATH_MSG_INFO("Geometry extraction failed");
165  return;
166  }
167 
168  if(!exportGeometryInformation(hashMap)) {
169  ATH_MSG_INFO("Geometry export failed");
170  }
171 
172  }
173 
174  return;
175 }
176 
177 TrigAccel::Work* TrigInDetAccelerationSvc::createWork(unsigned int jobCode, std::shared_ptr<TrigAccel::OffloadBuffer> pB) const {
178 
179  if(!m_factoryConfigured) return 0;
180 
181  // To remove this, WorkFactory::createWork() should be made const
182  // (and thread-safe).
183  std::scoped_lock lock (m_workMutex);
185  return wf->createWork(jobCode, pB);
186 
187 }
188 
189 
190 const std::vector<short>& TrigInDetAccelerationSvc::getLayerInformation(int i) const {
191  if (i<0 || i>2) i = 0;
192  return m_layerInfo[i];
193 }
194 
195 bool TrigInDetAccelerationSvc::exportITkGeometryInformation(const std::map<std::tuple<short,short, int, int>,std::vector<PhiEtaHash> >& hashMap) const {
196 
197  const InDetDD::PixelDetectorManager * pix_mgr = nullptr;
198 
199  if (m_detStore->retrieve(pix_mgr,"ITkPixel").isFailure()) {
200  ATH_MSG_WARNING("failed to get ITkPixel Manager");
201  return false;
202  }
203 
204  //export layer structure
205 
206  size_t dataTypeSize = sizeof(TrigAccel::ITk::DETECTOR_MODEL);
207  const size_t bufferOffset = 256;
208  size_t totalSize = bufferOffset + dataTypeSize;
209 
211 
212  if(!pBG->fit(totalSize)) pBG->reallocate(totalSize);
213 
214  TrigAccel::ITk::DETECTOR_MODEL* pArray = reinterpret_cast<TrigAccel::ITk::DETECTOR_MODEL*>(pBG->m_buffer + bufferOffset);
215 
216  // cppcheck-suppress memsetClassFloat; deliberate
217  memset(pArray,0,dataTypeSize);
218 
219  int nLayers = (int)hashMap.size();
220  pArray->m_nLayers = nLayers;
221  pArray->m_nModules=0;
222 
223  int layerIdx=0;
224  int middleLayerIdx=0;
225 
226  for(std::map<std::tuple<short,short, int, int>,std::vector<PhiEtaHash> >::const_iterator it = hashMap.begin();it!=hashMap.end();++it, layerIdx++) {
227 
228  short barrel_ec = std::get<0>((*it).first);
229  int vol_id = std::get<2>((*it).first);
230  int lay_id = std::get<3>((*it).first);
231  if(barrel_ec == -100) barrel_ec = 0;
232  int globalLayerId = vol_id*1000 + lay_id;
233 
234  pArray->m_layers[layerIdx].m_nElements = 0;
235  pArray->m_layers[layerIdx].m_subdet = globalLayerId;
236  pArray->m_layers[layerIdx].m_type = barrel_ec;
237 
238  // Fill in a table of layer ids that can contain the middle SPs
239  if (std::find(m_middleSpacePointLayers.begin(), m_middleSpacePointLayers.end(), globalLayerId) != m_middleSpacePointLayers.end()){
240  pArray->m_middleSpacePointLayers[middleLayerIdx] = layerIdx;
241  ++middleLayerIdx;
242  }
243 
244  std::vector<std::vector<PhiEtaHash>::const_iterator> vStops;
245  vStops.push_back((*it).second.begin());
246  std::vector<PhiEtaHash>::const_iterator firstIt = (*it).second.begin();
247  std::vector<PhiEtaHash>::const_iterator nextIt = (*it).second.begin();
248  ++nextIt;
249 
250  int nPhiSlices=0;
251 
252  for(; nextIt!=(*it).second.end();++nextIt, ++firstIt) {
253  if((*nextIt).m_phiIndex!=(*firstIt).m_phiIndex) {
254  vStops.push_back(nextIt);
255  nPhiSlices++;
256  }
257  }
258 
259  nPhiSlices++;
260 
261  vStops.push_back((*it).second.end());
262 
263  float rc=0.0;
264  float minBound = 100000.0;
265  float maxBound =-100000.0;
266 
267  pArray->m_layers[layerIdx].m_nPhiSlices = nPhiSlices;
268 
269  //3. iterating over phi sectors
270 
271  for(unsigned int iStops = 1; iStops<vStops.size();iStops++) {
272  int nPhiModules = 0;
273  bool first = true;
274 
275  for(std::vector<PhiEtaHash>::const_iterator hIt = vStops[iStops-1];hIt!=vStops[iStops];++hIt, nPhiModules++) {
276 
277  pArray->m_hashArray[pArray->m_nModules] = (*hIt).m_hash;
278  const InDetDD::SiDetectorElement *p = pix_mgr->getDetectorElement((*hIt).m_hash);
279 
280  if (first) {
281  first = false;
282  }
283 
284  pArray->m_layers[layerIdx].m_nElements++;
285 
286  const Amg::Vector3D& C = p->center();
287  if (barrel_ec == 0) {
288  rc += sqrt(C(0)*C(0)+C(1)*C(1));
289  if(p->zMin() < minBound) minBound = p->zMin();
290  if(p->zMax() > maxBound) maxBound = p->zMax();
291  pArray->m_minRZ[pArray->m_nModules] = p->zMin();
292  pArray->m_maxRZ[pArray->m_nModules] = p->zMax();
293  } else {
294  rc += C(2);
295  if(p->rMin() < minBound) minBound = p->rMin();
296  if(p->rMax() > maxBound) maxBound = p->rMax();
297  pArray->m_minRZ[pArray->m_nModules] = p->rMin();
298  pArray->m_maxRZ[pArray->m_nModules] = p->rMax();
299  }
300 
301  pArray->m_nModules++;
302  }
303 
304  }
305  pArray->m_layers[layerIdx].m_refCoord = rc/pArray->m_layers[layerIdx].m_nElements;
306  pArray->m_layers[layerIdx].m_minBound = minBound;
307  pArray->m_layers[layerIdx].m_maxBound = maxBound;
308  }
309 
310  std::shared_ptr<TrigAccel::OffloadBuffer> pDMBuff = std::make_shared<TrigAccel::OffloadBuffer>(pBG);
311 
312  delete pBG;
313 
314  ATH_MSG_INFO("Creating Work item for task "<<TrigAccel::InDetJobControlCode::SIL_LAYERS_EXPORT);
315 
317 
318  return pW == 0;//request is actioned immediately, no actual WorkItem is created
319 
320 }
321 
322 
323 bool TrigInDetAccelerationSvc::extractITkGeometryInformation(std::map<std::tuple<short,short,int,int>, std::vector<PhiEtaHash> >& hashMap) {
324 
325  const PixelID* pixelId = nullptr;
326 
327  if (m_detStore->retrieve(pixelId, "PixelID").isFailure()) {
328  ATH_MSG_WARNING("Could not get Pixel ID helper");
329  return false;
330  }
331 
332  // Read Pixel layer details
333  short subdetid = 1;
334  for(int hash = 0; hash<(int)pixelId->wafer_hash_max(); hash++) {
335 
336  Identifier offlineId = pixelId->wafer_id(hash);
337 
338  if(offlineId==0) continue;
339 
340  short barrel_ec = pixelId->barrel_ec(offlineId);
341  if(abs(barrel_ec)>2) continue;//no DBM needed
342 
343  short phi_index = pixelId->phi_module(offlineId);
344  short eta_index = pixelId->eta_module(offlineId);
345  short layer_disk = pixelId->layer_disk(offlineId);
346 
347  // Calculate new volume and layer id for ITk
348  int vol_id = -1;
349  if (barrel_ec== 0) vol_id = 8;
350  if (barrel_ec==-2) vol_id = 7;
351  if (barrel_ec== 2) vol_id = 9;
352 
353  int new_vol=0, new_lay=0;
354 
355  if (vol_id == 7 || vol_id == 9) {
356  new_vol = 10*vol_id + layer_disk;
357  new_lay = eta_index;
358  } else if (vol_id == 8) {
359  new_lay = 0;
360  new_vol = 10*vol_id + layer_disk;
361  }
362 
363  auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, new_vol, new_lay);
364  std::map<std::tuple<short,short,int,int>,std::vector<PhiEtaHash> >::iterator it = hashMap.find(t);
365  if(it==hashMap.end())
366  hashMap.insert(std::pair<std::tuple<short,short,int,int>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1, PhiEtaHash(phi_index, eta_index, hash) )));
367  else (*it).second.push_back(PhiEtaHash(phi_index, eta_index, hash));
368  }
369 
370  m_layerInfo[0].clear();
371  m_layerInfo[1].clear();
372 
373  m_layerInfo[0].resize(hashMap.size()); // Mapping from layerId to barrel_ec
374  m_layerInfo[1].resize(pixelId->wafer_hash_max(), -1); // Mapping from layerId to the module hash
375 
376  // Map layer geometry details to module hash id
377  int layerId=0;
378  for(std::map<std::tuple<short,short,int,int>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
379 
380  short barrel_ec = std::get<0>((*it).first);
381  short subdetId = std::get<1>((*it).first);
382  if(barrel_ec == -100) barrel_ec = 0;
383 
384  m_layerInfo[0][layerId] = barrel_ec;
385 
386  if(subdetId == 1) {//pixel
387  for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
388  m_layerInfo[subdetId][(*hIt).m_hash] = layerId;
389  }
390  }
391  }
392 
393  for(std::map<std::tuple<short,short,int,int>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it) {
394 
395  //sorting along phi first, then along eta
396  std::sort((*it).second.begin(), (*it).second.end(), PhiEtaHash::compare());
397 
398  }
399 
400  return true;
401 }
402 
403 
404 bool TrigInDetAccelerationSvc::exportGeometryInformation(const std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >& hashMap) const {
405 
406  const InDetDD::SCT_DetectorManager * sct_mgr = nullptr;
407  const InDetDD::PixelDetectorManager * pix_mgr = nullptr;
408 
409  if (m_detStore->retrieve(sct_mgr, "SCT").isFailure()) {
410  ATH_MSG_WARNING("failed to get SCT Manager");
411  return false;
412 
413  }
414  if (m_detStore->retrieve(pix_mgr,"Pixel").isFailure()) {
415  ATH_MSG_WARNING("failed to get SCT Manager");
416  return false;
417  }
418 
419  //export layer structure
420 
421  size_t dataTypeSize = sizeof(TrigAccel::DETECTOR_MODEL);
422  const size_t bufferOffset = 256;
423  size_t totalSize = bufferOffset + dataTypeSize;
424 
426 
427  if(!pBG->fit(totalSize)) pBG->reallocate(totalSize);
428 
429  TrigAccel::DETECTOR_MODEL* pArray = reinterpret_cast<TrigAccel::DETECTOR_MODEL*>(pBG->m_buffer + bufferOffset);
430 
431  // cppcheck-suppress memsetClassFloat; deliberate
432  memset(pArray,0,dataTypeSize);
433 
434  int nLayers = (int)hashMap.size();
435  pArray->m_nLayers = nLayers;
436  pArray->m_nModules=0;
437 
438  int layerIdx=0;
439 
440  for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::const_iterator it = hashMap.begin();it!=hashMap.end();++it, layerIdx++) {
441  short subdetid = std::get<0>((*it).first);
442  short barrel_ec = std::get<1>((*it).first);
443 
444  pArray->m_layers[layerIdx].m_nElements = 0;
445  pArray->m_layers[layerIdx].m_subdet = subdetid;
446  pArray->m_layers[layerIdx].m_type = barrel_ec;
447 
448  std::vector<std::vector<PhiEtaHash>::const_iterator> vStops;
449  vStops.push_back((*it).second.begin());
450  std::vector<PhiEtaHash>::const_iterator firstIt = (*it).second.begin();
451  std::vector<PhiEtaHash>::const_iterator nextIt = (*it).second.begin();
452  ++nextIt;
453 
454  int nPhiSlices=0;
455 
456  for(; nextIt!=(*it).second.end();++nextIt, ++firstIt) {
457  if((*nextIt).m_phiIndex!=(*firstIt).m_phiIndex) {
458  vStops.push_back(nextIt);
459  nPhiSlices++;
460  }
461  }
462 
463  nPhiSlices++;
464 
465  vStops.push_back((*it).second.end());
466 
467  float rc=0.0;
468  float minBound = 100000.0;
469  float maxBound =-100000.0;
470 
471  pArray->m_layers[layerIdx].m_nPhiSlices = nPhiSlices;
472 
473  //3. iterating over phi sectors
474 
475  for(unsigned int iStops = 1; iStops<vStops.size();iStops++) {
476 
477  int nPhiModules = 0;
478 
479  bool first = true;
480 
481  for(std::vector<PhiEtaHash>::const_iterator hIt = vStops[iStops-1];hIt!=vStops[iStops];++hIt, nPhiModules++) {
482 
483  pArray->m_hashArray[pArray->m_nModules] = (*hIt).m_hash;
484 
485  const InDetDD::SiDetectorElement *p = (subdetid==1) ? pix_mgr->getDetectorElement((*hIt).m_hash) : sct_mgr->getDetectorElement((*hIt).m_hash);
486 
487  if(first) {
488  first = false;
489  }
490 
491  pArray->m_layers[layerIdx].m_nElements++;
492 
493  const Amg::Vector3D& C = p->center();
494  if(barrel_ec == 0) {
495  rc += sqrt(C(0)*C(0)+C(1)*C(1));
496  if(p->zMin() < minBound) minBound = p->zMin();
497  if(p->zMax() > maxBound) maxBound = p->zMax();
498  pArray->m_minRZ[pArray->m_nModules] = p->zMin();
499  pArray->m_maxRZ[pArray->m_nModules] = p->zMax();
500  }
501  else {
502  rc += C(2);
503  if(p->rMin() < minBound) minBound = p->rMin();
504  if(p->rMax() > maxBound) maxBound = p->rMax();
505  pArray->m_minRZ[pArray->m_nModules] = p->rMin();
506  pArray->m_maxRZ[pArray->m_nModules] = p->rMax();
507  }
508 
509  pArray->m_nModules++;
510  }
511 
512  }
513  pArray->m_layers[layerIdx].m_refCoord = rc/pArray->m_layers[layerIdx].m_nElements;
514  pArray->m_layers[layerIdx].m_minBound = minBound;
515  pArray->m_layers[layerIdx].m_maxBound = maxBound;
516  }
517 
518  std::shared_ptr<TrigAccel::OffloadBuffer> pDMBuff = std::make_shared<TrigAccel::OffloadBuffer>(pBG);
519 
520  delete pBG;
521 
522  ATH_MSG_INFO("Creating Work item for task "<<TrigAccel::InDetJobControlCode::SIL_LAYERS_EXPORT);
523 
525 
526  return pW == 0;//request is actioned immediately, no actual WorkItem is created
527 
528 }
529 
530 
531 bool TrigInDetAccelerationSvc::extractGeometryInformation(std::map<std::tuple<short,short,short>, std::vector<PhiEtaHash> >& hashMap) {
532 
533  const PixelID* pixelId = nullptr;
534  const SCT_ID* sctId = nullptr;
535 
536  if (m_detStore->retrieve(pixelId, "PixelID").isFailure()) {
537  ATH_MSG_WARNING("Could not get Pixel ID helper");
538  return false;
539  }
540 
541  if (m_detStore->retrieve(sctId, "SCT_ID").isFailure()) {
542  ATH_MSG_WARNING("Could not get Pixel ID helper");
543  return false;
544  }
545 
546  short subdetid = 1;
547 
548  for(int hash = 0; hash<(int)pixelId->wafer_hash_max(); hash++) {
549 
550  Identifier offlineId = pixelId->wafer_id(hash);
551 
552  if(offlineId==0) continue;
553 
554  short barrel_ec = pixelId->barrel_ec(offlineId);
555  if(abs(barrel_ec)>2) continue;//no DBM needed
556  short layer_disk = pixelId->layer_disk(offlineId);
557  short phi_index = pixelId->phi_module(offlineId);
558  short eta_index = pixelId->eta_module(offlineId);
559  auto t = std::make_tuple(subdetid, barrel_ec, layer_disk);
560  std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.find(t);
561  if(it==hashMap.end())
562  hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1, PhiEtaHash(phi_index, eta_index, hash) )));
563  else (*it).second.push_back(PhiEtaHash(phi_index, eta_index, hash));
564  }
565  subdetid = 2;
566  for(int hash = 0; hash<(int)sctId->wafer_hash_max(); hash++) {
567 
568  Identifier offlineId = sctId->wafer_id(hash);
569 
570  if(offlineId==0) continue;
571 
572  short barrel_ec = sctId->barrel_ec(offlineId);
573  short layer_disk = sctId->layer_disk(offlineId);
574  short phi_index = sctId->phi_module(offlineId);
575  short eta_index = sctId->eta_module(offlineId);
576 
577  auto t = std::make_tuple(subdetid, barrel_ec, layer_disk);
578  std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.find(t);
579  if(it==hashMap.end())
580  hashMap.insert(std::pair<std::tuple<short,short,short>,std::vector<PhiEtaHash> >(t,std::vector<PhiEtaHash>(1, PhiEtaHash(phi_index, eta_index, hash))));
581  else (*it).second.push_back(PhiEtaHash(phi_index, eta_index, hash));
582  }
583 
584  m_layerInfo[1].resize(pixelId->wafer_hash_max(), -1);
585  m_layerInfo[2].resize(sctId->wafer_hash_max(), -1);
586 
587  int layerId=0;
588 
589  for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
590 
591  short subdetId = std::get<0>((*it).first);
592  short barrel_ec = std::get<1>((*it).first);
593 
594  m_layerInfo[0].push_back(barrel_ec);
595 
596  if(subdetId == 1) {//pixel
597  for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
598  m_layerInfo[subdetId][(*hIt).m_hash] = layerId;
599  }
600  }
601  if(subdetId == 2) {//SCT
602  for(std::vector<PhiEtaHash>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
603  m_layerInfo[subdetId][(*hIt).m_hash] = layerId;
604  }
605  }
606  }
607 
608 
609  for(std::map<std::tuple<short,short,short>,std::vector<PhiEtaHash> >::iterator it = hashMap.begin();it!=hashMap.end();++it) {
610 
611  //sorting along phi first, then along eta
612 
613  std::sort((*it).second.begin(), (*it).second.end(), PhiEtaHash::compare());
614 
615  }
616  return true;
617 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
TrigInDetAccelerationSvc::m_factoryConfigured
bool m_factoryConfigured
Definition: TrigInDetAccelerationSvc.h:81
TrigAccel::DataExportBuffer
Definition: DataExportBuffer.h:14
TrigAccel::SiliconLayer::m_nElements
int m_nElements
Definition: TrigInDetAccelEDM.h:26
TrigAccel::DataExportBuffer::fit
bool fit(size_t s)
Definition: DataExportBuffer.h:26
TrigAccel::DATA_EXPORT_BUFFER
struct TrigAccel::DataExportBuffer DATA_EXPORT_BUFFER
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TrigAccel::ITk::SiliconLayer::m_nPhiSlices
int m_nPhiSlices
Definition: TrigITkAccelEDM.h:31
TrigAccel::DataExportBuffer::reallocate
void reallocate(size_t s)
Definition: DataExportBuffer.h:30
TrigAccel::ITk::SiliconLayer::m_refCoord
float m_refCoord
Definition: TrigITkAccelEDM.h:27
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
TrigInDetAccelerationSvc::extractITkGeometryInformation
bool extractITkGeometryInformation(std::map< std::tuple< short, short, int, int >, std::vector< PhiEtaHash > > &)
Definition: TrigInDetAccelerationSvc.cxx:323
TrigAccel::SIL_LAYERS_EXPORT
@ SIL_LAYERS_EXPORT
Definition: TrigInDetAccelCodes.h:24
TrigAccel::WorkFactory::createWork
virtual Work * createWork(int, std::shared_ptr< OffloadBuffer > data)=0
TrigAccel::WorkFactory::getFactoryId
virtual int getFactoryId()=0
TrigInDetAccelCodes.h
DMTest::C
C_v1 C
Definition: C.h:26
TrigAccel::DetectorModel::m_nLayers
int m_nLayers
Definition: TrigInDetAccelEDM.h:35
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TrigAccel::TrigITkModuleID_CUDA
constexpr unsigned int TrigITkModuleID_CUDA
Definition: TrigInDetAccelCodes.h:13
TrigAccel::ITk::DetectorModel::m_layers
SILICON_LAYER m_layers[MAX_SILICON_LAYERS]
Definition: TrigITkAccelEDM.h:39
TrigInDetAccelerationSvc::exportITkGeometryInformation
bool exportITkGeometryInformation(const std::map< std::tuple< short, short, int, int >, std::vector< PhiEtaHash > > &hashMap) const
Definition: TrigInDetAccelerationSvc.cxx:195
python.selector.AtlRunQuerySelectorLhcOlc.priority
priority
Definition: AtlRunQuerySelectorLhcOlc.py:611
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
TrigAccel::SiliconLayer::m_subdet
int m_subdet
Definition: TrigInDetAccelEDM.h:23
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TrigInDetAccelerationSvc::PhiEtaHash::compare
Definition: TrigInDetAccelerationSvc.h:53
TrigAccel::SiliconLayer::m_type
int m_type
Definition: TrigInDetAccelEDM.h:24
TrigInDetAccelerationSvc::m_pWF
TrigAccel::WorkFactory * m_pWF
Definition: TrigInDetAccelerationSvc.h:76
getModule
bool getModule(std::istream &s, RegSelModule &m)
Definition: RegSelModule.cxx:110
InDetDD::SCT_DetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Definition: SCT_DetectorManager.cxx:64
TrigInDetAccelerationSvc::TrigInDetAccelerationSvc
TrigInDetAccelerationSvc(const std::string &, ISvcLocator *)
Constructor
Definition: TrigInDetAccelerationSvc.cxx:27
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
TrigInDetAccelerationSvc::m_module
TrigAccel::Module * m_module
Definition: TrigInDetAccelerationSvc.h:77
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TrigInDetAccelerationSvc::handle
virtual void handle(const Incident &) override
OnBeginRun data gathering and export.
Definition: TrigInDetAccelerationSvc.cxx:143
TrigInDetAccelerationSvc::createWork
virtual TrigAccel::Work * createWork(unsigned int, std::shared_ptr< TrigAccel::OffloadBuffer >) const override
Definition: TrigInDetAccelerationSvc.cxx:177
TrigAccel::DetectorModel::m_maxRZ
float m_maxRZ[MAX_NUMBER_PIX_MODULES+MAX_NUMBER_SCT_MODULES]
Definition: TrigInDetAccelEDM.h:40
TrigInDetAccelerationSvc.h
TrigAccel::Module
Definition: Trigger/TrigAccel/TrigAccelEvent/TrigAccelEvent/Module.h:16
TrigInDetAccelerationSvc::m_detStore
ServiceHandle< StoreGateSvc > m_detStore
Definition: TrigInDetAccelerationSvc.h:78
TrigAccel::TrigInDetModuleID_CUDA
constexpr unsigned int TrigInDetModuleID_CUDA
Definition: TrigInDetAccelCodes.h:12
TrigAccel::ITk::SiliconLayer::m_type
int m_type
Definition: TrigITkAccelEDM.h:26
PixelDetectorManager.h
TrigAccel::SiliconLayer::m_minBound
float m_minBound
Definition: TrigInDetAccelEDM.h:27
SiNumerology.h
TrigInDetAccelerationSvc::m_nDCs
int m_nDCs
Definition: TrigInDetAccelerationSvc.h:71
TrigAccel::DetectorModel::m_layers
SILICON_LAYER m_layers[MAX_SILICON_LAYERS]
Definition: TrigInDetAccelEDM.h:37
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
TrigAccel::ITk::DetectorModel::m_maxRZ
float m_maxRZ[MAX_NUMBER_PIX_MODULES+MAX_NUMBER_SCT_MODULES]
Definition: TrigITkAccelEDM.h:43
TrigAccel::WorkFactory::configure
virtual bool configure()=0
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Incidents.h
TrigAccel::ITk::SiliconLayer::m_maxBound
float m_maxBound
Definition: TrigITkAccelEDM.h:29
TrigAccel::DetectorModel::m_nModules
int m_nModules
Definition: TrigInDetAccelEDM.h:36
TrigInDetAccelerationSvc::m_evtStore
ServiceHandle< StoreGateSvc > m_evtStore
Definition: TrigInDetAccelerationSvc.h:79
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TrigInDetAccelerationSvc::getLayerInformation
virtual const std::vector< short > & getLayerInformation(int) const override
Definition: TrigInDetAccelerationSvc.cxx:190
TrigAccel::ITk::DetectorModel::m_hashArray
int m_hashArray[MAX_NUMBER_PIX_MODULES+MAX_NUMBER_SCT_MODULES]
Definition: TrigITkAccelEDM.h:41
TrigAccel::DetectorModel::m_minRZ
float m_minRZ[MAX_NUMBER_PIX_MODULES+MAX_NUMBER_SCT_MODULES]
Definition: TrigInDetAccelEDM.h:39
createCablingJSON.eta_index
int eta_index
Definition: createCablingJSON.py:9
TrigInDetAccelerationSvc::m_workMutex
std::mutex m_workMutex
Definition: TrigInDetAccelerationSvc.h:93
TrigAccel::ITk::DetectorModel::m_minRZ
float m_minRZ[MAX_NUMBER_PIX_MODULES+MAX_NUMBER_SCT_MODULES]
Definition: TrigITkAccelEDM.h:42
TrigAccel::ITk::DetectorModel
Definition: TrigITkAccelEDM.h:35
TrigAccel::ITk::DetectorModel::m_middleSpacePointLayers
int m_middleSpacePointLayers[MAX_SILICON_LAYERS]
Definition: TrigITkAccelEDM.h:40
TrigAccel::DetectorModel::m_hashArray
int m_hashArray[MAX_NUMBER_PIX_MODULES+MAX_NUMBER_SCT_MODULES]
Definition: TrigInDetAccelEDM.h:38
TrigAccel::SiliconLayer::m_maxBound
float m_maxBound
Definition: TrigInDetAccelEDM.h:27
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
TrigInDetAccelerationSvc::PhiEtaHash
Definition: TrigInDetAccelerationSvc.h:51
TrigAccel::SiliconLayer::m_nPhiSlices
int m_nPhiSlices
Definition: TrigInDetAccelEDM.h:29
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: SCT_ID.cxx:639
TrigAccel::ITk::DetectorModel::m_nModules
int m_nModules
Definition: TrigITkAccelEDM.h:38
TrigInDetAccelerationSvc::m_middleSpacePointLayers
std::vector< int > m_middleSpacePointLayers
Definition: TrigInDetAccelerationSvc.h:74
TrigAccel::Work
Definition: Work.h:14
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
TrigAccel::DETECTOR_MODEL
struct TrigAccel::DetectorModel DETECTOR_MODEL
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
PixelID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: PixelID.cxx:912
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TrigInDetAccelerationSvc::m_moduleName
std::string m_moduleName
Definition: TrigInDetAccelerationSvc.h:72
AthenaInterprocess::UpdateAfterFork::type
static const std::string & type()
Incident type.
Definition: Incidents.h:49
SiDetectorElement.h
TrigITkAccelEDM.h
TrigAccel::ITk::DETECTOR_MODEL
struct TrigAccel::ITk::DetectorModel DETECTOR_MODEL
TrigAccel::DataExportBuffer::m_buffer
char * m_buffer
Definition: DataExportBuffer.h:57
TrigInDetAccelerationSvc::m_libHandle
void * m_libHandle
Definition: TrigInDetAccelerationSvc.h:75
TrigAccel::ITk::SiliconLayer::m_subdet
int m_subdet
Definition: TrigITkAccelEDM.h:25
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCT_ID
Definition: SCT_ID.h:68
TrigAccel::Module::getFactoryById
virtual WorkFactory * getFactoryById(int id)=0
TrigAccel::ITk::SiliconLayer::m_nElements
int m_nElements
Definition: TrigITkAccelEDM.h:28
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:534
TrigInDetAccelerationSvc::m_useITkGeometry
bool m_useITkGeometry
Definition: TrigInDetAccelerationSvc.h:73
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.copyTCTOutput.totalSize
totalSize
Definition: copyTCTOutput.py:93
TrigAccel::ITk::DetectorModel::m_nLayers
int m_nLayers
Definition: TrigITkAccelEDM.h:37
TrigAccel::WorkFactory
Definition: WorkFactory.h:16
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
TrigInDetAccelerationSvc::initialize
virtual StatusCode initialize() override
Initialize
Definition: TrigInDetAccelerationSvc.cxx:49
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
SCT_DetectorManager.h
TrigInDetAccelerationSvc::finalize
virtual StatusCode finalize() override
Finalize
Definition: TrigInDetAccelerationSvc.cxx:129
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
checker_macros.h
Define macros for attributes used to control the static checker.
TrigAccel::ITk::SiliconLayer::m_minBound
float m_minBound
Definition: TrigITkAccelEDM.h:29
PixelID
Definition: PixelID.h:67
TrigAccel::SiliconLayer::m_refCoord
float m_refCoord
Definition: TrigInDetAccelEDM.h:25
TrigAccel::DetectorModel
Definition: TrigInDetAccelEDM.h:33
TrigInDetAccelEDM.h
TrigInDetAccelerationSvc::m_layerInfo
std::vector< short > m_layerInfo[3]
Definition: TrigInDetAccelerationSvc.h:91
TrigInDetAccelerationSvc::extractGeometryInformation
bool extractGeometryInformation(std::map< std::tuple< short, short, short >, std::vector< PhiEtaHash > > &)
Definition: TrigInDetAccelerationSvc.cxx:531
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
TrigInDetAccelerationSvc::exportGeometryInformation
bool exportGeometryInformation(const std::map< std::tuple< short, short, short >, std::vector< PhiEtaHash > > &) const
Definition: TrigInDetAccelerationSvc.cxx:404