ATLAS Offline Software
DefectsEmulatorCondAlgBase.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef INDET_DEFECTSEMULATORCONDALGBASE_H
8 #define INDET_DEFECTSEMULATORCONDALGBASE_H
9 
11 
14 
15 #include "GaudiKernel/ServiceHandle.h"
16 
18 #include "PixelEmulatedDefects.h"
20 #include "GaudiKernel/ITHistSvc.h"
21 
22 #include "TH2.h"
23 
24 #include <span>
25 
26 namespace CLHEP {
27  class HepRandomEngine;
28 }
29 namespace InDet {
35  {
36  public:
37  DefectsEmulatorCondAlgBase(const std::string& name, ISvcLocator* pSvcLocator);
38  virtual ~DefectsEmulatorCondAlgBase() override = default;
39 
40  virtual StatusCode finalize() override;
41 
42  protected:
43  StatusCode initializeBase(unsigned int n_masks, unsigned int wafer_hash_max);
44  StatusCode initializeProbabilities(unsigned int n_masks);
46 
47  ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};
48 
49  Gaudi::Property<std::vector<std::vector<int> > > m_modulePattern
50  {this,"ModulePatterns", {},
51  "Integer ranges to select: (0-1) barrel/end-cap range, (2-3) layer, (4-5) eta index range, (6-7) phi index range, "
52  "(8-9) module number of columns or strips, (10) both sides (0,1), (11) all rows (0,1)" };
53  Gaudi::Property<std::vector<std::vector<double> > > m_defectProbability
54  {this,"DefectProbabilities", {},
55  "Defect probabilities per module pattern: defect module, defect strip." };
56  Gaudi::Property<std::vector<std::vector<double> > > m_nDefectFractionsPerPattern
57  {this,"NDefectFractionsPerPattern", {},
58  "List of fractions per pattern for exactly 1 to n defects under the codition that there is a defect, where -1. marks the"
59  "end of this lists, before the fractions for the next mask start." };
60  Gaudi::Property<std::vector<std::vector<double> > > m_cornerDefectParamsPerPattern
61  {this,"CornerDefectParamsPerPattern", {},
62  "Set of corner defect parameters (probability, x-intersection pos min, max, y-intersection pos min, max, sagitta minm max). "
63  "per module pattern. " };
64  Gaudi::Property<std::vector<std::vector<double> > > m_cornerDefectNCornerFractionsPerPattern
65  {this,"NCornerDefectFractionsPerPattern", {},
66  "List of fractions per pattern for exactly 1 to 4 corner defects under the codition that there is a defect." };
67 
68  std::vector<std::vector<std::vector<float> > > m_perPatternAndMaskFractions;
69  std::vector<std::vector<float> > m_perPatternCornerDefectNCornerCummulativeProb;
70 
71  Gaudi::Property<bool> m_rngPerDefectType
72  {this, "RngPerDefectType", false, "One RNG per defect type to decorrelate randomness of defects."};
73 
74  // Properties to add a checker board like pattern to the defects
75  // for debugging
76  Gaudi::Property<bool> m_oddRowToggle
77  {this, "OddRowToggle", false};
78  Gaudi::Property<bool> m_oddColToggle
79  {this, "OddColToggle", false};
80  Gaudi::Property<bool> m_checkerBoardToggle
81  {this, "CheckerBoardDefects", false};
82  Gaudi::Property<unsigned int> m_maxAttempts
83  {this, "MaxRandomPositionAttempts", 10};
84 
85  ServiceHandle<ITHistSvc> m_histSvc{this,"HistSvc","THistSvc"};
86  Gaudi::Property<std::string> m_histogramGroupName
87  {this,"HistogramGroupName","", "Histogram group name or empty to disable histogramming"};
88  Gaudi::Property<bool> m_fillHistogramsPerPattern
89  {this, "FillHistogramsPerPattern", false, "If true, histogram per module defects etc. separately per pattern."};
90  Gaudi::Property<bool> m_fillEtaPhiHistogramsPerPattern
91  {this, "FillEtaPhiHistogramsPerPattern", false, "If true, histogram per eta, phi amd z, R are filled separately per pattern."};
92 
93  Gaudi::Property<std::string> m_outputFile
94  {this,"DefectsOutputFile","", "Empty or file name to write out conditions data (.json or .root)."};
95  Gaudi::Property<std::vector<std::string> > m_inputFiles
96  {this,"DefectsInputFiles",{}, "Empty or file name to write out conditions data (.json or .root)."};
97 
98  std::vector<std::string> m_rngName;
99 
100  enum DefectTypes {
104  };
105 
109  kNProb
110  };
111 
121  };
122 
125  StatusCode checkProbabilities(unsigned int n_probabilities) const;
126 
132  double totalProbability(const std::vector<unsigned int> &module_pattern_idx, unsigned int prob_idx) const {
133  double total_prob=0;
134  for (unsigned int pattern_i : module_pattern_idx) {
135  assert( prob_idx < m_defectProbability.value().at(pattern_i).size() );
136  total_prob += m_defectProbability.value()[pattern_i][prob_idx];
137  }
138  return total_prob;
139  }
147  void makeCumulativeProbabilityDist(std::vector<unsigned int> &module_pattern_idx,
148  unsigned int prob_idx,
149  std::vector<double> &cumulative_prob) const {
150  cumulative_prob.clear();
151  double total_prob=0.f;
152  for (unsigned int pattern_i : module_pattern_idx) {
153  assert( prob_idx < m_defectProbability.value().at(pattern_i).size() );
154  total_prob += m_defectProbability.value()[pattern_i][prob_idx];
155  cumulative_prob.push_back(total_prob);
156  }
157  }
158 
159  enum ECounts {
166  kNCounts
167  };
168 
169  // Get number of cell, and group defects and return total number of defects.
170  // @param rndmEngine random engine which will be used to throw the random number of defects one per mask.
171  // @param module_pattern_idx list of pattern indices which match the module.
172  // @param n_masks the number of defect categories e.g. individual pixel, core-column, chip defect.
173  // @param n_cels the number cells per module e.g. total number of pixel or strips.
174  // @param n_mask_defects output array of number of defects per category.
175  // @return total number of defects i.e. the sum of the number of defects per category.
176  // n_mask_defects will be resized to n_masks and filled with number of defects per category, where the first element
177  // will be the number of individual cell defects.
178  unsigned int throwNumberOfDefects(std::span<CLHEP::HepRandomEngine *> rndmEngine,
179  const std::vector<unsigned int> &module_pattern_idx,
180  unsigned int n_masks,
181  unsigned int n_cells,
182  std::vector<unsigned int> &n_mask_defects) const;
183 
184  // Print a message summarizing the defect generation
185  // @param n_masks number of masks.
186  // @param n_error number of modules with wrong module design.
187  // @param n_defects total the total number of generated defects.
188  // @param counts more detailed count per mask which is e.g. pixels, core-columns, chips.
189  void printSummaryOfDefectGeneration(unsigned int n_masks,
190  unsigned int n_error,
191  unsigned int n_defects_total,
192  const std::vector<std::array<unsigned int,kNCounts> > &counts) const;
193 
194  // Get histogram index and matrix type id for a certain matrix for a certain module pattern.
195  // calls during execute must be protected by m_histMutex and must not be called if histogramming is
196  // disabled.
197  // will return histogram index, and matrix type id
198  // usage:
199  // <verb>
200  // auto [histogram_index, type_id] = findHist(pattern_i, n_rows, n_cols);
201  // m_hist[pattern_i][histogram_index] or m_nGroupDefectHistspattern_i][histogram_index]
202  // </verb>
203  std::pair<unsigned int, unsigned int> findHist(unsigned int pattern_i, unsigned int n_rows, unsigned int n_cols) const;
204  void histogramDefectModule(unsigned int module_pattern_i, unsigned int hist_pattern_i, unsigned int id_hash, const Amg::Vector3D &center) const;
205  // fill per module histograms
206  // @param module_pattern_i the pattern index for which to histogram the position
207  // @param pattern_hist_i module pattern index or zero if there is only one set of histograms for all patterns
208  // @param matrix_histogram_index an index which is unique for each matrix type defined by the number of rows and columns
209  // @param module_i the ID hash
210  // @param n_masks the number of maskes defined int the module helper e.g. all pixels, core-columns, chips
211  // @param n_mask_defects the number of created defects per mask for the given module
212  // @param center global position of the module
213  // Will fill the number of defects per module and matrix type ID per hash ID histograms. Must not be called
214  // if histogramming is disabled.
215  void fillPerModuleHistograms(unsigned int module_pattern_i,
216  unsigned int pattern_hist_i,
217  unsigned int matrix_histogram_index,
218  unsigned int matrix_index,
219  unsigned int module_i,
220  unsigned int n_masks,
221  const std::vector<unsigned int> &n_mask_defects,
222  const Amg::Vector3D &center) const;
223 
224 
225  std::vector<std::string> m_groupDefectHistNames; // must be filled with one name per nask except for the first one
226  std::vector<unsigned int> m_maxNGroupDefects; // max number of group defects for histograms; one element per nask starting from the second maske
228  // during execute the following may only be accessed when m_histMutex is locked
229  mutable std::vector<unsigned int> m_matrixTypeId ATLAS_THREAD_SAFE;
230  mutable std::vector<std::vector<unsigned int> > m_dimPerHist ATLAS_THREAD_SAFE;
231 
232  mutable std::vector< std::vector< TH2 *> > m_hist ATLAS_THREAD_SAFE;
233  mutable std::vector< std::vector<std::vector< TH1 *> > > m_groupDefectHists ATLAS_THREAD_SAFE;
234  mutable std::vector< std::vector< TH2 *> > m_moduleHist ATLAS_THREAD_SAFE;
235 
239  kNPosHists
240  };
241  mutable std::array<std::vector<TH2 *>,kNPosHists> m_defectModuleEtaPhiHist ATLAS_THREAD_SAFE;
242  mutable std::array<std::vector<TH2 *>,kNPosHists> m_defectModuleEtaLayerHist ATLAS_THREAD_SAFE;
243 
249  };
250 
251  mutable std::atomic<unsigned int> m_modulesWithoutDefectParameters {};
252 
254  };
255 }
256 #endif
InDet::DefectsEmulatorCondAlgBase
Conditions algorithms for emulating ITK pixel defects.
Definition: DefectsEmulatorCondAlgBase.h:35
InDet::DefectsEmulatorCondAlgBase::m_oddRowToggle
Gaudi::Property< bool > m_oddRowToggle
Definition: DefectsEmulatorCondAlgBase.h:77
InDet::DefectsEmulatorCondAlgBase::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: DefectsEmulatorCondAlgBase.h:47
InDet::DefectsEmulatorCondAlgBase::kMaxDefectsPerModule
@ kMaxDefectsPerModule
Definition: DefectsEmulatorCondAlgBase.h:165
InDet::DefectsEmulatorCondAlgBase::m_nDefectFractionsPerPattern
Gaudi::Property< std::vector< std::vector< double > > > m_nDefectFractionsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:57
InDet::DefectsEmulatorCondAlgBase::m_checkerBoardToggle
Gaudi::Property< bool > m_checkerBoardToggle
Definition: DefectsEmulatorCondAlgBase.h:81
InDet::DefectsEmulatorCondAlgBase::findHist
std::pair< unsigned int, unsigned int > findHist(unsigned int pattern_i, unsigned int n_rows, unsigned int n_cols) const
Definition: DefectsEmulatorCondAlgBase.cxx:296
InDet::DefectsEmulatorCondAlgBase::kDefectModulePos
@ kDefectModulePos
Definition: DefectsEmulatorCondAlgBase.h:237
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
std::array< std::vector< TH2 * >, kNPosHists > m_defectModuleEtaPhiHist ATLAS_THREAD_SAFE
Definition: DefectsEmulatorCondAlgBase.h:241
InDet::DefectsEmulatorCondAlgBase::initializeCornerDefects
StatusCode initializeCornerDefects()
Definition: DefectsEmulatorCondAlgBase.cxx:443
InDet::DefectsEmulatorCondAlgBase::m_oddColToggle
Gaudi::Property< bool > m_oddColToggle
Definition: DefectsEmulatorCondAlgBase.h:79
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:132
InDet::DefectsEmulatorCondAlgBase::~DefectsEmulatorCondAlgBase
virtual ~DefectsEmulatorCondAlgBase() override=default
InDet::DefectsEmulatorCondAlgBase::kModuleDefectProb
@ kModuleDefectProb
Definition: DefectsEmulatorCondAlgBase.h:107
InDet::DefectsEmulatorCondAlgBase::DefectsEmulatorCondAlgBase
DefectsEmulatorCondAlgBase(const std::string &name, ISvcLocator *pSvcLocator)
Definition: DefectsEmulatorCondAlgBase.cxx:23
InDet::DefectsEmulatorCondAlgBase::m_histogramGroupName
Gaudi::Property< std::string > m_histogramGroupName
Definition: DefectsEmulatorCondAlgBase.h:87
InDet::DefectsEmulatorCondAlgBase::m_outputFile
Gaudi::Property< std::string > m_outputFile
Definition: DefectsEmulatorCondAlgBase.h:94
InDet::DefectsEmulatorCondAlgBase::kNElements
@ kNElements
Definition: DefectsEmulatorCondAlgBase.h:160
InDet::DefectsEmulatorCondAlgBase::m_perPatternAndMaskFractions
std::vector< std::vector< std::vector< float > > > m_perPatternAndMaskFractions
Definition: DefectsEmulatorCondAlgBase.h:68
InDet::DefectsEmulatorCondAlgBase::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: DefectsEmulatorCondAlgBase.h:85
InDet::DefectsEmulatorCondAlgBase::m_fillEtaPhiHistogramsPerPattern
Gaudi::Property< bool > m_fillEtaPhiHistogramsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:91
InDet::DefectsEmulatorCondAlgBase::EPosHistType
EPosHistType
Definition: DefectsEmulatorCondAlgBase.h:236
InDet::DefectsEmulatorCondAlgBase::kMaskDefects
@ kMaskDefects
Definition: DefectsEmulatorCondAlgBase.h:103
InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
std::vector< std::vector< TH2 * > > m_hist ATLAS_THREAD_SAFE
Definition: DefectsEmulatorCondAlgBase.h:232
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:69
InDet::DefectsEmulatorCondAlgBase::kNCounts
@ kNCounts
Definition: DefectsEmulatorCondAlgBase.h:166
InDet::DefectsEmulatorCondAlgBase::m_rngPerDefectType
Gaudi::Property< bool > m_rngPerDefectType
Definition: DefectsEmulatorCondAlgBase.h:72
InDet::DefectsEmulatorCondAlgBase::m_defectProbability
Gaudi::Property< std::vector< std::vector< double > > > m_defectProbability
Definition: DefectsEmulatorCondAlgBase.h:54
InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
std::vector< std::vector< unsigned int > > m_dimPerHist ATLAS_THREAD_SAFE
Definition: DefectsEmulatorCondAlgBase.h:230
InDet::DefectsEmulatorCondAlgBase::m_histMutex
std::mutex m_histMutex
Definition: DefectsEmulatorCondAlgBase.h:227
L1TopoRatesCalculator_submatrix_plotter.counts
counts
Definition: L1TopoRatesCalculator_submatrix_plotter.py:74
InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
std::vector< std::vector< TH2 * > > m_moduleHist ATLAS_THREAD_SAFE
Definition: DefectsEmulatorCondAlgBase.h:234
InDet::DefectsEmulatorCondAlgBase::printSummaryOfDefectGeneration
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
Definition: DefectsEmulatorCondAlgBase.cxx:263
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::DefectsEmulatorCondAlgBase::histogramDefectModule
void histogramDefectModule(unsigned int module_pattern_i, unsigned int hist_pattern_i, unsigned int id_hash, const Amg::Vector3D &center) const
Definition: DefectsEmulatorCondAlgBase.cxx:490
InDet::DefectsEmulatorCondAlgBase::kCornerDefects
@ kCornerDefects
Definition: DefectsEmulatorCondAlgBase.h:102
InDet::DefectsEmulatorCondAlgBase::kNCornerDefectParams
@ kNCornerDefectParams
Definition: DefectsEmulatorCondAlgBase.h:120
CLHEP
STD'S.
Definition: CaloNoiseCompCondAlg.h:58
InDet::DefectsEmulatorCondAlgBase::ECornerDefectParams
ECornerDefectParams
Definition: DefectsEmulatorCondAlgBase.h:112
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkSagitta
@ kCornerDefectkSagitta
Definition: DefectsEmulatorCondAlgBase.h:119
InDet::DefectsEmulatorCondAlgBase::initializeProbabilities
StatusCode initializeProbabilities(unsigned int n_masks)
Definition: DefectsEmulatorCondAlgBase.cxx:373
InDet::DefectsEmulatorCondAlgBase::kNDefects
@ kNDefects
Definition: DefectsEmulatorCondAlgBase.h:161
InDet::DefectsEmulatorCondAlgBase::finalize
virtual StatusCode finalize() override
Definition: DefectsEmulatorCondAlgBase.cxx:210
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkWidthRowDirectionOffset
@ kCornerDefectkWidthRowDirectionOffset
Definition: DefectsEmulatorCondAlgBase.h:116
InDet::DefectsEmulatorCondAlgBase::m_modulePattern
Gaudi::Property< std::vector< std::vector< int > > > m_modulePattern
Definition: DefectsEmulatorCondAlgBase.h:50
InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
std::array< std::vector< TH2 * >, kNPosHists > m_defectModuleEtaLayerHist ATLAS_THREAD_SAFE
Definition: DefectsEmulatorCondAlgBase.h:242
InDet::DefectsEmulatorCondAlgBase::kCornerDefectWidthColumnDirection
@ kCornerDefectWidthColumnDirection
Definition: DefectsEmulatorCondAlgBase.h:115
InDet::DefectsEmulatorCondAlgBase::m_cornerDefectNCornerFractionsPerPattern
Gaudi::Property< std::vector< std::vector< double > > > m_cornerDefectNCornerFractionsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:65
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
InDet::DefectsEmulatorCondAlgBase::kNMaxRtriesExceeded
@ kNMaxRtriesExceeded
Definition: DefectsEmulatorCondAlgBase.h:163
InDet::DefectsEmulatorCondAlgBase::kMatrixTypeId
@ kMatrixTypeId
Definition: DefectsEmulatorCondAlgBase.h:245
InDet::DefectsEmulatorCondAlgBase::kCornerDefectProb
@ kCornerDefectProb
Definition: DefectsEmulatorCondAlgBase.h:113
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
InDet::DefectsEmulatorCondAlgBase::m_inputFiles
Gaudi::Property< std::vector< std::string > > m_inputFiles
Definition: DefectsEmulatorCondAlgBase.h:96
InDet::DefectsEmulatorCondAlgBase::m_fillHistogramsPerPattern
Gaudi::Property< bool > m_fillHistogramsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:89
InDet::DefectsEmulatorCondAlgBase::kNProb
@ kNProb
Definition: DefectsEmulatorCondAlgBase.h:109
SiDetectorElementCollection.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
PixelEmulatedDefects.h
InDet::DefectsEmulatorCondAlgBase::kNPosHists
@ kNPosHists
Definition: DefectsEmulatorCondAlgBase.h:239
InDet::DefectsEmulatorCondAlgBase::checkProbabilities
StatusCode checkProbabilities(unsigned int n_probabilities) const
Consistency check of module patterns, probabilities.
Definition: DefectsEmulatorCondAlgBase.cxx:188
InDet::DefectsEmulatorCondAlgBase::kNPerModuleHistTypes
@ kNPerModuleHistTypes
Definition: DefectsEmulatorCondAlgBase.h:248
InDet::DefectsEmulatorCondAlgBase::initializeBase
StatusCode initializeBase(unsigned int n_masks, unsigned int wafer_hash_max)
Definition: DefectsEmulatorCondAlgBase.cxx:27
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkWidthRowDirection
@ kCornerDefectkWidthRowDirection
Definition: DefectsEmulatorCondAlgBase.h:117
InDet::DefectsEmulatorCondAlgBase::kCornerDefectWidthColumnDirectionOffset
@ kCornerDefectWidthColumnDirectionOffset
Definition: DefectsEmulatorCondAlgBase.h:114
InDet::DefectsEmulatorCondAlgBase::kModuleDefects
@ kModuleDefects
Definition: DefectsEmulatorCondAlgBase.h:101
InDet::DefectsEmulatorCondAlgBase::m_histogrammingEnabled
bool m_histogrammingEnabled
Definition: DefectsEmulatorCondAlgBase.h:253
InDet::DefectsEmulatorCondAlgBase::kModulesWithDefectsPos
@ kModulesWithDefectsPos
Definition: DefectsEmulatorCondAlgBase.h:238
InDet::DefectsEmulatorCondAlgBase::DefectTypes
DefectTypes
Definition: DefectsEmulatorCondAlgBase.h:100
InDet::DefectsEmulatorCondAlgBase::kNModulesWithDefects
@ kNModulesWithDefects
Definition: DefectsEmulatorCondAlgBase.h:164
InDet::DefectsEmulatorCondAlgBase::m_rngName
std::vector< std::string > m_rngName
Definition: DefectsEmulatorCondAlgBase.h:98
InDet::DefectsEmulatorCondAlgBase::kCornerDefectkSagittaOffset
@ kCornerDefectkSagittaOffset
Definition: DefectsEmulatorCondAlgBase.h:118
InDet::DefectsEmulatorCondAlgBase::m_maxNGroupDefects
std::vector< unsigned int > m_maxNGroupDefects
Definition: DefectsEmulatorCondAlgBase.h:226
InDet::DefectsEmulatorCondAlgBase::kNRetries
@ kNRetries
Definition: DefectsEmulatorCondAlgBase.h:162
InDet::DefectsEmulatorCondAlgBase::ECounts
ECounts
Definition: DefectsEmulatorCondAlgBase.h:159
InDet::DefectsEmulatorCondAlgBase::m_maxAttempts
Gaudi::Property< unsigned int > m_maxAttempts
Definition: DefectsEmulatorCondAlgBase.h:83
InDet::DefectsEmulatorCondAlgBase::makeCumulativeProbabilityDist
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.
Definition: DefectsEmulatorCondAlgBase.h:147
InDet::DefectsEmulatorCondAlgBase::throwNumberOfDefects
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
Definition: DefectsEmulatorCondAlgBase.cxx:218
InDet::DefectsEmulatorCondAlgBase::m_modulesWithoutDefectParameters
std::atomic< unsigned int > m_modulesWithoutDefectParameters
Definition: DefectsEmulatorCondAlgBase.h:251
InDet::DefectsEmulatorCondAlgBase::EProbabilities
EProbabilities
Definition: DefectsEmulatorCondAlgBase.h:106
InDet::DefectsEmulatorCondAlgBase::kDefectCell
@ kDefectCell
Definition: DefectsEmulatorCondAlgBase.h:247
InDet::DefectsEmulatorCondAlgBase::kCellDefectProb
@ kCellDefectProb
Definition: DefectsEmulatorCondAlgBase.h:108
InDet::DefectsEmulatorCondAlgBase::EPerModuleHistType
EPerModuleHistType
Definition: DefectsEmulatorCondAlgBase.h:244
InDet::DefectsEmulatorCondAlgBase::m_cornerDefectParamsPerPattern
Gaudi::Property< std::vector< std::vector< double > > > m_cornerDefectParamsPerPattern
Definition: DefectsEmulatorCondAlgBase.h:61
InDet::DefectsEmulatorCondAlgBase::m_groupDefectHistNames
std::vector< std::string > m_groupDefectHistNames
Definition: DefectsEmulatorCondAlgBase.h:225
InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
std::vector< unsigned int > m_matrixTypeId ATLAS_THREAD_SAFE
Definition: DefectsEmulatorCondAlgBase.h:229
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >
InDet::DefectsEmulatorCondAlgBase::kDefectModule
@ kDefectModule
Definition: DefectsEmulatorCondAlgBase.h:246
InDet::DefectsEmulatorCondAlgBase::ATLAS_THREAD_SAFE
std::vector< std::vector< std::vector< TH1 * > > > m_groupDefectHists ATLAS_THREAD_SAFE
Definition: DefectsEmulatorCondAlgBase.h:233
InDet::DefectsEmulatorCondAlgBase::fillPerModuleHistograms
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
Definition: DefectsEmulatorCondAlgBase.cxx:505