64 if (manager) fGeoManager = manager;
66 Error(
"ctor",
"No geometry loaded");
69 fNsegments = fGeoManager->GetNsegments();
75 fVisLevel = fGeoManager->GetVisLevel();
76 fVisOption = fGeoManager->GetVisOption();
77 fExplodedView = fGeoManager->GetBombMode();
83 fPaintingOverlaps =
kFALSE;
93 memset(&fCheckedBox[0], 0, 6*
sizeof(
Double_t));
95 fCheckedNode = fGeoManager->GetTopNode();
117 gSize3D.numPoints += numpoints;
134 static Int_t npoints = 0;
140 memset(xmin, 0, 3*
sizeof(
Double_t));
141 memset(xmax, 0, 3*
sizeof(
Double_t));
146 for (i=0; i<3; i++) xmin[i]=xmax[i]=0;
151 for (i=0; i<3; i++) {
152 box[i] += ninv*(point[i]-box[i]);
153 if (point[i]<xmin[i]) xmin[i]=point[i];
154 if (point[i]>xmax[i]) xmax[i]=point[i];
155 box[i+3] = 0.5*(xmax[i]-xmin[i]);
164 memcpy(bombtr, tr, 3*
sizeof(
Double_t));
281 for (i=1; i<8; i++) {
284 Warning(
"DefineColors",
"No colors defined");
288 for (j=0; j<100; j++) {
291 new TColor(1000+(i-1)*100+j, r,g,b);
301 const Int_t kBCols[8] = {1,2,3,5,4,6,7,1};
303 if (!tcolor) tcolor =
new TColor(base, 0.5,0.5,0.5);
307 if (r>0.5) code += 1;
308 if (g>0.5) code += 2;
309 if (b>0.5) code += 4;
316 else j =
Int_t(99*(light-0.25)/0.5);
318 color = 1000 + (kBCols[code]-1)*100+j;
336 const Int_t big = 9999;
337 const Int_t inaxis = 7;
338 const Int_t maxdist = 5;
342 if (!view)
return big;
352 if (px < puxmin - inaxis)
return big;
353 if (py > puymin + inaxis)
return big;
354 if (px > puxmax + inaxis)
return big;
355 if (py < puymax - inaxis)
return big;
358 gPad->SetSelected(view);
368 gPad->SetSelected(crt);
380 gPad->SetSelected(crt);
391 if ((puxmax+inaxis-px) < 40) {
392 if ((py-puymax+inaxis) < 40) {
404 gPad->SetSelected(volume);
432 else gPad->SetSelected(vol);
450 gPad->SetSelected(vol);
470 while ((daughter=
next())) {
485 else gPad->SetSelected(vol);
509 else gPad->SetSelected(vol);
533 view->
SetView(-206,126,75,irep);
546 vol->
SetLineColor(vol->GetMaterial()->GetDefaultColor());
578 while ((daughter=
next())) {
584 if (vis && level<=rlevel) count++;
592 if (vis && last) count++;
594 if (last) next.
Skip();
609 if (maxnodes <= 0 && top) {
623 for (
Int_t level = 1;level<20;level++) {
631 if (nnodes > maxnodes) {
653 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TGeoManagerEditor"))) {
667 if (!option[0])
gPad->GetCanvas()->GetCanvasImp()->ShowEditor();
697 if (autorange) tlo = 0.;
701 for (i=0; i<ncoeff; i++) {
704 if (i < ncoeff-1) formula +=
"+";
705 if (lambda < lambdamin &&
706 lambda > 0.) lambdamin = lambda;
708 if (autorange) thi = 10./lambdamin;
730 Error(
"DrawPolygon",
"No vertices defined");
740 g1->
SetTitle(
Form(
"Polygon with %d vertices (outscribed %d)",nvert, nconv));
756 g2 =
new TGraph(nconv+1, xc,yc);
766 gROOT->MakeDefCanvas();
769 if (g2) g2->
Draw(
"LP");
795 gROOT->MakeDefCanvas();
808 if (has_pad)
gPad->Update();
820 gPad->GetViewer3D(option);
837 gROOT->MakeDefCanvas();
850 if (has_pad)
gPad->Update();
856 gPad->GetViewer3D(option);
867 if (!overlap)
return;
879 gROOT->MakeDefCanvas();
887 gPad->GetViewer3D(option);
896 if (has_pad)
gPad->Update();
922 gROOT->MakeDefCanvas();
937 if (has_pad)
gPad->Update();
952 if (!
gPad->GetView())
return;
993 while ((obj=
next())) {
994 if (strcmp(obj->
ClassName(),
"TGeoTrack"))
continue;
997 track->PaintCollect(tmin, start);
1000 if (!ntracks)
return;
1003 while ((obj=
next())) {
1004 if (strcmp(obj->
ClassName(),
"TGeoTrack"))
continue;
1006 if (!track)
continue;
1007 track->PaintCollect(tmax, end);
1089 if (!
gPad)
return info;
1092 info =
"wrong overlapping flag";
1097 else ovtype =
"OVERLAP";
1147 Int_t nframes = nfr;
1150 if (nvols<1500) nframes=10;
1151 if (nvols<1000) nframes=20;
1152 if (nvols<200) nframes = 50;
1153 if (nvols<100) nframes = 100;
1165 return fChecker->
LegoPlot(ntheta, themin, themax, nphi, phimin, phimax, rmin, rmax, option);
1172 for (
Int_t i=0; i<3; i++)
1173 master[i] = -local[0]*
fMat[i]-local[1]*
fMat[i+3]-local[2]*
fMat[i+6];
1200 if (
gPad) is_padviewer = (!strcmp(
gPad->GetViewer3D()->ClassName(),
"TViewer3DPad"))?
kTRUE:
kFALSE;
1217 for (inode=0; inode<nnodes; inode++) {
1237 if (!overlap)
return;
1238 Int_t color, transparency;
1257 if (!strstr(option,
"range")) ((
TAttLine*)vol)->Modify();
1270 if (!strstr(option,
"range")) ((
TAttLine*)vol)->Modify();
1305 Int_t transparency = 0;
1308 if (!strstr(option,
"range")) ((
TAttLine*)vol)->Modify();
1323 if (!strstr(option,
"range")) ((
TAttLine*)vol)->Modify();
1363 Int_t line_color=0, line_width=0, line_style=0;
1364 while ((daughter=
next())) {
1370 drawDaughters =
kTRUE;
1380 if (!strstr(option,
"range")) ((
TAttLine*)vol)->Modify();
1415 if (!strstr(option,
"range")) ((
TAttLine*)vol)->Modify();
1454 return addDaughters;
1472 viewer->
AddObject(buffer, &addDaughters);
1489 return addDaughters;
1510 Int_t i, col, wid, sty;
1540 for (i=1;i<=level; i++) {
1604 if (!
gPad ||
gPad->IsBatch())
return;
1624 fMat[0] = c1*c3 - s1*c2*s3;
1625 fMat[1] = c1*s3 + s1*c2*
c3;
1628 fMat[3] = -s1*c3 - c1*c2*s3;
1629 fMat[4] = -s1*s3 + c1*c2*
c3;
1645 for (i=0; i<3; i++) cov[i] = 0.5*(min[i]+max[i]);
1647 for (i=0; i<3; i++) cop[i] = cov[i] - dir[i]*dview;
1654 Int_t pxmin,pxmax, pymin,pymax;
1655 pxmin =
gPad->UtoAbsPixel(0);
1656 pxmax =
gPad->UtoAbsPixel(1);
1657 pymin =
gPad->VtoAbsPixel(1);
1658 pymax =
gPad->VtoAbsPixel(0);
1669 tosource[2] = -dir[2];
1673 Int_t base_color, color;
1679 Int_t ntotal = pxmax*pymax;
1683 for (px=pxmin; px<pxmax; px++) {
1684 for (py=pymin; py<pymax; py++) {
1690 xloc =
gPad->AbsPixeltoX(pxmin+pxmax-px);
1692 yloc =
gPad->AbsPixeltoY(pymin+pymax-py);
1694 modloc =
TMath::Sqrt(xloc*xloc+yloc*yloc+dproj*dproj);
1695 local[0] = xloc/modloc;
1696 local[1] = yloc/modloc;
1697 local[2] = dproj/modloc;
1720 if (stemin>1E10)
break;
1753 if (step>1E10)
break;
1758 if (steptot>stemax) {
1772 if (!nextnode)
continue;
1781 if (!done)
continue;
1785 if (!norm)
continue;
1786 calf = norm[0]*tosource[0]+norm[1]*tosource[1]+norm[2]*tosource[2];
1788 color =
GetColor(base_color, light);
1829 if ((ibomb<0) || (ibomb>3)) {
1830 Warning(
"SetExplodedView",
"exploded view can be 0-3");
1858 Warning(
"SetNsegments",
"number of segments should be > 2");
1897 if (
gPad->GetView()) {
1921 Warning(
"SetVisOption",
"wrong visualization option");
1965 const Int_t inaxis = 7;
1966 const Int_t maxdist = 5;
1967 const Int_t big = 9999;
1971 if (!(numpoints && view))
return dist;
1980 if (px < puxmin - inaxis)
return big;
1981 if (py > puymin + inaxis)
return big;
1982 if (px > puxmax + inaxis)
return big;
1983 if (py < puymax - inaxis)
return big;
1984 if ((puxmax+inaxis-px) < 40) {
1997 for (
Int_t i=0; i<numpoints; i++) {
2000 points[j]=dmaster[0]; points[j+1]=dmaster[1]; points[j+2]=dmaster[2];
2001 view->
WCtoNDC(&points[j], xndc);
2002 x1 =
gPad->XtoAbsPixel(xndc[0]);
2003 y1 =
gPad->YtoAbsPixel(xndc[1]);
2004 dpoint2 = (px-
x1)*(px-x1) + (py-y1)*(py-y1);
2005 if (dpoint2 < dist) dist=(
Int_t)dpoint2;
2007 if (dist > 100)
return dist;
2042 memcpy(bombtr, tr, 3*
sizeof(
Double_t));
Bool_t IsVisLeaves() const
virtual Int_t ShapeDistancetoPrimitive(const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py) const
Returns distance between point px,py on the pad an a shape.
virtual void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const
Geometry checking method (see TGeoChecker).
virtual Bool_t IsExplodedView() const
virtual Style_t GetLineStyle() const
virtual void SetLineWidth(Width_t lwidth)
void TestOverlaps(const char *path)
— Geometry overlap checker based on sampling.
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual void Test(Int_t npoints, Option_t *option)
Check time of finding "Where am I" for n points.
virtual void SetCheckedNode(TGeoNode *node)
Select a node to be checked for overlaps.
virtual TVirtualGeoTrack * AddTrack(Int_t id, Int_t pdgcode, TObject *part)
Create a primary TGeoTrack.
Bool_t IsVolAttributes() const
TGeoNode * InitTrack(const Double_t *point, const Double_t *dir)
Initialize current point and current direction vector (normalized) in MARS.
void ResetAttBit(UInt_t f)
TGeoShape * fClippingShape
virtual void SetBombFactors(Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3, Double_t bombr=1.3)
— Set cartesian and radial bomb factors for translations
void DoRestoreState()
Restore a backed-up state without affecting the cache stack.
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
Bool_t IsRaytracing() const
Check if the painter is currently ray-tracing the content of this volume.
virtual void Raytrace(Option_t *option="")
Raytrace current drawn geometry.
ClassImp(TGeoPainter) TGeoPainter
*-*-*-*-*-*-*-*-*-*-*Geometry painter default constructor*-*-*-*-*-*-*-*-* *-* ======================...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void SetCurrentDirection(Double_t *dir)
TGeoVolume * GetVolume() const
TGeoHMatrix * GetSecondMatrix() const
void SetUserPlugin(TGeoIteratorPlugin *plugin)
Set a plugin.
TGeoVolume * GetSecondVolume() const
virtual void RandomPoints(const TGeoVolume *vol, Int_t npoints, Option_t *option="")
Draw random points in the bounding box of a volume.
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)=0
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
TGeoHMatrix * GetMatrix(Int_t level=-1) const
Return global matrix for node at LEVEL.
virtual void CheckBoundaryReference(Int_t icheck=-1)
Check the boundary errors reference file created by CheckBoundaryErrors method.
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
virtual void Clear(Option_t *option="")
Remove all objects from the array.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)=0
Computes distance from point (px,py) to the object.
virtual void DrawPolygon(const TGeoPolygon *poly)
Draw a polygon in 3D.
Double_t Concentration(Double_t time) const
Find concentration of the element at a given time.
virtual void Paint(Option_t *option="")
Paint current geometry according to option.
virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py)
Execute mouse actions on a given volume.
void PrintOverlaps() const
Print the current list of overlaps held by the manager class.
virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py)
compute the closest distance of approach from point px,py to a volume
void CdUp()
Go one level up in geometry.
virtual void ProcessNode()=0
virtual void DrawOverlap(void *ovlp, Option_t *option="")
Draw an overlap.
virtual Double_t GetLatitude()=0
virtual void DrawPath(const char *path, Option_t *option="")
Draw all volumes for a given path.
virtual void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.)
Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNe...
virtual Bool_t PaintComposite(Option_t *option="") const
Paint this composite shape into the current 3D viewer Returns bool flag indicating if the caller shou...
virtual void SetAutoRange(Bool_t autorange=kTRUE)=0
virtual void PaintOverlap(void *ovlp, Option_t *option="")
Paint an overlap.
virtual void ClearVisibleVolumes()
Clear the list of visible volumes reset the kVisOnScreen bit for volumes previously in the list...
virtual void AddTrackPoint(Double_t *point, Double_t *box, Bool_t reset=kFALSE)
Average center of view of all painted tracklets and compute view box.
TH2F * LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180., Int_t nphi=90, Double_t phimin=0., Double_t phimax=360., Double_t rmin=0., Double_t rmax=9999999, Option_t *option="")
Generate a lego plot fot the top volume, according to option.
void Skip()
Stop iterating the current branch.
void GetVertices(Double_t *x, Double_t *y) const
Fill list of vertices into provided arrays.
virtual void SetTopVisible(Bool_t vis=kTRUE)
Set top geometry volume as visible.
void SetSelectedNode(TGeoNode *node)
TGeoHMatrix * GetCurrentMatrix() const
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
Int_t LoadPlugin()
Load the plugin library for this handler.
void ToLower()
Change string to lower-case.
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
virtual void SetTitle(const char *title="")
Set graph title.
virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option="")
Draw the time evolution of a radionuclide.
virtual Double_t GetDY() const
Bool_t IsVisDaughters() const
Int_t GetEntriesFast() const
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum value along Y for this function In case the function is already drawn, set also the minimum in the helper histogram.
virtual void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)
Test for shape navigation methods.
virtual void Modify()
Change current line attributes if necessary.
Bool_t IsReflection() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Long_t ExecPlugin(int nargs, const T &...params)
virtual Double_t GetDZ() const
virtual void SetPerspective()=0
virtual void UnbombTranslation(const Double_t *tr, Double_t *bombtr)
get the new 'unbombed' translation vector according current exploded view mode
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
Int_t GetNdaughters() const
void LocalToMasterVect(const Double_t *local, Double_t *master) const
Convert a local vector according view rotation matrix.
virtual void CheckGeometryFull(Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000, const Double_t *vertex=NULL)
Geometry checking method (see: TGeoManager::CheckGeometry())
virtual void AddSize3D(Int_t numpoints, Int_t numsegs, Int_t numpolys)
— Add numpoints, numsegs, numpolys to the global 3D size.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Int_t PushPath(Int_t startlevel=0)
const char * Data() const
void SetVisRaytrace(Bool_t flag=kTRUE)
virtual Double_t GetPsi()=0
virtual Bool_t Contains(const Double_t *point) const =0
virtual void OpProgress(const char *opname, Long64_t current, Long64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE, const char *msg="")
Text progress bar.
void Stop()
Stop the stopwatch.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual Int_t GetColor(Int_t base, Float_t light) const
Get index of a base color with given light intensity (0,1)
virtual void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="")
check current point in the geometry
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMatrix *global=0)
Paint recursively a node and its content accordind to visualization options.
void CheckOverlaps(const TGeoVolume *vol, Double_t ovlp=0.1, Option_t *option="")
Check illegal overlaps for volume VOL within a limit OVLP.
virtual void DrawVolume(TGeoVolume *vol, Option_t *option="")
Draw method.
void SetCurrentPoint(Double_t *point)
virtual void GetViewAngles(Double_t &longitude, Double_t &latitude, Double_t &psi)
Get the current view angles.
TGeoNode * GetTopNode() const
Bool_t IsVisDaughters() const
void LocalToMaster(const Double_t *local, Double_t *master) const
void SetMatrixReflection(Bool_t flag=kTRUE)
virtual void SetNmeshPoints(Int_t npoints)
Set number of points to be generated on the shape outline when checking for overlaps.
Int_t GetVisLevel() const
Returns current depth to which geometry is drawn.
virtual void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz, const char *target_vol=0, Bool_t check_norm=kFALSE)
Shoot nrays in the current drawn geometry.
void GetPath(TString &path) const
Returns the path for the current node.
virtual Double_t GetDview() const =0
virtual void SetMarkerColor(Color_t mcolor=1)
void SetTopName(const char *name)
Set the top name for path.
Bool_t IsExtrusion() const
void Test(Int_t npoints, Option_t *option)
Check time of finding "Where am I" for n points.
virtual void DrawCurrentPoint(Int_t color)
Draw current point in the same view.
virtual const char * GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int_t py) const
Get some info about the current selected volume.
Abstract 3D shapes viewer.
void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz, const char *target_vol=0, Bool_t check_norm=kFALSE)
Randomly shoot nrays from point (startx,starty,startz) and plot intersections with surfaces for curre...
void SetOutside(Bool_t flag=kTRUE)
TGeoNode * GetCurrentNode() const
void SetNmeshPoints(Int_t npoints=1000)
Set number of points to be generated on the shape outline when checking for overlaps.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TGeoVolume * GetTopVolume() const
static void SetTransform(TGeoMatrix *matrix)
Set current transformation matrix that applies to shape.
void GetConvexVertices(Double_t *x, Double_t *y) const
Fill list of vertices of the convex outscribed polygon into provided arrays.
void Error(const char *location, const char *msgfmt,...)
virtual void TestOverlaps(const char *path)
— Geometry overlap checker based on sampling.
virtual void SetPoints(Double_t *points) const =0
virtual void PrintOverlaps() const
Print overlaps (see TGeoChecker::PrintOverlaps())
virtual const Double_t * GetOrigin() const
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)=0
virtual void GrabFocus(Int_t nfr=0, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0)
Move focus to current volume.
Int_t GetMaxVisNodes() const
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Bool_t IsOnScreen() const
check if this node is drawn. Assumes that this node is current
TObject * UncheckedAt(Int_t i) const
TObjArray * GetListOfVolumes() const
virtual void SetLineColor(Color_t lcolor)
const TGeoMatrix * GetCurrentMatrix() const
Returns global matrix for current node.
static void HLS2RGB(Float_t h, Float_t l, Float_t s, Float_t &r, Float_t &g, Float_t &b)
Static method to compute RGB from HLS.
virtual Double_t Weight(Double_t precision, Option_t *option="v")
Compute weight [kg] of the current volume.
virtual Double_t GetDX() const
const Double_t * GetCurrentPoint() const
virtual Size_t GetMarkerSize() const
void GetCoeff(Int_t i, Double_t &cn, Double_t &lambda) const
virtual void DrawOnly(Option_t *option="")
Draw only one volume.
Bool_t TestVoxels(TGeoVolume *vol, Int_t npoints=1000000)
Returns optimal voxelization type for volume vol.
virtual void PaintVolume(TGeoVolume *vol, Option_t *option="", TGeoMatrix *global=0)
Paint recursively a node and its content accordind to visualization options.
TGeoChecker * GetChecker()
Create/return geometry checker.
virtual void EditGeometry(Option_t *option="")
Start the geometry editor.
void Clear(Option_t *option="")
clear the data for this matrix
virtual void DefaultColors()
Set default volume colors according to tracking media.
TGeoNode * Step(Bool_t is_geom=kTRUE, Bool_t cross=kTRUE)
Make a rectiliniar step of length fStep from current point (fPoint) on current direction (fDirection)...
TGeoNode * FindNextBoundaryAndStep(Double_t stepmax=TGeoShape::Big(), Bool_t compsafe=kFALSE)
Compute distance to next boundary within STEPMAX.
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
virtual void Draw(Option_t *option="")
Draw method.
virtual TGeoNode * SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path)
shoot npoints randomly in a box of 1E-5 arround current point.
2-D histogram with a float per channel (see TH1 documentation)}
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void SetStep(Double_t step)
virtual void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.)
Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNe...
TGeoVolume * GetVolume(Int_t level=-1) const
Return volume associated with node at LEVEL in the branch.
Double_t * FindNormalFast()
Computes fast normal to next crossed boundary, assuming that the current point is close enough to the...
virtual Double_t GetDproj() const =0
void RandomPoints(TGeoVolume *vol, Int_t npoints, Option_t *option)
Draw random points in the bounding box of a volume.
static void ShowEditor()
Show the global pad editor. Static method.
void SetTransparency(Char_t transparency=0)
virtual void CheckBoundaryReference(Int_t icheck=-1)
Check the boundary errors reference file created by CheckBoundaryErrors method.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
virtual void CheckOverlaps(const TGeoVolume *vol, Double_t ovlp=0.1, Option_t *option="") const
Check overlaps for the top volume of the geometry, within a limit OVLP.
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
Bool_t IsDrawingExtra() const
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
char * Form(const char *fmt,...)
TGeoNode * GetMother(Int_t up=1) const
virtual void DefaultAngles()
Set default angles for the current view.
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
Generic 3D primitive description class.
virtual void SetVisLevel(Int_t level=3)
Set default level down to which visualization is performed.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t TestVoxels(TGeoVolume *vol)
Check voxels efficiency per volume.
virtual void SetMarkerStyle(Style_t mstyle=1)
Double_t GetOverlap() const
virtual void SetExplodedView(Int_t iopt=0)
set type of exploding view
Bool_t PaintShape(const TGeoShape &shape, Option_t *option) const
Paint the supplied shape into the current 3D viewer.
void DefineColors() const
Define 100 colors with increasing light intensities for each basic color (1-7) Register these colors ...
void SetIterator(const TGeoIterator *iter)
Int_t CountNodes(TGeoVolume *vol, Int_t level) const
Count number of visible nodes down to a given level.
virtual Color_t GetLineColor() const
virtual void EstimateCameraMove(Double_t tmin, Double_t tmax, Double_t *start, Double_t *end)
Estimate camera movement between tmin and tmax for best track display.
Bool_t IsVisBranch() const
Bool_t TestAttBit(UInt_t f) const
virtual void Draw(Option_t *option="")
Draws 3-D polymarker with its current attributes.
virtual void SetMarkerSize(Size_t msize=1)
virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const =0
virtual Double_t GetLongitude()=0
virtual void SetVisOption(Int_t option=0)
set drawing mode : option=0 (default) all nodes drawn down to vislevel option=1 leaves and nodes at v...
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum value along Y for this function In case the function is already drawn, set also the maximum in the helper histogram.
virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const =0
virtual void SetTitle(const char *title="")
Set function title if title has the form "fffffff;xxxx;yyyy", it is assumed that the function title i...
virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z)
Set point following LastPoint to x, y, z.
virtual Bool_t cd(const char *path="")
Browse the tree of nodes starting from fTopNode according to pathname.
void CheckEdit()
Check if Ged library is loaded and load geometry editor classe.
virtual void MoveFocus(Double_t *center, Double_t dx, Double_t dy, Double_t dz, Int_t nsteps=10, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0)=0
virtual void GetWindow(Double_t &u0, Double_t &v0, Double_t &du, Double_t &dv) const =0
void OpProgress(const char *opname, Long64_t current, Long64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE, const char *msg="")
Print current operation progress.
virtual Bool_t PreferLocalFrame() const =0
TGeoShape * GetShape() const
static const double x1[5]
void PaintPhysicalNode(TGeoPhysicalNode *node, Option_t *option="")
Paints a physical node associated with a path.
virtual void GetHLS(Float_t &h, Float_t &l, Float_t &s) const
void DoBackupState()
Backup the current state without affecting the cache stack.
Bool_t IsNodeSelectable() const
R__EXTERN TGeoManager * gGeoManager
TGeoHMatrix * GetFirstMatrix() const
virtual Int_t CountVisibleNodes()
Count total number of visible nodes.
virtual void ModifiedPad(Bool_t update=kFALSE) const
Check if a pad and view are present and send signal "Modified" to pad.
Bool_t IsVisContainers() const
virtual Bool_t IsComposite() const
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual ~TGeoPainter()
*-*-*-*-*-*-*-*-*-*-*Geometry painter default destructor*-*-*-*-*-*-*-*-* *-* =======================...
void SetPaintVolume(TGeoVolume *vol)
void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)
Test for shape navigation methods.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void CdTop()
Make top level node the current node.
void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="")
— Draw point (x,y,z) over the picture of the daughers of the volume containing this point...
double func(double *x, double *p)
TGeoVolume * GetCurrentVolume() const
void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const
Shoot nrays with random directions from starting point (startx, starty, startz) in the reference fram...
TObjArray * GetListOfPhysicalNodes()
The color creation and management class.
TGeoIteratorPlugin * fPlugin
TGeoElementRN * GetElement() const
TH2F * LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180., Int_t nphi=90, Double_t phimin=0., Double_t phimax=360., Double_t rmin=0., Double_t rmax=9999999, Option_t *option="")
Generate a lego plot fot the top volume, according to option.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual void SetLineStyle(Style_t lstyle)
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
virtual void SetLineColor(Color_t lcolor)
Set the line color.
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, Int_t px, Int_t py)
Execute mouse actions on a given volume.
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
Mother of all ROOT objects.
Double_t Weight(Double_t precision=0.01, Option_t *option="v")
Estimate weight of top level volume with a precision SIGMA(W)/W better than PRECISION.
TGeoNode * SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path)
shoot npoints randomly in a box of 1E-5 arround current point.
void CheckGeometryFull(Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000, const Double_t *vertex=NULL)
Geometry checking.
TPolyMarker3D * GetPolyMarker() const
static void SetPainter(const TVirtualGeoPainter *painter)
Static function to set an alternative histogram painter.
virtual Color_t GetMarkerColor() const
virtual TGeoVolume * GetDrawnVolume() const
Get currently drawn volume.
virtual void DrawShape(TGeoShape *shape, Option_t *option="")
Draw a shape.
Short_t Max(Short_t a, Short_t b)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Bool_t IsVisible() const
virtual void GetRange(Float_t *min, Float_t *max)=0
A Graph is a graphics object made of two arrays X and Y with npoints each.
virtual void SetViewChanged(Bool_t flag=kTRUE)=0
virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_t px, Int_t py)
Execute mouse actions on a given shape.
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Stub implementation to avoid forcing implementation at this stage.
Char_t GetTransparency() const
virtual void BombTranslation(const Double_t *tr, Double_t *bombtr)
get the new 'bombed' translation vector according current exploded view mode
TGeoVolume * GetFirstVolume() const
Double_t Sqrt(Double_t x)
void GetRange(Double_t &tmin, Double_t &tmax) const
TGeoManager * fGeoManager
virtual Style_t GetMarkerStyle() const
virtual Width_t GetLineWidth() const
virtual void SetNsegments(Int_t nseg=20)
Set number of segments to approximate circles.
double norm(double *x, double *p)
Bool_t IsVisibleFull() const
Int_t GetNdaughters() const
virtual Bool_t IsPerspective() const =0
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.