Loading [MathJax]/jax/input/TeX/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
InDet::StripDefectsEmulatorCondAlg Class Reference

Conditions algorithms for emulating ITK strip defects. More...

#include <StripDefectsEmulatorCondAlg.h>

Inheritance diagram for InDet::StripDefectsEmulatorCondAlg:
Collaboration diagram for InDet::StripDefectsEmulatorCondAlg:

Public Types

using T_ID = detail::DetectorEmulatorCondAlgTraits< StripDefectsEmulatorCondAlg >::T_ID
 
using T_ModuleHelper = detail::DetectorEmulatorCondAlgTraits< StripDefectsEmulatorCondAlg >::T_ModuleHelper
 
using T_EmulatedDefects = detail::DetectorEmulatorCondAlgTraits< StripDefectsEmulatorCondAlg >::T_EmulatedDefects
 
using T_DetectorElementCollection = detail::DetectorEmulatorCondAlgTraits< StripDefectsEmulatorCondAlg >::T_DetectorElementCollection
 
using T_ModuleDesign = detail::DetectorEmulatorCondAlgTraits< StripDefectsEmulatorCondAlg >::T_ModuleDesign
 

Public Member Functions

virtual StatusCode initialize () override final
 
virtual StatusCode execute (const EventContext &ctx) const override
 
 DefectsEmulatorCondAlgBase (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, 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 sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Types

enum  EProbabilities { kModuleDefectProb, kCellDefectProb, kNProb }
 
enum  ECornerDefectParams {
  kCornerDefectProb, kCornerDefectWidthColumnDirectionOffset, kCornerDefectWidthColumnDirection, kCornerDefectkWidthRowDirectionOffset,
  kCornerDefectkWidthRowDirection, kCornerDefectkSagittaOffset, kCornerDefectkSagitta, kNCornerDefectParams
}
 
enum  ECounts {
  kNElements, kNDefects, kNRetries, kNMaxRtriesExceeded,
  kNModulesWithDefects, kMaxDefectsPerModule, kNCounts
}
 
enum  EPosHistType { kDefectModulePos, kModulesWithDefectsPos, kNPosHists }
 
enum  EPerModuleHistType { kMatrixTypeId, kDefectModule, kDefectCell, kNPerModuleHistTypes }
 

Protected Member Functions

std::unordered_multimap< unsigned int, unsigned int > getModuleConnectionMap (const InDetDD::SiDetectorElementCollection &det_ele_coll) const
 Return the map which defines which modules are connected to the same sensor as a reference module. More...
 
bool isModuleDefect (const EventContext &ctx, unsigned int id_hash) const
 Alternative method to declare strip modules as defect. More...
 
const StripDefectsEmulatorCondAlgderived () const
 
StatusCode initializeBase (unsigned int n_masks, unsigned int wafer_hash_max)
 
StatusCode initializeProbabilities (unsigned int n_masks)
 
StatusCode initializeCornerDefects ()
 
StatusCode checkProbabilities (unsigned int n_probabilities) const
 Consistency check of module patterns, probabilities. More...
 
double totalProbability (const std::vector< unsigned int > &module_pattern_idx, unsigned int prob_idx) const
 Compute the total probability using the probabilities associated to the given list of patterns. More...
 
void makeCumulativeProbabilityDist (std::vector< unsigned int > &module_pattern_idx, unsigned int prob_idx, std::vector< double > &cumulative_prob) const
 Create a cumulative distribution from the referenced set of probabilities. More...
 
unsigned int throwNumberOfDefects (CLHEP::HepRandomEngine *rndmEngine, const std::vector< unsigned int > &module_pattern_idx, unsigned int n_masks, unsigned int n_cells, std::vector< unsigned int > &n_mask_defects) const
 
void printSummaryOfDefectGeneration (unsigned int n_masks, unsigned int n_error, unsigned int n_defects_total, const std::vector< std::array< unsigned int, kNCounts > > &counts) const
 
std::pair< unsigned int, unsigned int > findHist (unsigned int pattern_i, unsigned int n_rows, unsigned int n_cols) const
 
void histogramDefectModule (unsigned int module_pattern_i, unsigned int hist_pattern_i, unsigned int id_hash, const Amg::Vector3D &center) const
 
void fillPerModuleHistograms (unsigned int module_pattern_i, unsigned int pattern_hist_i, unsigned int matrix_histogram_index, unsigned int matrix_index, unsigned int module_i, unsigned int n_masks, const std::vector< unsigned int > &n_mask_defects, const Amg::Vector3D &center) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Static Protected Member Functions

static std::string IDName ()
 Name of the SCT_ID helper. More...
 

Protected Attributes

ToolHandle< ISCT_ConditionsToolm_moduleVetoTool {this,"SCTConditionsTool","","Optional SCT conditions tool to mark modules as defect (alternative to ModulePattern)"}
 
SG::ReadCondHandleKey< T_DetectorElementCollectionm_detEleCollKey
 
SG::WriteCondHandleKey< T_EmulatedDefectsm_writeKey
 
Gaudi::Property< std::string > m_idName
 
const T_IDm_idHelper
 
ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
 
Gaudi::Property< std::vector< std::vector< int > > > m_modulePattern
 
Gaudi::Property< std::vector< std::vector< double > > > m_defectProbability
 
Gaudi::Property< std::vector< std::vector< double > > > m_nDefectFractionsPerPattern
 
Gaudi::Property< std::vector< std::vector< double > > > m_cornerDefectParamsPerPattern
 
Gaudi::Property< std::vector< std::vector< double > > > m_cornerDefectNCornerFractionsPerPattern
 
std::vector< std::vector< std::vector< float > > > m_perPatternAndMaskFractions
 
std::vector< std::vector< float > > m_perPatternCornerDefectNCornerCummulativeProb
 
Gaudi::Property< bool > m_oddRowToggle {this, "OddRowToggle", false}
 
Gaudi::Property< bool > m_oddColToggle {this, "OddColToggle", false}
 
Gaudi::Property< bool > m_checkerBoardToggle {this, "CheckerBoardDefects", false}
 
Gaudi::Property< unsigned int > m_maxAttempts {this, "MaxRandomPositionAttempts", 10}
 
ServiceHandle< ITHistSvc > m_histSvc {this,"HistSvc","THistSvc"}
 
Gaudi::Property< std::string > m_histogramGroupName {this,"HistogramGroupName","", "Histogram group name or empty to disable histogramming"}
 
Gaudi::Property< bool > m_fillHistogramsPerPattern {this, "FillHistogramsPerPattern", false, "If true, histogram per module defects etc. separately per pattern."}
 
Gaudi::Property< bool > m_fillEtaPhiHistogramsPerPattern {this, "FillEtaPhiHistogramsPerPattern", false, "If true, histogram per eta, phi amd z, R are filled separately per pattern."}
 
std::string m_rngName
 
std::vector< std::string > m_groupDefectHistNames
 
std::vector< unsigned int > m_maxNGroupDefects
 
std::mutex m_histMutex
 
std::vector< unsigned int > m_matrixTypeId ATLAS_THREAD_SAFE
 
std::vector< std::vector< unsigned int > > m_dimPerHist ATLAS_THREAD_SAFE
 
std::vector< std::vector< TH2 * > > m_hist ATLAS_THREAD_SAFE
 
std::vector< std::vector< std::vector< TH1 * > > > m_groupDefectHists ATLAS_THREAD_SAFE
 
std::vector< std::vector< TH2 * > > m_moduleHist ATLAS_THREAD_SAFE
 
std::array< std::vector< TH2 * >, kNPosHists > m_defectModuleEtaPhiHist ATLAS_THREAD_SAFE
 
std::array< std::vector< TH2 * >, kNPosHists > m_defectModuleEtaLayerHist ATLAS_THREAD_SAFE
 
std::atomic< unsigned int > m_modulesWithoutDefectParameters {}
 
bool m_histogrammingEnabled = false
 

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

DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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
 

Friends

class DefectsEmulatorCondAlgImpl< StripDefectsEmulatorCondAlg >
 

Detailed Description

Conditions algorithms for emulating ITK strip defects.

The algorithm mask random strips and modules as defect. This data can be used to reject hits overlapping with these defects.

Definition at line 38 of file StripDefectsEmulatorCondAlg.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_DetectorElementCollection

Definition at line 40 of file DefectsEmulatorCondAlgImpl.h.

◆ T_EmulatedDefects

Definition at line 39 of file DefectsEmulatorCondAlgImpl.h.

◆ T_ID

Definition at line 37 of file DefectsEmulatorCondAlgImpl.h.

◆ T_ModuleDesign

Definition at line 41 of file DefectsEmulatorCondAlgImpl.h.

◆ T_ModuleHelper

Definition at line 38 of file DefectsEmulatorCondAlgImpl.h.

Member Enumeration Documentation

◆ ECornerDefectParams

Enumerator
kCornerDefectProb 
kCornerDefectWidthColumnDirectionOffset 
kCornerDefectWidthColumnDirection 
kCornerDefectkWidthRowDirectionOffset 
kCornerDefectkWidthRowDirection 
kCornerDefectkSagittaOffset 
kCornerDefectkSagitta 
kNCornerDefectParams 

Definition at line 95 of file DefectsEmulatorCondAlgBase.h.

◆ ECounts

Enumerator
kNElements 
kNDefects 
kNRetries 
kNMaxRtriesExceeded 
kNModulesWithDefects 
kMaxDefectsPerModule 
kNCounts 

Definition at line 142 of file DefectsEmulatorCondAlgBase.h.

142  {
143  kNElements,
144  kNDefects,
145  kNRetries,
149  kNCounts
150  };

◆ EPerModuleHistType

Enumerator
kMatrixTypeId 
kDefectModule 
kDefectCell 
kNPerModuleHistTypes 

Definition at line 227 of file DefectsEmulatorCondAlgBase.h.

227  {
230  kDefectCell,
232  };

◆ EPosHistType

Enumerator
kDefectModulePos 
kModulesWithDefectsPos 
kNPosHists 

Definition at line 219 of file DefectsEmulatorCondAlgBase.h.

219  {
222  kNPosHists
223  };

◆ EProbabilities

Enumerator
kModuleDefectProb 
kCellDefectProb 
kNProb 

Definition at line 89 of file DefectsEmulatorCondAlgBase.h.

89  {
92  kNProb
93  };

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ checkProbabilities()

StatusCode InDet::DefectsEmulatorCondAlgBase::checkProbabilities ( unsigned int  n_probabilities) const
protectedinherited

Consistency check of module patterns, probabilities.

Definition at line 159 of file DefectsEmulatorCondAlgBase.cxx.

159  {
160  if (!(m_modulePattern.size() == m_defectProbability.size()
162  && ModuleIdentifierMatchUtil::verifyElementCount<double>(m_defectProbability.value(), n_probabilities))) {
163  if (m_modulePattern.size() != m_defectProbability.size()) {
164  ATH_MSG_ERROR( "size difference modulePattern vs defectProbability : " << m_modulePattern.size() << " != " << m_defectProbability.size() << "?");
165  }
167  if (!ret) {
168  ATH_MSG_ERROR( "Order problem in modulePattern : " << ret << "?");
169  }
170  ret = ModuleIdentifierMatchUtil::verifyElementCount<double>(m_defectProbability.value(), n_probabilities);
171  if (!ret) {
172  ATH_MSG_ERROR( "Size problem in defectProbability : " << ret << " ( n_prob" << n_probabilities << ")?");
173  }
174  }
175  return m_modulePattern.size() == m_defectProbability.size()
177  && ModuleIdentifierMatchUtil::verifyElementCount<double>(m_defectProbability.value(), n_probabilities)
178  ? StatusCode::SUCCESS : StatusCode::FAILURE;
179  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ DefectsEmulatorCondAlgBase()

InDet::DefectsEmulatorCondAlgBase::DefectsEmulatorCondAlgBase
inherited

Definition at line 43 of file DefectsEmulatorCondAlgBase.cxx.

18  : AthReentrantAlgorithm(name, pSvcLocator)
19  {}

◆ derived()

Definition at line 49 of file DefectsEmulatorCondAlgImpl.h.

49 { return *static_cast<const T_Derived *>(this); }

◆ 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() [1/2]

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

◆ evtStore() [2/2]

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

◆ execute()

virtual StatusCode InDet::DefectsEmulatorCondAlgImpl< StripDefectsEmulatorCondAlg >::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 & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ fillPerModuleHistograms()

void InDet::DefectsEmulatorCondAlgBase::fillPerModuleHistograms ( unsigned int  module_pattern_i,
unsigned int  pattern_hist_i,
unsigned int  matrix_histogram_index,
unsigned int  matrix_index,
unsigned int  module_i,
unsigned int  n_masks,
const std::vector< unsigned int > &  n_mask_defects,
const Amg::Vector3D center 
) const
protectedinherited

Definition at line 476 of file DefectsEmulatorCondAlgBase.cxx.

484  {
485  // all the following histograms are expected to have the same binning
486  // i.e. one bin per ID hash organised in a matrix
487  assert( pattern_hist_i < m_moduleHist.size());
488  assert( kMatrixTypeId < m_moduleHist[pattern_hist_i].size());
489  assert( kDefectModule < m_moduleHist[pattern_hist_i].size());
490  unsigned int ids_per_col = static_cast<unsigned int>(m_moduleHist[pattern_hist_i][kDefectModule]->GetNbinsX());
491  unsigned int bin_i=m_moduleHist[pattern_hist_i][kDefectModule]->GetBin( module_i%ids_per_col+1, module_i/ids_per_col+1);
492  unsigned int mask_i=n_masks;
493  for (; --mask_i>0; ) {
494  assert( mask_i < n_mask_defects.size() && mask_i>0);
495  if (!m_groupDefectHists.empty()) {
496  m_groupDefectHists[pattern_hist_i][matrix_histogram_index][mask_i-1]->Fill(n_mask_defects[mask_i]);
497  }
498  assert( (kDefectCell+mask_i) < m_moduleHist[pattern_hist_i].size());
499  m_moduleHist[pattern_hist_i][kDefectCell+mask_i]->SetBinContent(bin_i, n_mask_defects[mask_i]);
500  }
501  assert( (kDefectCell+mask_i) < m_moduleHist[pattern_hist_i].size());
502  m_moduleHist[pattern_hist_i][kDefectCell+mask_i]->SetBinContent(bin_i, n_mask_defects[mask_i]);
503  m_moduleHist[pattern_hist_i][kMatrixTypeId]->SetBinContent(bin_i, matrix_index+1 );
504  unsigned int n_defects_total = std::accumulate(n_mask_defects.begin(),n_mask_defects.end(), 0u);
505  if (n_defects_total>0) {
506  unsigned int eta_phi_pattern_i = m_fillEtaPhiHistogramsPerPattern ? module_pattern_i : 0;
507  assert( kModulesWithDefectsPos < m_defectModuleEtaPhiHist.size());
508  assert( eta_phi_pattern_i < m_defectModuleEtaPhiHist[kModulesWithDefectsPos].size() );
509  m_defectModuleEtaPhiHist[kModulesWithDefectsPos][eta_phi_pattern_i]->Fill(center.z(), center.perp());
510  m_defectModuleEtaLayerHist[kModulesWithDefectsPos][eta_phi_pattern_i]->Fill(center.x(), center.y(),n_defects_total);
511  }
512  }

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ finalize()

StatusCode InDet::DefectsEmulatorCondAlgBase::finalize ( )
overridevirtualinherited

Definition at line 181 of file DefectsEmulatorCondAlgBase.cxx.

181  {
183  ATH_MSG_WARNING("No defect parameters for " << m_modulesWithoutDefectParameters << " modules.");
184  }
185  return StatusCode::SUCCESS;
186  }

◆ findHist()

std::pair< unsigned int, unsigned int > InDet::DefectsEmulatorCondAlgBase::findHist ( unsigned int  pattern_i,
unsigned int  n_rows,
unsigned int  n_cols 
) const
protectedinherited

Definition at line 267 of file DefectsEmulatorCondAlgBase.cxx.

267  {
268  unsigned int key=(n_rows << 16) | n_cols;
269  assert( pattern_i < m_dimPerHist.size());
270  assert( pattern_i < m_hist.size());
271  unsigned int matrix_type_id;
272  {
273  std::vector<unsigned int>::const_iterator global_iter = std::find(m_matrixTypeId.begin(), m_matrixTypeId.end(), key );
274  if (global_iter != m_matrixTypeId.end()) {
275  matrix_type_id = global_iter - m_matrixTypeId.begin();
276  }
277  else {
278  matrix_type_id =m_matrixTypeId.size();
279  m_matrixTypeId.push_back(key);
280  }
281  }
282 
283  std::vector<unsigned int>::const_iterator iter = std::find(m_dimPerHist[pattern_i].begin(), m_dimPerHist[pattern_i].end(), key );
284  if (iter == m_dimPerHist[pattern_i].end()) {
286  name << "defects_" << pattern_i << "_" << (matrix_type_id) << "_" << n_rows << "_" << n_cols;
288  title << "Defects for " << n_rows << "(rows) #times " << n_cols << " (columns) ID " << (matrix_type_id) << ", pattern " << pattern_i;
289  {
291  m_hist[pattern_i].push_back(new TH2F(name.str().c_str(), title.str().c_str(),
292  n_cols, -0.5, n_cols-0.5,
293  n_rows, -0.5, n_rows-0.5
294  ));
295  }
296  m_hist[pattern_i].back()->GetXaxis()->SetTitle("offline column");
297  m_hist[pattern_i].back()->GetYaxis()->SetTitle("offline row");
298  if ( m_histSvc->regHist(m_histogramGroupName.value() + name.str(),m_hist[pattern_i].back()).isFailure() ) {
299  throw std::runtime_error("Failed to register histogram.");
300  }
301  m_dimPerHist[pattern_i].push_back(key);
302 
303  if (!m_groupDefectHists.empty()) {
304  assert( pattern_i < m_groupDefectHists.size());
305  assert( m_groupDefectHistNames.size() == m_maxNGroupDefects.size());
306  m_groupDefectHists[pattern_i].emplace_back();
307  m_groupDefectHists[pattern_i].back().resize(m_groupDefectHistNames.size());
308  for (unsigned int group_i=0u; group_i < m_groupDefectHistNames.size(); ++group_i) {
309  const std::string &group_name = m_groupDefectHistNames[group_i];
311  hname << "n_" << group_name << "_" << pattern_i << "_" << matrix_type_id << "_" << n_rows << "_" << n_cols;
312  HistUtil::StringCat htitle;
313  htitle << "Number of " << group_name << " defects for " << n_rows << "(rows) #times " << n_cols << " (columns) ID "
314  << (matrix_type_id) << ", pattern " << pattern_i;
315 
316  {
318  assert(group_i < m_groupDefectHists[pattern_i].back().size());
319  m_groupDefectHists[pattern_i].back()[group_i]= new TH1F(hname.str().c_str(), htitle.str().c_str(),
320  m_maxNGroupDefects[group_i]+1, -0.5,m_maxNGroupDefects[group_i]+.5);
321  }
322  if (m_histSvc->regHist(m_histogramGroupName.value() + m_groupDefectHists[pattern_i].back()[group_i]->GetName(),
323  m_groupDefectHists[pattern_i].back()[group_i]).isFailure() ) {
324  throw std::runtime_error("Failed to register histogram.");
325  }
326  }
327  }
328  return std::make_pair(static_cast<unsigned int>(m_hist[pattern_i].size()-1), matrix_type_id);
329  }
330  else {
331  return std::make_pair(static_cast<unsigned int>(iter-m_dimPerHist[pattern_i].begin()), matrix_type_id);
332  }
333  }

◆ getModuleConnectionMap()

std::unordered_multimap<unsigned int, unsigned int> InDet::StripDefectsEmulatorCondAlg::getModuleConnectionMap ( const InDetDD::SiDetectorElementCollection det_ele_coll) const
inlineprotected

Return the map which defines which modules are connected to the same sensor as a reference module.

Definition at line 57 of file StripDefectsEmulatorCondAlg.h.

57  {
59  }

◆ histogramDefectModule()

void InDet::DefectsEmulatorCondAlgBase::histogramDefectModule ( unsigned int  module_pattern_i,
unsigned int  hist_pattern_i,
unsigned int  id_hash,
const Amg::Vector3D center 
) const
protectedinherited

Definition at line 461 of file DefectsEmulatorCondAlgBase.cxx.

464  {
465  assert( hist_pattern_i < m_moduleHist.size() );
466  unsigned int ids_per_col = static_cast<unsigned int>(m_moduleHist[hist_pattern_i][kDefectModule]->GetNbinsX());
467  unsigned int bin_i=m_moduleHist[hist_pattern_i][kDefectModule]->GetBin( id_hash%ids_per_col+1, id_hash/ids_per_col+1);
468  m_moduleHist[hist_pattern_i][kDefectModule]->SetBinContent(bin_i,1);
469  unsigned int eta_phi_pattern_i = m_fillEtaPhiHistogramsPerPattern ? module_pattern_i : 0;
470  assert( kDefectModulePos < m_defectModuleEtaPhiHist.size());
471  assert( eta_phi_pattern_i < m_defectModuleEtaPhiHist[kDefectModulePos].size() );
472  m_defectModuleEtaPhiHist[kDefectModulePos][eta_phi_pattern_i]->Fill(center.z(), center.perp());
473  m_defectModuleEtaLayerHist[kDefectModulePos][eta_phi_pattern_i]->Fill(center.x(), center.y());
474  }

◆ IDName()

static std::string InDet::StripDefectsEmulatorCondAlg::IDName ( )
inlinestaticprotected

Name of the SCT_ID helper.

Definition at line 53 of file StripDefectsEmulatorCondAlg.h.

53 { return std::string("SCT_ID"); }

◆ initialize()

StatusCode InDet::StripDefectsEmulatorCondAlg::initialize ( )
finaloverridevirtual

Reimplemented from InDet::DefectsEmulatorCondAlgImpl< StripDefectsEmulatorCondAlg >.

Definition at line 7 of file StripDefectsEmulatorCondAlg.cxx.

7  {
8  // There are no group defects defined for strips
10  m_maxNGroupDefects.clear();
12  }

◆ initializeBase()

StatusCode InDet::DefectsEmulatorCondAlgBase::initializeBase ( unsigned int  n_masks,
unsigned int  wafer_hash_max 
)
protectedinherited

Definition at line 21 of file DefectsEmulatorCondAlgBase.cxx.

21  {
22  ATH_CHECK(m_rndmSvc.retrieve());
23  m_rngName = name()+"RandomEngine";
26 
27  if (!m_histSvc.name().empty() && !m_histogramGroupName.value().empty()) {
28  ATH_CHECK(m_histSvc.retrieve());
30  // allow histogramming for at most 6 different pixel module types
31  // histgram for additional module types will end up in the last histogram
32  unsigned int n_pattern_for_histogramming = m_fillHistogramsPerPattern ? m_modulePattern.size() : 1;
33  constexpr unsigned int n_different_matrices_max=6;
34  m_dimPerHist.resize(n_pattern_for_histogramming);
35  m_hist.resize(n_pattern_for_histogramming);
36  if (!m_groupDefectHistNames.empty()) {
37  m_groupDefectHists.resize(n_pattern_for_histogramming);
38  }
39  for (unsigned int pattern_i=0; pattern_i < n_pattern_for_histogramming; ++pattern_i) {
40  m_dimPerHist[pattern_i].reserve(n_different_matrices_max);
41  m_hist[pattern_i].reserve(n_different_matrices_max);
42  }
43  std::vector<std::string> hist_name {
44  "matrix_type_id_per_module;Matrix type ID per module",
45  "defect_module;Module is defect",
46  "defects_per_module;Defect cells per module"};
47  for (const std::string &group_name: m_groupDefectHistNames) {
49  hname << group_name << "defects_per_module;" << group_name <<" defects per module";
50  hist_name.push_back(hname.str());
51  }
52  m_moduleHist.resize(n_pattern_for_histogramming);
53  unsigned int max_y_axis = (((wafer_hash_max+99)/100+9)/10)*10;
54 
55  for (unsigned int pattern_i=0; pattern_i<m_moduleHist.size(); ++pattern_i) {
56  m_moduleHist.at(pattern_i).resize(hist_name.size(), nullptr);
57  for (unsigned int hist_i=0; hist_i<hist_name.size(); ++hist_i) {
58  // support idHashes from 0 to 10k
59  std::string::size_type pos = hist_name.at(hist_i).find(";");
60  HistUtil::StringCat a_name;
61  a_name << hist_name[hist_i].substr(0, (pos != std::string::npos ? pos : hist_name[hist_i].size())) << "_" << pattern_i;
62  HistUtil::StringCat a_title;
63  a_title << hist_name[hist_i].substr((pos != std::string::npos ? pos+1 : 0), hist_name[hist_i].size())
64  << " ( module pattern " << pattern_i << ")";
65  {
67  m_moduleHist.at(pattern_i).at(hist_i) = new TH2F(a_name.str().c_str(), a_title.str().c_str(),
68  100, -0.5, 100-0.5,
69  max_y_axis, -0.5, max_y_axis-0.5);
70  }
71  m_moduleHist[pattern_i][hist_i]->GetXaxis()->SetTitle("ID hash % 100");
72  m_moduleHist[pattern_i][hist_i]->GetYaxis()->SetTitle("ID hash / 100");
73  ATH_MSG_VERBOSE("Create histogram pattern " << pattern_i << " hist " << hist_i << " name " << a_name.str().c_str()
74  << " -> " << m_moduleHist[pattern_i][hist_i]->GetName());
75  if ( m_histSvc->regHist(m_histogramGroupName.value() + m_moduleHist[pattern_i][hist_i]->GetName(),
76  m_moduleHist[pattern_i][hist_i]).isFailure() ) {
77  return StatusCode::FAILURE;
78  }
79  }
80  }
81 
82  unsigned int n_eta_phi_histograms = m_fillEtaPhiHistogramsPerPattern ? m_modulePattern.size() : 1;
83  for (unsigned int pos_i=0; pos_i<m_defectModuleEtaPhiHist.size(); ++pos_i) {
84  m_defectModuleEtaPhiHist.at(pos_i).resize(n_eta_phi_histograms, nullptr);
85  m_defectModuleEtaLayerHist.at(pos_i).resize(n_eta_phi_histograms, nullptr);
86  }
87  std::array<std::string_view, kNPosHists> pos_hist_name {
88  "defect_modules",
89  "modules_with_defects"
90  };
91  std::array<std::string_view, kNPosHists> pos_hist_title {
92  "Defect modules",
93  "Modules with defects"
94  };
95  for (unsigned pattern_i=0; pattern_i< n_eta_phi_histograms; ++pattern_i) {
96  for (unsigned int pos_i=0; pos_i<m_defectModuleEtaPhiHist.size(); ++pos_i) {
97  {
98  HistUtil::StringCat a_name;
99  a_name << pos_hist_name.at(pos_i) << "_zr" << "_" << pattern_i;
100  HistUtil::StringCat a_title;
101  a_title << pos_hist_title.at(pos_i) << " vs global zr" << " ( module pattern " << pattern_i << ")";
102  {
104  m_defectModuleEtaPhiHist.at(pos_i).at(pattern_i) = new TH2F(a_name.str().c_str(), a_title.str().c_str(),
105  200, -3000, 3000,
106  200, 0, 1050
107  );
108  }
109  if ( m_histSvc->regHist(m_histogramGroupName.value() + m_defectModuleEtaPhiHist.at(pos_i).at(pattern_i)->GetName(),
110  m_defectModuleEtaPhiHist.at(pos_i).at(pattern_i)).isFailure() ) {
111  return StatusCode::FAILURE;
112  }
113  }
114  {
115  HistUtil::StringCat a_name;
116  a_name << pos_hist_name.at(pos_i) << "_xy" << "_" << pattern_i;
117  HistUtil::StringCat a_title;
118  a_title << pos_hist_title.at(pos_i) << " vs global xy" << " ( module pattern " << pattern_i << ")";
119  {
121  m_defectModuleEtaLayerHist.at(pos_i).at(pattern_i) = new TH2F(a_name.str().c_str(), a_title.str().c_str(),
122  200, -1050,1050,
123  200, -1050,1050
124  );
125  }
126  if ( m_histSvc->regHist(m_histogramGroupName.value() + m_defectModuleEtaLayerHist.at(pos_i).at(pattern_i)->GetName(),
127  m_defectModuleEtaLayerHist.at(pos_i).at(pattern_i)).isFailure() ) {
128  return StatusCode::FAILURE;
129  }
130  }
131  }
132  }
133 
134  if (n_masks>1) {
135  m_maxNGroupDefects.resize( n_masks-1, 0u);
136  for (const std::vector<std::vector<float> > &fractions_per_pattern : m_perPatternAndMaskFractions) {
137  for (unsigned int mask_i=0; mask_i<n_masks-1; ++mask_i) {
138  m_maxNGroupDefects[mask_i] = std::max(m_maxNGroupDefects[mask_i], static_cast<unsigned int>(fractions_per_pattern[mask_i].size()));
139  }
140  }
141 
142  if (m_groupDefectHistNames.size() != n_masks-1) {
143  ATH_MSG_FATAL("m_groupDefectHistNames does not contain a name per mask starting from the second mask "
144  "(the first mask must be the full matrix)");
145  return StatusCode::FAILURE;
146  }
147  if (m_maxNGroupDefects.size() != n_masks-1) {
148  ATH_MSG_FATAL("m_maxNGroupDefects does not contain a upper bin value for number of expected defects "
149  "per mask starting from the second mask (the first mask must be the full matrix)");
150  return StatusCode::FAILURE;
151  }
152  }
153  }
154 
155  return StatusCode::SUCCESS;
156  }

◆ initializeCornerDefects()

StatusCode InDet::DefectsEmulatorCondAlgBase::initializeCornerDefects ( )
protectedinherited

Definition at line 414 of file DefectsEmulatorCondAlgBase.cxx.

414  {
415  if (!m_cornerDefectParamsPerPattern.empty()) {
416  if (m_cornerDefectParamsPerPattern.size() != m_modulePattern.size()) {
417  ATH_MSG_ERROR("Expected exactly one set of corner defect parameters per module pattern but the numbers disagree "
418  << m_cornerDefectParamsPerPattern.size() << " != " << m_modulePattern.size());
419  return StatusCode::FAILURE;
420  }
422  ATH_MSG_ERROR("Expected exactly one set of n corner fractions per module pattern but the numbers disagree "
424  return StatusCode::FAILURE;
425  }
427  for (unsigned int pattern_i=0; pattern_i < m_cornerDefectParamsPerPattern.size(); ++pattern_i) {
428  if (m_cornerDefectParamsPerPattern[pattern_i].empty()) continue;
430  ATH_MSG_ERROR("Mismatch in number of corner defect parameters for pattern " << pattern_i << ". Expected " << kNCornerDefectParams
431  << " but got " << m_cornerDefectParamsPerPattern[pattern_i].size() );
432  return StatusCode::FAILURE;
433  }
434  if (m_cornerDefectNCornerFractionsPerPattern[pattern_i].size()>4) {
435  ATH_MSG_ERROR("Too many Fractions for corner defects for pattern " << pattern_i <<
436  ". Expected fractions for at most 4 corners but got " << m_cornerDefectNCornerFractionsPerPattern[pattern_i].size()
437  << ".");
438  return StatusCode::FAILURE;
439  }
440  double scale = std::accumulate( m_cornerDefectNCornerFractionsPerPattern.value()[pattern_i].begin(),
441  m_cornerDefectNCornerFractionsPerPattern.value()[pattern_i].end(),
442  0.);
443  if (std::abs(scale-1.)>1e-3) {
444  ATH_MSG_ERROR("The fractions for corner defects in 1.." << m_cornerDefectNCornerFractionsPerPattern[pattern_i].size()
445  << " corner(s) for pattern " << pattern_i << " do not add up to ~1 but " << scale);
446  return StatusCode::FAILURE;
447  }
450  double total = 0.;
451  for (double fraction : m_cornerDefectNCornerFractionsPerPattern[pattern_i]) {
452  total += fraction * scale;
453  m_perPatternCornerDefectNCornerCummulativeProb[pattern_i].push_back( static_cast<float>(total) );
454  }
455  }
456  }
457  return StatusCode::SUCCESS;
458  }

