44 EcalLaserAlphasEBMap()
54 Base::setSingleIov(
true);
58 bool fill()
override {
59 auto tag = PlotBase::getTag<0>();
60 for (
auto const& iov :
tag.iovs) {
64 if (
payload->barrelItems().empty())
75 if (value_ptr ==
payload->end())
99 EcalLaserAlphasEEMap()
109 Base::setSingleIov(
true);
112 bool fill()
override {
113 auto tag = PlotBase::getTag<0>();
114 for (
auto const& iov :
tag.iovs) {
117 if (
payload->endcapItems().empty())
129 if (value_ptr ==
payload->end())
134 if (myEEId.zside() == -1)
152 EcalLaserAlphasPlot() :
cond::payloadInspector::PlotImage<
EcalLaserAlphas>(
"Ecal Laser Alphas - map ") {
156 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
161 auto iov = iovs.front();
163 unsigned int run = std::get<0>(iov);
166 if (
payload->barrelItems().empty())
171 if (
payload->endcapItems().empty())
174 fillEEMap_SingleIOV<EcalLaserAlphas>(
payload, endc_m, endc_p);
178 gStyle->SetPalette(1);
179 gStyle->SetOptStat(0);
180 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
184 t1.SetTextSize(0.05);
185 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser Alphas, IOV %i",
run));
187 float xmi[3] = {0.0, 0.24, 0.76};
188 float xma[3] = {0.24, 0.76, 1.00};
189 std::array<std::unique_ptr<TPad>, 3> pad;
191 pad[
obj] = std::make_unique<TPad>(Form(
"p_%i",
obj), Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[
obj], 0.94);
206 canvas.SaveAs(ImageName.c_str());
214 template <cond::payloadInspector::IOVMultiplicity nIOVs,
int ntags,
int method>
217 EcalLaserAlphasBase()
218 :
cond::payloadInspector::PlotImage<
EcalLaserAlphas, nIOVs, ntags>(
"Ecal Laser Alphas difference ") {}
220 bool fill()
override {
224 float pEBmin, pEEmin, pEBmax, pEEmax;
233 auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
234 l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().
name;
235 auto firstiov = iovs.front();
236 run[0] = std::get<0>(firstiov);
237 std::tuple<cond::Time_t, cond::Hash> lastiov;
239 auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
240 l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().
name;
241 lastiov = tag2iovs.front();
243 lastiov = iovs.back();
244 l_tagname[1] = l_tagname[0];
246 run[1] = std::get<0>(lastiov);
247 for (
int irun = 0; irun < nIOVs; irun++) {
248 std::shared_ptr<EcalLaserAlphas>
payload;
255 if (
payload->barrelItems().empty())
260 if (
payload->endcapItems().empty())
263 fillEEMap_TwoIOVs<EcalLaserAlphas>(
payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax,
method);
268 gStyle->SetPalette(1);
269 gStyle->SetOptStat(0);
270 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
274 int len = l_tagname[0].length() + l_tagname[1].length();
278 t1.SetTextSize(0.04);
281 Form(
"%s IOV %i %s %s IOV %i",
282 l_tagname[1].c_str(),
285 l_tagname[0].c_str(),
288 t1.SetTextSize(0.05);
289 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser Alphas Diff, IOV %i %s %i",
run[1],
dr[
method].c_str(),
run[0]));
292 t1.SetTextSize(0.05);
293 t1.DrawLatex(0.5, 0.96, Form(
"%s, IOV %i %s %i", l_tagname[0].c_str(),
run[1],
dr[
method].c_str(),
run[0]));
295 float xmi[3] = {0.0, 0.24, 0.76};
296 float xma[3] = {0.24, 0.76, 1.00};
297 std::array<std::unique_ptr<TPad>, 3> pad;
300 pad[
obj] = std::make_unique<TPad>(Form(
"p_%i",
obj), Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[
obj], 0.94);
305 DrawEE(endc_m, pEEmin, pEEmax);
309 DrawEE(endc_p, pEEmin, pEEmax);
312 canvas.SaveAs(ImageName.c_str());
316 using EcalLaserAlphasDiffOneTag = EcalLaserAlphasBase<cond::payloadInspector::SINGLE_IOV, 1, 0>;
317 using EcalLaserAlphasDiffTwoTags = EcalLaserAlphasBase<cond::payloadInspector::SINGLE_IOV, 2, 0>;
318 using EcalLaserAlphasRatioOneTag = EcalLaserAlphasBase<cond::payloadInspector::SINGLE_IOV, 1, 1>;
319 using EcalLaserAlphasRatioTwoTags = EcalLaserAlphasBase<cond::payloadInspector::SINGLE_IOV, 2, 1>;
326 EcalLaserAlphasSummaryPlot()
331 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
332 auto iov = iovs.front();
334 unsigned int run = std::get<0>(iov);
340 align =
new TH2F(
"",
"", 0, 0, 0, 0, 0, 0);
342 float mean_x_EB = 0.0f;
343 float mean_x_EE = 0.0f;
351 payload->summary(mean_x_EB, rms_EB, num_x_EB, mean_x_EE, rms_EE, num_x_EE);
357 gStyle->SetPalette(1);
358 gStyle->SetOptStat(0);
359 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
363 t1.SetTextSize(0.04);
365 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser Alphas Summary, IOV %i",
run));
367 TPad pad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
375 canvas.SaveAs(ImageName.c_str());
void fillTableWithSummary(TH2F *&align, std::string title, const float &mean_x_EB, const float &rms_EB, const int &num_x_EB, const float &mean_x_EE, const float &rms_EE, const int &num_x_EE)
void fillWithValue(float xvalue, float yvalue, float weight=1)
static EEDetId unhashIndex(int hi)
static bool validHashIndex(int i)
void DrawEE(TH2F *endc, float min, float max)
void DrawEB(TH2F *ebmap, float min, float max)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
static const int MIN_HASH
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
std::vector< Item >::const_iterator const_iterator
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
void drawTable(int nbRows, int nbColumns)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)