ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::StripDefectsEmulatorAlg Class Reference

Algorithm which selectively copies hits from an input SCT_RDO_Container. More...

#include <StripDefectsEmulatorAlg.h>

Inheritance diagram for InDet::StripDefectsEmulatorAlg:
Collaboration diagram for InDet::StripDefectsEmulatorAlg:

Public Types

using T_ID_Helper
using T_ID_Adapter
 Adapter to support different types of RDO collections, and ID helpers.
using T_DefectsData
using T_RDORawData
using T_ModuleHelper
using T_ModuleDesign

Public Member Functions

 DefectsEmulatorBase (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
StatusCode initializeBase (unsigned int wafer_hash_max)
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Attributes

static constexpr ActsTrk::DetectorType DETECTOR_TYPE

Protected Types

enum  EHistType

Protected Member Functions

virtual bool setModuleData (const ActsDetectorElement &acts_detector_element, ModuleIdentifierMatchUtil::ModuleData_t &module_data) const override
 Set the module data for matching for the given detector element.
std::tuple< TH2 *, TH2 *, TH1 * > findHist (unsigned int n_rows, unsigned int n_cols) const
 Get rejected hits and noise histograms for a certain module design.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Protected Attributes

ServiceHandle< ITHistSvc > m_histSvc
Gaudi::Property< std::string > m_histogramGroupName
Gaudi::Property< std::vector< std::vector< int > > > m_modulePattern
Gaudi::Property< std::vector< float > > m_noiseProbability
Gaudi::Property< std::vector< std::vector< double > > > m_noiseShape
std::mutex m_histMutex
std::vector< unsigned int > m_dimPerHist ATLAS_THREAD_SAFE
std::array< TH2 *, kNHistTypes > m_moduleHist ATLAS_THREAD_SAFE
std::array< std::vector< TH2 * >, 2 > m_hist ATLAS_THREAD_SAFE
std::vector< TH1 * > m_noiseShapeHist ATLAS_THREAD_SAFE
std::atomic< std::size_t > m_rejectedRDOs
std::atomic< std::size_t > m_totalRDOs
std::atomic< std::size_t > m_splitRDOs
std::atomic< std::size_t > m_totalNoise
PublicToolHandle< ActsTrk::ITrackingGeometryToolm_trackingGeometryTool
ServiceHandle< IAthRNGSvcm_rndmSvc
std::string m_rngName
std::vector< unsigned short > m_noiseParamIdx
std::vector< std::vector< float > > m_noiseShapeCummulative
unsigned int m_maxNShape
bool m_histogrammingEnabled

Static Protected Attributes

static const std::array< std::string_view, kNHistTypess_histNames
static const std::array< std::string_view, kNHistTypess_histTitles

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadCondHandleKey< T_DefectsDatam_emulatedDefects
SG::ReadHandleKey< SCT_RDO_Containerm_origRdoContainerKey
SG::WriteHandleKey< SCT_RDO_Containerm_rdoOutContainerKey
Gaudi::Property< std::string > m_idHelperName
T_ID_Helper m_idHelper
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Algorithm which selectively copies hits from an input SCT_RDO_Container.

Hits will be copied unless they are marked as defects in the "defects" conditions data. This is a specialization of DefectsEmulatorAlg for SCT_RDOs. RDOs referring to a group of strips are split if overlapping with a defect not covering the full group of strips.

Definition at line 194 of file StripDefectsEmulatorAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ T_DefectsData

using InDet::DefectsEmulatorAlg< SCT_RDO_Container >::T_DefectsData
inherited

Definition at line 37 of file DefectsEmulatorAlg.h.

◆ T_ID_Adapter

using InDet::DefectsEmulatorAlg< SCT_RDO_Container >::T_ID_Adapter
inherited

Adapter to support different types of RDO collections, and ID helpers.

Must have the following traits:

  • The adapter is constructable from the ID_Helper
  • provides methods row_index and column_index to compute the row and column index from an Identifier
  • provides a method cloneOrRejectHit which returns the number of newly added hits and takes as arguments: a module helper and matching emulated defects conditions data, a module id hash, a row and column index, the input RDO, and the collection to which the "cloned" RDOs are added.

Definition at line 36 of file DefectsEmulatorAlg.h.

◆ T_ID_Helper

using InDet::DefectsEmulatorAlg< SCT_RDO_Container >::T_ID_Helper
inherited

Definition at line 25 of file DefectsEmulatorAlg.h.

◆ T_ModuleDesign

using InDet::DefectsEmulatorAlg< SCT_RDO_Container >::T_ModuleDesign
inherited

Definition at line 40 of file DefectsEmulatorAlg.h.

◆ T_ModuleHelper

using InDet::DefectsEmulatorAlg< SCT_RDO_Container >::T_ModuleHelper
inherited

Definition at line 39 of file DefectsEmulatorAlg.h.

◆ T_RDORawData

using InDet::DefectsEmulatorAlg< SCT_RDO_Container >::T_RDORawData
inherited

Definition at line 38 of file DefectsEmulatorAlg.h.

Member Enumeration Documentation

◆ EHistType

enum InDet::DefectsEmulatorBase::EHistType
protectedinherited

Definition at line 71 of file DefectsEmulatorBase.h.

71 {
75 };
Algorithm template to selectivly copy RDOs from an InDetRawDataCollection.

Member Function Documentation

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ DefectsEmulatorBase()

( const std::string & name,
ISvcLocator * pSvcLocator )
inherited

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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; }