◆ initializeProbabilities()

StatusCode InDet::DefectsEmulatorCondAlgBase::initializeProbabilities ( unsigned int  n_masks)
protectedinherited

Definition at line 344 of file DefectsEmulatorCondAlgBase.cxx.

344  {
345  if (n_masks>1) {
346  if (m_nDefectFractionsPerPattern.size() != m_modulePattern.size()) {
347  ATH_MSG_ERROR("The number of fraction lists per pattern does not match the number of module patterns: "
348  << m_nDefectFractionsPerPattern.size() << " != " << m_modulePattern.size());
349  return StatusCode::FAILURE;
350  }
351  if (m_defectProbability.size() != m_modulePattern.size()) {
352  ATH_MSG_ERROR("The number of probability lists per pattern does not match the number of module patterns: "
353  << m_defectProbability.size() << " != " << m_modulePattern.size());
354  return StatusCode::FAILURE;
355  }
357  for (unsigned int pattern_i=0; pattern_i< m_perPatternAndMaskFractions.size(); ++pattern_i) {
358  m_perPatternAndMaskFractions[pattern_i].reserve( n_masks-1);
359  m_perPatternAndMaskFractions[pattern_i].emplace_back();
360  if (m_defectProbability[pattern_i].size() != kCellDefectProb + n_masks) {
361  ATH_MSG_ERROR("There should be one probability for the module to be defect, one probability for a pixel/strip etc. "
362  "to be defect and one probability for each group to be defect i.e. "
363  << (kCellDefectProb + n_masks) << " probabilities, but there are "
364  << m_defectProbability.size() << " for pattern " << pattern_i);
365  return StatusCode::FAILURE;
366  }
367  double sum=0.;
368  for (unsigned int value_i=0; value_i< m_nDefectFractionsPerPattern[pattern_i].size(); ++value_i) {
369  if (m_nDefectFractionsPerPattern[pattern_i][value_i]<0.) {
370  if (value_i+1 < m_nDefectFractionsPerPattern[pattern_i].size()) {
371  if (m_perPatternAndMaskFractions[pattern_i].size() == n_masks-1) {
372  ATH_MSG_ERROR("More fraction lists than number of masks: "
373  << m_perPatternAndMaskFractions[pattern_i].size()+1 << " > " << (n_masks-1)
374  << " for pattern " << pattern_i);
375  return StatusCode::FAILURE;
376  }
377  m_perPatternAndMaskFractions[pattern_i].emplace_back();
378  sum=0.;
379  }
380  }
381  else {
382  sum += m_nDefectFractionsPerPattern[pattern_i][value_i];
383  m_perPatternAndMaskFractions[pattern_i].back().push_back(sum);
384  }
385  }
386  for (unsigned int mask_i=0; mask_i< m_perPatternAndMaskFractions[pattern_i].size(); ++mask_i) {
387  if ( m_perPatternAndMaskFractions[pattern_i][mask_i].empty()
388  || std::abs(m_perPatternAndMaskFractions[pattern_i][mask_i].back()-1.)>1e-5) {
389  ATH_MSG_ERROR("Empty fraction list or fractions do not add up to 1: "
390  << (!m_perPatternAndMaskFractions[pattern_i][mask_i].empty()
391  ?m_perPatternAndMaskFractions[pattern_i][mask_i].back() : -1.f)
392  << " for pattern " << pattern_i << ", mask " << mask_i
393  << " (" << m_groupDefectHistNames.at(mask_i) << ")");
394  return StatusCode::FAILURE;
395  }
396  ATH_MSG_DEBUG("Fractions for pattern " << pattern_i << " mask " << mask_i
397  << " (" << m_groupDefectHistNames.at(mask_i) << "):"
398  << m_perPatternAndMaskFractions[pattern_i][mask_i]);
399  assert( pattern_i < m_defectProbability.size() );
400  assert( kNProb + mask_i < m_defectProbability[pattern_i].size() );
401  for (float &value : m_perPatternAndMaskFractions[pattern_i][mask_i] ) {
402  value *= m_defectProbability[pattern_i][kNProb+mask_i];
403  }
404  ATH_MSG_DEBUG("Probabilities for pattern " << pattern_i << " mask " << mask_i
405  << " (" << m_groupDefectHistNames.at(mask_i) << ") for 1.."
406  << m_perPatternAndMaskFractions[pattern_i][mask_i].size() << " defects:"
407  << m_perPatternAndMaskFractions[pattern_i][mask_i]);
408  }
409  }
410  }
411  return checkProbabilities(kCellDefectProb+n_masks);
412  }

