Skip to content

Commit

Permalink
minor simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Salavat committed Feb 6, 2021
1 parent 943c2c3 commit 49edf0a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CalibCalorimetry/HcalAlgos/src/HcalDbHardcode.cc
Expand Up @@ -651,19 +651,19 @@ HcalSiPMParameter HcalDbHardcode::makeHardcodeSiPMParameter(HcalGenericDetId fId
HcalSiPMType theType = HcalNoSiPM;
double thePe2fC = getParameters(fId).photoelectronsToAnalog();
double theDC = getParameters(fId).darkCurrent(0, intlumi);
float theNoiseCN = (float)getParameters(fId).noiseCorrelation(0);
double theNoiseCN = getParameters(fId).noiseCorrelation(0);
if (fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel) {
if (useHBUpgrade_) {
HcalDetId hid(fId);
int nLayersInDepth = getLayersInDepth(hid.ietaAbs(), hid.depth(), topo);
if (nLayersInDepth > 4) {
theType = HcalHBHamamatsu2;
theDC = getParameters(fId).darkCurrent(1, intlumi);
theNoiseCN = (float)getParameters(fId).noiseCorrelation(1);
theNoiseCN = getParameters(fId).noiseCorrelation(1);
} else {
theType = HcalHBHamamatsu1;
theDC = getParameters(fId).darkCurrent(0, intlumi);
theNoiseCN = (float)getParameters(fId).noiseCorrelation(0);
theNoiseCN = getParameters(fId).noiseCorrelation(0);
}
} else
theType = HcalHPD;
Expand All @@ -674,11 +674,11 @@ HcalSiPMParameter HcalDbHardcode::makeHardcodeSiPMParameter(HcalGenericDetId fId
if (nLayersInDepth > 4) {
theType = HcalHEHamamatsu2;
theDC = getParameters(fId).darkCurrent(1, intlumi);
theNoiseCN = (float)getParameters(fId).noiseCorrelation(1);
theNoiseCN = getParameters(fId).noiseCorrelation(1);
} else {
theType = HcalHEHamamatsu1;
theDC = getParameters(fId).darkCurrent(0, intlumi);
theNoiseCN = (float)getParameters(fId).noiseCorrelation(0);
theNoiseCN = getParameters(fId).noiseCorrelation(0);
}
} else
theType = HcalHPD;
Expand All @@ -689,7 +689,7 @@ HcalSiPMParameter HcalDbHardcode::makeHardcodeSiPMParameter(HcalGenericDetId fId
theType = HcalHPD;
}

return HcalSiPMParameter(fId.rawId(), theType, thePe2fC, theDC, 0, theNoiseCN);
return HcalSiPMParameter(fId.rawId(), theType, thePe2fC, theDC, 0, (float)theNoiseCN);
}

std::unique_ptr<HcalSiPMCharacteristics> HcalDbHardcode::makeHardcodeSiPMCharacteristics() const {
Expand Down

0 comments on commit 49edf0a

Please sign in to comment.