20 enum { kESChannels = 137216 };
31 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
32 TH2F*** esmap =
new TH2F**[2];
34 for (
int plane = 0; plane < 2; plane++) {
35 esmap[plane] =
new TH2F*[2];
36 for (
int side = 0; side < 2; side++)
37 esmap[plane][side] =
new TH2F(
42 auto iov = iovs.front();
44 run = std::get<0>(iov);
47 for (
int id = 0;
id < kESChannels;
id++)
50 int side = myESId.
zside();
55 int plane = myESId.
plane() - 1;
56 if (side < 0 || side > 1 || plane < 0 || plane > 1) {
57 std::cout <<
" channel " <<
id <<
" side " << myESId.
zside() <<
" plane " << myESId.
plane() << std::endl;
63 if (myESId.
strip() == 1) {
64 esmap[plane][side]->Fill(myESId.
six() - 1, myESId.
siy() - 1,
value);
71 gStyle->SetOptStat(0);
72 gStyle->SetPalette(1);
73 TCanvas
canvas(
"CC map",
"CC map", 1680, 1320);
78 t1.DrawLatex(0.5, 0.96, Form(
"ES Intercalib Constants, IOV %i",
run));
79 t1.SetTextSize(0.025);
81 float xmi[2] = {0.0, 0.5};
82 float xma[2] = {0.5, 1.0};
83 TPad*** pad =
new TPad**[2];
84 for (
int plane = 0; plane < 2; plane++) {
85 pad[plane] =
new TPad*[2];
86 for (
int side = 0; side < 2; side++) {
87 float yma = 0.94 - (0.46 * plane);
88 float ymi = yma - 0.44;
90 new TPad(Form(
"p_%i_%i", plane, side), Form(
"p_%i_%i", plane, side), xmi[side], ymi, xma[side], yma);
91 pad[plane][side]->Draw();
95 int min = valmin * 10 - 1.;
97 for (
int side = 0; side < 2; side++) {
98 for (
int plane = 0; plane < 2; plane++) {
99 pad[plane][side]->cd();
100 esmap[plane][side]->Draw(
"colz1");
101 esmap[plane][side]->SetMinimum(valmin);
107 canvas.SaveAs(ImageName.c_str());
117 ESIntercalibConstantsDiff()
121 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
122 TH2F*** esmap =
new TH2F**[2];
124 for (
int plane = 0; plane < 2; plane++) {
125 esmap[plane] =
new TH2F*[2];
126 for (
int side = 0; side < 2; side++)
127 esmap[plane][side] =
new TH2F(
130 unsigned int run[2], irun = 0;
131 float val[kESChannels], valmin = 999.;
132 for (
auto const& iov : iovs) {
134 run[irun] = std::get<0>(iov);
137 for (
int id = 0;
id < kESChannels;
id++)
142 float value = *IC_it;
147 int side = myESId.
zside();
152 int plane = myESId.
plane() - 1;
153 if (side < 0 || side > 1 || plane < 0 || plane > 1) {
154 std::cout <<
" channel " <<
id <<
" side " << myESId.
zside() <<
" plane " << myESId.
plane()
160 if (myESId.
strip() == 1) {
161 esmap[plane][side]->Fill(myESId.
six() - 1, myESId.
siy() - 1,
diff);
171 gStyle->SetOptStat(0);
172 gStyle->SetPalette(1);
173 TCanvas
canvas(
"CC map",
"CC map", 1680, 1320);
177 t1.SetTextSize(0.05);
178 t1.DrawLatex(0.5, 0.96, Form(
"ES Intercalib Constants, IOV %i - %i",
run[1],
run[0]));
179 t1.SetTextSize(0.025);
181 float xmi[2] = {0.0, 0.5};
182 float xma[2] = {0.5, 1.0};
183 TPad*** pad =
new TPad**[2];
184 for (
int plane = 0; plane < 2; plane++) {
185 pad[plane] =
new TPad*[2];
186 for (
int side = 0; side < 2; side++) {
187 float yma = 0.94 - (0.46 * plane);
188 float ymi = yma - 0.44;
190 new TPad(Form(
"p_%i_%i", plane, side), Form(
"p_%i_%i", plane, side), xmi[side], ymi, xma[side], yma);
191 pad[plane][side]->Draw();
195 int min = valmin * 10 - 1.;
197 for (
int side = 0; side < 2; side++) {
198 for (
int plane = 0; plane < 2; plane++) {
199 pad[plane][side]->cd();
200 esmap[plane][side]->Draw(
"colz1");
201 esmap[plane][side]->SetMinimum(valmin);
207 canvas.SaveAs(ImageName.c_str());