◆ 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()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ isModuleDefect()

bool InDet::StripDefectsEmulatorCondAlg::isModuleDefect ( const EventContext &  ctx,
unsigned int  id_hash 
) const
inlineprotected

Alternative method to declare strip modules as defect.

If the module veto tool is enabled, the tool can be used alternatively to declare strip modules as defect.

Definition at line 63 of file StripDefectsEmulatorCondAlg.h.

63  {
64  return (m_moduleVetoTool.isEnabled() && !m_moduleVetoTool->isGood(id_hash, ctx));
65  }

◆ makeCumulativeProbabilityDist()

void InDet::DefectsEmulatorCondAlgBase::makeCumulativeProbabilityDist ( std::vector< unsigned int > &  module_pattern_idx,
unsigned int  prob_idx,
std::vector< double > &  cumulative_prob 
) const
inlineprotectedinherited

Create a cumulative distribution from the referenced set of probabilities.

Parameters
module_pattern_idxindex of patterns for which the associated probabilities are to be considered
prob_idxthe index of the probability (e.g. module defect probability, single element defect probability)
cumulative_proboutput vector to be filled with the cumulative_distribution in ascending order Create a cumulative distributions using the specified probabilities associated to each pattern referenced by module_pattern_idx

Definition at line 130 of file DefectsEmulatorCondAlgBase.h.

