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 | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
InDet::PixelRDOTool Class Reference

#include <PixelRDOTool.h>

Inheritance diagram for InDet::PixelRDOTool:
Collaboration diagram for InDet::PixelRDOTool:

Public Member Functions

 PixelRDOTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~PixelRDOTool ()=default
 
virtual StatusCode initialize ()
 
std::vector< UnpackedPixelRDOgetUnpackedPixelRDOs (const InDetRawDataCollection< PixelRDORawData > &collection, const PixelID &pixelID, const InDetDD::SiDetectorElement *element, const EventContext &ctx, int defaultLabel=-1) const
 
bool isGoodRDO (const InDet::SiDetectorElementStatus *pixelDetElStatus, const IdentifierHash &moduleHash, const Identifier &rdoID, const EventContext &ctx, const IInDetConditionsTool::IDCCacheEntry *cacheEntry) const
 
bool isGoodRDO (const InDet::SiDetectorElementStatus *pixelDetElStatus, const IdentifierHash &moduleHash, const InDetDD::SiDetectorElement *element, const Identifier &rdoID, const EventContext &ctx, const IInDetConditionsTool::IDCCacheEntry *cacheEntry) const
 
bool checkDuplication (const PixelID &pixelID, const Identifier &rdoID, const int lvl1, std::vector< UnpackedPixelRDO > &collectionID) const
 
const InDet::SiDetectorElementStatusgetPixelDetElStatus (const EventContext &ctx) const
 
const InDetDD::SiDetectorElementcheckCollection (const InDetRawDataCollection< PixelRDORawData > &collection, const EventContext &ctx) const
 
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 std::optional< IdentifierisGanged (const Identifier &rdoID, const InDetDD::SiDetectorElement *element)
 

Protected Member Functions

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

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

ToolHandle< IInDetConditionsToolm_summaryTool
 
SG::ReadHandleKey< InDet::SiDetectorElementStatusm_pixelDetElStatus
 Optional read handle to get status data to test whether a pixel detector element is good. More...
 
ServiceHandle< InDetDD::IPixelReadoutManagerm_pixelReadout
 
const PixelIDm_pixelId = nullptr
 
BooleanProperty m_checkDuplicatedRDO
 
BooleanProperty m_printDuplicate
 
BooleanProperty m_checkGanged
 
BooleanProperty m_useModuleMap
 
BooleanProperty m_isITk
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_pixelDetEleCollKey
 
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 46 of file PixelRDOTool.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

◆ PixelRDOTool()

InDet::PixelRDOTool::PixelRDOTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 21 of file PixelRDOTool.cxx.

23  :
25  {
26  }

◆ ~PixelRDOTool()

virtual InDet::PixelRDOTool::~PixelRDOTool ( )
virtualdefault

Member Function Documentation

◆ checkCollection()

const InDetDD::SiDetectorElement * InDet::PixelRDOTool::checkCollection ( const InDetRawDataCollection< PixelRDORawData > &  collection,
const EventContext &  ctx 
) const

Definition at line 153 of file PixelRDOTool.cxx.

154  {
155  const unsigned int RDO_size = collection.size();
156  if ( RDO_size==0) {
157  ATH_MSG_DEBUG("Empty RDO collection");
158  return nullptr;
159  }
160 
161  IdentifierHash idHash = collection.identifyHash();
162 
163  const InDet::SiDetectorElementStatus *pixelDetElStatus = getPixelDetElStatus(ctx);
164  if (pixelDetElStatus){
165  // If module is bad, do not create a cluster collection
168  pixelDetElStatus->isGood(idHash),
169  m_summaryTool->isGood(idHash,ctx)
170  );
171  }
172  //
173  if (m_useModuleMap && (pixelDetElStatus ? !pixelDetElStatus->isGood(idHash): !(m_summaryTool->isGood(idHash, ctx)))) {
174  return nullptr;
175  }
176 
178  const InDetDD::SiDetectorElementCollection* pixelDetEle(*pixelDetEleHandle);
179  if (not pixelDetEleHandle.isValid() or pixelDetEle == nullptr) {
180  ATH_MSG_FATAL(m_pixelDetEleCollKey.fullKey() << " is not available.");
181  return nullptr;
182  }
183 
184  const InDetDD::SiDetectorElement* element = pixelDetEle->getDetectorElement(idHash);
185  const Trk::RectangleBounds *mybounds =
186  dynamic_cast<const Trk::RectangleBounds *>(&element->surface().bounds());
187  if (not mybounds) {
188  ATH_MSG_ERROR("Dynamic cast failed at "<<__LINE__<<" of PixelRDOTool.cxx.");
189  return nullptr;
190  }
191 
192  return element;
193  }

◆ checkDuplication()

bool InDet::PixelRDOTool::checkDuplication ( const PixelID pixelID,
const Identifier rdoID,
const int  lvl1,
std::vector< UnpackedPixelRDO > &  collectionID 
) const

Definition at line 113 of file PixelRDOTool.cxx.

117  {
119  return false;
120 
121  auto isDuplicate = [&pixelID,rdoID](const UnpackedPixelRDO& rc) -> bool {
122  return (pixelID.phi_index(rdoID) == pixelID.phi_index(rc.ID)) &&
123  (pixelID.eta_index(rdoID) == pixelID.eta_index(rc.ID));
124  };
125 
126  const auto pDuplicate = std::find_if(collectionID.begin(), collectionID.end(),isDuplicate);
127  const bool foundDuplicate {pDuplicate != collectionID.end()};
128  if (foundDuplicate)
129  pDuplicate->LVL1 = std::max(pDuplicate->LVL1, lvl1);
130 
131  return foundDuplicate;
132  }

◆ 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

◆ getPixelDetElStatus()

const InDet::SiDetectorElementStatus * InDet::PixelRDOTool::getPixelDetElStatus ( const EventContext &  ctx) const

Definition at line 135 of file PixelRDOTool.cxx.

136  {
137  if (m_pixelDetElStatus.empty()) {
138  return nullptr;
139  }
140 
141  SG::ReadHandle<InDet::SiDetectorElementStatus> status = SG::makeHandle<InDet::SiDetectorElementStatus>(m_pixelDetElStatus, ctx);
142  if (!status.isValid()) {
143  std::stringstream msg;
144  msg << "Failed to get " << m_pixelDetElStatus.key() << " from StoreGate in " << name();
145  throw std::runtime_error(msg.str());
146  }
147  return status.cptr();
148  }

◆ getUnpackedPixelRDOs()

std::vector< UnpackedPixelRDO > InDet::PixelRDOTool::getUnpackedPixelRDOs ( const InDetRawDataCollection< PixelRDORawData > &  collection,
const PixelID pixelID,
const InDetDD::SiDetectorElement element,
const EventContext &  ctx,
int  defaultLabel = -1 
) const

Definition at line 196 of file PixelRDOTool.cxx.

201  {
202  std::vector<UnpackedPixelRDO> unpacked;
203  unpacked.reserve(collection.size());
204 
205  const IdentifierHash idHash = collection.identifyHash();
206  const InDet::SiDetectorElementStatus *pixelDetElStatus = getPixelDetElStatus(ctx);
207  IInDetConditionsTool::IDCCacheEntry* cacheEntry = (pixelDetElStatus ? nullptr : m_summaryTool->getCacheEntryOut(ctx));
208 
209  // For ttbar200 we have ~70 RDO in average per element, with a max of ~1000.
210  // A flat set brings marginal improvements wrt unordered set for those sizes.
211  //std::unordered_set<Identifier> > idset;
212 
213  // This is not used for ITk, still we are creating it for the moment and could be optimized away in the future
214  boost::container::flat_set<Identifier> idset;
215 
216  for(const auto *const rdo : collection) {
217  const Identifier rdoID = rdo->identify();
218 
219  if (!isGoodRDO(pixelDetElStatus,
220  idHash,
221  element,
222  rdoID,
223  ctx,
224  cacheEntry))
225  continue;
226 
227  const int lvl1 = rdo->getLVL1A();
228 
229  if (!m_isITk) {
230 
231  if (not idset.insert(rdoID).second) {
232  if (m_printDuplicate) ATH_MSG_WARNING("Discarded a duplicated RDO");
233  continue;
234  }
235 
236  if (m_checkDuplicatedRDO) {
237  if (checkDuplication(pixelID, rdoID, lvl1, unpacked))
238  continue;
239  }
240  }
241 
242  const int tot = rdo->getToT();
243 
244  unpacked.emplace_back(
245  defaultLabel,
246  pixelID.phi_index(rdoID),
247  pixelID.eta_index(rdoID),
248  tot,
249  lvl1,
250  rdoID
251 
252  );
253 
254  if (m_checkGanged) {
255  std::optional<Identifier> gangedID = isGanged(rdoID, element);
256  if (gangedID.has_value()) {
257  unpacked.emplace_back(
258  defaultLabel,
259  pixelID.phi_index(*gangedID),
260  pixelID.eta_index(*gangedID),
261  tot,
262  lvl1,
263  *gangedID
264 
265  );
266  }
267  }
268  }
269  return unpacked;
270  }

