Skip to content

Commit

Permalink
improving style
Browse files Browse the repository at this point in the history
  • Loading branch information
Salavat committed Jun 20, 2019
1 parent 562c518 commit 96a5a57
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CalibFormats/HcalObjects/src/HcalDbService.cc
Expand Up @@ -225,10 +225,11 @@ bool HcalDbService::convertPedestalWidths(const HcalGenericDetId& fId,
continue;
}
float y = pedestal->getValues()[i];
int x1 = (int)std::floor(y);
int x2 = (int)std::floor(y + 1.);
float y1 = coder->charge(*shape, x1, i);
float y2 = coder->charge(*shape, x2, i);
unsigned x1 = static_cast<unsigned>(std::floor(y));
unsigned x2 = static_cast<unsigned>(std::floor(y + 1.));
unsigned iun = static_cast<unsigned>(i);
float y1 = coder->charge(*shape, x1, iun);
float y2 = coder->charge(*shape, x2, iun);
pedTrueWidth[i] = (y2 - y1) * x;
}
return true;
Expand Down

0 comments on commit 96a5a57

Please sign in to comment.