21 enum {kEBTotalTowers = 2448, kEETotalTowers = 1584};
30 EcalTPGWeightGroupPlot() :
cond::payloadInspector::PlotImage<
EcalTPGWeightGroup>(
"EcalTPGWeightGroup - map ") {
34 bool fill(
const std::vector<std::tuple<cond::Time_t,cond::Hash> >& iovs )
override{
41 TH2F*
barrel =
new TH2F(
"EB",
"EB Tower Status", 72, 0, 72, 34, -17, 17);
42 TH2F* endc_p =
new TH2F(
"EE+",
"EE+ Tower Status",22, 0, 22, 22, 0, 22);
43 TH2F* endc_m =
new TH2F(
"EE-",
"EE- Tower Status",22, 0, 22, 22, 0, 22);
45 auto iov = iovs.front();
47 unsigned int run = std::get<0>(iov);
55 for(it = map.begin() ; it != map.end() ; it++){
61 if(ttId_eb.subDet()==1){
63 int ieta = ttId_eb.ieta();
65 int iphi = ttId_eb.iphi() - 1;
67 if(minEB > (*it).second)
70 if(maxEB < (*it).second)
73 barrel->Fill(iphi, ieta,(*it).second);
83 int ix = ttId_ee.ix();
84 int iy = ttId_ee.iy();
85 int zside = ttId_ee.zside();
88 if(minEE > (*it).second)
91 if(maxEE < (*it).second)
95 endc_p->Fill(ix, iy, (*it).second);
97 endc_m->Fill(ix, iy, (*it).second);
108 TCanvas
canvas(
"CC map",
"CC map",800,800);
112 t1.SetTextSize(0.05);
113 t1.DrawLatex(0.5, 0.96, Form(
"Ecal TPG WeightGroup, IOV %i", run));
116 TPad* padb =
new TPad(
"padb",
"padb", 0., 0.45, 1., 0.9);
118 TPad* padem =
new TPad(
"padem",
"padem", 0., 0., 0.45, 0.45);
120 TPad* padep =
new TPad(
"padep",
"padep", 0.55, 0., 1., 0.45);
123 TLine*
l =
new TLine(0., 0., 0., 0.);
126 barrel->SetStats(
false);
127 barrel->SetMaximum(maxEB);
128 barrel->SetMinimum(minEB);
129 barrel->Draw(
"colz");
132 for(
int i = 0;
i <17;
i++) {
133 Double_t
x = 4.+ (
i * 4);
134 l =
new TLine(x, -17., x, 17.);
138 l =
new TLine(0., 0., 72., 0.);
151 canvas.SaveAs(ImageName.c_str());
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
std::map< uint32_t, uint32_t >::const_iterator EcalTPGGroupsMapItr
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
static EcalScDetId unhashIndex(int hi)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)=0
void DrawEE_Tower(TH2F *endc, TLine *l, double minScale, double maxScale)
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
void setSingleIov(bool flag)
static bool validHashIndex(int hi)
std::map< uint32_t, uint32_t > EcalTPGGroupsMap