ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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 More...
 
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  }

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  }

Member Data Documentation

◆ calibrationType

Definition at line 38 of file ChargeCalibrationBundle.h.

◆ 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:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
CXXUTILS_TRAPPING_FP
#define CXXUTILS_TRAPPING_FP
Definition: trapping_fp.h:24
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
PixelChargeCalib::ChargeCalibrationBundle::linGanged
std::vector< PixelChargeCalib::LinearFitParameters > linGanged
Definition: ChargeCalibrationBundle.h:35
PixelChargeCalib::ChargeCalibrationBundle::useTXT
bool useTXT
Definition: ChargeCalibrationBundle.h:27
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
python.sizes.txt
string txt
Definition: sizes.py:141
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
PixelChargeCalib::ChargeCalibrationBundle::lin
std::vector< PixelChargeCalib::LinearFitParameters > lin
Definition: ChargeCalibrationBundle.h:34
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
PixelChargeCalib::ChargeCalibrationBundle::thresholdLong
std::vector< PixelChargeCalib::Thresholds > thresholdLong
Definition: ChargeCalibrationBundle.h:30
PixelChargeCalib::ChargeCalibrationBundle::totRes
std::vector< PixelChargeCalib::Resolutions > totRes
Definition: ChargeCalibrationBundle.h:36
PixelChargeCalib::ChargeCalibrationBundle::thresholdGanged
std::vector< PixelChargeCalib::Thresholds > thresholdGanged
Definition: ChargeCalibrationBundle.h:31
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
PixelChargeCalib::ChargeCalibrationBundle::params
std::vector< PixelChargeCalib::LegacyFitParameters > params
Definition: ChargeCalibrationBundle.h:32
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
PixelChargeCalib::ChargeCalibrationBundle::paramsGanged
std::vector< PixelChargeCalib::LegacyFitParameters > paramsGanged
Definition: ChargeCalibrationBundle.h:33
threshold
Definition: chainparser.cxx:74
PixelChargeCalib::ChargeCalibrationBundle::useLUT
bool useLUT
Definition: ChargeCalibrationBundle.h:26
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
InDetDD::PixelDiodeType::NORMAL
@ NORMAL