◆ initialize()

StatusCode InDet::PixelRDOTool::initialize ( )
virtual

Definition at line 28 of file PixelRDOTool.cxx.

29  {
31 
32  bool disable_smry =
33  !m_useModuleMap ||
35 
36  ATH_CHECK(m_summaryTool.retrieve(DisableTool{disable_smry}));
37 
39  if (!m_pixelDetElStatus.empty()) {
40  ATH_CHECK( m_pixelReadout.retrieve() );
41  }
42  ATH_CHECK( detStore()->retrieve(m_pixelId, "PixelID") );
43 
44  return StatusCode::SUCCESS;
45  }

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

◆ isGanged()

std::optional< Identifier > InDet::PixelRDOTool::isGanged ( const Identifier rdoID,
const InDetDD::SiDetectorElement element 
)
static

Definition at line 49 of file PixelRDOTool.cxx.

51  {
52  // If the pixel is ganged, returns a new identifier for it
53  InDetDD::SiCellId cellID = element->cellIdFromIdentifier(rdoID);
54  if (element->numberOfConnectedCells(cellID) > 1) {
55  InDetDD::SiCellId gangedCellID = element->connectedCell(cellID,1);
56  return element->identifierFromCellId(gangedCellID);
57  }
58  return {};
59  }

◆ isGoodRDO() [1/2]

bool InDet::PixelRDOTool::isGoodRDO ( const InDet::SiDetectorElementStatus pixelDetElStatus,
const IdentifierHash moduleHash,
const Identifier rdoID,
const EventContext &  ctx,
const IInDetConditionsTool::IDCCacheEntry cacheEntry 
) const

Definition at line 61 of file PixelRDOTool.cxx.

65  {
67  m_useModuleMap && pixelDetElStatus,
68  pixelDetElStatus ? pixelDetElStatus->isChipGood(moduleHash,m_pixelReadout->getFE(rdoID, m_pixelId->wafer_id(rdoID))) : false,
69  m_summaryTool->isGood(moduleHash, rdoID, ctx, cacheEntry));
70 
71  if (!m_useModuleMap) {
72  return true;
73  }
74 
75  if (pixelDetElStatus) {
76  const auto waferId = m_pixelId->wafer_id(rdoID);
77  const auto fe = m_pixelReadout->getFE(rdoID, waferId);
78  return pixelDetElStatus->isChipGood(moduleHash, fe);
79  } else {
80  return m_summaryTool->isGood(moduleHash, rdoID, ctx, cacheEntry);
81  }
82  }

◆ isGoodRDO() [2/2]

bool InDet::PixelRDOTool::isGoodRDO ( const InDet::SiDetectorElementStatus pixelDetElStatus,
const IdentifierHash moduleHash,
const InDetDD::SiDetectorElement element,
const Identifier rdoID,
const EventContext &  ctx,
const IInDetConditionsTool::IDCCacheEntry cacheEntry 
) const

Definition at line 85 of file PixelRDOTool.cxx.