◆ execute()

virtual StatusCode InDet::DefectsEmulatorAlg< SCT_RDO_Container >::execute ( const EventContext & ctx) const
overridevirtualinherited

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode InDet::DefectsEmulatorBase::finalize ( )
overridevirtualinherited

Definition at line 35 of file DefectsEmulatorBase.cxx.

147 {
148 ATH_MSG_INFO( "Total number of rejected RDOs " << m_rejectedRDOs << ", kept " << m_totalRDOs
149 << (m_splitRDOs>0 ? (", split " + std::to_string(m_splitRDOs) ) : "")
150 << ", additional noise " << m_totalNoise);
151 return StatusCode::SUCCESS;
152 }
#define ATH_MSG_INFO(x)

◆ findHist()

std::tuple< TH2 *, TH2 *, TH1 * > InDet::DefectsEmulatorBase::findHist ( unsigned int n_rows,
unsigned int n_cols ) const
protectedinherited

Get rejected hits and noise histograms for a certain module design.

Parameters
n_rowsthe number of rows of the module design
n_colsthe number of columns of the module design
Returns
rejected_hits per cell, noise per cell, noise shape histograms calls during execute must be protected by m_histMutex

Definition at line 54 of file DefectsEmulatorBase.cxx.

154 {
155 unsigned int key=(n_rows << 16) | n_cols;
157 if (iter == m_dimPerHist.end()) {
158 if (m_dimPerHist.size() == m_dimPerHist.capacity()) {
159 if (m_dimPerHist.capacity()==0) {
160 return std::make_tuple(nullptr,nullptr,nullptr);
161 }
162 else {
164 m_hist[kNoiseHits].empty() ? nullptr : m_hist[kNoiseHits].back(),
165 m_noiseShapeHist.empty() ? nullptr : m_noiseShapeHist.back());
166 }
167 }
168 else {
169 // if no "sensor" with this dimensions has been registered yet, create histograms
170 // and register it.
171 for (unsigned int hist_type_i=0; hist_type_i<kNHistTypes; ++hist_type_i) {
173 name << s_histNames.at(hist_type_i) << "_hits_" << n_rows << "_" << n_cols;
175 title << s_histTitles.at(hist_type_i) << "hits for " << n_rows << "(rows) #times " << n_cols << " (columns)";
176 {
178 m_hist.at(hist_type_i).push_back(new TH2F(name.str().c_str(), title.str().c_str(),
179 n_cols, -0.5, n_cols-0.5,
180 n_rows, -0.5, n_rows-0.5
181 ));
182 }
183 m_hist[hist_type_i].back()->GetXaxis()->SetTitle("offline column");
184 m_hist[hist_type_i].back()->GetYaxis()->SetTitle("offline row");
185 if ( m_histSvc->regHist(m_histogramGroupName.value() + name.str(),m_hist[hist_type_i].back()).isFailure() ) {
186 throw std::runtime_error("Failed to register histogram.");
187 }
188 }
189 {
191 name << "noise_shape_" << n_rows << "_" << n_cols;
193 title << "Noise shape for " << n_rows << "(rows) #times " << n_cols << " (columns)";
194 m_noiseShapeHist.push_back(new TH1F(name.str().c_str(), title.str().c_str(), m_maxNShape+1, -0.5, m_maxNShape+.5));
195 m_noiseShapeHist.back()->GetXaxis()->SetTitle("offline column");
196 m_noiseShapeHist.back()->GetYaxis()->SetTitle("offline row");
197 if ( m_histSvc->regHist(m_histogramGroupName.value() + name.str(),m_noiseShapeHist.back()).isFailure() ) {
198 throw std::runtime_error("Failed to register histogram.");
199 }
200 }
201 m_dimPerHist.push_back(key);
203 m_hist[kNoiseHits].empty() ? nullptr : m_hist[kNoiseHits].back(),
204 m_noiseShapeHist.empty() ? nullptr : m_noiseShapeHist.back()
205 );
206 }
207 }
208 else {
210 m_hist[kNoiseHits].empty() ? nullptr : m_hist[kNoiseHits].at(iter-m_dimPerHist.begin()),
211 m_noiseShapeHist.empty() ? nullptr : m_noiseShapeHist.at(iter-m_dimPerHist.begin()));
212 }
213 }
static const Attributes_t empty

