48 EcalTimeCalibConstantsEBMap()
58 Base::setSingleIov(
true);
62 bool fill()
override {
63 auto tag = PlotBase::getTag<0>();
64 for (
auto const& iov :
tag.iovs) {
68 if (
payload->barrelItems().empty())
79 if (value_ptr ==
payload->end())
101 int EEhistSplit = 20;
104 EcalTimeCalibConstantsEEMap()
114 Base::setSingleIov(
true);
117 bool fill()
override {
118 auto tag = PlotBase::getTag<0>();
119 for (
auto const& iov :
tag.iovs) {
122 if (
payload->endcapItems().empty())
134 if (value_ptr ==
payload->end())
139 if (myEEId.zside() == -1)
157 EcalTimeCalibConstantsPlot()
162 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
167 auto iov = iovs.front();
169 unsigned int run = std::get<0>(iov);
172 if (
payload->barrelItems().empty())
175 fillEBMap_SingleIOV<EcalTimeCalibConstants>(
payload,
barrel);
177 if (
payload->endcapItems().empty())
180 fillEEMap_SingleIOV<EcalTimeCalibConstants>(
payload, endc_m, endc_p);
184 gStyle->SetPalette(1);
185 gStyle->SetOptStat(0);
186 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
190 t1.SetTextSize(0.05);
191 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Time Calib Constants, IOV %i",
run));
193 float xmi[3] = {0.0, 0.24, 0.76};
194 float xma[3] = {0.24, 0.76, 1.00};
195 std::array<std::unique_ptr<TPad>, 3> pad;
197 pad[
obj] = std::make_unique<TPad>(Form(
"p_%i",
obj), Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[
obj], 0.94);
203 DrawEE(endc_m, -2.5, 2.5);
209 DrawEE(endc_p, -2.5, 2.5);
212 canvas.SaveAs(ImageName.c_str());
220 template <cond::payloadInspector::IOVMultiplicity nIOVs,
int ntags,
int method>
223 EcalTimeCalibConstantsBase()
225 "Ecal Time Calib Constants comparison") {}
227 bool fill()
override {
231 float pEBmin, pEEmin, pEBmax, pEEmax;
240 auto iovs = cond::payloadInspector::PlotBase::getTag<0>().iovs;
241 l_tagname[0] = cond::payloadInspector::PlotBase::getTag<0>().
name;
242 auto firstiov = iovs.front();
243 run[0] = std::get<0>(firstiov);
244 std::tuple<cond::Time_t, cond::Hash> lastiov;
246 auto tag2iovs = cond::payloadInspector::PlotBase::getTag<1>().iovs;
247 l_tagname[1] = cond::payloadInspector::PlotBase::getTag<1>().
name;
248 lastiov = tag2iovs.front();
250 lastiov = iovs.back();
251 l_tagname[1] = l_tagname[0];
253 run[1] = std::get<0>(lastiov);
254 for (
int irun = 0; irun < nIOVs; irun++) {
255 std::shared_ptr<EcalTimeCalibConstants>
payload;
262 if (
payload->barrelItems().empty())
265 fillEBMap_TwoIOVs<EcalTimeCalibConstants>(
payload,
barrel, irun, pEB, pEBmin, pEBmax,
method);
267 if (
payload->endcapItems().empty())
270 fillEEMap_TwoIOVs<EcalTimeCalibConstants>(
payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax,
method);
275 gStyle->SetPalette(1);
276 gStyle->SetOptStat(0);
277 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
281 int len = l_tagname[0].length() + l_tagname[1].length();
285 t1.SetTextSize(0.05);
289 Form(
"%s %i %s %s %i", l_tagname[1].c_str(),
run[1],
dr[
method].c_str(), l_tagname[0].c_str(),
run[0]));
291 t1.SetTextSize(0.05);
292 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Time Calib Constants, IOV %i %s %i",
run[1],
dr[
method].c_str(),
run[0]));
295 t1.SetTextSize(0.05);
296 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]));
299 float xmi[3] = {0.0, 0.24, 0.76};
300 float xma[3] = {0.24, 0.76, 1.00};
301 std::array<std::unique_ptr<TPad>, 3> pad;
304 pad[
obj] = std::make_unique<TPad>(Form(
"p_%i",
obj), Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[
obj], 0.94);
309 DrawEE(endc_m, pEEmin, pEEmax);
313 DrawEE(endc_p, pEEmin, pEEmax);
316 canvas.SaveAs(ImageName.c_str());
320 using EcalTimeCalibConstantsDiffOneTag = EcalTimeCalibConstantsBase<cond::payloadInspector::SINGLE_IOV, 1, 0>;
321 using EcalTimeCalibConstantsDiffTwoTags = EcalTimeCalibConstantsBase<cond::payloadInspector::SINGLE_IOV, 2, 0>;
322 using EcalTimeCalibConstantsRatioOneTag = EcalTimeCalibConstantsBase<cond::payloadInspector::SINGLE_IOV, 1, 1>;
323 using EcalTimeCalibConstantsRatioTwoTags = EcalTimeCalibConstantsBase<cond::payloadInspector::SINGLE_IOV, 2, 1>;
330 EcalTimeCalibConstantsSummaryPlot()
335 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
336 auto iov = iovs.front();
338 unsigned int run = std::get<0>(iov);
344 align =
new TH2F(
"",
"", 0, 0, 0, 0, 0, 0);
346 float mean_x_EB = 0.0f;
347 float mean_x_EE = 0.0f;
355 payload->summary(mean_x_EB, rms_EB, num_x_EB, mean_x_EE, rms_EE, num_x_EE);
357 align,
"Ecal Time Calib Constants", mean_x_EB, rms_EB, num_x_EB, mean_x_EE, rms_EE, num_x_EE);
361 gStyle->SetPalette(1);
362 gStyle->SetOptStat(0);
363 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
367 t1.SetTextSize(0.04);
369 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Time Calib Constants Summary, IOV %i",
run));
371 TPad pad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
379 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)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
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)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
void drawTable(int nbRows, int nbColumns)
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)