10 #ifndef ROOT_TGeoPainter
11 #define ROOT_TGeoPainter
32 class TVirtualGeoTrack;
33 class TGeoPhysicalNode;
40 class TGeoPainter :
public TVirtualGeoPainter {
46 Double_t fCheckedBox[6];
55 Bool_t fPaintingOverlaps;
57 Bool_t fIsPaintingShape;
60 TGeoNode *fCheckedNode;
61 TGeoOverlap *fOverlap;
64 TGeoManager *fGeoManager;
65 TGeoChecker *fChecker;
66 TGeoShape *fClippingShape;
67 TGeoVolume *fTopVolume;
68 TGeoVolume *fLastVolume;
71 TObjArray *fVisVolumes;
74 void DefineColors()
const;
75 void LocalToMasterVect(
const Double_t *local, Double_t *master)
const;
78 virtual void ClearVisibleVolumes();
81 TGeoPainter(TGeoManager *manager);
82 virtual ~TGeoPainter();
83 virtual void AddSize3D(Int_t numpoints, Int_t numsegs, Int_t numpolys);
84 virtual TVirtualGeoTrack *AddTrack(Int_t
id, Int_t pdgcode, TObject *part);
85 virtual void AddTrackPoint(Double_t *point, Double_t *box, Bool_t reset=kFALSE);
86 virtual void BombTranslation(
const Double_t *tr, Double_t *bombtr);
87 virtual void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.);
88 virtual void CheckBoundaryReference(Int_t icheck=-1);
89 virtual void CheckGeometryFull(Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000,
const Double_t *vertex=NULL);
90 virtual void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz)
const;
92 virtual void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option=
"");
93 virtual void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option);
94 virtual void CheckOverlaps(
const TGeoVolume *vol, Double_t ovlp=0.1, Option_t *option=
"")
const;
95 Int_t CountNodes(TGeoVolume *vol, Int_t level)
const;
96 virtual Int_t CountVisibleNodes();
97 virtual void DefaultAngles();
98 virtual void DefaultColors();
99 virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py);
100 virtual void Draw(Option_t *option=
"");
101 virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option=
"");
102 virtual void DrawOverlap(
void *ovlp, Option_t *option=
"");
103 virtual void DrawCurrentPoint(Int_t color);
104 virtual void DrawOnly(Option_t *option=
"");
105 virtual void DrawPanel();
106 virtual void DrawPath(
const char *path, Option_t *option=
"");
107 virtual void DrawPolygon(
const TGeoPolygon *poly);
108 virtual void DrawShape(TGeoShape *shape, Option_t *option=
"");
109 virtual void DrawVolume(TGeoVolume *vol, Option_t *option=
"");
110 virtual void EditGeometry(Option_t *option=
"");
111 virtual void EstimateCameraMove(Double_t tmin, Double_t tmax, Double_t *start, Double_t *end);
112 virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, Int_t px, Int_t py);
113 virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_t px, Int_t py);
114 virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py);
115 virtual const char*GetVolumeInfo(
const TGeoVolume *volume, Int_t px, Int_t py)
const;
116 virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr)
const
117 {bombx=fBombX; bomby=fBombY; bombz=fBombZ; bombr=fBombR;}
118 virtual Int_t GetBombMode()
const {
return fExplodedView;}
119 virtual TGeoNode *GetCheckedNode() {
return fCheckedNode;}
120 TGeoChecker *GetChecker();
121 virtual Int_t GetColor(Int_t base, Float_t light)
const;
122 virtual const char *GetDrawPath()
const {
return fVisBranch.Data();}
123 virtual TGeoVolume *GetDrawnVolume()
const;
124 virtual TGeoVolume *GetTopVolume()
const {
return fTopVolume;}
125 virtual Int_t GetVisLevel()
const {
return fVisLevel;}
126 virtual Int_t GetVisOption()
const {
return fVisOption;}
127 Int_t GetNsegments()
const {
return fNsegments;}
128 virtual void GrabFocus(Int_t nfr=0, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0);
129 virtual Double_t *GetViewBox() {
return &fCheckedBox[0];}
130 virtual void GetViewAngles(Double_t &longitude, Double_t &latitude, Double_t &psi);
131 virtual Bool_t IsExplodedView()
const {
return ((fExplodedView==kGeoVisDefault)?kFALSE:kTRUE);}
132 virtual Bool_t IsRaytracing()
const {
return fIsRaytracing;}
133 virtual Bool_t IsPaintingShape()
const {
return fIsPaintingShape;}
134 TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180.,
135 Int_t nphi=90, Double_t phimin=0., Double_t phimax=360.,
136 Double_t rmin=0., Double_t rmax=9999999, Option_t *option=
"");
137 void Lock(Bool_t flag = kTRUE) {fVisLock = flag;}
138 virtual void ModifiedPad(Bool_t update=kFALSE)
const;
139 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=
"");
140 virtual void Paint(Option_t *option=
"");
141 virtual void PaintNode(TGeoNode *node, Option_t *option=
"", TGeoMatrix* global=0);
142 Bool_t PaintShape(
const TGeoShape & shape, Option_t * option)
const;
143 virtual void PaintShape(TGeoShape *shape, Option_t *option=
"");
144 virtual void PaintOverlap(
void *ovlp, Option_t *option=
"");
145 virtual void PaintVolume(TGeoVolume *vol, Option_t *option=
"", TGeoMatrix* global=0);
146 virtual void PrintOverlaps()
const;
147 void PaintPhysicalNode(TGeoPhysicalNode *node, Option_t *option=
"");
148 virtual void RandomPoints(
const TGeoVolume *vol, Int_t npoints, Option_t *option=
"");
149 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);
150 virtual void Raytrace(Option_t *option=
"");
151 virtual TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil,
const char* g3path);
152 virtual void SetBombFactors(Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3, Double_t bombr=1.3);
153 virtual void SetClippingShape(TGeoShape *shape) {fClippingShape = shape;}
154 virtual void SetExplodedView(Int_t iopt=0);
155 virtual void SetNsegments(Int_t nseg=20);
156 virtual void SetNmeshPoints(Int_t npoints);
157 virtual void SetGeoManager(TGeoManager *geom) {fGeoManager=geom;}
158 virtual void SetIteratorPlugin(TGeoIteratorPlugin *plugin) {fPlugin = plugin; ModifiedPad();}
159 virtual void SetCheckedNode(TGeoNode *node);
160 virtual void SetRaytracing(Bool_t flag=kTRUE) {fIsRaytracing = flag;}
161 virtual void SetTopVisible(Bool_t vis=kTRUE);
162 virtual void SetTopVolume(TGeoVolume *vol) {fTopVolume = vol;}
163 virtual void SetVisLevel(Int_t level=3);
164 virtual void SetVisOption(Int_t option=0);
165 virtual Int_t ShapeDistancetoPrimitive(
const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py)
const;
166 virtual void Test(Int_t npoints, Option_t *option);
167 virtual void TestOverlaps(
const char *path);
168 virtual Bool_t TestVoxels(TGeoVolume *vol);
169 virtual void UnbombTranslation(
const Double_t *tr, Double_t *bombtr);
170 virtual Double_t Weight(Double_t precision, Option_t *option=
"v");
172 ClassDef(TGeoPainter,0)