Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 const std::out_of_range
22 std::stringstream
error;
23 error <<
"PixelChargeCalibCondData::"<< functionName <<
"("<<
enum2uint(
type,__func__)<<
", " << moduleHash <<
", " << FE <<
"): out of bounds";
24 return std::out_of_range(
error.str());
26 const std::out_of_range
27 generateError(
const char * functionName,
unsigned int moduleHash,
unsigned int FE,
unsigned int val){
28 std::stringstream
error;
29 error <<
"PixelChargeCalibCondData::"<< functionName <<
"(" << moduleHash <<
", " << FE <<
", "<<
val <<
"): out of bounds";
30 return std::out_of_range(
error.str());
32 const std::out_of_range
33 generateError(
const char * functionName,
unsigned int moduleHash,
unsigned int FE){
34 std::stringstream
error;
35 error <<
"PixelChargeCalibCondData::"<< functionName <<
"(" << moduleHash <<
", " << FE <<
"): out of bounds";
36 return std::out_of_range(
error.str());
38 const std::out_of_range
39 generateError(
const char * functionName,
unsigned int moduleHash){
40 std::stringstream
error;
41 error <<
"PixelChargeCalibCondData::"<< functionName <<
"(" << moduleHash <<
"): out of bounds";
42 return std::out_of_range(
error.str());
71 const auto & [barrel_ec,
layer] = becLayer;
76 setThresholds(
t, moduleHash, std::vector<Thresholds>(numFE, thresholds));
85 setTotResolutions(moduleHash, std::vector<PixelChargeCalib::Resolutions>(numFE, zeroResolution));
92 if (hashIndexedVector.size()<=moduleHash){
95 hashIndexedVector[moduleHash] = thresholds;
102 const auto &feIndexedVector = hashIndexedVector.at(moduleHash);
103 if (FE < feIndexedVector.size()) {
104 return feIndexedVector[FE];
106 throw generateError(__func__,
type, moduleHash, FE);
113 if (thisVector.size()<=moduleHash){
124 const auto &
v = thisVector.at(moduleHash);
128 throw generateError(__func__,
type, moduleHash, FE);
135 if ( thisVector.size()<=moduleHash){
148 const auto &linFit = typeMap.at(moduleHash);
149 if (FE < linFit.size()) {
150 return typeMap.at(moduleHash).at(FE);
152 throw generateError(__func__,
type, moduleHash, FE);
168 throw generateError(__func__, moduleHash, FE);
180 float tot =
legacy.ToT(Q);
186 if (
float tot1 = lin.
ToT(Q); tot1 != 0.f)
return tot1;
195 unsigned int moduleHash,
208 const auto analogueThreshold = thresholds.value;
214 if (
float charge1 = lin.
Q(ToT); charge1 != 0.f)
return charge1;
232 const auto analogueThreshold = thresholds.value;
238 if (
float charge1 = lin.
Q(ToT); charge1 != 0.f)
return charge1;
246 throw generateError(__func__, moduleHash,
static_cast<int>(
strategy));
254 throw generateError(__func__, moduleHash);
266 throw generateError(__func__, moduleHash);
275 return it->second.at(FE);
277 throw generateError(__func__, moduleHash,FE);
283 throw generateError(__func__, moduleHash,FE, ToT);
287 return charges[ToT - 1];
293 float minDiff = FLT_MAX;
297 if (
diff < minDiff) {
PixelChargeCalib::LegacyFitParameters getLegacyFitParameters(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE) const
int getDefaultAnalogThresholdSigma(int barrel_ec, int layer) const
const IBLCalibration & getTot2Charges(unsigned int moduleHash, unsigned int FE) const
std::array< std::vector< std::vector< PixelChargeCalib::Thresholds > >, s_NPixelDiodes > m_thresholds
float getToT(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float Q) const
int getDefaultAnalogThreshold(int barrel_ec, int layer) const
int getDefaultAnalogThresholdNoise(int barrel_ec, int layer) const
int getDefaultInTimeThreshold(int barrel_ec, int layer) const
PixelChargeCalib::Thresholds getThresholds(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE) const
float getTotRes(unsigned int moduleHash, unsigned int FE, float Q) const
std::array< std::vector< std::vector< PixelChargeCalib::LegacyFitParameters > >, s_NPixelDiodes > m_legacyFit
void setAllFromConfigData(unsigned int moduleHash, const PixelModuleData *configData, const std::pair< int, int > &becLayer, unsigned int numFE)
void setLinearFitParameters(InDetDD::PixelDiodeType type, unsigned int moduleHash, const std::vector< PixelChargeCalib::LinearFitParameters > ¶meters)
float getDefaultQ2TotC() const
std::vector< std::vector< PixelChargeCalib::Resolutions > > m_totRes
void setLegacyFitParameters(InDetDD::PixelDiodeType type, unsigned int moduleHash, const std::vector< PixelChargeCalib::LegacyFitParameters > ¶meters)
constexpr static std::size_t s_NPixelDiodes
float getChargeLUTFEI4(unsigned int moduleHash, unsigned int FE, unsigned int ToT) const
std::size_t m_sizeOfHashVector
PixelChargeCalibCondData()=default
std::map< int, CalibrationStrategy > m_calibrationStrategy
void setThresholds(InDetDD::PixelDiodeType type, unsigned int moduleHash, const std::vector< PixelChargeCalib::Thresholds > &thresholds)
std::pair< std::vector< unsigned int >, bool > res
Struct for holding vectors of charge calibration constants, with utility methods.
void setTot2Charges(unsigned int moduleHash, IBLModule charges)
void setCalibrationStrategy(unsigned int moduleHash, CalibrationStrategy strategy)
CalibrationStrategy getCalibrationStrategy(unsigned int moduleHash) const
constexpr std::size_t enum2uint(T n, std::string_view callingFunctionName="")
Convert an enum class to size_t for use as an array index.
std::map< int, IBLModule > m_tot2Charges
void setAllFromBundle(unsigned int moduleHash, const PixelChargeCalib::ChargeCalibrationBundle &b)
std::vector< IBLCalibration > IBLModule
double charge(const T &p)
float getDefaultQ2TotA() const
PixelChargeCalib::LinearFitParameters getLinearFitParameters(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE) const
float getCharge(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float ToT) const
float getDefaultQ2TotE() const
Store pixel constant parameters in PixelModuleData.
static constexpr size_t IBLCalibrationSize
bundles of parameters used together in the PixelChargeCalibCondAlg
float getToTLUTFEI4(unsigned int moduleHash, unsigned int FE, float Q) const
void setTotResolutions(unsigned int moduleHash, const std::vector< PixelChargeCalib::Resolutions > &value)
std::array< std::vector< std::vector< PixelChargeCalib::LinearFitParameters > >, s_NPixelDiodes > m_linFit
std::array< float, IBLCalibrationSize > IBLCalibration