30 : fp_(conf_.getParameter<
edm::FileInPath>(
"file")) {
31 edm::LogInfo(
"SiPixelFakeGainForHLTESSource::SiPixelFakeGainForHLTESSource");
35 findingRecord<SiPixelGainCalibrationForHLTRcd>();
46 unsigned int nmodules = 0;
47 uint32_t nchannels = 0;
50 const std::vector<uint32_t>& DetIds =
reader.getAllDetIds();
53 for (std::vector<uint32_t>::const_iterator detit = DetIds.begin(); detit != DetIds.end(); detit++) {
55 std::vector<char> theSiPixelGainCalibration;
56 const std::pair<int, int>& detUnitDimensions =
reader.getDetUnitDimensions(*detit);
60 for (
int i = 0;
i < detUnitDimensions.first;
i++) {
61 float totalGain = 0.0;
63 float totalEntries = 0.0;
64 for (
int j = 0;
j < detUnitDimensions.second;
j++) {
69 if ((
j + 1) % 80 == 0) {
70 float gain = totalGain / totalEntries;
71 float ped = totalPed / totalEntries;
73 obj->setData(ped,
gain, theSiPixelGainCalibration);
84 int nCols = detUnitDimensions.first;
87 <<
"[SiPixelFakeGainForHLTESSource::produce] detid already exists" << std::endl;
93 return std::unique_ptr<SiPixelGainCalibrationForHLT>(
obj);