32 setAttribute(Qt::WA_DeleteOnClose);
38 fHisto =
new TH1F(
"gaus1",
"Example of TH1 drawing in TCanvas", 100, -5, 5);
42 gPad = fxTCanvasWidget->getCanvas();
45 static constexpr int nth2points = 40;
46 fHisto2 = std::make_shared<TH2I>(
"gaus2",
"Example of TH2 drawing in RCanvas", nth2points, -5, 5, nth2points, -5, 5);
48 for (
int n=0;
n<nth2points;++
n) {
49 for (
int k=0;k<nth2points;++k) {
50 double x = 10.*
n/nth2points-5.;
51 double y = 10.*k/nth2points-5.;
68 auto viewer = fxGeomViewerWidget->getGeomViewer();
95 auto viewer = fxGeomViewerWidget->getGeomViewer();
117 viewer->SelectVolume(
"CMSE");
120 viewer->SetDrawOptions(
"clipxyz");
129 QMessageBox::information(
this,
"QtRoot standalone example",
"Demo how QRootCanvas can be inserted into the QWidget");
136 fxTabWidget->setCurrentIndex(3);
R__EXTERN TGeoManager * gGeoManager
Provides v7 drawing facilities for TObject types (TGraph etc).
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
The manager class for any TGeo geometry.
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
void CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
void DefaultColors()
Set default volume colors according to A of material.
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
Make in one step a volume pointing to a box shape with given medium.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
void SetNsegments(Int_t nseg)
Set number of segments for approximating circles in drawing.
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a tube segment shape with given medium.
Base class describing materials.
Media are used to store properties related to tracking and which are useful only when using geometry ...
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
void SetTransparency(Char_t transparency=0)
void InvisibleAll(Bool_t flag=kTRUE)
Make volume and each of it daughters (in)visible.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual void FillRandom(const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr)
Fill histogram following distribution in function fname.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculate a gaussian function with mean and sigma.