ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
TrigL2LayerNumberToolITk Class Reference

#include <TrigL2LayerNumberToolITk.h>

Inheritance diagram for TrigL2LayerNumberToolITk:
Collaboration diagram for TrigL2LayerNumberToolITk:

Public Member Functions

 TrigL2LayerNumberToolITk (const std::string &, const std::string &, const IInterface *)
 
virtual ~TrigL2LayerNumberToolITk ()
 
virtual StatusCode initialize () override
 
virtual int maxSiliconLayerNum () const override
 
virtual int offsetEndcapPixels () const override
 
virtual int offsetBarrelSCT () const override
 
virtual int offsetEndcapSCT () const override
 
virtual void report () const override
 
virtual int maxNumberOfUniqueLayers () const override
 
virtual const std::vector< short > * pixelLayers () const override
 
virtual const std::vector< short > * sctLayers () const override
 
virtual const std::vector< TrigInDetSiLayer > * layerGeometry () const override
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 other standard AlgTool methods More...
 

Protected Member Functions

void createModuleHashMap (std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > &)
 
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

Gaudi::Property< bool > m_useNewScheme {this, "UseNewLayerScheme", false}
 
int m_MaxSiliconLayerNum {-1}
 
int m_OffsetEndcapPixels {-1}
 
int m_OffsetBarrelSCT {-1}
 
int m_OffsetEndcapSCT {-1}
 
int m_LastBarrelLayer {0}
 
const SCT_IDm_sctId {nullptr}
 
const PixelIDm_pixelId {nullptr}
 
const InDetDD::PixelDetectorManagerm_pixelManager {nullptr}
 
const InDetDD::SCT_DetectorManagerm_sctManager {nullptr}
 
std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > m_hashMap
 
std::vector< short > m_pixelLayers
 
std::vector< short > m_sctLayers
 
std::vector< TrigInDetSiLayerm_layerGeometry
 

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 45 of file TrigL2LayerNumberToolITk.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigL2LayerNumberToolITk()

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

Definition at line 14 of file TrigL2LayerNumberToolITk.cxx.

16  :
17  AthAlgTool(t,n,p) {
18 
19  declareInterface< ITrigL2LayerNumberTool >( this );
20 }

◆ ~TrigL2LayerNumberToolITk()

virtual TrigL2LayerNumberToolITk::~TrigL2LayerNumberToolITk ( )
inlinevirtual

Definition at line 50 of file TrigL2LayerNumberToolITk.h.

50 {};

Member Function Documentation

◆ createModuleHashMap()

void TrigL2LayerNumberToolITk::createModuleHashMap ( std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > &  hashMap)
protected

Definition at line 66 of file TrigL2LayerNumberToolITk.cxx.