◆ initialize()

virtual StatusCode InDet::DefectsEmulatorAlg< SCT_RDO_Container >::initialize ( )
overridevirtualinherited

◆ initializeBase()

StatusCode InDet::DefectsEmulatorBase::initializeBase ( unsigned int wafer_hash_max)
inherited

Definition at line 34 of file DefectsEmulatorBase.cxx.

25 {
26 ATH_CHECK( m_trackingGeometryTool.retrieve( DisableTool{m_noiseProbability.empty()} ));
27 if (!m_noiseProbability.value().empty()) {
28 if (m_modulePattern.value().size() != m_noiseProbability.value().size()) {
29 ATH_MSG_FATAL("Number of module patterns and noise probabilities differs: "
30 << m_modulePattern.value().size() << " != " << m_noiseProbability.size() );
32 }
33
34 if (m_noiseProbability.value().size() != m_noiseShape.value().size()) {
35 ATH_MSG_FATAL("Number of noise probabilities and number of noise shapes differs: "
36 << m_noiseProbability.size() << " != " << m_noiseShape.size());
38 }
39 ATH_CHECK(m_rndmSvc.retrieve());
40 m_rngName = name()+"RandomEngine";
41
43 ATH_MSG_FATAL("Maximjum wafer hash too large (" << wafer_hash_max
44 << "). This algorithm only supports wafer hashes up to "
47 }
48 m_noiseParamIdx.resize(wafer_hash_max, static_cast<unsigned short>(m_noiseProbability.size()));
51
54 module_pattern_idx.reserve( m_modulePattern.value().size() );
55
56 // Associate noise probabilities and noise shapes to module identifier hashes.
57 // The association is done according to the module match criteria. The derived
58 // class has to ensure that only modules with umambigous identifier hash are
59 // considered.
62 Counter counter {0u,0u,0u,0u,0u};
64
66
67 if (!acts_detector_element) return;
70 if (module_pattern_idx.empty()) {
71 ++counter.n_no_matching_pattern;
72 } else {
73 m_noiseParamIdx.at(acts_detector_element->identifyHash()) = module_pattern_idx.front();
74 }
75 ++counter.n_detector_elements_of_correct_type;
76 }
77 }, true /*sensitive surfaces*/);
78 ATH_MSG_DEBUG("Visited surfaces with " << counter.n_detector_elements << " / "
79 << (counter.n_missing_detector_elements + counter.n_detector_elements)
80 << " (wrong type " << counter.n_wrong_type << ")"
81 << " expected detector type " << counter.n_detector_elements_of_correct_type
82 << " without match " << counter.n_no_matching_pattern);
83 if (counter.n_missing_detector_elements || counter.n_wrong_type>0) {
84 ATH_MSG_ERROR("Encountered " << counter.n_wrong_type << " associated detector elements with wrong type and "
85 << counter.n_missing_detector_elements << " surfaces without detector element.");
86 }
87
88 // create normalised cummulative distributions of noise shape distributions
90 unsigned int pattern_i=0;
91 for (const std::vector<double> &shape : m_noiseShape.value()) {
92 m_noiseShapeCummulative[pattern_i].reserve( shape.size());
93 double scale=std::accumulate(shape.begin(), shape.end(),0.);
94 if (std::abs(scale-1.)>1e-5) {
95 ATH_MSG_FATAL("Noise shape integral for pattern " << pattern_i << " not 1. but " << scale);
97 }
98 //coverity[DIVIDE_BY_ZERO:FALSE]
99 scale = 1./scale;
100 double sum =0.;
101 for (double value : shape) {
102 sum += value * scale;
104 }
105 m_maxNShape=std::max(m_maxNShape,static_cast<unsigned int>(shape.size()));
106 ++pattern_i;
107 }
109 }
110
111 if (!m_histSvc.name().empty() && !m_histogramGroupName.value().empty()) {
112 ATH_CHECK( m_histSvc.retrieve() );
113 // reserve space for histograms for 6 different sensor types
114 constexpr unsigned int n_different_pixel_matrices_max=6;
116 for (unsigned int hist_type_i=0; hist_type_i<kNHistTypes; ++hist_type_i) {
118 }
119
120 // create per id-hash histograms
122
123 unsigned int max_y_axis = (((wafer_hash_max+99)/100+9)/10)*10;
124 for (unsigned int hist_type_i=0; hist_type_i<kNHistTypes; ++hist_type_i) {
125 {
127 hist_name << s_histNames.at(hist_type_i) << "_hits_per_module";
129 hist_title << s_histTitles.at(hist_type_i) << " hits per module";
130
132 m_moduleHist.at(hist_type_i) = new TH2F(hist_name.str().c_str(), hist_title.str().c_str(),
133 100, -0.5, 100-0.5,
134 max_y_axis, -0.5, max_y_axis-0.5
135 );
136 }
137 m_moduleHist[hist_type_i]->GetXaxis()->SetTitle("ID hash % 100");
138 m_moduleHist[hist_type_i]->GetYaxis()->SetTitle("ID hash / 100");
139 if ( m_histSvc->regHist(m_histogramGroupName.value() + m_moduleHist[hist_type_i]->GetName(),m_moduleHist[hist_type_i]).isFailure() ) {
140 return StatusCode::FAILURE;
141 }
142 }
144 }
145 return StatusCode::SUCCESS;
146 }
const ActsDetectorElement * getActsDetectorElement(const Acts::Surface &surf)
Attempts to retrieve the ActsDetectorElement associated to the passed ActsSurface.
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
virtual bool setModuleData(const ActsDetectorElement &acts_detector_element, ModuleIdentifierMatchUtil::ModuleData_t &module_data) const override
void moduleMatches(const std::vector< std::vector< int > > &module_pattern, const ModuleData_t &module_data, std::vector< unsigned int > &module_pattern_idx)
Test whether an identifier, which is split into various parts, matches some of the given patterns.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ setModuleData()