90  {
91 
92 
94  m_useModuleMap && pixelDetElStatus,
95  pixelDetElStatus ? pixelDetElStatus->isChipGood(moduleHash,m_pixelReadout->getFE(rdoID, m_pixelId->wafer_id(rdoID))) : false,
96  m_summaryTool->isGood(moduleHash, rdoID, ctx, cacheEntry));
97 
98  if (!m_useModuleMap) {
99  return true;
100  }
101 
102  if (pixelDetElStatus) {
103  const auto waferId = element->identify();
104  const auto fe = m_pixelReadout->getFE(rdoID, waferId, element);
105 
106  return pixelDetElStatus->isChipGood(moduleHash, fe);
107  } else {
108  return m_summaryTool->isGood(moduleHash, rdoID, ctx, cacheEntry);
109  }
110  }

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

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

BooleanProperty InDet::PixelRDOTool::m_checkDuplicatedRDO
private
Initial value:
{
this,
"CheckDuplicatedRDO",
false,
"Check duplicated RDOs using isDuplicated method"
}

Definition at line 136 of file PixelRDOTool.h.

◆ m_checkGanged

BooleanProperty InDet::PixelRDOTool::m_checkGanged
private
Initial value:
{
this,
"CheckGanged",
true,
"Check for ganged pixels when unpacking the RDOs"
}

Definition at line 150 of file PixelRDOTool.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_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_isITk

BooleanProperty InDet::PixelRDOTool::m_isITk
private
Initial value:
{
this,
"isITk",
false,
"Toggle specific checks for ITk RDO data"
}

Definition at line 165 of file PixelRDOTool.h.

◆ m_pixelDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> InDet::PixelRDOTool::m_pixelDetEleCollKey
private
Initial value:
{
this,
"PixelDetEleCollKey",
"PixelDetectorElementCollection",
"Key of SiDetectorElementCollection for Pixel"
}

Definition at line 172 of file PixelRDOTool.h.

◆ m_pixelDetElStatus

SG::ReadHandleKey<InDet::SiDetectorElementStatus> InDet::PixelRDOTool::m_pixelDetElStatus
private
Initial value:
{
this,
"PixelDetElStatus",
"" ,
"Key of SiDetectorElementStatus for Pixel"
}

Optional read handle to get status data to test whether a pixel detector element is good.

If set to e.g. PixelDetectorElementStatus the event data will be used instead of the pixel conditions summary tool.

Definition at line 120 of file PixelRDOTool.h.

◆ m_pixelId

const PixelID* InDet::PixelRDOTool::m_pixelId = nullptr
private

Definition at line 134 of file PixelRDOTool.h.

◆ m_pixelReadout

ServiceHandle<InDetDD::IPixelReadoutManager> InDet::PixelRDOTool::m_pixelReadout
private
Initial value:
{
this,
"PixelReadoutManager",
"PixelReadoutManager",
"Pixel readout manager"
}

Definition at line 127 of file PixelRDOTool.h.

◆ m_printDuplicate

BooleanProperty InDet::PixelRDOTool::m_printDuplicate
private
Initial value:
{
this,
"PrintDuplicate",
true,
"Print duplicate RDO warning"
}

Definition at line 143 of file PixelRDOTool.h.

◆ m_summaryTool

ToolHandle<IInDetConditionsTool> InDet::PixelRDOTool::m_summaryTool
private
Initial value:
{
this,
"PixelConditionsSummaryTool",
"PixelConditionsSummaryTool",
"Tool to retrieve Pixel Conditions summary"
}

Definition at line 108 of file PixelRDOTool.h.

◆ m_useModuleMap

BooleanProperty InDet::PixelRDOTool::m_useModuleMap
private
Initial value:
{
this,
"UsePixelModuleMap",
true,
"Use bad modules map"
}

