Go to the source code of this file.
|
int | DrawEveHisto (TH2 *histo, TGeoHMatrix *matrix, double max=-1., TEveCompound *comp=0) |
|
int DrawEveHisto |
( |
TH2 * |
histo, |
|
|
TGeoHMatrix * |
matrix, |
|
|
double |
max = -1. , |
|
|
TEveCompound * |
comp = 0 |
|
) |
| |
Definition at line 1 of file DrawEveHisto.C.
References Double_t, max(), t, x, and y.
Referenced by plotDC02AnalyzedData().
5 TEveBoxSet* q =
new TEveBoxSet(histo->GetTitle());
6 gStyle->SetPalette(1, 0);
10 TEveRGBAPalette* pal =
new TEveRGBAPalette(1, histo->GetMaximum());
12 TEveRGBAPalette* pal =
new TEveRGBAPalette(1,
max);
16 int histoSize = histo->GetNbinsX() * histo->GetNbinsY();
17 q->Reset(TEveBoxSet::kBT_AABoxFixedDim, kFALSE, histoSize);
22 double xoffset = histo->GetNbinsX()/2;
23 double yoffset = histo->GetNbinsY()/2;
24 for (Int_t
x=0;
x < histo->GetNbinsX();
x++) {
25 for (Int_t
y=0;
y < histo->GetNbinsY();
y++){
26 q->AddBox(
x-xoffset,
y-yoffset,0);
27 q->DigitValue(histo->GetBinContent(
x,
y));
32 TGeoHMatrix testMatrix = (*matrix);
34 testMatrix.SetScale(scale);
35 TEveTrans&
t = q->RefMainTrans();
36 t.SetFrom(testMatrix);
41 gEve->AddGlobalElement(q);
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)