virtual bool InDet::DefectsEmulatorAlg< SCT_RDO_Container >::setModuleData ( const ActsDetectorElement & acts_detector_element,
ModuleIdentifierMatchUtil::ModuleData_t & module_data ) const
overrideprotectedvirtualinherited

Set the module data for matching for the given detector element.

Parameters
acts_detector_elementthe detector element in question
module_datadestination for the module data for matching
Returns
True if the given module is to be considered for matching. The implementation has to ensure that only modules are considered which have unique identifier hashes i.e. modules of one detector type.

Implements InDet::DefectsEmulatorBase.

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/4]

std::vector< TH1 *> m_noiseShapeHist InDet::DefectsEmulatorBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 84 of file DefectsEmulatorBase.h.

◆ ATLAS_THREAD_SAFE [2/4]

std::array<std::vector< TH2 *>,2> m_hist InDet::DefectsEmulatorBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 83 of file DefectsEmulatorBase.h.

◆ ATLAS_THREAD_SAFE [3/4]

std::array<TH2 *,kNHistTypes> m_moduleHist InDet::DefectsEmulatorBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 82 of file DefectsEmulatorBase.h.

82{};

◆ ATLAS_THREAD_SAFE [4/4]

std::vector<unsigned int> m_dimPerHist InDet::DefectsEmulatorBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 81 of file DefectsEmulatorBase.h.

◆ DETECTOR_TYPE

ActsTrk::DetectorType InDet::DefectsEmulatorAlg< SCT_RDO_Container >::DETECTOR_TYPE
staticconstexprinherited

Definition at line 42 of file DefectsEmulatorAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_emulatedDefects

Definition at line 55 of file DefectsEmulatorAlg.h.

56{this, "EmulatedDefectsKey", ""};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_histMutex

std::mutex InDet::DefectsEmulatorBase::m_histMutex
mutableprotectedinherited

Definition at line 79 of file DefectsEmulatorBase.h.

◆ m_histogramGroupName

Gaudi::Property<std::string> InDet::DefectsEmulatorBase::m_histogramGroupName
protectedinherited

Definition at line 58 of file DefectsEmulatorBase.h.

59{this,"HistogramGroupName","", "Histogram group name or empty to disable histogramming"};

◆ m_histogrammingEnabled

Definition at line 102 of file DefectsEmulatorBase.h.

◆ m_histSvc

Definition at line 56 of file DefectsEmulatorBase.h.

