27 "Global representation of ECAL",
44 std::cout <<
"LM region=" << ilmr <<
" reg/sm/dcc/side " << ireg <<
"/" << ism <<
"/" << idcc <<
"/" << side
47 TString hname =
"LMR=";
70 rootfile = TFile::Open(
"ebgeom.root");
71 assert(rootfile !=
nullptr);
102 rootfile = TFile::Open(
"eegeom_1.root");
105 rootfile = TFile::Open(
"eegeom_2.root");
106 assert(rootfile !=
nullptr);
132 h_ = (TH2*)rootfile->Get(hn_);
134 h_->GetXaxis()->SetTitle(
"ix");
135 h_->GetXaxis()->CenterTitle();
136 h_->GetYaxis()->SetTitle(
"iy");
137 h_->GetYaxis()->CenterTitle();
159 rootfile = TFile::Open(
"ebgeom.root");
160 assert(rootfile !=
nullptr);
174 rootfile = TFile::Open(
"eegeom_1.root");
177 rootfile = TFile::Open(
"eegeom_2.root");
178 assert(rootfile !=
nullptr);
195 g_ = (TGraph*)rootfile->Get(gn_);
200 TH2*
h = getHist(ilmr, histtype);
201 assert(h !=
nullptr);
202 TString
tname = h->GetTitle();
207 tname +=
" Monitoring Regions";
210 tname +=
" Monitoring Modules";
213 tname +=
" Super Crystals";
216 tname +=
" Crystals";
219 tname +=
" Electronic Channels";
222 tname +=
" HV Channels";
225 tname +=
" LV Channels";
229 if (canv ==
nullptr) {
230 TString cname =
tname;
231 cname.ReplaceAll(
" ",
"_");
232 canv =
new TCanvas(cname, cname, 10, 10, 500, 500);
234 canv->SetTitle(tname);
240 assert(gsect !=
nullptr);
241 gsect->SetLineWidth(1);
242 gsect->Draw(
"LSame");
244 assert(gside !=
nullptr);
245 gside->SetLineWidth(2);
246 gside->Draw(
"LSame");
250 TH2*
h = (TH2*)_h->Clone(name);
257 TAxis* ax = h->GetXaxis();
258 TAxis* ay = h->GetYaxis();
259 assert(ax->GetNbins() == _nbinx && ay->GetNbins() == _nbiny);
260 assert(ax->GetXmax() == _xmax && ax->GetXmin() == _xmin);
261 assert(ay->GetXmax() == _ymax && ay->GetXmin() == _ymin);
269 assert(
abs(ieta) >= 1 &&
abs(ieta) <= 85);
270 assert(iphi >= 1 && iphi <= 360);
272 ibinx = ax->FindBin(ieta);
273 ibiny = ay->FindBin(iphi);
274 }
else if (iz == -1) {
275 assert(ix >= 1 && ix <= 100 && iy >= 1 && iy <= 100);
276 ibinx = (_nbuf + 100 + 1) - ix;
277 ibiny = (_nbuf + 180 + 50 + 1) - iy;
278 }
else if (iz == 1) {
279 assert(ix >= 1 && ix <= 100 && iy >= 1 && iy <= 100);
280 ibinx = _nbinx + 1 - ((_nbuf + 100 + 1) - ix);
281 ibiny = (_nbuf + 180 + 50 + 1) - iy;
283 h->SetBinContent(ibinx, ibiny, val);
292 gr->SetLineColor(lineColor);
295 for (
int isec = 1; isec <= 9; isec++) {
297 TGraph* grm = (TGraph*)gr->Clone();
298 TGraph* grp = (TGraph*)gr->Clone();
301 for (
int ii = 0;
ii <
n;
ii++) {
303 gr->GetPoint(
ii, x_, y_);
312 grm->SetPoint(
ii, xx_, yy_);
317 grp->SetPoint(
ii, xx_, yy_);
319 grm->SetLineColor(lineColor);
320 grm->SetLineWidth(2);
322 grp->SetLineColor(lineColor);
323 grp->SetLineWidth(2);
static void drawHist(int ilmr, int unit, TCanvas *canv=nullptr)
static void regionAndSector(int ilmr, int &ireg, int &isect, int &idcc, int &iside)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void drawGlobalBoundaries(int lineColor)
static TString smName(int ism)
static char const * tname
static TH2 * getHist(int ilmr, int unit)
static TGraph * getBoundary(int ilmr, int unit)
static void setBinGlobalHist(TH2 *h, int ix, int iy, int iz, float val)
static TString smName(int ism)
static TGraph * getGraphBoundary(int type, int num, bool global=false)
Abs< T >::type abs(const T &t)
static TGraph * getGraphBoundary(int type, int num, int iz=-1, int xside=0)
static TH2 * getGlobalHist(const char *name=nullptr)
int ism(int ieta, int iphi)
Basic3DVector unit() const