14 : minEntries_(ps.getParameter<int>(
"MinEntries")),
15 checkAnomalies_(ps.getParameter<bool>(
"checkAnomalies")),
16 nSigma_(ps.getParameter<double>(
"nSigma")),
17 thresholdAnomalies_(ps.getParameter<double>(
"thresholdAnomalies")),
18 dqmDir_(ps.getParameter<std::
string>(
"dqmDir")),
19 labelG6G1_(ps.getParameter<std::
string>(
"labelG6G1")),
20 threshDiffEB_(ps.getParameter<double>(
"threshDiffEB")),
21 threshDiffEE_(ps.getParameter<double>(
"threshDiffEE")),
22 threshChannelsAnalyzed_(ps.getParameter<double>(
"threshChannelsAnalyzed")),
26 currentPedestals_(nullptr),
27 g6g1Pedestals_(nullptr),
28 channelStatus_(nullptr) {
30 ps.
getParameter<std::vector<std::string> >(
"ChannelStatusToExclude"));
36 float kBarrelSize = 61200;
37 float kEndcapSize = 2 * 7324;
38 float skipped_channels_EB = 0;
39 float skipped_channels_EE = 0;
42 std::string hname =
dqmDir_ +
"/EB/" + std::to_string(
int(
i / 100)) +
"/eb_" + std::to_string(
i);
45 edm::LogWarning(
"MissingMonitorElement") <<
"failed to find MonitorElement " << hname;
68 skipped_channels_EB++;
81 std::string hname =
dqmDir_ +
"/EE/" + std::to_string(
int(
i / 100)) +
"/ee_" + std::to_string(
i);
85 edm::LogWarning(
"MissingMonitorElement") <<
"failed to find MonitorElement " << hname;
108 skipped_channels_EE++;
117 pedestals.
setValue(
id.rawId(), ped);
120 bool enough_stat =
false;
132 edm::LogError(
"Large Variations found wrt to old pedestals, no file created");
144 throw std::runtime_error(
"PoolDBService required.");
188 uint32_t nAnomaliesEB = 0;
189 uint32_t nAnomaliesEE = 0;
220 MonitorElement* pmeb = ibooker.
book2D(
"meaneb",
"Pedestal Means EB", 360, 1., 361., 171, -85., 86.);
221 MonitorElement* preb = ibooker.
book2D(
"rmseb",
"Pedestal RMS EB ", 360, 1., 361., 171, -85., 86.);
223 MonitorElement* pmeep = ibooker.
book2D(
"meaneep",
"Pedestal Means EEP", 100, 1, 101, 100, 1, 101);
226 MonitorElement* pmeem = ibooker.
book2D(
"meaneem",
"Pedestal Means EEM", 100, 1, 101, 100, 1, 101);
229 MonitorElement* pmebd = ibooker.
book2D(
"meanebdiff",
"Abs Rel Pedestal Means Diff EB", 360, 1., 361., 171, -85., 86.);
230 MonitorElement* prebd = ibooker.
book2D(
"rmsebdiff",
"Abs Rel Pedestal RMS Diff E ", 360, 1., 361., 171, -85., 86.);
232 MonitorElement* pmeepd = ibooker.
book2D(
"meaneepdiff",
"Abs Rel Pedestal Means Diff EEP", 100, 1, 101, 100, 1, 101);
233 MonitorElement* preepd = ibooker.
book2D(
"rmseepdiff",
"Abs Rel Pedestal RMS Diff EEP", 100, 1, 101, 100, 1, 101);
235 MonitorElement* pmeemd = ibooker.
book2D(
"meaneemdiff",
"Abs Rel Pedestal Means Diff EEM", 100, 1, 101, 100, 1, 101);
236 MonitorElement* preemd = ibooker.
book2D(
"rmseemdiff",
"Abs RelPedestal RMS Diff EEM", 100, 1, 101, 100, 1, 101);
247 float mean = newpeds[di].mean_x12;
248 float rms = newpeds[di].rms_x12;
250 float cmean = (*currentPedestals_)[di].mean_x12;
251 float crms = (*currentPedestals_)[di].rms_x12;
263 hdiffeb->
Fill(mean - cmean);
268 float mean = newpeds[di].mean_x12;
269 float rms = newpeds[di].rms_x12;
270 float cmean = (*currentPedestals_)[di].mean_x12;
271 float crms = (*currentPedestals_)[di].rms_x12;
276 if (di.
zside() > 0) {
293 hdiffee->
Fill(mean - cmean);
static EEDetId detIdFromDenseIndex(uint32_t din)
virtual void setCurrentFolder(std::string const &fullpath)
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > g6g1PedestalsToken_
const self & getMap() const
int entriesEE_[EEDetId::kSizeForDenseIndexing]
bool checkVariation(const EcalPedestalsMap &oldPedestals, const EcalPedestalsMap &newPedestals)
const float threshDiffEE_
bool isGood(const DetId &id)
const float threshDiffEB_
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
int iphi() const
get the crystal iphi
static EBDetId detIdFromDenseIndex(uint32_t di)
const float threshChannelsAnalyzed_
bool getData(T &iHolder) const
void setValue(const uint32_t id, const Item &item)
ECALpedestalPCLHarvester(const edm::ParameterSet &ps)
void addDefault(ParameterSetDescription const &psetDescription)
const EcalPedestals * g6g1Pedestals_
virtual double getEntries() const
get # of entries
const bool checkAnomalies_
virtual MonitorElement * get(std::string const &fullpath) const
std::vector< int > chStatusToExclude_
Abs< T >::type abs(const T &t)
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
const double thresholdAnomalies_
const std::string dqmDir_
int ieta() const
get the crystal ieta
void dqmPlots(const EcalPedestals &newpeds, DQMStore::IBooker &ibooker)
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedestalsToken_
const EcalChannelStatus * channelStatus_
std::vector< Item >::const_iterator const_iterator
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
T getParameter(std::string const &) const
bool checkStatusCode(const DetId &id)
const EcalPedestals * currentPedestals_
cond::Time_t currentTime() const
const_iterator find(uint32_t rawId) const
const_iterator end() const
void endRun(edm::Run const &run, edm::EventSetup const &isetup) override
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int entriesEB_[EBDetId::kSizeForDenseIndexing]
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > channelsStatusToken_