57{this,"HistSvc","THistSvc"};

◆ m_idHelper

T_ID_Helper InDet::DefectsEmulatorAlg< SCT_RDO_Container >::m_idHelper
privateinherited

Definition at line 64 of file DefectsEmulatorAlg.h.

64{};

◆ m_idHelperName

Gaudi::Property<std::string> InDet::DefectsEmulatorAlg< SCT_RDO_Container >::m_idHelperName
privateinherited

Definition at line 61 of file DefectsEmulatorAlg.h.

62{this, "IDHelper",""};

◆ m_maxNShape

unsigned int InDet::DefectsEmulatorBase::m_maxNShape
protectedinherited

Definition at line 100 of file DefectsEmulatorBase.h.

100{};

◆ m_modulePattern

Gaudi::Property<std::vector<std::vector<int> > > InDet::DefectsEmulatorBase::m_modulePattern
protectedinherited

Definition at line 61 of file DefectsEmulatorBase.h.

62 {this,"ModulePatterns", {},
63 "Integer ranges to select: (0-1) barrel/end-cap range, (2-3) layer, (4-5) eta index range, (6-7) phi index range, "
64 "(8-9) module number of columns or strips, (10) both sides (0,1), (11) all rows (0,1)" };

◆ m_noiseParamIdx

std::vector<unsigned short> InDet::DefectsEmulatorBase::m_noiseParamIdx
protectedinherited

Definition at line 97 of file DefectsEmulatorBase.h.

◆ m_noiseProbability

Gaudi::Property<std::vector<float> > InDet::DefectsEmulatorBase::m_noiseProbability
protectedinherited

Definition at line 66 of file DefectsEmulatorBase.h.

67{this,"NoiseProbability",0., "Probability for a cell to produce a spurious hit per module pattern"};

◆ m_noiseShape

Gaudi::Property<std::vector<std::vector<double> > > InDet::DefectsEmulatorBase::m_noiseShape
protectedinherited

Definition at line 68 of file DefectsEmulatorBase.h.

69{this,"NoiseShape",{}, "Shape of noise distribution (e.g. used for Pixel tot distribution or strip time bin distribution."};

◆ m_noiseShapeCummulative

std::vector<std::vector<float> > InDet::DefectsEmulatorBase::m_noiseShapeCummulative
protectedinherited

Definition at line 98 of file DefectsEmulatorBase.h.

◆ m_origRdoContainerKey

Definition at line 57 of file DefectsEmulatorAlg.h.

58{this, "InputKey", ""};

◆ m_rdoOutContainerKey

Definition at line 59 of file DefectsEmulatorAlg.h.

60{this, "OutputKey", ""};

◆ m_rejectedRDOs

std::atomic<std::size_t> InDet::DefectsEmulatorBase::m_rejectedRDOs
mutableprotectedinherited

Definition at line 87 of file DefectsEmulatorBase.h.

87{};

◆ m_rndmSvc

Definition at line 95 of file DefectsEmulatorBase.h.

95{this, "RndmSvc", "AthRNGSvc", ""};

◆ m_rngName

std::string InDet::DefectsEmulatorBase::m_rngName
protectedinherited

Definition at line 96 of file DefectsEmulatorBase.h.

◆ m_splitRDOs

std::atomic<std::size_t> InDet::DefectsEmulatorBase::m_splitRDOs
mutableprotectedinherited

Definition at line 89 of file DefectsEmulatorBase.h.

89{};

◆ m_totalNoise

std::atomic<std::size_t> InDet::DefectsEmulatorBase::m_totalNoise
mutableprotectedinherited

Definition at line 90 of file DefectsEmulatorBase.h.

90{};

◆ m_totalRDOs

std::atomic<std::size_t> InDet::DefectsEmulatorBase::m_totalRDOs
mutableprotectedinherited

Definition at line 88 of file DefectsEmulatorBase.h.

88{};

◆ m_trackingGeometryTool

Definition at line 92 of file DefectsEmulatorBase.h.

93{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ s_histNames

const std::array< std::string_view, DefectsEmulatorBase::kNHistTypes > InDet::DefectsEmulatorBase::s_histNames
staticprotectedinherited

Definition at line 76 of file DefectsEmulatorBase.h.

◆ s_histTitles

const std::array< std::string_view, DefectsEmulatorBase::kNHistTypes > InDet::DefectsEmulatorBase::s_histTitles
staticprotectedinherited

Definition at line 77 of file DefectsEmulatorBase.h.


The documentation for this class was generated from the following file: