36 if (pedestal && gain && shape && coder ) {
38 for (
int i=0;
i<4;
i++) {
40 int x1=(int)std::floor(x);
41 int x2=(int)std::floor(x+1);
43 float y2=coder->
charge(*shape,x2,
i);
44 float y1=coder->
charge(*shape,x1,
i);
45 pedTrue[
i]=(y2-y1)*(x-x1)+y1;
51 if (pedestal && gain ) {
71 for (std::vector<DetId>::const_iterator
id=ids.begin();
id!=ids.end(); ++id) {
93 for (std::vector<DetId>::const_iterator
id=ids.begin();
id!=ids.end(); ++id) {
111 if (pedestalwidth && gainwidth && shape && coder) {
112 float pedTrueWidth[4];
113 for (
int i=0;
i<4;
i++) {
117 float y2=coder->
charge(*shape,1,
i);
118 float y1=coder->
charge(*shape,0,
i);
119 pedTrueWidth[
i]=(y2-y1)*x;
125 if (pedestalwidth && gainwidth) {
126 float pedestalWidth [4];
127 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