66  {
67 
68 
69  //helper function
70 
71 
72  short subdetid = 1;
73 
74  for(int hash = 0; hash<static_cast<int>(m_pixelId->wafer_hash_max()); hash++) {
75 
76  Identifier offlineId = m_pixelId->wafer_id(hash);
77 
78  if(offlineId==0) continue;
79 
80  short barrel_ec = m_pixelId->barrel_ec(offlineId);
81  if(std::abs(barrel_ec)>2) continue;//no DBM needed
82 
83  short phi_index = m_pixelId->phi_module(offlineId);
84  short eta_index = m_pixelId->eta_module(offlineId);
85  int lay_id = m_pixelId->layer_disk(offlineId);
86  int eta_mod = m_pixelId->eta_module(offlineId);
87 
88  int vol_id = -1;
89  if(barrel_ec== 0) vol_id = 8;
90  if(barrel_ec==-2) vol_id = 7;
91  if(barrel_ec== 2) vol_id = 9;
92 
93  int new_vol=0, new_lay=0;
94 
95  if(vol_id == 7 || vol_id == 9) {
96  new_vol = 10*vol_id + lay_id;
97  new_lay = eta_mod;
98  }
99  else if(vol_id == 8) {
100  new_lay = 0;
101  new_vol = 10*vol_id + lay_id;
102  }
103 
104  auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, new_vol, new_lay);
105 
106  std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >::iterator it = hashMap.find(t);
107  if(it==hashMap.end())
108  hashMap.insert(std::pair<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >(t,std::vector<PhiEtaHashITk>(1, PhiEtaHashITk(phi_index, eta_index, hash) )));
109  else (*it).second.push_back(PhiEtaHashITk(phi_index, eta_index, hash));
110  }
111 
112  subdetid = 2;
113 
114  for(int hash = 0; hash<static_cast<int>(m_sctId->wafer_hash_max()); hash++) {
115 
116  Identifier offlineId = m_sctId->wafer_id(hash);
117 
118  if(offlineId==0) continue;
119 
120  short barrel_ec = m_sctId->barrel_ec(offlineId);
121  short phi_index = m_sctId->phi_module(offlineId);
122  short eta_index = m_sctId->eta_module(offlineId);
123 
124  int vol_id = 13;
125 
126  if(barrel_ec) vol_id = 12;
127  if(barrel_ec>0) vol_id = 14;
128 
129  int lay_id = m_sctId->layer_disk(offlineId);
130 
131  auto t = std::make_tuple(barrel_ec==0 ? -100 : barrel_ec, subdetid, vol_id, lay_id);
132 
133  std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >::iterator it = hashMap.find(t);
134  if(it==hashMap.end())
135  hashMap.insert(std::pair<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >(t,std::vector<PhiEtaHashITk>(1, PhiEtaHashITk(phi_index, eta_index, hash))));
136  else (*it).second.push_back(PhiEtaHashITk(phi_index, eta_index, hash));
137  }
138 
139  m_pixelLayers.clear();
140  m_sctLayers.clear();
141 
142  m_pixelLayers.resize(m_pixelId->wafer_hash_max(), -100);
143  m_sctLayers.resize(m_sctId->wafer_hash_max(), -100);
144  m_layerGeometry.resize(hashMap.size());
145 
146  int layerId=0;
147 
149 
150  for(std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >::iterator it = hashMap.begin();it!=hashMap.end();++it, layerId++) {
151 
152  short vol_id = std::get<2>((*it).first);
153  short lay_id = std::get<3>((*it).first);
154  int combinedId = static_cast<int>(vol_id)*1000 + lay_id;
155 
156  short subdetId = std::get<1>((*it).first);
157  short barrel_ec = std::get<0>((*it).first);
158 
159  if(barrel_ec == -100) barrel_ec = 0;
160 
161  if(barrel_ec == 0) m_LastBarrelLayer++;
162 
163  m_layerGeometry[layerId].m_type = barrel_ec;
164 
165  m_layerGeometry[layerId].m_subdet = combinedId;
166 
167  //m_layerGeometry[layerId].m_subdet = subdetId;
168 
169  float rc=0.0;
170  float minBound = 100000.0;
171  float maxBound =-100000.0;
172  int nModules = 0;
173 
174  for(std::vector<PhiEtaHashITk>::iterator hIt = (*it).second.begin();hIt != (*it).second.end();++hIt) {
175 
176  const InDetDD::SiDetectorElement *p = NULL;
177 
178  if(subdetId == 1) {//pixel
179  m_pixelLayers[(*hIt).m_hash] = layerId;
180  p = m_pixelManager->getDetectorElement((*hIt).m_hash);
181  }
182  if(subdetId == 2) {//SCT
183  m_sctLayers[(*hIt).m_hash] = layerId;
184  p = m_sctManager->getDetectorElement((*hIt).m_hash);
185  }
186 
187  const Amg::Vector3D& C = p->center();
188  if(barrel_ec == 0) {
189  rc += sqrt(C(0)*C(0)+C(1)*C(1));
190  if(p->zMin() < minBound) minBound = p->zMin();
191  if(p->zMax() > maxBound) maxBound = p->zMax();
192  }
193  else {
194  rc += C(2);
195  if(p->rMin() < minBound) minBound = p->rMin();
196  if(p->rMax() > maxBound) maxBound = p->rMax();
197  }
198  nModules++;
199  }
200  m_layerGeometry[layerId].m_refCoord = rc/nModules;
201  m_layerGeometry[layerId].m_minBound = minBound;
202  m_layerGeometry[layerId].m_maxBound = maxBound;
203  }
204 
205  ATH_MSG_INFO("List of unique layers in Pixel and SCT :");
206  for(int l=0;l<layerId;l++) {
207  ATH_MSG_INFO("Layer "<<l<<" ("<<m_layerGeometry[l].m_subdet<<") : reference coordinate ="<< m_layerGeometry[l].m_refCoord<<" boundaries: "<<m_layerGeometry[l].m_minBound<<" "<<m_layerGeometry[l].m_maxBound<<" type="<<m_layerGeometry[l].m_type);
208  }
209 }

