35 EcalLaserAPDPNRatiosRefEBMap() :
cond::payloadInspector::Histogram2D<
EcalLaserAPDPNRatiosRef>(
"ECAL Barrel Laser APDPN Ratios Ref- map ",
38 Base::setSingleIov(
true );
42 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
44 for (
auto const & iov: iovs) {
45 std::shared_ptr<EcalLaserAPDPNRatiosRef>
payload = Base::fetchPayload( std::get<1>(iov) );
48 if (payload->barrelItems().empty())
return false;
50 for(
int iphi =
MIN_IPHI; iphi <
MAX_IPHI+1; iphi++) fillWithValue(iphi, 0, -1);
57 if (value_ptr == payload->end())
63 fillWithValue( (
EBDetId(rawid)).iphi() , (
EBDetId(rawid)).ieta(), weight);
85 EcalLaserAPDPNRatiosRefEEMap() :
cond::payloadInspector::Histogram2D<
EcalLaserAPDPNRatiosRef>(
"ECAL Endcap Laser APDPN Ratios Ref- map ",
88 Base::setSingleIov(
true );
91 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
93 for (
auto const & iov: iovs) {
94 std::shared_ptr<EcalLaserAPDPNRatiosRef> payload = Base::fetchPayload( std::get<1>(iov) );
96 if (payload->endcapItems().empty())
return false;
101 fillWithValue(ix, iy, -1);
107 if (value_ptr == payload->end())
110 float weight = (
float)(*value_ptr);
112 if(myEEId.zside() == -1)
113 fillWithValue(myEEId.ix(), myEEId.iy(),
weight);
115 fillWithValue(myEEId.ix() +
IX_MAX + EEhistSplit, myEEId.iy(),
weight);
134 setSingleIov(
true );
137 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
139 TH2F* endc_p =
new TH2F(
"EE+",
"Laser APDPN Ratios Ref EE+",
IX_MAX,
IX_MIN,
IX_MAX + 1, IY_MAX,
IY_MIN, IY_MAX + 1);
140 TH2F* endc_m =
new TH2F(
"EE-",
"Laser APDPN Ratios Ref EE-",
IX_MAX,
IX_MIN,
IX_MAX + 1, IY_MAX,
IY_MIN, IY_MAX + 1);
142 auto iov = iovs.front();
143 std::shared_ptr<EcalLaserAPDPNRatiosRef> payload = fetchPayload( std::get<1>(iov) );
144 unsigned int run = std::get<0>(iov);
148 if (payload->barrelItems().empty())
151 fillEBMap_SingleIOV<EcalLaserAPDPNRatiosRef>(
payload,
barrel);
154 if (payload->endcapItems().empty())
157 fillEEMap_SingleIOV<EcalLaserAPDPNRatiosRef>(
payload, endc_m, endc_p);
161 gStyle->SetPalette(1);
162 gStyle->SetOptStat(0);
163 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
167 t1.SetTextSize(0.04);
168 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser APDPN Ratios Ref, IOV %i", run));
170 float xmi[3] = {0.0 , 0.24, 0.76};
171 float xma[3] = {0.24, 0.76, 1.00};
172 TPad** pad =
new TPad*;
174 pad[
obj] =
new TPad(Form(
"p_%i",
obj),Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[obj], 0.94);
189 canvas.SaveAs(ImageName.c_str());
200 EcalLaserAPDPNRatiosRefDiff() :
cond::payloadInspector::PlotImage<
EcalLaserAPDPNRatiosRef>(
"Ecal Laser APDPN Ratios Ref difference ") {
204 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
205 TH2F* barrel =
new TH2F(
"EB",
"Laser APDPN Ratios Ref EB", MAX_IPHI, 0, MAX_IPHI, 2 *
MAX_IETA, -
MAX_IETA,
MAX_IETA);
206 TH2F* endc_p =
new TH2F(
"EE+",
"Laser APDPN Ratios Ref EE+",
IX_MAX,
IX_MIN,
IX_MAX + 1, IY_MAX,
IY_MIN, IY_MAX + 1);
207 TH2F* endc_m =
new TH2F(
"EE-",
"Laser APDPN Ratios Ref EE-",
IX_MAX,
IX_MIN,
IX_MAX + 1, IY_MAX,
IY_MIN, IY_MAX + 1);
208 float pEBmin, pEEmin, pEBmax, pEEmax;
214 unsigned int run[2], irun = 0;
216 for (
auto const & iov: iovs) {
217 std::shared_ptr<EcalLaserAPDPNRatiosRef> payload = fetchPayload( std::get<1>(iov) );
218 run[irun] = std::get<0>(iov);
222 if (payload->barrelItems().empty())
225 fillEBMap_DiffIOV<EcalLaserAPDPNRatiosRef>(
payload,
barrel, irun, pEB, pEBmin, pEBmax);
227 if (payload->endcapItems().empty())
230 fillEEMap_DiffIOV<EcalLaserAPDPNRatiosRef>(
payload, endc_m, endc_p, irun, pEE, pEEmin, pEEmax);
237 gStyle->SetPalette(1);
238 gStyle->SetOptStat(0);
239 TCanvas
canvas(
"CC map",
"CC map", 1600, 450);
243 t1.SetTextSize(0.04);
244 t1.DrawLatex(0.5, 0.96, Form(
"Ecal Laser APDPN Ratios Ref Diff, IOV %i - %i", run[1], run[0]));
246 float xmi[3] = {0.0 , 0.24, 0.76};
247 float xma[3] = {0.24, 0.76, 1.00};
248 TPad** pad =
new TPad*;
251 pad[
obj] =
new TPad(Form(
"p_%i",
obj),Form(
"p_%i",
obj), xmi[
obj], 0.0, xma[obj], 0.94);
256 DrawEE(endc_m, pEEmin, pEEmax);
258 DrawEB(barrel, pEBmin, pEBmax);
260 DrawEE(endc_p, pEEmin, pEEmax);
263 canvas.SaveAs(ImageName.c_str());
274 EcalLaserAPDPNRatiosRefSummaryPlot():
279 bool fill(
const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs)
override {
280 auto iov=iovs.front();
281 std::shared_ptr <EcalLaserAPDPNRatiosRef> payload = fetchPayload(std::get<1> (iov));
282 unsigned int run=std::get<0> (iov);
288 align=
new TH2F(
"",
"", 0, 0, 0, 0, 0, 0);
291 float mean_x_EB=0.0f;
292 float mean_x_EE=0.0f;
301 payload->summary(mean_x_EB, rms_EB, num_x_EB, mean_x_EE, rms_EE, num_x_EE);
302 fillTableWithSummary(align,
"Ecal Laser APDPN Ratios Ref", mean_x_EB, rms_EB, num_x_EB, mean_x_EE, rms_EE, num_x_EE);
307 gStyle->SetPalette(1);
308 gStyle->SetOptStat(0);
309 TCanvas
canvas(
"CC map",
"CC map", 1000, 1000);
313 t1.SetTextSize(0.04);
315 t1.DrawLatex(0.5, 0.96,Form(
"Ecal Laser APDPN Ratios Ref Summary, IOV %i", run));
318 TPad* pad =
new TPad(
"pad",
"pad", 0.0, 0.0, 1.0, 0.94);
327 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)
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
void drawTable(int nbRows, int nbColumns)