Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoOverlap.h
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 09/02/03
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGeoOverlap
13#define ROOT_TGeoOverlap
14
15#include "TNamed.h"
16
17#include "TAttLine.h"
18
19#include "TAttFill.h"
20
21#include "TAtt3D.h"
22
23#include "TGeoMatrix.h"
24
25///////////////////////////////////////////////////////////////////////////
26// //
27// TGeoOverlap - base class describing geometry overlaps. Overlaps apply //
28// to the nodes contained inside a volume. These should not overlap to //
29// each other nor extrude the shape of their mother volume. //
30// //
31///////////////////////////////////////////////////////////////////////////
32
33class TGeoVolume;
34class TPolyMarker3D;
35class TBrowser;
36
37class TGeoOverlap : public TNamed,
38 public TAttLine,
39 public TAttFill,
40 public TAtt3D
41{
42public:
45 kGeoExtrusion = BIT(15)
46};
47
48private:
49 TGeoOverlap(const TGeoOverlap&) = delete;
51
52protected:
53 Double_t fOverlap; // overlap distance
54 TGeoVolume *fVolume1; // first volume
55 TGeoVolume *fVolume2; // second volume
56 TGeoHMatrix *fMatrix1; // positioning matrix for first volume
57 TGeoHMatrix *fMatrix2; // positioning matrix for second volume
58 TPolyMarker3D *fMarker; // points in the overlapping region
59
60public:
62 TGeoOverlap(const char *name, TGeoVolume *vol1, TGeoVolume *vol2,
63 const TGeoMatrix *matrix1, const TGeoMatrix *matrix2,
64 Bool_t isovlp=kTRUE, Double_t ovlp=0.01);
65 virtual ~TGeoOverlap();
66
67 void Browse(TBrowser *b);
68 virtual Int_t Compare(const TObject *obj) const;
69 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
70 virtual void Draw(Option_t *option=""); // *MENU*
71 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
77 Double_t GetOverlap() const {return fOverlap;}
80 Bool_t IsFolder() const {return kFALSE;}
81 virtual Bool_t IsSortable() const {return kTRUE;}
82 virtual void Paint(Option_t *option="");
83 virtual void Print(Option_t *option="") const; // *MENU*
84 virtual void PrintInfo() const;
85 virtual void Sizeof3D() const;
86 void SampleOverlap(Int_t npoints=1000000); // *MENU*
92 void SetFirstMatrix(TGeoMatrix *matrix) {*fMatrix1 = matrix;}
93 void SetSecondMatrix(TGeoMatrix *matrix) {*fMatrix2 = matrix;}
94 void SetOverlap(Double_t ovlp) {fOverlap=ovlp;}
95 void Validate() const; // *MENU*
96
97 ClassDef(TGeoOverlap, 2) // base class for geometical overlaps
98};
99
100#endif
101
#define b(i)
Definition RSha256.hxx:100
int Int_t
Definition RtypesCore.h:45
const Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
#define BIT(n)
Definition Rtypes.h:85
char name[80]
Definition TGX11.cxx:110
Use this attribute class when an object should have 3D capabilities.
Definition TAtt3D.h:19
Fill Area Attributes class.
Definition TAttFill.h:19
Line Attributes class.
Definition TAttLine.h:18
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition TGeoMatrix.h:421
Geometrical transformation package.
Definition TGeoMatrix.h:41
Base class describing geometry overlaps.
Definition TGeoOverlap.h:41
TGeoVolume * GetSecondVolume() const
Definition TGeoOverlap.h:74
TGeoHMatrix * fMatrix1
Definition TGeoOverlap.h:56
void SetIsOverlap(Bool_t flag=kTRUE)
Definition TGeoOverlap.h:88
void Browse(TBrowser *b)
Define double-click action.
void Validate() const
Validate this overlap.
TPolyMarker3D * GetPolyMarker() const
Definition TGeoOverlap.h:72
void SetNextPoint(Double_t x, Double_t y, Double_t z)
Set next overlapping point.
TGeoVolume * fVolume1
Definition TGeoOverlap.h:54
virtual void Sizeof3D() const
Get 3D size of this.
Bool_t IsOverlap() const
Definition TGeoOverlap.h:79
void SetFirstMatrix(TGeoMatrix *matrix)
Definition TGeoOverlap.h:92
void SampleOverlap(Int_t npoints=1000000)
Draw overlap and sample with random points the overlapping region.
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition TGeoOverlap.h:80
void SetOverlap(Double_t ovlp)
Definition TGeoOverlap.h:94
TPolyMarker3D * fMarker
Definition TGeoOverlap.h:58
void SetSecondMatrix(TGeoMatrix *matrix)
Definition TGeoOverlap.h:93
TGeoOverlap(const TGeoOverlap &)=delete
TGeoHMatrix * GetFirstMatrix() const
Definition TGeoOverlap.h:75
Double_t fOverlap
Definition TGeoOverlap.h:53
void SetSecondVolume(TGeoVolume *vol)
Definition TGeoOverlap.h:91
TGeoHMatrix * fMatrix2
Definition TGeoOverlap.h:57
TGeoOverlap & operator=(const TGeoOverlap &)=delete
void SetFirstVolume(TGeoVolume *vol)
Definition TGeoOverlap.h:90
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Event interception.
virtual void Print(Option_t *option="") const
Print detailed info.
TGeoVolume * fVolume2
Definition TGeoOverlap.h:55
virtual Bool_t IsSortable() const
Definition TGeoOverlap.h:81
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Distance to primitive for an overlap.
virtual Int_t Compare(const TObject *obj) const
Method to compare this overlap with another.
virtual void PrintInfo() const
Print some info.
virtual void Paint(Option_t *option="")
Paint the overlap.
Bool_t IsExtrusion() const
Definition TGeoOverlap.h:78
void SetIsExtrusion(Bool_t flag=kTRUE)
Definition TGeoOverlap.h:87
Double_t GetOverlap() const
Definition TGeoOverlap.h:77
virtual ~TGeoOverlap()
Destructor.
TGeoHMatrix * GetSecondMatrix() const
Definition TGeoOverlap.h:76
TGeoOverlap()
Default ctor.
TGeoVolume * GetFirstVolume() const
Definition TGeoOverlap.h:73
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:49
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:201
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:766
A 3D polymarker.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
th1 Draw()