◆ 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

◆ initialize()

StatusCode TrigL2LayerNumberToolITk::initialize ( )
overridevirtual

Definition at line 22 of file TrigL2LayerNumberToolITk.cxx.

22  {
23 
24  ATH_CHECK( detStore()->retrieve(m_pixelId, "PixelID") );
25  ATH_CHECK( detStore()->retrieve(m_sctId, "SCT_ID") );
26  ATH_CHECK( detStore()->retrieve(m_pixelManager, "ITkPixel") );
27  ATH_CHECK( detStore()->retrieve(m_sctManager, "ITkStrip") );
28 
29  //calculate the numbers
30 
31  if(!m_useNewScheme) {
32 
33  const InDetDD::SiNumerology& pixSiNum = m_pixelManager->numerology();
34  const InDetDD::SiNumerology& sctSiNum = m_sctManager->numerology();
35 
36  m_MaxSiliconLayerNum = pixSiNum.numLayers()+pixSiNum.numDisks()+sctSiNum.numLayers()+sctSiNum.numDisks();
37  m_OffsetBarrelSCT = pixSiNum.numLayers();
38  m_OffsetEndcapPixels = pixSiNum.numLayers()+sctSiNum.numLayers();
40  m_OffsetEndcapSCT = pixSiNum.numLayers()+sctSiNum.numLayers()+pixSiNum.numDisks();
41  }
42  else {
44 
45  ATH_MSG_INFO("Total number of unique silicon layers = "<<m_hashMap.size());
46 
47  m_MaxSiliconLayerNum = static_cast<int>(m_hashMap.size());
49  }
50 
51  report();
52 
53  return StatusCode::SUCCESS;
54 }

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

◆ interfaceID()

static const InterfaceID& ITrigL2LayerNumberTool::interfaceID ( )
inlinestaticinherited

other standard AlgTool methods

< the Tool's interface

Definition at line 24 of file ITrigL2LayerNumberTool.h.

24  {
25  return IID_ITrigL2LayerNumberTool;
26  }

◆ layerGeometry()

virtual const std::vector<TrigInDetSiLayer>* TrigL2LayerNumberToolITk::layerGeometry ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 75 of file TrigL2LayerNumberToolITk.h.

75  {
76  return &m_layerGeometry;
77  }

◆ maxNumberOfUniqueLayers()

virtual int TrigL2LayerNumberToolITk::maxNumberOfUniqueLayers ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 63 of file TrigL2LayerNumberToolITk.h.

63  {
64  return static_cast<int>(m_hashMap.size());
65  }

◆ maxSiliconLayerNum()

virtual int TrigL2LayerNumberToolITk::maxSiliconLayerNum ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 57 of file TrigL2LayerNumberToolITk.h.

57 {return m_MaxSiliconLayerNum;}

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

◆ offsetBarrelSCT()

virtual int TrigL2LayerNumberToolITk::offsetBarrelSCT ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 59 of file TrigL2LayerNumberToolITk.h.

59 {return m_OffsetBarrelSCT;}

◆ offsetEndcapPixels()

virtual int TrigL2LayerNumberToolITk::offsetEndcapPixels ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 58 of file TrigL2LayerNumberToolITk.h.

58 {return m_OffsetEndcapPixels;}

◆ offsetEndcapSCT()

virtual int TrigL2LayerNumberToolITk::offsetEndcapSCT ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 60 of file TrigL2LayerNumberToolITk.h.

60 {return m_OffsetEndcapSCT;}

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

◆ pixelLayers()

