104 Error(
"Compare",
"other object is not TGeoOverlap");
109 return (fOverlap <= other->
GetOverlap()) ? 1 : -1;
114 return (fOverlap <= other->
GetOverlap()) ? 1 : -1;
200 while (ipoint < npoints) {
207 if (itry > 10000 && !ipoint) {
208 Error(
"SampleOverlap",
"No point inside volume!!! - aborting");
232 marker->
Draw(
"SAME");
238 Info(
"SampleOverlap",
"#Overlap %s has %g +/- %g [cm3]",
GetName(), capacity, err * capacity);
259 for (
Int_t i = 0; i < npoints; i++) {
264 printf(
"point %d: safe1=%f\n", i, safe1);
270 printf(
"point %d: safe1=%f safe2=%f\n", i, safe1, safe2);
R__EXTERN TRandom * gRandom
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Using a TBrowser one can browse all ROOT objects.
Matrix class used for computing global transformations Should NOT be used for node definition.
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
Geometrical transformation package.
void Print(Option_t *option="") const override
print the matrix in 4x4 format
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
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
Base class describing geometry overlaps.
void SetIsOverlap(Bool_t flag=kTRUE)
void Paint(Option_t *option="") override
Paint the overlap.
void Validate() const
Validate this overlap.
void SetNextPoint(Double_t x, Double_t y, Double_t z)
Set next overlapping point.
void SampleOverlap(Int_t npoints=1000000)
Draw overlap and sample with random points the overlapping region.
Int_t Compare(const TObject *obj) const override
Method to compare this overlap with another.
void Draw(Option_t *option="") override
Draw the overlap.
void Print(Option_t *option="") const override
Print detailed info.
~TGeoOverlap() override
Destructor.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Distance to primitive for an overlap.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Event interception.
void Browse(TBrowser *b) override
Define double-click action.
virtual void PrintInfo() const
Print some info.
Bool_t IsExtrusion() const
Double_t GetOverlap() const
void Sizeof3D() const override
Get 3D size of this.
TGeoOverlap()
Default ctor.
virtual void Sizeof3D() const =0
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const =0
virtual Double_t Capacity() const =0
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
TGeoManager * GetGeoManager() const
Bool_t Contains(const Double_t *point) const
TGeoShape * GetShape() const
void InspectShape() const
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual void GetPoint(Int_t n, Float_t &x, Float_t &y, Float_t &z) const
Fills the parameters x, y, z with the coordinate of the n-th point n must be between 0 and Size() - 1...
virtual Int_t GetN() const
virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z)
Set point following LastPoint to x, y, z.
void Draw(Option_t *option="") override
Draws 3-D polymarker with its current attributes.
Double_t Rndm() override
Machine independent random number generator.
virtual void PaintOverlap(void *ovlp, Option_t *option="")=0
virtual void DrawOverlap(void *ovlp, Option_t *option="")=0
virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py)=0
virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py)=0
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Double_t Sqrt(Double_t x)
Returns the square root of x.