26 TH2*
MEGeom::_h =
new TH2F(
"globalEcal",
"Global representation of ECAL",
42 std::cout <<
"LM region=" << ilmr <<
" reg/sm/dcc/side " << ireg <<
"/" << ism <<
"/" << idcc <<
"/" << side << std::endl;
44 TString hname =
"LMR="; hname += ilmr; hname +=
" ";
57 hname +=
"DCC="; hname += idcc; hname +=
"/" ; hname += side;
67 rootfile = TFile::Open(
"ebgeom.root");
68 assert( rootfile!=0 );
88 rootfile = TFile::Open(
"eegeom_1.root");
90 if( ireg==
ME::iEEP ) rootfile = TFile::Open(
"eegeom_2.root");
91 assert( rootfile!=0 );
92 hn_=
"eem_S"; hn_+= isect;
105 h_ = (TH2*) rootfile->Get( hn_ );
106 h_->SetTitle( hname );
107 h_->GetXaxis()->SetTitle(
"ix");
108 h_->GetXaxis()->CenterTitle();
109 h_->GetYaxis()->SetTitle(
"iy");
110 h_->GetYaxis()->CenterTitle();
135 rootfile = TFile::Open(
"ebgeom.root");
136 assert( rootfile!=0 );
149 rootfile = TFile::Open(
"eegeom_1.root");
151 if( ireg==
ME::iEEP ) rootfile = TFile::Open(
"eegeom_2.root");
152 assert( rootfile!=0 );
158 case ME::iSector: gn_ =
"Sector_"; gn_+=isect;
break;
162 g_ = (TGraph*) rootfile->Get( gn_ );
170 TH2*
h = getHist( ilmr, histtype );
172 TString
tname = h->GetTitle();
187 TString cname =
tname;
188 cname.ReplaceAll(
" ",
"_");
189 canv =
new TCanvas( cname, cname, 10, 10, 500, 500 );
191 canv->SetTitle( tname );
198 gsect->SetLineWidth( 1 );
199 gsect->Draw(
"LSame");
202 gside->SetLineWidth( 2 );
203 gside->Draw(
"LSame");
209 TH2*
h = (TH2*)_h->Clone( name );
218 TAxis*
ax = h->GetXaxis();
219 TAxis* ay = h->GetYaxis();
220 assert( ax->GetNbins()==_nbinx && ay->GetNbins()==_nbiny );
221 assert( ax->GetXmax()==_xmax && ax->GetXmin()==_xmin );
222 assert( ay->GetXmax()==_ymax && ay->GetXmin()==_ymin );
231 assert(
abs(ieta)>=1 &&
abs(ieta)<=85 );
232 assert( iphi>=1 && iphi<=360 );
234 ibinx = ax->FindBin( ieta );
235 ibiny = ay->FindBin( iphi );
239 assert( ix>=1 && ix<=100 && iy>=1 && iy<=100 );
240 ibinx = (_nbuf+100+1)-ix;
241 ibiny = (_nbuf+180+50+1)-iy;
245 assert( ix>=1 && ix<=100 && iy>=1 && iy<=100 );
246 ibinx = _nbinx+1-((_nbuf+100+1)-ix);
247 ibiny = (_nbuf+180+50+1)-iy;
249 h->SetBinContent( ibinx, ibiny, val );
260 gr->SetLineWidth( 2 );
261 gr->SetLineColor( lineColor );
264 for(
int isec=1; isec<=9; isec++ )
267 TGraph* grm = (TGraph*) gr->Clone();
268 TGraph* grp = (TGraph*) gr->Clone();
274 gr->GetPoint(
ii, x_, y_ );
283 grm->SetPoint(
ii, xx_, yy_ );
288 grp->SetPoint(
ii, xx_, yy_ );
290 grm->SetLineColor( lineColor );
291 grm->SetLineWidth( 2 );
293 grp->SetLineColor( lineColor );
294 grp->SetLineWidth( 2 );
static void regionAndSector(int ilmr, int &ireg, int &isect, int &idcc, int &iside)
static void drawGlobalBoundaries(int lineColor)
static TString smName(int ism)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static char const * tname
static TH2 * getGlobalHist(const char *name=0)
static void drawHist(int ilmr, int unit, TCanvas *canv=0)
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)
int ism(int ieta, int iphi)