|
ATLAS Offline Software
|
|
std::string | formBichselDataFileName (int particleType, unsigned int nCols) |
|
BichselData | getBichselDataFromFile (const std::string &fullFilename) |
|
std::tuple< double, double, double > | parseThreeDoubles (const std::string &line) |
|
std::pair< int, int > | fastSearch (const std::vector< double > &vec, double item) |
|
double | randomThreshold (const PixelChargeCalib::Thresholds &t, CLHEP::HepRandomEngine *pEngine) |
|
void | crossTalk (double crossTalk, SiChargedDiodeCollection &chargedDiodes) |
|
void | thermalNoise (double thermalNoise, SiChargedDiodeCollection &chargedDiodes, CLHEP::HepRandomEngine *rndmEngine) |
|
void | randomNoise (SiChargedDiodeCollection &chargedDiodes, const PixelModuleData *moduleData, int nBcid, const PixelChargeCalibCondData *chargeCalibData, CLHEP::HepRandomEngine *rndmEngine, InDetDD::IPixelReadoutManager *pixelReadout) |
|
void | randomNoise (SiChargedDiodeCollection &chargedDiodes, const double totalNoiseOccupancy, const std::vector< float > &noiseShape, float overflowToT, const PixelChargeCalibCondData *chargeCalibData, CLHEP::HepRandomEngine *rndmEngine, InDetDD::IPixelReadoutManager *pixelReadout) |
|
void | randomDisable (SiChargedDiodeCollection &chargedDiodes, const PixelModuleData *moduleData, CLHEP::HepRandomEngine *rndmEngine) |
|
void | randomDisable (SiChargedDiodeCollection &chargedDiodes, double disableProbability, CLHEP::HepRandomEngine *rndmEngine) |
|
double | getG4Time (const SiTotalCharge &totalCharge) |
|
◆ crossTalk()
Definition at line 25 of file PixelNoiseFunctions.cxx.
30 for (
SiChargedDiodeIterator i_chargedDiode = oldChargedDiodes.begin(); i_chargedDiode != oldChargedDiodes.end();
33 std::vector<InDetDD::SiCellId> neighbours;
35 for (std::vector<InDetDD::SiCellId>::const_iterator p_neighbour = neighbours.begin();
36 p_neighbour != neighbours.end(); ++p_neighbour) {
◆ fastSearch()
std::pair<int, int> PixelDigitization::fastSearch |
( |
const std::vector< double > & |
vec, |
|
|
double |
item |
|
) |
| |
Definition at line 73 of file PixelDigitizationUtilities.cxx.
74 std::pair<int, int>
output{-1, -1};
77 int index_up =
vec.size() - 1;
80 }
else if (
item ==
vec[index_low]) {
84 }
else if (
item ==
vec[index_up]) {
89 while ((index_up - index_low) != 1) {
90 int index_middle =
int(1.0 * (index_up + index_low) / 2.);
91 if (
item <
vec[index_middle]) index_up = index_middle;
92 else if (
item >
vec[index_middle]) index_low = index_middle;
94 output.first = index_middle;
95 output.second = index_middle;
◆ formBichselDataFileName()
std::string PixelDigitization::formBichselDataFileName |
( |
int |
particleType, |
|
|
unsigned int |
nCols |
|
) |
| |
◆ getBichselDataFromFile()
BichselData PixelDigitization::getBichselDataFromFile |
( |
const std::string & |
fullFilename | ) |
|
Definition at line 28 of file PixelDigitizationUtilities.cxx.
31 std::string
errmsg =
"getBichselDataFromFile: File " + fullFilename +
" could not be opened.";
32 throw std::runtime_error(errmsg);
38 const auto & [logBetaGamma, logCollisionEnergy, logCrossSection] =
parseThreeDoubles(thisLine);
39 iData.
addEntry(logBetaGamma, logCollisionEnergy, logCrossSection);
◆ getG4Time()
◆ parseThreeDoubles()
std::tuple<double, double, double> PixelDigitization::parseThreeDoubles |
( |
const std::string & |
line | ) |
|
Definition at line 47 of file PixelDigitizationUtilities.cxx.
48 std::tuple<double, double, double>
result{0., 0.,0.};
52 static const std::regex threeDoublesRx(
"^([-+.0-9eE]+)\\s+([-+.0-9eE]+)\\s+([-+.0-9eE]+)$");
54 bool foundDoubles=std::regex_match(
line, x3, threeDoublesRx);
59 result = {std::stod(x3[1]), std::stod(x3[2]), std::stod(x3[3])};
60 }
catch (std::logic_error &
e){
61 const std::string
msg(
"parseThreeDoubles: error in parsing a number in "+
line);
62 throw(std::runtime_error(
msg));
65 const std::string
msg(
"parseThreeDoubles: error in parsing the line " +
line);
66 throw(std::runtime_error(
msg));
◆ randomDisable() [1/2]
◆ randomDisable() [2/2]
void PixelDigitization::randomDisable |
( |
SiChargedDiodeCollection & |
chargedDiodes, |
|
|
double |
disableProbability, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
Definition at line 157 of file PixelNoiseFunctions.cxx.
160 i_chargedDiode != chargedDiodes.
orderedEnd(); ++i_chargedDiode) {
161 if (CLHEP::RandFlat::shoot(rndmEngine) < disableProbability) {
◆ randomNoise() [1/2]
Definition at line 98 of file PixelNoiseFunctions.cxx.
108 const auto totalCells = nCircuits * nColumns *
nRows;
109 int nNoise = CLHEP::RandPoisson::shoot(rndmEngine, totalCells * totalNoiseOccupancy);
112 for (
int i = 0;
i < nNoise;
i++) {
113 int circuit = CLHEP::RandFlat::shootInt(rndmEngine, nCircuits);
114 int column = CLHEP::RandFlat::shootInt(rndmEngine, nColumns);
115 int row = CLHEP::RandFlat::shootInt(rndmEngine,
nRows);
123 if (roCell.isValid()) {
125 float x =
static_cast<float>(CLHEP::RandFlat::shoot(rndmEngine, 0., 1.));
127 for (
size_t j = 1; j < noiseShape.size(); j++) {
128 if (
x > noiseShape[j - 1] &&
x <= noiseShape[j]) {
133 float noiseToTm =
bin + 1.5f;
134 float noiseToT = CLHEP::RandGaussZiggurat::shoot(rndmEngine, noiseToTm, 1.
f);
135 if (noiseToT < 1.
f) {
continue; }
136 noiseToT =
std::min(noiseToT, overflowToT);
139 float chargeShape = chargeCalibData->
getCharge(
type, moduleHash, circuit, noiseToT);
◆ randomNoise() [2/2]
Definition at line 73 of file PixelNoiseFunctions.cxx.
83 const double totalNoiseOccupancy = moduleData->
getNoiseOccupancy(barrel_ec,layerIndex) * nBcid;
85 const std::vector<float> &noiseShape = moduleData->
getNoiseShape(barrel_ec, layerIndex);
94 return randomNoise(chargedDiodes, totalNoiseOccupancy, noiseShape, overflowToT, chargeCalibData, rndmEngine, pixelReadout);
◆ randomThreshold()
Definition at line 105 of file PixelDigitizationUtilities.cxx.
106 const double & thrand1 = CLHEP::RandGaussZiggurat::shoot(pEngine);
107 const double & thrand2 = CLHEP::RandGaussZiggurat::shoot(pEngine);
108 return t.value +
t.sigma * thrand1 +
t.noise * thrand2;
◆ thermalNoise()
void PixelDigitization::thermalNoise |
( |
double |
thermalNoise, |
|
|
SiChargedDiodeCollection & |
chargedDiodes, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
std::tuple< double, double, double > parseThreeDoubles(const std::string &line)
const InDetDD::SolidStateDetectorElementBase * element() const
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
double intersectionLength(const SiCellId &diode1, const SiCellId &diode2) const
Compute the intersection length of two diodes: return: the intersection length when the two diodes ar...
SiChargedDiodeOrderedIterator orderedEnd()
std::vector< size_t > vec
std::unordered_map< InDetDD::SiCellId, SiChargedDiode, SiChargedDiodeHash, std::equal_to< InDetDD::SiCellId >, SG::ArenaPoolSTLAllocator< std::pair< const InDetDD::SiCellId, SiChargedDiode > > > SiChargedDiodeMap
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
static void disabled(SiChargedDiode &chDiode, bool flag, bool mask=false)
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
SiChargedDiodeMap::iterator SiChargedDiodeIterator
const list_t & chargeComposition() const
virtual Identifier identifierFromCellId(const SiCellId &cellId) const =0
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
void addEntry(double logBetaGamma, double logCollisionEnergy, double logIntegratedCrossSection)
const SiTotalCharge & totalCharge() const
virtual PixelDiodeType getDiodeType(Identifier id) const =0
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
int numberOfCircuits() const
Total number of circuits:
void randomDisable(SiChargedDiodeCollection &chargedDiodes, double disableProbability, CLHEP::HepRandomEngine *rndmEngine)
void randomNoise(SiChargedDiodeCollection &chargedDiodes, const double totalNoiseOccupancy, const std::vector< float > &noiseShape, float overflowToT, const PixelChargeCalibCondData *chargeCalibData, CLHEP::HepRandomEngine *rndmEngine, InDetDD::IPixelReadoutManager *pixelReadout)
int getFEI3Latency(int barrel_ec, int layer) const
unsigned constexpr int nCols
int layer_disk(const Identifier &id) const
std::string to_string(const DetectorType &type)
double charge(const T &p)
std::vector< double > logHighestCrossSectionsVector
PixelReadoutTechnology getReadoutTechnology() const
void crossTalk(double crossTalk, SiChargedDiodeCollection &chargedDiodes)
void add(const InDetDD::SiCellId &diode, const T &charge)
double getDisableProbability(int barrel_ec, int layer) const
SiChargedDiodeMap & chargedDiodes()
int rowsPerCircuit() const
Number of cell rows per circuit:
const std::vector< float > & getNoiseShape(int barrel_ec, int layer) const
constexpr int getFEI4OverflowToT() const
double getNoiseOccupancy(int barrel_ec, int layer) const
std::vector< std::vector< double > > logIntegratedCrossSectionsVectorOfVector
SiChargedDiodeOrderedSet::iterator SiChargedDiodeOrderedIterator
float getCharge(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float ToT) const
virtual void neighboursOfCell(const SiCellId &cellId, std::vector< SiCellId > &neighbours) const
Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cel...
SiChargedDiodeOrderedIterator orderedBegin()
unsigned constexpr int nRows
const HepMcParticleLink & particleLink() const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
int columnsPerCircuit() const
Number of cell columns per circuit:
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