132  {
133  cumulative_prob.clear();
134  double total_prob=0.f;
135  for (unsigned int pattern_i : module_pattern_idx) {
136  assert( prob_idx < m_defectProbability.value().at(pattern_i).size() );
137  total_prob += m_defectProbability.value()[pattern_i][prob_idx];
138  cumulative_prob.push_back(total_prob);
139  }
140  }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< 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.

◆ printSummaryOfDefectGeneration()

void InDet::DefectsEmulatorCondAlgBase::printSummaryOfDefectGeneration ( unsigned int  n_masks,
unsigned int  n_error,
unsigned int  n_defects_total,
const std::vector< std::array< unsigned int, kNCounts > > &  counts 
) const
protectedinherited

Definition at line 234 of file DefectsEmulatorCondAlgBase.cxx.

237  {
238  assert(counts.size() == n_masks+1 );
239  msg(MSG::INFO) << "Total cells: " << counts[0][kNElements] << ", module design of wrong type: " << n_error << ", defects "
240  << n_defects_total << ".\n";
241  for (unsigned int mask_i=0; mask_i < counts.size(); ++mask_i) {
242  msg() << "Defect " << (mask_i==0 ? "cells" : (mask_i>m_groupDefectHistNames.size() ? "modules" : m_groupDefectHistNames.at(mask_i-1)))
243  << " " << counts[mask_i][kNDefects] << " / " << counts[mask_i][kNElements];
244  if (counts[mask_i][kNRetries]>0 || counts[mask_i][kNMaxRtriesExceeded]>0) {
245  msg() << "(";
246  if (counts[mask_i][kNRetries]>0) {
247  msg() << "retries " << counts[mask_i][kNRetries];
248  if (counts[mask_i][kNMaxRtriesExceeded]>0) {
249  msg() << ";";
250  }
251  }
252  if (counts[mask_i][kNMaxRtriesExceeded]>0) {
253  msg() << "exceeded max attempts " << counts[mask_i][kNMaxRtriesExceeded];
254  }
255  msg() << ")";
256  }
257  if (counts[mask_i][kMaxDefectsPerModule]>0) {
258  msg() << " max/module " <<counts[mask_i][kMaxDefectsPerModule];
259  }
260  if (mask_i+1<counts.size()) {
261  msg() << ".\n";
262  }
263  }
264  msg() << endmsg;
265  }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

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

◆ throwNumberOfDefects()

unsigned int InDet::DefectsEmulatorCondAlgBase::throwNumberOfDefects ( CLHEP::HepRandomEngine *  rndmEngine,
const std::vector< unsigned int > &  module_pattern_idx,
unsigned int  n_masks,
unsigned int  n_cells,
std::vector< unsigned int > &  n_mask_defects 
) const
protectedinherited

Definition at line 189 of file DefectsEmulatorCondAlgBase.cxx.

194  {
195  n_mask_defects.clear();
196  n_mask_defects.resize(n_masks, 0u);
197 
198  // to avoid throwing random numbers if not necessary
199  // first identify the masks for which random numbers need to be thrown.
200  std::vector<bool> has(n_masks, false);
201  for (unsigned int mask_i=n_masks; mask_i-->1; ) {
202  for (unsigned int match_i: module_pattern_idx) {
203  assert(!m_perPatternAndMaskFractions.at(match_i).at(mask_i-1).empty());
204  if (m_perPatternAndMaskFractions.at(match_i).at(mask_i-1).back()>0.) {
205  has[mask_i]=true;
206  break;
207  }
208  }
209  }
210 
211  for (unsigned int mask_i=n_masks; mask_i-->1; ) {
212  assert( mask_i>0);
213  float prob = !has.at(mask_i) ? 1. : CLHEP::RandFlat::shoot(rndmEngine,1.);
214 
215  for (unsigned int match_i: module_pattern_idx) {
216  unsigned int n_mask_defects_idx=m_perPatternAndMaskFractions.at(match_i).at(mask_i-1).size();
217  for (; n_mask_defects_idx-->0 && prob <= m_perPatternAndMaskFractions[match_i][mask_i-1][n_mask_defects_idx];);
218  if (++n_mask_defects_idx < m_perPatternAndMaskFractions[match_i][mask_i-1].size()) {
219  n_mask_defects[mask_i] = n_mask_defects_idx+1;
220  break;
221  }
222 
223  prob -= m_perPatternAndMaskFractions[match_i][mask_i-1].back();
224  if (prob<=0.f) break;
225  }
226  }
227  double defect_prob = totalProbability(module_pattern_idx,kCellDefectProb);
228  n_mask_defects[0]= static_cast<unsigned int>(std::max(0,static_cast<int>(
229  CLHEP::RandPoisson::shoot(rndmEngine,
230  n_cells * defect_prob))));
231  return std::accumulate(n_mask_defects.begin(),n_mask_defects.end(), 0u);
232  }

