13#include "CLHEP/Random/RandFlat.h"
14#include "CLHEP/Random/RandGaussZiggurat.h"
15#include "CLHEP/Random/RandPoisson.h"
17#include "CLHEP/Random/RandomEngine.h"
23 : base_class(
type, name, parent) {
31 ATH_MSG_FATAL(
"AnalogueNoiseOn/m_analogueNoiseOn should be true if NoiseOn/m_NoiseOn is true.");
32 return StatusCode::FAILURE;
43 constexpr float fC = 6242.2;
51 <<
" is invalid. Abort this job!!!");
52 return StatusCode::FAILURE;
56 <<
" is invalid. Abort this job!!!");
57 return StatusCode::FAILURE;
63 <<
" requires timing information."
65 <<
" (Condensed) does not keep timing information. Abort this job!!!");
66 return StatusCode::FAILURE;
69 return StatusCode::SUCCESS;
76 data.m_GainFactor.resize(strips);
78 data.m_Analogue[0].resize(strips);
79 data.m_Analogue[1].resize(strips);
80 data.m_Analogue[2].resize(strips);
100 const int strip_max = p_design->
cells();
106 data.m_StripHitsOnWafer.assign(strip_max, 0);
111 if (not collection.
empty()) {
156 std::vector<float>
response(bin_max);
158 for (
auto& [blub, diode]: collection) {
160 unsigned int flagmask = diode.flag() & 0xFE;
168 [[maybe_unused]]
const list_t &ChargesOnStrip = diode.totalCharge().chargeComposition();
173 for (
short bin = 0;
bin < bin_max; ++
bin) {
178 for (
short bin = 0;
bin < bin_max; ++
bin) {
179 if (
strip + 1 < strip_max) {
189 for (
short bin = 0;
bin < bin_max; ++
bin) {
194 for (
short bin = 0;
bin < bin_max; ++
bin) {
195 if (
strip + 1 < strip_max) {
218 for (
auto& [blub, diode]: collection) {
227 }
else if (((0x10 & diode.flag()) == 0x10) or ((0x4 & diode.flag()) == 0x4)) {
235 int have_hit_bin = 0;
245 if (((0x10 & diode.flag()) == 0x10) || ((0x4 & diode.flag()) == 0x4)) {
249 if (have_hit_bin == 2 or have_hit_bin == 3 or have_hit_bin == 6 or have_hit_bin == 7) {
257 if (have_hit_bin == 2 or have_hit_bin == 3) {
265 if (have_hit_bin == 0) {
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
This is an Identifier helper class for the SCT subdetector.
StringProperty m_detMgrName
const InDetDD::SCT_DetectorManager * m_ITkStripMgr
Handle to SCT detector manager, also valid for ITkStrips.
void initVectors(int strips, ITkStripFrontEndData &data) const
void doSignalChargeForHits(SiChargedDiodeCollection &collectione, ITkStripFrontEndData &data, const int &stripMax) const
void doThresholdCheckForRealHits(SiChargedDiodeCollection &collectione, ITkStripFrontEndData &data, const int &stripMax) const
BooleanProperty m_NoiseOn
ITkStripFrontEnd(const std::string &type, const std::string &name, const IInterface *parent)
constructor
virtual void process(SiChargedDiodeCollection &collection, CLHEP::HepRandomEngine *rndmEngine) const override
use the baseclass default finalize
BooleanProperty m_analogueNoiseOn
ShortProperty m_data_compression_mode
const SCT_ID * m_ITkStripId
Handle to SCT ID helper also valid for ITkStrips.
FloatProperty m_Threshold
ShortProperty m_data_readout_mode
ToolHandle< IAmplifier > m_strip_amplifier
Handle the Amplifier tool.
virtual StatusCode initialize() override
AlgTool initialize.
Base class for the SCT module side design, extended by the Forward and Barrel module design.
int cells() const
number of readout stips within module side:
int strip() const
Get strip number. Equivalent to phiIndex().
bool isValid() const
Test if its in a valid state.
Identifier for the strip or pixel readout cell.
const InDetDD::DetectorDesign & design() const
static void SetTimeBin(SiChargedDiode &chDiode, int time, MsgStream *log=nullptr)
static void belowThreshold(SiChargedDiode &chDiode, bool flag, bool mask=false)
std::vector< SiCharge > list_t
simulation of the ITk Strips front-end electronics working as a SiPreDigitsProcessor models response ...