36 setAttribute(Qt::WA_DeleteOnClose);
42 fHisto =
new TH1F(
"gaus1",
"Example of TH1 drawing in TCanvas", 100, -5, 5);
46 gPad = fxTCanvasWidget->getCanvas();
49 static constexpr int nth2points = 40;
50 fHisto2 = std::make_shared<TH2I>(
"gaus2",
"Example of TH2 drawing in RCanvas", nth2points, -5, 5, nth2points, -5, 5);
52 for (
int n=0;
n<nth2points;++
n) {
53 for (
int k=0;k<nth2points;++k) {
54 double x = 10.*
n/nth2points-5.;
55 double y = 10.*k/nth2points-5.;
72 auto viewer = fxGeomViewerWidget->getGeomViewer();
99 auto viewer = fxGeomViewerWidget->getGeomViewer();
121 viewer->SelectVolume(
"CMSE");
124 viewer->SetDrawOptions(
"clipxyz");
186 R->AddNode(bar1, 1, tr1);
189 R->AddNode(bar2, 1, tr2);
190 R->AddNode(bar2, 2, tr3);
193 R->AddNode(tub1, 1, tr4);
224 T->AddNode(bar5, 1, tr8);
227 T->AddNode(bar6, 1, tr9);
242 auto canv = fxTCanvasWidget->getCanvas();
245 canv->GetListOfPrimitives()->Add(geom,
"");
251 for (
int n=0;
n<21;
n++)
259 canv->GetListOfPrimitives()->Add(pm,
"");
273 canv->GetListOfPrimitives()->Add(pl,
"");
281 QMessageBox::information(
this,
"QtRoot standalone example",
"Demo how QRootCanvas can be inserted into the QWidget");
287 if (fxTabWidget->count() > 3) {
289 fxTabWidget->setCurrentIndex(3);
297 auto widget = fxTabWidget->widget(3);
298 fxTabWidget->removeTab(3);
301 fxTabWidget->setCurrentIndex(2);
303 fxTabWidget->setCurrentIndex(2);
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
Provides v7 drawing facilities for TObject types (TGraph, TH1, TH2, etc).
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
An arbitrary trapezoid with less than 8 vertices standing on two parallel planes perpendicular to Z a...
virtual void SetVertex(Int_t vnum, Double_t x, Double_t y)
Set values for a given vertex.
Class describing rotation + translation.
The manager class for any TGeo geometry.
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=0)
Make an TGeoArb8 volume.
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 ...
Class describing rotations.
Class describing translations.
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)
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
void InvisibleAll(Bool_t flag=kTRUE)
Make volume and each of it daughters (in)visible.
TGeoShape * GetShape() const
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 a 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.
A 3-dimensional polyline.
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
Set point n to x, y, z.
void SetPoint(Int_t n, Double_t x, Double_t y, Double_t z)
Set point n to x, y, z.
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.