◆ totalProbability()

double InDet::DefectsEmulatorCondAlgBase::totalProbability ( const std::vector< unsigned int > &  module_pattern_idx,
unsigned int  prob_idx 
) const
inlineprotectedinherited

Compute the total probability using the probabilities associated to the given list of patterns.

Parameters
module_pattern_idxthe index of the patterns
theindex of the probabilities to be used (e.g. module defect probability, single element defect probability)
Returns
sum of the referenced probabilities.

Definition at line 115 of file DefectsEmulatorCondAlgBase.h.

115  {
116  double total_prob=0;
117  for (unsigned int pattern_i : module_pattern_idx) {
118  assert( prob_idx < m_defectProbability.value().at(pattern_i).size() );
119  total_prob += m_defectProbability.value()[pattern_i][prob_idx];
120  }
121  return total_prob;
122  }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Friends And Related Function Documentation

◆ DefectsEmulatorCondAlgImpl< StripDefectsEmulatorCondAlg >

Definition at line 1 of file StripDefectsEmulatorCondAlg.h.

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/7]

std::vector<unsigned int> m_matrixTypeId InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 212 of file DefectsEmulatorCondAlgBase.h.

◆ ATLAS_THREAD_SAFE [2/7]

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

Definition at line 213 of file DefectsEmulatorCondAlgBase.h.

◆ ATLAS_THREAD_SAFE [3/7]

std::vector< std::vector< TH2 *> > m_hist InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 215 of file DefectsEmulatorCondAlgBase.h.

◆ ATLAS_THREAD_SAFE [4/7]

std::vector< std::vector<std::vector< TH1 *> > > m_groupDefectHists InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 216 of file DefectsEmulatorCondAlgBase.h.

◆ ATLAS_THREAD_SAFE [5/7]

std::vector< std::vector< TH2 *> > m_moduleHist InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 217 of file DefectsEmulatorCondAlgBase.h.

◆ ATLAS_THREAD_SAFE [6/7]

std::array<std::vector<TH2 *>,kNPosHists> m_defectModuleEtaPhiHist InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 224 of file DefectsEmulatorCondAlgBase.h.

◆ ATLAS_THREAD_SAFE [7/7]

std::array<std::vector<TH2 *>,kNPosHists> m_defectModuleEtaLayerHist InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
mutableprotectedinherited

Definition at line 225 of file DefectsEmulatorCondAlgBase.h.

◆ m_checkerBoardToggle

Gaudi::Property<bool> InDet::DefectsEmulatorCondAlgBase::m_checkerBoardToggle {this, "CheckerBoardDefects", false}
protectedinherited

Definition at line 74 of file DefectsEmulatorCondAlgBase.h.

◆ m_cornerDefectNCornerFractionsPerPattern

Gaudi::Property<std::vector<std::vector<double> > > InDet::DefectsEmulatorCondAlgBase::m_cornerDefectNCornerFractionsPerPattern
protectedinherited
Initial value:
{this,"NCornerDefectFractionsPerPattern", {},
"List of fractions per pattern for exactly 1 to 4 corner defects under the codition that there is a defect." }

Definition at line 61 of file DefectsEmulatorCondAlgBase.h.

◆ m_cornerDefectParamsPerPattern

Gaudi::Property<std::vector<std::vector<double> > > InDet::DefectsEmulatorCondAlgBase::m_cornerDefectParamsPerPattern
protectedinherited
Initial value:
{this,"CornerDefectParamsPerPattern", {},
"Set of corner defect parameters (probability, x-intersection pos min, max, y-intersection pos min, max, sagitta minm max). "
"per module pattern. " }

Definition at line 57 of file DefectsEmulatorCondAlgBase.h.

◆ m_defectProbability

Gaudi::Property<std::vector<std::vector<double> > > InDet::DefectsEmulatorCondAlgBase::m_defectProbability
protectedinherited
Initial value:
{this,"DefectProbabilities", {},
"Defect probabilities per module pattern: defect module, defect strip." }

Definition at line 50 of file DefectsEmulatorCondAlgBase.h.

◆ m_detEleCollKey

Definition at line 51 of file DefectsEmulatorCondAlgImpl.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_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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fillEtaPhiHistogramsPerPattern

Gaudi::Property<bool> InDet::DefectsEmulatorCondAlgBase::m_fillEtaPhiHistogramsPerPattern {this, "FillEtaPhiHistogramsPerPattern", false, "If true, histogram per eta, phi amd z, R are filled separately per pattern."}
protectedinherited

Definition at line 84 of file DefectsEmulatorCondAlgBase.h.

◆ m_fillHistogramsPerPattern

