20 #include "CLHEP/Matrix/Matrix.h"
39 clusterEnergyCorrectionObjectSpecificToken_(
esConsumes()),
47 using namespace edm::eventsetup;
53 edm::LogInfo(
"Global ADC->GeV scale: EB ") << std::setprecision(6) << agc.getEBValue()
56 << std::setprecision(6) << agc.getEEValue() <<
" GeV/ADC count";
59 double r1 = (double)std::rand() / (double(RAND_MAX) + double(1));
60 int ieta = int(1 +
r1 * 85);
61 r1 = (double)std::rand() / (double(RAND_MAX) + double(1));
62 int iphi = int(1 +
r1 * 20);
65 edm::LogInfo(
"EcalTrivialObjectAnalyzer: using EBDetId: ") << ebid;
69 if (it != myped.end()) {
70 edm::LogInfo(
"EcalPedestal: ") <<
" mean_x1: " << std::setprecision(8) << (*it).mean_x1
71 <<
" rms_x1: " << (*it).rms_x1 <<
" mean_x6: " << (*it).mean_x6
72 <<
" rms_x6: " << (*it).rms_x6 <<
" mean_x12: " << (*it).mean_x12
73 <<
" rms_x12: " << (*it).rms_x12;
75 edm::LogInfo(
"No pedestal found for this xtal! something wrong with EcalPedestals in your DB? ");
83 if (git != grp.getMap().end()) {
84 edm::LogInfo(
"XtalGroupId.id() = ") << std::setprecision(3) << (*git).id();
87 edm::LogInfo(
"No group id found for this crystal. something wrong with EcalWeightXtalGroups in your DB?");
95 if (grit != gr.getMap().end()) {
98 edm::LogInfo(
"EcalMGPAGainRatio: ") <<
"gain 12/6 : " << std::setprecision(4) << mgpa.gain12Over6()
99 <<
" gain 6/1: " << mgpa.gain6Over1();
101 edm::LogInfo(
"No MGPA Gain Ratio found for this xtal! something wrong with EcalGainRatios in your DB? ");
109 if (icalit != ical.getMap().end()) {
110 icalconst = (*icalit);
112 edm::LogInfo(
"EcalIntercalibConstant: ") << std::setprecision(6) << icalconst;
114 edm::LogInfo(
"No intercalib const found for this xtal! something wrong with EcalIntercalibConstants in your DB? ");
122 if (icalitErr != icalErr.getMap().end()) {
123 icalconstErr = (*icalitErr);
125 edm::LogInfo(
"EcalIntercalibError: ") << std::setprecision(6) << icalconstErr;
127 edm::LogInfo(
"No intercalib const found for this xtal! something wrong with EcalIntercalibErrors in your DB? ");
136 if (icalit != ical.getMap().end()) {
137 icalconst = (*icalit);
139 edm::LogInfo(
"EcalTimeCalibConstant: ") << std::setprecision(6) << icalconst;
141 edm::LogInfo(
"No intercalib const found for this xtal! something wrong with EcalTimeCalibConstants in your DB? ");
149 if (icalitErr != icalErr.getMap().end()) {
150 icalconstErr = (*icalitErr);
152 edm::LogInfo(
"EcalTimeCalibError: ") << std::setprecision(6) << icalconstErr;
154 edm::LogInfo(
"No intercalib const found for this xtal! something wrong with EcalTimeCalibErrors in your DB? ");
164 edm::LogInfo(
"EcalTimeOffsetConstant: ") <<
" EB " << TOff.getEBValue() <<
" EE " << TOff.getEEValue();
169 edm::LogInfo(
"EcalTBWeightMap.size(): ") << std::setprecision(3) << wgts.getMap().size();
175 edm::LogInfo(
"Lookup EcalWeightSet for groupid: ") << std::setprecision(3) << gid.id() <<
" and TDC id " << tdcid;
176 EcalTBWeights::EcalTBWeightMap::const_iterator wit = wgts.getMap().find(std::make_pair(gid, tdcid));
178 if (wit != wgts.getMap().end()) {
180 edm::LogInfo(
"check size of data members in EcalWeightSet");
190 CLHEP::HepMatrix clmat1(3, 10, 0);
191 CLHEP::HepMatrix clmat2(3, 10, 0);
192 for (
int irow = 0; irow < 3; irow++) {
193 for (
int icol = 0; icol < 10; icol++) {
194 clmat1[irow][icol] = mat1(irow, icol);
195 clmat2[irow][icol] = mat2(irow, icol);
198 edm::LogInfo(
"weight matrix before gain switch:") << clmat1;
199 edm::LogInfo(
"weight matrix after gain switch:") << clmat2;
202 edm::LogInfo(
"No weights found for EcalGroupId: ") << gid.id() <<
" and EcalTDCId: " << tdcid;
208 for (EcalFunctionParameters::const_iterator it = paramLocalCont.params().begin(); it != paramLocalCont.params().end();
215 for (EcalFunctionParameters::const_iterator it = paramCrack.params().begin(); it != paramCrack.params().end(); ++it) {
221 for (EcalFunctionParameters::const_iterator it = paramEnergyCorrection.params().begin();
222 it != paramEnergyCorrection.params().end();
229 for (EcalFunctionParameters::const_iterator it = paramEnergyUncertainty.params().begin();
230 it != paramEnergyUncertainty.params().end();
236 edm::LogInfo(
"EnergyCorrectionObjectSpecificParameters:");
237 for (EcalFunctionParameters::const_iterator it = paramEnergyCorrectionObjectSpecific.params().begin();
238 it != paramEnergyCorrectionObjectSpecific.params().end();
250 lalphait = lalpha.getMap().find(ebid.
rawId());
251 if (lalphait != lalpha.getMap().end()) {
252 edm::LogInfo(
"EcalLaserAlpha: ") << std::setprecision(6) << (*lalphait);
254 edm::LogInfo(
"No laser alpha found for this xtal! something wrong with EcalLaserAlphas in your DB? ");
261 lrefit = lref.getMap().find(ebid.
rawId());
262 if (lrefit != lref.getMap().end()) {
268 edm::LogInfo(
"No laser apd/pn ref found for this xtal! something wrong with EcalLaserAPDPNRatiosRef in your DB? ");
275 lratioit = lratio.getLaserMap().find(ebid.
rawId());
278 if (lratioit != lratio.getLaserMap().end()) {
279 lratioconst = (*lratioit);
287 edm::LogInfo(
"No laser apd/pn ratio found for this xtal! something wrong with EcalLaserAPDPNRatios in your DB? ");
293 for (
int i = 1;
i <= 92;
i++) {
294 ltimestamp = lratio.getTimeMap()[
i];
304 chit = ch_status.getMap().find(ebid.
rawId());
305 if (chit != ch_status.getMap().end()) {
309 edm::LogInfo(
"No channel status found for this xtal! something wrong with EcalChannelStatus in your DB? ");
316 edm::LogInfo(
"Sample Mask EB ") << std::hex << smask.getEcalSampleMaskRecordEB() <<
" EE " << std::hex
317 << smask.getEcalSampleMaskRecordEE();
EventNumber_t event() const
const edm::ESGetToken< EcalClusterEnergyUncertaintyParameters, EcalClusterEnergyUncertaintyParametersRcd > clusterEnergyUncertaintyToken_
const edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > laserAlphasToken_
const edm::ESGetToken< EcalClusterLocalContCorrParameters, EcalClusterLocalContCorrParametersRcd > clusterLocalContCorrToken_
const edm::ESGetToken< EcalIntercalibErrors, EcalIntercalibErrorsRcd > intercalibErrorsToken_
const edm::ESGetToken< EcalClusterCrackCorrParameters, EcalClusterCrackCorrParametersRcd > clusterCrackCorrToken_
Code getStatusCode() const
return decoded status
constexpr uint32_t rawId() const
get the raw id
math::Matrix< 3, 10 >::type EcalWeightMatrix
bool getData(T &iHolder) const
const edm::ESGetToken< EcalClusterEnergyCorrectionParameters, EcalClusterEnergyCorrectionParametersRcd > clusterEnergyCorrectionToken_
const edm::ESGetToken< EcalClusterEnergyCorrectionObjectSpecificParameters, EcalClusterEnergyCorrectionObjectSpecificParametersRcd > clusterEnergyCorrectionObjectSpecificToken_
const edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > sampleMaskToken_
const edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > timeCalibConstantsToken_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > channelStatusToken_
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedestalsToken_
EcalTrivialObjectAnalyzer(edm::ParameterSet const &p)
const edm::ESGetToken< EcalTimeCalibErrors, EcalTimeCalibErrorsRcd > timeCalibErrorsToken_
float EcalIntercalibError
const edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > laserAPDPNRatiosToken_
const edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > laserAPDPNRatiosRefToken_
Log< level::Info, false > LogInfo
const edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > weightXtalGroupsToken_
const edm::ESGetToken< EcalIntercalibConstants, EcalIntercalibConstantsRcd > intercalibConstantsToken_
const edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > timeOffsetConstantToken_
std::vector< Item >::const_iterator const_iterator
const edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > tbWeightsToken_
float EcalTimeCalibConstant
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > gainRatiosToken_
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > adcToGevConstantToken_
float EcalIntercalibConstant