![]() |
ATLAS Offline Software
|
Conditions algorithms for emulating ITK pixel defects. More...
#include <DefectsEmulatorCondAlgBase.h>
Public Member Functions | |
| DefectsEmulatorCondAlgBase (const std::string &name, ISvcLocator *pSvcLocator) | |
| virtual | ~DefectsEmulatorCondAlgBase () override=default |
| virtual StatusCode | finalize () override |
| virtual StatusCode | sysInitialize () override |
| Override sysInitialize. | |
| virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. | |
| virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. | |
| 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 |
| 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. | |
| 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 |
Protected Types | |
| enum | DefectTypes { kModuleDefects , kCornerDefects , kMaskDefects } |
| 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 | |
| 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. | |
| 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. | |
| 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. | |
| unsigned int | throwNumberOfDefects (std::span< 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 ¢er) 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 ¢er) const |
| 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< IAthRNGSvc > | m_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_rngPerDefectType {this, "RngPerDefectType", false, "One RNG per defect type to decorrelate randomness of defects."} |
| 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."} |
| Gaudi::Property< std::string > | m_outputFile {this,"DefectsOutputFile","", "Empty or file name to write out conditions data (.json or .root)."} |
| Gaudi::Property< std::vector< std::string > > | m_inputFiles {this,"DefectsInputFiles",{}, "Empty or file name to write out conditions data (.json or .root)."} |
| std::vector< 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< StoreGateSvc > | StoreGateSvc_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 | |
| 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 |
Conditions algorithms for emulating ITK pixel defects.
The algorithm mask random pixels and core columns (group of 8 consecutive columns of a chip) as defect. This data can be used to reject hits associated to these pixels or core columns.
Definition at line 34 of file DefectsEmulatorCondAlgBase.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
|
protected |
| Enumerator | |
|---|---|
| kModuleDefects | |
| kCornerDefects | |
| kMaskDefects | |
Definition at line 100 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 112 of file DefectsEmulatorCondAlgBase.h.
|
protected |
| Enumerator | |
|---|---|
| kNElements | |
| kNDefects | |
| kNRetries | |
| kNMaxRtriesExceeded | |
| kNModulesWithDefects | |
| kMaxDefectsPerModule | |
| kNCounts | |
Definition at line 159 of file DefectsEmulatorCondAlgBase.h.
|
protected |
| Enumerator | |
|---|---|
| kMatrixTypeId | |
| kDefectModule | |
| kDefectCell | |
| kNPerModuleHistTypes | |
Definition at line 244 of file DefectsEmulatorCondAlgBase.h.
|
protected |
| Enumerator | |
|---|---|
| kDefectModulePos | |
| kModulesWithDefectsPos | |
| kNPosHists | |
Definition at line 236 of file DefectsEmulatorCondAlgBase.h.
|
protected |
| Enumerator | |
|---|---|
| kModuleDefectProb | |
| kCellDefectProb | |
| kNProb | |
Definition at line 106 of file DefectsEmulatorCondAlgBase.h.
| InDet::DefectsEmulatorCondAlgBase::DefectsEmulatorCondAlgBase | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator ) |
Definition at line 23 of file DefectsEmulatorCondAlgBase.cxx.
|
overridevirtualdefault |
|
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.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
|
protected |
Consistency check of module patterns, probabilities.
Definition at line 188 of file DefectsEmulatorCondAlgBase.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
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
|
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.
|
protected |
Definition at line 519 of file DefectsEmulatorCondAlgBase.cxx.
|
inlinevirtualinherited |
Definition at line 96 of file AthCommonReentrantAlgorithm.h.
|
overridevirtual |
Definition at line 210 of file DefectsEmulatorCondAlgBase.cxx.
|
protected |
Definition at line 296 of file DefectsEmulatorCondAlgBase.cxx.
|
protected |
Definition at line 504 of file DefectsEmulatorCondAlgBase.cxx.
|
protected |
Definition at line 27 of file DefectsEmulatorCondAlgBase.cxx.
|
protected |
Definition at line 457 of file DefectsEmulatorCondAlgBase.cxx.
|
protected |
Definition at line 373 of file DefectsEmulatorCondAlgBase.cxx.
|
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.
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ITkPixelCablingAlg, ITkStripCablingAlg, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, and Simulation::BeamEffectsAlg.
Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.
|
inlineprotected |
Create a cumulative distribution from the referenced set of probabilities.
| module_pattern_idx | index of patterns for which the associated probabilities are to be considered |
| prob_idx | the index of the probability (e.g. module defect probability, single element defect probability) |
| cumulative_prob | output 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 147 of file DefectsEmulatorCondAlgBase.h.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
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.
|
protected |
Definition at line 263 of file DefectsEmulatorCondAlgBase.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
inlinevirtualinherited |
Definition at line 100 of file AthCommonReentrantAlgorithm.h.
|
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.
|
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 HypoBase, and InputMakerBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
protected |
Definition at line 218 of file DefectsEmulatorCondAlgBase.cxx.
|
inlineprotected |
Compute the total probability using the probabilities associated to the given list of patterns.
| module_pattern_idx | the index of the patterns |
| the | index of the probabilities to be used (e.g. module defect probability, single element defect probability) |
Definition at line 132 of file DefectsEmulatorCondAlgBase.h.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
mutableprotected |
Definition at line 229 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 230 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 232 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 233 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 234 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 241 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 242 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 80 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 64 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 60 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 53 of file DefectsEmulatorCondAlgBase.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
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.
|
protected |
Definition at line 90 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 88 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 225 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 227 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 86 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 253 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 85 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 95 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 82 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 226 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 49 of file DefectsEmulatorCondAlgBase.h.
|
mutableprotected |
Definition at line 251 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 56 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 78 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 76 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 93 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 68 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 69 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 47 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 98 of file DefectsEmulatorCondAlgBase.h.
|
protected |
Definition at line 71 of file DefectsEmulatorCondAlgBase.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.