Gaudi::Property<bool> InDet::DefectsEmulatorCondAlgBase::m_fillHistogramsPerPattern {this, "FillHistogramsPerPattern", false, "If true, histogram per module defects etc. separately per pattern."}
protectedinherited

Definition at line 82 of file DefectsEmulatorCondAlgBase.h.

◆ m_groupDefectHistNames

std::vector<std::string> InDet::DefectsEmulatorCondAlgBase::m_groupDefectHistNames
protectedinherited

Definition at line 208 of file DefectsEmulatorCondAlgBase.h.

◆ m_histMutex

std::mutex InDet::DefectsEmulatorCondAlgBase::m_histMutex
mutableprotectedinherited

Definition at line 210 of file DefectsEmulatorCondAlgBase.h.

◆ m_histogramGroupName

Gaudi::Property<std::string> InDet::DefectsEmulatorCondAlgBase::m_histogramGroupName {this,"HistogramGroupName","", "Histogram group name or empty to disable histogramming"}
protectedinherited

Definition at line 80 of file DefectsEmulatorCondAlgBase.h.

◆ m_histogrammingEnabled

bool InDet::DefectsEmulatorCondAlgBase::m_histogrammingEnabled = false
protectedinherited

Definition at line 236 of file DefectsEmulatorCondAlgBase.h.

◆ m_histSvc

ServiceHandle<ITHistSvc> InDet::DefectsEmulatorCondAlgBase::m_histSvc {this,"HistSvc","THistSvc"}
protectedinherited

Definition at line 79 of file DefectsEmulatorCondAlgBase.h.

◆ m_idHelper

Definition at line 60 of file DefectsEmulatorCondAlgImpl.h.

◆ m_idName

Gaudi::Property<std::string> InDet::DefectsEmulatorCondAlgImpl< StripDefectsEmulatorCondAlg >::m_idName
protectedinherited

Definition at line 57 of file DefectsEmulatorCondAlgImpl.h.

◆ m_maxAttempts

Gaudi::Property<unsigned int> InDet::DefectsEmulatorCondAlgBase::m_maxAttempts {this, "MaxRandomPositionAttempts", 10}
protectedinherited

Definition at line 76 of file DefectsEmulatorCondAlgBase.h.

◆ m_maxNGroupDefects

std::vector<unsigned int> InDet::DefectsEmulatorCondAlgBase::m_maxNGroupDefects
protectedinherited

Definition at line 209 of file DefectsEmulatorCondAlgBase.h.

◆ m_modulePattern

Gaudi::Property<std::vector<std::vector<int> > > InDet::DefectsEmulatorCondAlgBase::m_modulePattern
protectedinherited
Initial value:
{this,"ModulePatterns", {},
"Integer ranges to select: (0-1) barrel/end-cap range, (2-3) layer, (4-5) eta index range, (6-7) phi index range, "
"(8-9) module number of columns or strips, (10) both sides (0,1), (11) all rows (0,1)" }

Definition at line 46 of file DefectsEmulatorCondAlgBase.h.

◆ m_modulesWithoutDefectParameters

std::atomic<unsigned int> InDet::DefectsEmulatorCondAlgBase::m_modulesWithoutDefectParameters {}
mutableprotectedinherited

Definition at line 234 of file DefectsEmulatorCondAlgBase.h.

◆ m_moduleVetoTool

ToolHandle<ISCT_ConditionsTool> InDet::StripDefectsEmulatorCondAlg::m_moduleVetoTool {this,"SCTConditionsTool","","Optional SCT conditions tool to mark modules as defect (alternative to ModulePattern)"}
protected

Definition at line 48 of file StripDefectsEmulatorCondAlg.h.

◆ m_nDefectFractionsPerPattern

Gaudi::Property<std::vector<std::vector<double> > > InDet::DefectsEmulatorCondAlgBase::m_nDefectFractionsPerPattern
protectedinherited
Initial value:
{this,"NDefectFractionsPerPattern", {},
"List of fractions per pattern for exactly 1 to n defects under the codition that there is a defect, where -1. marks the"
"end of this lists, before the fractions for the next mask start." }

Definition at line 53 of file DefectsEmulatorCondAlgBase.h.

◆ m_oddColToggle

Gaudi::Property<bool> InDet::DefectsEmulatorCondAlgBase::m_oddColToggle {this, "OddColToggle", false}
protectedinherited

Definition at line 72 of file DefectsEmulatorCondAlgBase.h.

◆ m_oddRowToggle

Gaudi::Property<bool> InDet::DefectsEmulatorCondAlgBase::m_oddRowToggle {this, "OddRowToggle", false}
protectedinherited

Definition at line 70 of file DefectsEmulatorCondAlgBase.h.

◆ m_perPatternAndMaskFractions

std::vector<std::vector<std::vector<float> > > InDet::DefectsEmulatorCondAlgBase::m_perPatternAndMaskFractions
protectedinherited

Definition at line 65 of file DefectsEmulatorCondAlgBase.h.

◆ m_perPatternCornerDefectNCornerCummulativeProb

std::vector<std::vector<float> > InDet::DefectsEmulatorCondAlgBase::m_perPatternCornerDefectNCornerCummulativeProb
protectedinherited

Definition at line 66 of file DefectsEmulatorCondAlgBase.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> InDet::DefectsEmulatorCondAlgBase::m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
protectedinherited

Definition at line 44 of file DefectsEmulatorCondAlgBase.h.

◆ m_rngName

std::string InDet::DefectsEmulatorCondAlgBase::m_rngName
protectedinherited

Definition at line 87 of file DefectsEmulatorCondAlgBase.h.

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

◆ m_writeKey

Definition at line 54 of file DefectsEmulatorCondAlgImpl.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
InDet::DefectsEmulatorCondAlgBase::m_rngName
std::string m_rngName
Definition: DefectsEmulatorCondAlgBase.h:87
InDet::DefectsEmulatorCondAlgImpl::initialize
virtual StatusCode initialize() override
InDet::StripDefectsEmulatorCondAlg::m_moduleVetoTool
ToolHandle< ISCT_ConditionsTool > m_moduleVetoTool
Definition: StripDefectsEmulatorCondAlg.h:49
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
InDet::DefectsEmulatorCondAlgBase::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: DefectsEmulatorCondAlgBase.h:44
InDet::DefectsEmulatorCondAlgBase::kMaxDefectsPerModule
@ kMaxDefectsPerModule
Definition: DefectsEmulatorCondAlgBase.h:148
InDet::DefectsEmulatorCondAlgBase::m_nDefectFractionsPerPattern
Gaudi::Property< std::vector< std::vector< double > > > m_nDefectFractionsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:54
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:279
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::DefectsEmulatorCondAlgBase::kDefectModulePos
@ kDefectModulePos
Definition: DefectsEmulatorCondAlgBase.h:220
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
InDet::DefectsEmulatorCondAlgBase::initializeCornerDefects
StatusCode initializeCornerDefects()
Definition: DefectsEmulatorCondAlgBase.cxx:414
InDet::DefectsEmulatorCondAlgBase::totalProbability
double totalProbability(const std::vector< unsigned int > &module_pattern_idx, unsigned int prob_idx) const
Compute the total probability using the probabilities associated to the given list of patterns.
Definition: DefectsEmulatorCondAlgBase.h:115
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
InDet::DefectsEmulatorCondAlgBase::kModuleDefectProb
@ kModuleDefectProb
Definition: DefectsEmulatorCondAlgBase.h:90
python.ROOTUtils.protect
def protect(obj)
Definition: python/ROOTUtils.py:14
InDet::DefectsEmulatorCondAlgBase::m_histogramGroupName
Gaudi::Property< std::string > m_histogramGroupName
Definition: DefectsEmulatorCondAlgBase.h:81
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
InDet::DefectsEmulatorCondAlgImpl< StripDefectsEmulatorCondAlg >::m_idHelper
const T_ID * m_idHelper
Definition: DefectsEmulatorCondAlgImpl.h:60
athena.value
value
Definition: athena.py:124
InDet::DefectsEmulatorCondAlgBase::kNElements
@ kNElements
Definition: DefectsEmulatorCondAlgBase.h:143
InDet::DefectsEmulatorCondAlgBase::m_perPatternAndMaskFractions
std::vector< std::vector< std::vector< float > > > m_perPatternAndMaskFractions
Definition: DefectsEmulatorCondAlgBase.h:65
HistUtil::StringCat
Definition: HistUtil.h:41
InDet::DefectsEmulatorCondAlgBase::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: DefectsEmulatorCondAlgBase.h:79
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::DefectsEmulatorCondAlgBase::m_fillEtaPhiHistogramsPerPattern
Gaudi::Property< bool > m_fillEtaPhiHistogramsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:85
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
covarianceTool.prob
prob
Definition: covarianceTool.py:678
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
InDet::DefectsEmulatorCondAlgBase::m_perPatternCornerDefectNCornerCummulativeProb
std::vector< std::vector< float > > m_perPatternCornerDefectNCornerCummulativeProb
Definition: DefectsEmulatorCondAlgBase.h:66
InDet::DefectsEmulatorCondAlgBase::kNCounts
@ kNCounts
Definition: DefectsEmulatorCondAlgBase.h:149
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
InDet::DefectsEmulatorCondAlgBase::m_defectProbability
Gaudi::Property< std::vector< std::vector< double > > > m_defectProbability
Definition: DefectsEmulatorCondAlgBase.h:51
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
InDet::DefectsEmulatorCondAlgBase::kNCornerDefectParams
@ kNCornerDefectParams
Definition: DefectsEmulatorCondAlgBase.h:103
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
covarianceTool.title
title
Definition: covarianceTool.py:542
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkSagitta
@ kCornerDefectkSagitta
Definition: DefectsEmulatorCondAlgBase.h:102
mc.group_name
group_name
Definition: mc.PhPy8EG_A14NNPDF23_NNLOPS_example.py:33
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::DefectsEmulatorCondAlgBase::initializeProbabilities
StatusCode initializeProbabilities(unsigned int n_masks)
Definition: DefectsEmulatorCondAlgBase.cxx:344
InDet::ModuleIdentifierMatchUtil::verifyModulePatternList
bool verifyModulePatternList(const std::vector< std::vector< int > > &arr)
Verify whether a list of module identifier patterns is consistent.
Definition: ModuleIdentifierMatchUtil.h:99
InDet::DefectsEmulatorCondAlgBase::kNDefects
@ kNDefects
Definition: DefectsEmulatorCondAlgBase.h:144
hist_file_dump.f
f
Definition: hist_file_dump.py:141
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkWidthRowDirectionOffset
@ kCornerDefectkWidthRowDirectionOffset
Definition: DefectsEmulatorCondAlgBase.h:99
InDet::DefectsEmulatorCondAlgBase::m_modulePattern
Gaudi::Property< std::vector< std::vector< int > > > m_modulePattern
Definition: DefectsEmulatorCondAlgBase.h:47
InDet::DefectsEmulatorCondAlgBase::kCornerDefectWidthColumnDirection
@ kCornerDefectWidthColumnDirection
Definition: DefectsEmulatorCondAlgBase.h:98
InDet::DefectsEmulatorCondAlgBase::m_cornerDefectNCornerFractionsPerPattern
Gaudi::Property< std::vector< std::vector< double > > > m_cornerDefectNCornerFractionsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:62
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::DefectsEmulatorCondAlgBase::kNMaxRtriesExceeded
@ kNMaxRtriesExceeded
Definition: DefectsEmulatorCondAlgBase.h:146
InDet::DefectsEmulatorCondAlgBase::kMatrixTypeId
@ kMatrixTypeId
Definition: DefectsEmulatorCondAlgBase.h:228
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
InDet::DefectsEmulatorCondAlgBase::kCornerDefectProb
@ kCornerDefectProb
Definition: DefectsEmulatorCondAlgBase.h:96
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
InDet::DefectsEmulatorCondAlgBase::m_fillHistogramsPerPattern
Gaudi::Property< bool > m_fillHistogramsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:83
InDet::ConnectedModulesUtil::createModuleConnectionMap
std::unordered_multimap< unsigned int, unsigned int > createModuleConnectionMap(const T_ID &id_helper, const InDetDD::SiDetectorElementCollection &det_ele_coll)
create a map between detector elements and all such elements connected the same sensor
Definition: ConnectedModulesUtil.h:28
InDet::DefectsEmulatorCondAlgBase::kNProb
@ kNProb
Definition: DefectsEmulatorCondAlgBase.h:92
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDet::DefectsEmulatorCondAlgBase::kNPosHists
@ kNPosHists
Definition: DefectsEmulatorCondAlgBase.h:222
runIDAlign.accumulate
accumulate
Update flags based on parser line args.
Definition: runIDAlign.py:63
InDet::DefectsEmulatorCondAlgBase::checkProbabilities
StatusCode checkProbabilities(unsigned int n_probabilities) const
Consistency check of module patterns, probabilities.
Definition: DefectsEmulatorCondAlgBase.cxx:159
InDet::DefectsEmulatorCondAlgBase::kNPerModuleHistTypes
@ kNPerModuleHistTypes
Definition: DefectsEmulatorCondAlgBase.h:231
a
TList * a
Definition: liststreamerinfos.cxx:10
columnar::empty
bool empty() const noexcept
Definition: ObjectRange.h:129
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkWidthRowDirection
@ kCornerDefectkWidthRowDirection
Definition: DefectsEmulatorCondAlgBase.h:100
InDet::DefectsEmulatorCondAlgBase::kCornerDefectWidthColumnDirectionOffset
@ kCornerDefectWidthColumnDirectionOffset
Definition: DefectsEmulatorCondAlgBase.h:97
InDet::DefectsEmulatorCondAlgBase::m_histogrammingEnabled
bool m_histogrammingEnabled
Definition: DefectsEmulatorCondAlgBase.h:236
InDet::DefectsEmulatorCondAlgBase::kModulesWithDefectsPos
@ kModulesWithDefectsPos
Definition: DefectsEmulatorCondAlgBase.h:221
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDet::DefectsEmulatorCondAlgBase::kNModulesWithDefects
@ kNModulesWithDefects
Definition: DefectsEmulatorCondAlgBase.h:147
HistUtil::ProtectHistogramCreation
Definition: HistUtil.h:14
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkSagittaOffset
@ kCornerDefectkSagittaOffset
Definition: DefectsEmulatorCondAlgBase.h:101
InDet::DefectsEmulatorCondAlgBase::m_maxNGroupDefects
std::vector< unsigned int > m_maxNGroupDefects
Definition: DefectsEmulatorCondAlgBase.h:209
InDet::DefectsEmulatorCondAlgBase::kNRetries
@ kNRetries
Definition: DefectsEmulatorCondAlgBase.h:145
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
InDet::DefectsEmulatorCondAlgBase::m_modulesWithoutDefectParameters
std::atomic< unsigned int > m_modulesWithoutDefectParameters
Definition: DefectsEmulatorCondAlgBase.h:234
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
InDet::DefectsEmulatorCondAlgBase::kDefectCell
@ kDefectCell
Definition: DefectsEmulatorCondAlgBase.h:230
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
InDet::DefectsEmulatorCondAlgBase::kCellDefectProb
@ kCellDefectProb
Definition: DefectsEmulatorCondAlgBase.h:91
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDet::DefectsEmulatorCondAlgBase::m_cornerDefectParamsPerPattern
Gaudi::Property< std::vector< std::vector< double > > > m_cornerDefectParamsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:58
InDet::DefectsEmulatorCondAlgBase::m_groupDefectHistNames
std::vector< std::string > m_groupDefectHistNames
Definition: DefectsEmulatorCondAlgBase.h:208
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
InDet::DefectsEmulatorCondAlgBase::kDefectModule
@ kDefectModule
Definition: DefectsEmulatorCondAlgBase.h:229
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
HistUtil::StringCat::str
const std::string & str() const
Definition: HistUtil.h:47