Calorimeter detailed view by using TEveCaloDataVec as data-source.
Demonstrates how to plot calorimeter data with irregular bins.
#include "calorimeters.C"
void calo_detail()
{
auto data = MakeVecData(20);
data->IncDenyDestroy();
auto packH = slot->MakePack();
packH->SetElementName("Projections");
packH->SetHorizontal();
packH->SetShowTitleBar(
kFALSE);
slot = packH->NewSlot();
auto pack0 = slot->MakePack();
pack0->SetShowTitleBar(
kFALSE);
auto slotLeftTop = pack0->NewSlot();
auto slotLeftBottom = pack0->NewSlot();
slot = packH->NewSlot();
auto pack1 = slot->MakePack();
pack1->SetShowTitleBar(
kFALSE);
auto slotRightTop = pack1->NewSlot();
auto slotRightBottom = pack1->NewSlot();
TEveCalo3D *calo3d = MakeCalo3D(data, slotRightTop);
gEve->GetBrowser()->GetTabRight()->SetTab(1);
}
{
data->RefSliceInfo(0).Setup(
"ECAL", 0.3,
kRed);
data->RefSliceInfo(1).Setup(
"HCAL", 0.1,
kBlue);
auto ax =
h1->GetXaxis();
auto ay =
h1->GetYaxis();
Int_t xm = 1, xM = ax->GetNbins();
Int_t ym = 1, yM = ay->GetNbins();
if (ncells != 0) {
h1->GetMaximumBin(cx, cy, cz);
}
for (
Int_t i = xm; i <= xM; i += 2) {
for (
Int_t j = ym; j <= yM; j += 2) {
if ((i + j) % 3) {
} else {
2 * ay->GetBinWidth(j) + ay->GetBinLowEdge(j));
}
}
}
data->SetEtaBins(ax);
data->SetPhiBins(ay);
data->DataChanged();
return data;
}
int Int_t
Signed integer 4 bytes (int).
float Float_t
Float 4 bytes (float).
Visualization of a calorimeter event data in 2D.
Visualization of a calorimeter event data in 3D.
Calo data for universal cell geometry.
Visualization of calorimeter data as eta/phi histogram.
void SetMaxTowerH(Float_t x)
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
static TEveWindowSlot * CreateWindowInTab(TGTab *tab, TEveWindow *eve_parent=nullptr)
Create a new tab in a given tab-widget and populate it with a default window-slot.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
2-D histogram with a float per channel (see TH1 documentation)
Double_t GetBinContent(Int_t binx, Int_t biny) const override
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.