ATLAS Offline Software
Loading...
Searching...
No Matches
PixelChargeCalib::ChargeCalibrationBundle Struct Reference

bundles of parameters used together in the PixelChargeCalibCondAlg More...

#include <ChargeCalibrationBundle.h>

Collaboration diagram for PixelChargeCalib::ChargeCalibrationBundle:

Public Member Functions

 ChargeCalibrationBundle (size_t n, bool lut=false, bool txt=false)
 constructor with reserve for the vectors, n = number of frontends
int idxAtChargeLimit (float chargeLimit, InDetDD::PixelDiodeType type, int start, int end) const
void insertLinearParams (InDetDD::PixelDiodeType type, int idxLimit)

Public Attributes

bool isValid =true
bool useLUT = false
bool useTXT = false
std::vector< PixelChargeCalib::Thresholdsthreshold
std::vector< PixelChargeCalib::ThresholdsthresholdLong
std::vector< PixelChargeCalib::ThresholdsthresholdGanged
std::vector< PixelChargeCalib::LegacyFitParametersparams
std::vector< PixelChargeCalib::LegacyFitParametersparamsGanged
std::vector< PixelChargeCalib::LinearFitParameterslin
std::vector< PixelChargeCalib::LinearFitParameterslinGanged
std::vector< PixelChargeCalib::ResolutionstotRes
PixelChargeCalibCondData::IBLModule tot2Charges
PixelChargeCalibCondData::CalibrationStrategy calibrationType {PixelChargeCalibCondData::CalibrationStrategy::RUN1PIX}

Detailed Description

bundles of parameters used together in the PixelChargeCalibCondAlg

Definition at line 24 of file ChargeCalibrationBundle.h.

Constructor & Destructor Documentation

◆ ChargeCalibrationBundle()

PixelChargeCalib::ChargeCalibrationBundle::ChargeCalibrationBundle ( size_t n,
bool lut = false,
bool txt = false )
inline

constructor with reserve for the vectors, n = number of frontends

Definition at line 41 of file ChargeCalibrationBundle.h.

41 :useLUT(lut),useTXT(txt){
42 threshold.reserve(n);
43 thresholdLong.reserve(n);
44 thresholdGanged.reserve(n);
45 params.reserve(n);
46 paramsGanged.reserve(n);
47 lin.reserve(n);
48 linGanged.reserve(n);
49 totRes.reserve(n);
50 }
std::vector< PixelChargeCalib::LinearFitParameters > linGanged
std::vector< PixelChargeCalib::Thresholds > thresholdGanged
std::vector< PixelChargeCalib::Thresholds > threshold
std::vector< PixelChargeCalib::LinearFitParameters > lin
std::vector< PixelChargeCalib::LegacyFitParameters > paramsGanged
std::vector< PixelChargeCalib::Thresholds > thresholdLong
std::vector< PixelChargeCalib::Resolutions > totRes
std::vector< PixelChargeCalib::LegacyFitParameters > params

Member Function Documentation

◆ idxAtChargeLimit()

int PixelChargeCalib::ChargeCalibrationBundle::idxAtChargeLimit ( float chargeLimit,
InDetDD::PixelDiodeType type,
int start,
int end ) const
inline

Definition at line 54 of file ChargeCalibrationBundle.h.

54 {
55 const auto &relevantArray = (type == InDetDD::PixelDiodeType::NORMAL) ? params : paramsGanged;
56 int idx=-1;
57 for (int i = start;i!=end;++i){
58 const float tmpcharge = relevantArray.back().Q(i);
59 if (tmpcharge > chargeLimit){
60 idx = i;
61 break;
62 }
63 }
64 return idx;
65 }

◆ insertLinearParams()

void PixelChargeCalib::ChargeCalibrationBundle::insertLinearParams ( InDetDD::PixelDiodeType type,
int idxLimit )
inline

Definition at line 68 of file ChargeCalibrationBundle.h.

68 {
69 // Tell clang to optimize assuming that FP exceptions can trap.
70 // Otherwise, it can vectorize the division, which can lead to
71 // spurious division-by-zero traps from unused vector lanes.
73 auto &targetArray = (type == InDetDD::PixelDiodeType::NORMAL) ? lin : linGanged;
74 if (idxLimit <= 0){ //duplicates original logic
75 targetArray.emplace_back(0.f,0.f);
76 return;
77 }
78 //not entirely satisfactory, the fit derivatives are not continuous
79 //and a difference of 5 seems a bit arbitrary
80 const auto &readArray = (type == InDetDD::PixelDiodeType::NORMAL) ? params : paramsGanged;
81 static constexpr int dx = 5;
82 const float x1 = idxLimit;
83 const float x2 = idxLimit-dx;
84 const float y1 = readArray.back().Q(x1);
85 const float y2 = readArray.back().Q(x2);
86 targetArray.emplace_back((y1-y2)/dx, (y2*x1-y1*x2)/dx);
87 }
#define CXXUTILS_TRAPPING_FP
Definition trapping_fp.h:24

Member Data Documentation

◆ calibrationType

◆ isValid

bool PixelChargeCalib::ChargeCalibrationBundle::isValid =true

Definition at line 25 of file ChargeCalibrationBundle.h.

◆ lin

std::vector<PixelChargeCalib::LinearFitParameters> PixelChargeCalib::ChargeCalibrationBundle::lin

Definition at line 34 of file ChargeCalibrationBundle.h.

◆ linGanged

std::vector<PixelChargeCalib::LinearFitParameters> PixelChargeCalib::ChargeCalibrationBundle::linGanged

Definition at line 35 of file ChargeCalibrationBundle.h.

◆ params

std::vector<PixelChargeCalib::LegacyFitParameters> PixelChargeCalib::ChargeCalibrationBundle::params

Definition at line 32 of file ChargeCalibrationBundle.h.

◆ paramsGanged

std::vector<PixelChargeCalib::LegacyFitParameters> PixelChargeCalib::ChargeCalibrationBundle::paramsGanged

Definition at line 33 of file ChargeCalibrationBundle.h.

◆ threshold

std::vector<PixelChargeCalib::Thresholds> PixelChargeCalib::ChargeCalibrationBundle::threshold

Definition at line 29 of file ChargeCalibrationBundle.h.

◆ thresholdGanged

std::vector<PixelChargeCalib::Thresholds> PixelChargeCalib::ChargeCalibrationBundle::thresholdGanged

Definition at line 31 of file ChargeCalibrationBundle.h.

◆ thresholdLong

std::vector<PixelChargeCalib::Thresholds> PixelChargeCalib::ChargeCalibrationBundle::thresholdLong

Definition at line 30 of file ChargeCalibrationBundle.h.

◆ tot2Charges

PixelChargeCalibCondData::IBLModule PixelChargeCalib::ChargeCalibrationBundle::tot2Charges

Definition at line 37 of file ChargeCalibrationBundle.h.

◆ totRes

std::vector<PixelChargeCalib::Resolutions> PixelChargeCalib::ChargeCalibrationBundle::totRes

Definition at line 36 of file ChargeCalibrationBundle.h.

◆ useLUT

bool PixelChargeCalib::ChargeCalibrationBundle::useLUT = false

Definition at line 26 of file ChargeCalibrationBundle.h.

◆ useTXT

bool PixelChargeCalib::ChargeCalibrationBundle::useTXT = false

Definition at line 27 of file ChargeCalibrationBundle.h.


The documentation for this struct was generated from the following file: