34 if (pedestal && gain && shape && coder ) {
36 for (
int i=0;
i<4;
i++) {
38 int x1=(int)std::floor(x);
39 int x2=(int)std::floor(x+1);
41 float y2=coder->
charge(*shape,x2,
i);
42 float y1=coder->
charge(*shape,x1,
i);
43 pedTrue[
i]=(y2-y1)*(x-x1)+y1;
49 if (pedestal && gain ) {
69 for (std::vector<DetId>::const_iterator
id=ids.begin();
id!=ids.end(); ++id) {
91 for (std::vector<DetId>::const_iterator
id=ids.begin();
id!=ids.end(); ++id) {
109 if (pedestalwidth && gainwidth && shape && coder) {
110 float pedTrueWidth[4];
111 for (
int i=0;
i<4;
i++) {
115 float y2=coder->
charge(*shape,1,
i);
116 float y1=coder->
charge(*shape,0,
i);
117 pedTrueWidth[
i]=(y2-y1)*x;
123 if (pedestalwidth && gainwidth) {
124 float pedestalWidth [4];
125 for (
int i = 0;
i < 4;
i++) pedestalWidth [
i] = pedestalwidth->
getWidth (
i);
bool makeCastorCalibration(const HcalGenericDetId &fId, CastorCalibrations *fObject, bool pedestalInADC) const
const CastorPedestal * getPedestal(const HcalGenericDetId &fId) const
void setCalibrationWidths(const DetId id, const CastorCalibrationWidths &ca)
const CastorQIEShape & getShape() const
get basic shape
const CastorChannelStatus * getCastorChannelStatus(const HcalGenericDetId &fId) const
const CastorQIEData * mQIEData
std::vector< DetId > getAllChannels() const
const CastorPedestals * mPedestals
const Item * getValues(DetId fId, bool throwOnFail=true) const
const CastorGainWidths * mGainWidths
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
CastorDbService(const edm::ParameterSet &)
bool makeCastorCalibrationWidth(const HcalGenericDetId &fId, CastorCalibrationWidths *fObject, bool pedestalInADC) const
const CastorElectronicsMap * mElectronicsMap
CastorCalibrationsSet mCalibSet
const CastorQIEShape * getCastorShape() const
void setCalibrations(const DetId id, const CastorCalibrations &ca)
float charge(const CastorQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
const CastorGain * getGain(const HcalGenericDetId &fId) const
const float * getValues() const
get value for all capId = 0..3
const CastorElectronicsMap * getCastorMapping() const
#define TYPELOOKUP_DATA_REG(_dataclass_)
const CastorQIECoder * getCoder(DetId fId) const
get QIE parameters
const CastorPedestalWidths * mPedestalWidths
const CastorGainWidth * getGainWidth(const HcalGenericDetId &fId) const
const CastorPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
const CastorChannelQuality * mChannelQuality
const CastorGains * mGains
const float * getValues() const
get value for all capId = 0..3
CastorCalibrationWidthsSet mCalibWidthSet
const float * getValues() const
get value for all capId = 0..3
const CastorQIECoder * getCastorCoder(const HcalGenericDetId &fId) const