|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "CLHEP/Random/RandFlat.h"
17 #include "CLHEP/Random/RandGaussZiggurat.h"
33 return StatusCode::SUCCESS;
38 return StatusCode::SUCCESS;
42 CLHEP::HepRandomEngine* rndmEngine) {
61 const EventContext& ctx{Gaudi::Hive::currentContext()};
69 std::vector<Pixel1RawData*> p_rdo_small_fei4;
87 for (
auto &[mapId,mapDiode]:chargedDiodes) {
88 Identifier diodeID = chargedDiodes.getId(mapId);
89 double charge = mapDiode.charge();
103 if (mapDiode.totalCharge().fromTrack()) {
108 const int timeWalk = 25;
127 double totsig = calibData->
getTotRes(moduleHash, FE, tot);
128 int nToT =
static_cast<int>(CLHEP::RandGaussZiggurat::shoot(rndmEngine, tot, totsig));
133 if (nToT >= overflowToT) {
137 if (nToT <= moduleData->getToTThreshold(barrel_ec, layerIndex)) {
154 int flag = mapDiode.flag();
155 int bunch = (
flag >> 8) & 0xff;
158 const Identifier id_readout = chargedDiodes.element()->identifierFromCellId(cellId);
float getToT(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float Q) const
const InDetDD::SolidStateDetectorElementBase * element() const
static bool isDisabled(SiChargedDiode &chDiode)
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
double getCrossTalk(int barrel_ec, int layer) const
PixelChargeCalib::Thresholds getThresholds(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE) const
constexpr uint32_t invalidFrontEnd
Structs for holding charge calibration parameterisation and data.
float getTotRes(unsigned int moduleHash, unsigned int FE, float Q) const
static void disabled(SiChargedDiode &chDiode, bool flag, bool mask=false)
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
double getG4Time(const SiTotalCharge &totalCharge)
double randomThreshold(const PixelChargeCalib::Thresholds &t, CLHEP::HepRandomEngine *pEngine)
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
::StatusCode StatusCode
StatusCode definition for legacy code.
static void belowThreshold(SiChargedDiode &chDiode, bool flag, bool mask=false)
static void SetBunch(SiChargedDiode &chDiode, int bunch, MsgStream *log=nullptr)
int layer_disk(const Identifier &id) const
static bool isMaskOut(SiChargedDiode &chDiode)
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
PixelReadoutTechnology getReadoutTechnology() const
void crossTalk(double crossTalk, SiChargedDiodeCollection &chargedDiodes)
constexpr int getFEI4OverflowToT() const
void randomNoise(SiChargedDiodeCollection &chargedDiodes, const PixelModuleData *moduleData, int nBcid, const PixelChargeCalibCondData *chargeCalibData, CLHEP::HepRandomEngine *rndmEngine, InDetDD::IPixelReadoutManager *pixelReadout)
void randomDisable(SiChargedDiodeCollection &chargedDiodes, const PixelModuleData *moduleData, CLHEP::HepRandomEngine *rndmEngine)
virtual Identifier identify() const override final
identifier of this detector element (inline)
void thermalNoise(double thermalNoise, SiChargedDiodeCollection &chargedDiodes, CLHEP::HepRandomEngine *rndmEngine)
virtual Identifier identify() const override final