virtual const std::vector<short>* TrigL2LayerNumberToolITk::pixelLayers ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 67 of file TrigL2LayerNumberToolITk.h.

67  {
68  return &m_pixelLayers;
69  }

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

◆ report()

void TrigL2LayerNumberToolITk::report ( ) const
overridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 56 of file TrigL2LayerNumberToolITk.cxx.

56  {
57 
58  ATH_MSG_INFO("TrigL2 Layer numbering scheme:");
59  ATH_MSG_INFO("Total number of layers = "<<maxSiliconLayerNum());
60  ATH_MSG_INFO("OffsetEndcapPixels = "<<offsetEndcapPixels());
61  ATH_MSG_INFO("OffsetBarrelSCT = "<<offsetBarrelSCT());
62  ATH_MSG_INFO("OffsetEndcapSCT = "<<offsetEndcapSCT());
63 }

◆ sctLayers()

virtual const std::vector<short>* TrigL2LayerNumberToolITk::sctLayers ( ) const
inlineoverridevirtual

Implements ITrigL2LayerNumberTool.

Definition at line 71 of file TrigL2LayerNumberToolITk.h.

71  {
72  return &m_sctLayers;
73  }

◆ 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_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_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_hashMap

std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> > TrigL2LayerNumberToolITk::m_hashMap
protected

Definition at line 97 of file TrigL2LayerNumberToolITk.h.

◆ m_LastBarrelLayer

int TrigL2LayerNumberToolITk::m_LastBarrelLayer {0}
protected

Definition at line 88 of file TrigL2LayerNumberToolITk.h.

◆ m_layerGeometry

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

Definition at line 99 of file TrigL2LayerNumberToolITk.h.

◆ m_MaxSiliconLayerNum

int TrigL2LayerNumberToolITk::m_MaxSiliconLayerNum {-1}
protected

Definition at line 84 of file TrigL2LayerNumberToolITk.h.

◆ m_OffsetBarrelSCT

int TrigL2LayerNumberToolITk::m_OffsetBarrelSCT {-1}
protected

Definition at line 86 of file TrigL2LayerNumberToolITk.h.

◆ m_OffsetEndcapPixels

int TrigL2LayerNumberToolITk::m_OffsetEndcapPixels {-1}
protected

Definition at line 85 of file TrigL2LayerNumberToolITk.h.

◆ m_OffsetEndcapSCT

int TrigL2LayerNumberToolITk::m_OffsetEndcapSCT {-1}
protected

Definition at line 87 of file TrigL2LayerNumberToolITk.h.

◆ m_pixelId

const PixelID* TrigL2LayerNumberToolITk::m_pixelId {nullptr}
protected

Definition at line 91 of file TrigL2LayerNumberToolITk.h.

◆ m_pixelLayers

std::vector<short> TrigL2LayerNumberToolITk::m_pixelLayers
protected

Definition at line 98 of file TrigL2LayerNumberToolITk.h.

◆ m_pixelManager

const InDetDD::PixelDetectorManager* TrigL2LayerNumberToolITk::m_pixelManager {nullptr}
protected

Definition at line 92 of file TrigL2LayerNumberToolITk.h.

◆ m_sctId

const SCT_ID* TrigL2LayerNumberToolITk::m_sctId {nullptr}
protected

Definition at line 90 of file TrigL2LayerNumberToolITk.h.

◆ m_sctLayers

std::vector<short> TrigL2LayerNumberToolITk::m_sctLayers
protected

Definition at line 98 of file TrigL2LayerNumberToolITk.h.

◆ m_sctManager

const InDetDD::SCT_DetectorManager* TrigL2LayerNumberToolITk::m_sctManager {nullptr}
protected

Definition at line 93 of file TrigL2LayerNumberToolITk.h.

◆ m_useNewScheme

Gaudi::Property<bool> TrigL2LayerNumberToolITk::m_useNewScheme {this, "UseNewLayerScheme", false}
protected

