55 return (*
mCalibSet.load(std::memory_order_acquire)).getCalibrations(fId);
61 return (*
mCalibWidthSet.load(std::memory_order_acquire)).getCalibrationWidths(fId);
67 return mCalibSet.load(std::memory_order_acquire);
80 if (!
mCalibSet.load(std::memory_order_acquire)) {
91 for (std::vector<DetId>::const_iterator
id=ids.begin();
id!=ids.end(); ++
id) {
95 if (ok) ptr->setCalibrations(*
id,tool);
100 bool exchanged =
mCalibSet.compare_exchange_strong(expect, cptr, std::memory_order_acq_rel);
122 for (std::vector<DetId>::const_iterator
id=ids.begin();
id!=ids.end(); ++
id) {
126 if (ok) ptr->setCalibrationWidths(*
id,tool);
131 bool exchanged =
mCalibWidthSet.compare_exchange_strong(expect, cptr, std::memory_order_acq_rel);
139 if(!pedestal)
return false;
145 if(!coder || !shape)
return false;
147 for (
int i=0;
i<4;
i++) {
153 int x1=(
int)std::floor(x);
154 int x2=(
int)std::floor(x+1);
155 float y2=coder->
charge(*shape,x2,
i);
156 float y1=coder->
charge(*shape,x1,
i);
157 pedTrue[
i]=(y2-y1)*(x-x1)+y1;
175 bool effconverted =
convertPedestals(fId,effpedestal,effPedTrue,effPedestalInADC);
177 if (pedestal && effpedestal && converted && effconverted && gain && respcorr && timecorr && lutcorr) {
186 if(!pedestalwidth)
return false;
192 if(!coder || !shape)
return false;
194 for (
int i=0;
i<4;
i++) {
202 float y2=coder->
charge(*shape,1,
i);
203 float y1=coder->
charge(*shape,0,
i);
204 pedTrueWidth[
i]=(y2-y1)*x;
217 float pedTrueWidth[4];
220 float effPedTrueWidth[4];
222 if (pedestalwidth && effpedestalwidth&& gainwidth && converted && effconverted) {
298 if(qieType>0) qieType = 1;
const HcalLUTCorrs * mLUTCorrs
const HcalQIETypes * mQIETypes
const HcalPedestalWidths * mEffectivePedestalWidths
const HcalQIEShape & getShape(int qieType) const
get basic shape
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
const HcalFrontEndMap * getHcalFrontEndMapping() const
const HcalSiPMParameters * mSiPMParameters
bool makeHcalCalibration(const HcalGenericDetId &fId, HcalCalibrations *fObject, bool pedestalInADC, bool effPedestalInADC) const
const HcalMCParams * mMCParams
const HcalTPParameters * mTPParameters
std::atomic< HcalCalibrationWidthsSet const * > mCalibWidthSet
const HcalTPChannelParameter * getHcalTPChannelParameter(const HcalGenericDetId &fId) const
const HcalQIECoder * getCoder(DetId fId) const
get QIE parameters
const HcalPedestals * mEffectivePedestals
const HcalRecoParam * getHcalRecoParam(const HcalGenericDetId &fId) const
const HcalChannelStatus * getHcalChannelStatus(const HcalGenericDetId &fId) const
const HcalL1TriggerObjects * mL1TriggerObjects
const HcalPFCorrs * mPFCorrs
const Item * getValues(DetId fId, bool throwOnFail=true) const
const HcalChannelQuality * mChannelQuality
const HcalLutMetadata * mLutMetadata
const HcalTPChannelParameters * mTPChannelParameters
const float * getValues() const
get value for all capId = 0..3
const HcalPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
const HcalRespCorr * getHcalRespCorr(const HcalGenericDetId &fId) const
const HcalLUTCorr * getHcalLUTCorr(const HcalGenericDetId &fId) const
const HcalTimeCorr * getHcalTimeCorr(const HcalGenericDetId &fId) const
void buildCalibWidths() const
std::vector< DetId > getAllChannels() const
const HcalL1TriggerObject * getHcalL1TriggerObject(const HcalGenericDetId &fId) const
const HcalPedestal * getEffectivePedestal(const HcalGenericDetId &fId) const
const HcalLutMetadata * getHcalLutMetadata() const
const HcalMCParam * getHcalMCParam(const HcalGenericDetId &fId) const
const float * getValues() const
get value for all capId = 0..3
const HcalPedestalWidths * mPedestalWidths
const HcalRespCorrs * mRespCorrs
const HcalCalibrationWidths & getHcalCalibrationWidths(const HcalGenericDetId &fId) const
bool makeHcalCalibrationWidth(const HcalGenericDetId &fId, HcalCalibrationWidths *fObject, bool pedestalInADC, bool effPedestalInADC) const
const HcalZSThreshold * getHcalZSThreshold(const HcalGenericDetId &fId) const
const HcalElectronicsMap * mElectronicsMap
const HcalGainWidths * mGainWidths
const HcalCalibrationsSet * getHcalCalibrationsSet() const
const HcalTimeCorrs * mTimeCorrs
#define TYPELOOKUP_DATA_REG(_dataclass_)
const HcalQIEType * getHcalQIEType(const HcalGenericDetId &fId) const
const HcalPFCorr * getHcalPFCorr(const HcalGenericDetId &fId) const
const HcalTopology * getTopologyUsed() const
const HcalZSThresholds * mZSThresholds
const HcalPedestalWidth * getEffectivePedestalWidth(const HcalGenericDetId &fId) const
const HcalQIEData * mQIEData
const HcalGain * getGain(const HcalGenericDetId &fId) const
const HcalTPParameters * getHcalTPParameters() const
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
const HcalSiPMCharacteristics * getHcalSiPMCharacteristics() const
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
bool convertPedestals(const HcalGenericDetId &fId, const HcalPedestal *pedestal, float *pedTrue, bool inADC) const
void buildCalibrations() const
const HcalElectronicsMap * getHcalMapping() const
std::atomic< HcalCalibrationsSet const * > mCalibSet
const float * getValues() const
get value for all capId = 0..3
const HcalFrontEndMap * mFrontEndMap
const HcalPedestals * mPedestals
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
bool convertPedestalWidths(const HcalGenericDetId &fId, const HcalPedestalWidth *pedestalwidth, float *pedTrueWidth, bool inADC) const
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
const HcalSiPMParameter * getHcalSiPMParameter(const HcalGenericDetId &fId) const
const HcalRecoParams * mRecoParams
const HcalSiPMCharacteristics * mSiPMCharacteristics
const HcalCalibrationWidthsSet * getHcalCalibrationWidthsSet() const
const HcalTopology * topo() const
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.