Definition at line 158 of file PixelRDOTool.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:
InDet::PixelRDOTool::getPixelDetElStatus
const InDet::SiDetectorElementStatus * getPixelDetElStatus(const EventContext &ctx) const
Definition: PixelRDOTool.cxx:135
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
Trk::RectangleBounds
Definition: RectangleBounds.h:38
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
InDetDD::SolidStateDetectorElementBase::connectedCell
SiCellId connectedCell(const SiCellId cellId, int number) const
Get the cell ids sharing the readout for this cell.
Definition: SolidStateDetectorElementBase.cxx:250
InDet::PixelRDOTool::m_checkGanged
BooleanProperty m_checkGanged
Definition: PixelRDOTool.h:150
InDet::PixelRDOTool::m_pixelDetElStatus
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatus
Optional read handle to get status data to test whether a pixel detector element is good.
Definition: PixelRDOTool.h:120
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
InDet::PixelRDOTool::m_isITk
BooleanProperty m_isITk
Definition: PixelRDOTool.h:165
InDet::SiDetectorElementStatus::isChipGood
bool isChipGood(IdentifierHash hash, unsigned int chip) const
Definition: SiDetectorElementStatus.h:100
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
InDet::PixelRDOTool::isGoodRDO
bool isGoodRDO(const InDet::SiDetectorElementStatus *pixelDetElStatus, const IdentifierHash &moduleHash, const Identifier &rdoID, const EventContext &ctx, const IInDetConditionsTool::IDCCacheEntry *cacheEntry) const
Definition: PixelRDOTool.cxx:61
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDet::PixelRDOTool::m_useModuleMap
BooleanProperty m_useModuleMap
Definition: PixelRDOTool.h:158
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
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
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
InDetRawDataCollection::identifyHash
virtual IdentifierHash identifyHash() const override final
InDetDD::SiDetectorElement::cellIdFromIdentifier
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
Definition: SiDetectorElement.cxx:120
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
InDetDD::SolidStateDetectorElementBase::numberOfConnectedCells
int numberOfConnectedCells(const SiCellId cellId) const
Test if readout cell has more than one diode associated with it.
Definition: SolidStateDetectorElementBase.cxx:243
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
VALIDATE_STATUS_ARRAY
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
Definition: SiDetectorElementStatus.h:51
InDet::SiDetectorElementStatus
Definition: SiDetectorElementStatus.h:62
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
InDetDD::SiDetectorElement::identifierFromCellId
virtual Identifier identifierFromCellId(const SiCellId &cellId) const override final
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
Definition: SiDetectorElement.cxx:89
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VALIDATE_STATUS_ARRAY_ACTIVATED
#define VALIDATE_STATUS_ARRAY_ACTIVATED
Definition: SiDetectorElementStatus.h:50
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::PixelRDOTool::m_checkDuplicatedRDO
BooleanProperty m_checkDuplicatedRDO
Definition: PixelRDOTool.h:136
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
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
InDet::PixelRDOTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelRDOTool.h:127
InDet::SiDetectorElementStatus::isGood
bool isGood(IdentifierHash hash) const
Definition: SiDetectorElementStatus.h:97
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
InDetDD::SiCellId
Definition: SiCellId.h:29
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
merge.status
status
Definition: merge.py:17
InDet::PixelRDOTool::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: PixelRDOTool.h:172
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDet::PixelRDOTool::checkDuplication
bool checkDuplication(const PixelID &pixelID, const Identifier &rdoID, const int lvl1, std::vector< UnpackedPixelRDO > &collectionID) const
Definition: PixelRDOTool.cxx:113
InDet::PixelRDOTool::m_printDuplicate
BooleanProperty m_printDuplicate
Definition: PixelRDOTool.h:143
DataVector< RawDataT >::size
size_type size() const noexcept
Returns the number of elements in the collection.
InDet::PixelRDOTool::m_summaryTool
ToolHandle< IInDetConditionsTool > m_summaryTool
Definition: PixelRDOTool.h:108
InDet::PixelRDOTool::isGanged
static std::optional< Identifier > isGanged(const Identifier &rdoID, const InDetDD::SiDetectorElement *element)
Definition: PixelRDOTool.cxx:49
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:375
fitman.k
k
Definition: fitman.py:528
IInDetConditionsTool::IDCCacheEntry
Definition: IInDetConditionsTool.h:33
InDet::PixelRDOTool::m_pixelId
const PixelID * m_pixelId
Definition: PixelRDOTool.h:134
Identifier
Definition: IdentifierFieldParser.cxx:14