Definition at line 81 of file TrigL2LayerNumberToolITk.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TrigL2LayerNumberToolITk::offsetEndcapPixels
virtual int offsetEndcapPixels() const override
Definition: TrigL2LayerNumberToolITk.h:58
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TrigL2LayerNumberToolITk::m_sctId
const SCT_ID * m_sctId
Definition: TrigL2LayerNumberToolITk.h:90
TrigL2LayerNumberToolITk::m_pixelLayers
std::vector< short > m_pixelLayers
Definition: TrigL2LayerNumberToolITk.h:98
DMTest::C
C_v1 C
Definition: C.h:26
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TrigL2LayerNumberToolITk::maxSiliconLayerNum
virtual int maxSiliconLayerNum() const override
Definition: TrigL2LayerNumberToolITk.h:57
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
PixelModuleFeMask_create_db.nModules
nModules
Definition: PixelModuleFeMask_create_db.py:47
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrigL2LayerNumberToolITk::m_OffsetBarrelSCT
int m_OffsetBarrelSCT
Definition: TrigL2LayerNumberToolITk.h:86
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
TrigL2LayerNumberToolITk::report
virtual void report() const override
Definition: TrigL2LayerNumberToolITk.cxx:56
TrigL2LayerNumberToolITk::m_OffsetEndcapPixels
int m_OffsetEndcapPixels
Definition: TrigL2LayerNumberToolITk.h:85
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
TrigL2LayerNumberToolITk::m_OffsetEndcapSCT
int m_OffsetEndcapSCT
Definition: TrigL2LayerNumberToolITk.h:87
InDetDD::SCT_DetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Definition: SCT_DetectorManager.cxx:64
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
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
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigL2LayerNumberToolITk::m_sctLayers
std::vector< short > m_sctLayers
Definition: TrigL2LayerNumberToolITk.h:98
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
TrigL2LayerNumberToolITk::m_layerGeometry
std::vector< TrigInDetSiLayer > m_layerGeometry
Definition: TrigL2LayerNumberToolITk.h:99
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDetDD::SiNumerology::numDisks
int numDisks() const
Number of disks.
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
InDetDD::SiNumerology::numLayers
int numLayers() const
Number of layers.
createCablingJSON.eta_index
int eta_index
Definition: createCablingJSON.py:9
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SCT_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: SCT_ID.cxx:639
TrigL2LayerNumberToolITk::offsetEndcapSCT
virtual int offsetEndcapSCT() const override
Definition: TrigL2LayerNumberToolITk.h:60
TrigL2LayerNumberToolITk::m_LastBarrelLayer
int m_LastBarrelLayer
Definition: TrigL2LayerNumberToolITk.h:88
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
TrigL2LayerNumberToolITk::m_pixelId
const PixelID * m_pixelId
Definition: TrigL2LayerNumberToolITk.h:91
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
PixelID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: PixelID.cxx:912
InDetDD::SiNumerology
Definition: SiNumerology.h:27
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TrigL2LayerNumberToolITk::m_useNewScheme
Gaudi::Property< bool > m_useNewScheme
Definition: TrigL2LayerNumberToolITk.h:81
TrigL2LayerNumberToolITk::offsetBarrelSCT
virtual int offsetBarrelSCT() const override
Definition: TrigL2LayerNumberToolITk.h:59
a
TList * a
Definition: liststreamerinfos.cxx:10
TrigL2LayerNumberToolITk::m_MaxSiliconLayerNum
int m_MaxSiliconLayerNum
Definition: TrigL2LayerNumberToolITk.h:84
h
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
TrigL2LayerNumberToolITk::m_sctManager
const InDetDD::SCT_DetectorManager * m_sctManager
Definition: TrigL2LayerNumberToolITk.h:93
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
TrigL2LayerNumberToolITk::createModuleHashMap
void createModuleHashMap(std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > &)
Definition: TrigL2LayerNumberToolITk.cxx:66
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
PhiEtaHashITk
Definition: TrigL2LayerNumberToolITk.h:23
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
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
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TrigL2LayerNumberToolITk::m_pixelManager
const InDetDD::PixelDetectorManager * m_pixelManager
Definition: TrigL2LayerNumberToolITk.h:92
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:350
fitman.k
k
Definition: fitman.py:528
TrigL2LayerNumberToolITk::m_hashMap
std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > m_hashMap
Definition: TrigL2LayerNumberToolITk.h:97
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80