13 #ifndef ROOT_TGeoVolume
14 #define ROOT_TGeoVolume
33 #ifndef ROOT_TObjArray
37 #ifndef ROOT_TGeoMedium
41 #ifndef ROOT_TGeoShape
112 virtual void cd(
Int_t inode)
const;
Bool_t IsVisLeaves() const
char * GetPointerName() const
Provide a pointer name containing uid.
TGeoManager * fGeoManager
TGeoVolume()
dummy constructor
void CleanAll()
Clean data of the volume.
virtual void ClearThreadData() const
TGeoVolumeAssembly()
Thread vector size.
virtual void cd(Int_t inode) const
Actualize matrix of node indexed <inode>
Bool_t IsRunTimeShape() const
Bool_t IsVisibleDaughters() const
Bool_t IsAllInvisible() const
Return TRUE if volume and all daughters are invisible.
void SetNodes(TObjArray *nodes)
virtual void SetLineColor(Color_t lcolor)
Set the line color for all components.
void ClearShape()
Clear the shape of this volume from the list held by the current manager.
virtual void SetLineWidth(Width_t lwidth)
Set the line width for all components.
Bool_t IsRaytracing() const
Check if the painter is currently ray-tracing the content of this volume.
virtual void CreateThreadData(Int_t nthreads)
Bool_t IsXYZVoxels() const
void Voxelize(Option_t *option)
build the voxels for this volume
void SetFinder(TGeoPatternFinder *finder)
virtual Int_t GetCurrentNodeIndex() const
TGeoExtension * fUserExtension
virtual Bool_t IsVolumeMulti() const
void SetCylVoxels(Bool_t flag=kTRUE)
Bool_t IsReplicated() const
void AddNodeOffset(TGeoVolume *vol, Int_t copy_no, Double_t offset=0, Option_t *option="")
Add a division node to the list of nodes.
TGeoPatternFinder * GetFinder() const
virtual Bool_t IsVolumeMulti() const
TGeoExtension * fFWExtension
Transient user-defined extension to volumes.
static TGeoMedium * DummyMedium()
void InspectShape() const
TGeoVolumeMulti & operator=(const TGeoVolumeMulti &)
assignment operator
ThreadData_t()
index of next node to be entered
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
virtual Int_t GetByteCount() const
get the total size in bytes for this volume
Option_t * GetOption() const
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
virtual void Draw(Option_t *option="")
draw top volume according to option
Use this attribute class when an object should have 3D capabilities.
virtual void ClearThreadData() const
static const char * filename()
static void CreateDummyMedium()
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for all components.
virtual Int_t GetNextNodeIndex() const
virtual void DrawOnly(Option_t *option="")
draw only this volume
void VisibleDaughters(Bool_t vis=kTRUE)
set visibility for daughters
void SetOption(const char *option)
Set the current options (none implemented)
virtual ~TGeoVolumeAssembly()
Destructor. The assembly is owner of its "shape".
Int_t fNext
index of current selected node
void RemoveNode(TGeoNode *node)
Remove an existing daughter.
void ReplayCreation(const TGeoVolume *other)
Recreate the content of the other volume without pointer copying.
Int_t GetEntriesFast() const
void SetAsTopVolume()
Set this volume as the TOP one (the whole geometry starts from here)
void RegisterYourself(Option_t *option="")
Register the volume and all materials/media/matrices/shapes to the manager.
TGeoShape * GetLastShape() const
Returns the last shape.
Int_t GetNdaughters() const
void SetFWExtension(TGeoExtension *ext)
Connect framework defined extension to the volume.
void Raytrace(Bool_t flag=kTRUE)
Draw this volume with current settings and perform raytracing in the pad.
TGeoExtension * GetFWExtension() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TGeoVolume * GetVolume(Int_t id) const
Int_t CountNodes(Int_t nlevels=1000, Int_t option=0)
Count total number of subnodes starting from this volume, nlevels down option = 0 (default) - count o...
void Browse(TBrowser *b)
How to browse a volume.
virtual void CreateThreadData(Int_t nthreads)
const char * Data() const
TObject * fField
pointer to TGeoManager owning this volume
virtual Bool_t Contains(const Double_t *point) const =0
virtual ~TGeoVolume()
Destructor.
Fill Area Attributes class.
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
TGeoNode * ReplaceNode(TGeoNode *nodeorig, TGeoShape *newshape=0, TGeoMatrix *newpos=0, TGeoMedium *newmed=0)
Replace an existing daughter with a new volume having the same name but possibly a new shape...
Double_t WeightA() const
Analytical computation of the weight.
void SetActiveDaughters(Bool_t flag=kTRUE)
virtual TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Division makes no sense for assemblies.
Int_t GetNvolumes() const
The TNamed class is the base class for all named ROOT classes.
void AddVolume(TGeoVolume *vol)
Add a volume with valid shape to the list of volumes.
Bool_t IsVisDaughters() const
void InvisibleAll(Bool_t flag=kTRUE)
Make volume and each of it daughters (in)visible.
Int_t fThreadSize
Thread specific data vector.
Bool_t GetOptimalVoxels() const
— Returns true if cylindrical voxelization is optimal.
TGeoExtension * GrabFWExtension() const
Get a copy of the framework extension pointer.
virtual Int_t GetNextNodeIndex() const
Bool_t IsOverlappingCandidate() const
virtual TGeoVolume * MakeCopyVolume(TGeoShape *newshape)
Make a copy of this volume build a volume with same name, shape and medium.
TGeoMaterial * GetMaterial() const
void SetActivity(Bool_t flag=kTRUE)
void RandomPoints(Int_t npoints=1000000, Option_t *option="")
Draw random points in the bounding box of this volume.
virtual void SetMedium(TGeoMedium *medium)
Set medium for a multiple volume.
virtual void Paint(Option_t *option="")
paint volume
Double_t Capacity() const
Computes the capacity of this [cm^3] as the capacity of its shape.
virtual TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Division a la G3.
TString fOption
just a hook for now
static TGeoVolumeAssembly * MakeAssemblyFromVolume(TGeoVolume *vol)
Make a clone of volume VOL but which is an assembly.
void SortNodes()
sort nodes by decreasing volume of the bounding box.
virtual TGeoVolume * CloneVolume() const
Clone this volume.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute mouse actions on this volume.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
Double_t GetStart() const
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual Bool_t IsVisible() const
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat, Option_t *option="")
Add a new node to the list of nodes.
TObject * UncheckedAt(Int_t i) const
void SetShape(const TGeoShape *shape)
set the shape associated with this volume
Bool_t IsCylVoxels() const
Char_t GetTransparency() const
virtual void DrawOnly(Option_t *)
draw only this volume
Using a TBrowser one can browse all ROOT objects.
virtual TGeoVolume * CloneVolume() const
Clone this volume.
TGeoVoxelFinder * fVoxels
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat, Option_t *option="")
Add a new node to the list of nodes, This node is possibly overlapping with other daughters of the vo...
Bool_t Contains(const Double_t *point) const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute the closest distance of approach from point px,py to this volume
Int_t GetIndex(const TGeoNode *node) const
get index number for a given daughter
void InspectMaterial() const
Inspect the material for this volume.
TGeoPatternFinder * fFinder
dummy medium
void SetField(TObject *field)
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
Double_t Weight(Double_t precision=0.01, Option_t *option="va")
Estimate the weight of a volume (in kg) with SIGMA(M)/M better than PRECISION.
2-D histogram with a float per channel (see TH1 documentation)}
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
void SetTransparency(Char_t transparency=0)
void RandomRays(Int_t nrays=10000, Double_t startx=0, Double_t starty=0, Double_t startz=0, const char *target_vol=0, Bool_t check_norm=kFALSE)
Random raytracing method.
Bool_t IsSelected() const
TGeoManager * GetGeoManager() const
void CloneNodesAndConnect(TGeoVolume *newmother) const
Clone the array of nodes.
Bool_t TestBit(UInt_t f) const
void UnmarkSaved()
Reset SavePrimitive bits.
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
Bool_t IsStyleDefault() const
check if the visibility and attributes are the default ones
void PrintVoxels() const
Print the voxels for this volume.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a component to the assembly.
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="") const
Overlap checking tool.
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
virtual TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
division of multiple volumes
virtual const char * GetName() const
Get the shape name.
void SetUserExtension(TGeoExtension *ext)
Connect user-defined extension to the volume.
TGeoNode * GetNode(Int_t i) const
TGeoExtension * GrabUserExtension() const
Get a copy of the user extension pointer.
const char * GetIconName() const
Returns mime type name of object.
TGeoMaterial * GetMaterial() const
void SetAttVisibility(Bool_t vis)
void SetActivity(Bool_t flag=kTRUE)
Bool_t IsVisContainers() const
void SetNextNodeIndex(Int_t index)
virtual Int_t GetCurrentNodeIndex() const
TGeoShape * GetShape() const
~ThreadData_t()
Destructor.
virtual TGeoVolume * MakeCopyVolume(TGeoShape *newshape)
make a copy of this volume build a volume with same name, shape and medium
Bool_t IsVisLeaves() const
Int_t Export(const char *filename, const char *name="", Option_t *option="")
Export this volume to a file.
void SetVoxelFinder(TGeoVoxelFinder *finder)
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
TGeoVoxelFinder * GetVoxels() const
Getter for optimization structure.
void MakeCopyNodes(const TGeoVolume *other)
make a new list of nodes and copy all nodes of other volume inside
Bool_t IsVisContainers() const
void SetActiveDaughters(Bool_t flag=kTRUE)
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
ThreadData_t & GetThreadData() const
Int_t fNumber
option - if any
Bool_t IsActiveDaughters() const
TGeoExtension * GetUserExtension() const
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
Int_t GetRefCount() const
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TH2F * LegoPlot(Int_t ntheta=20, Double_t themin=0., Double_t themax=180., Int_t nphi=60, 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.
Mother of all ROOT objects.
TGeoVolume & operator=(const TGeoVolume &)
assignment operator
Int_t GetNodeIndex(const TGeoNode *node, Int_t *check_list, Int_t ncheck) const
Get the index of a daugther within check_list by providing the node pointer.
virtual ~TGeoVolumeMulti()
Destructor.
void CheckShape(Int_t testNo, Int_t nsamples=10000, Option_t *option="")
Tests for checking the shape navigation algorithms. See TGeoShape::CheckShape()
static TGeoVolume * Import(const char *filename, const char *name="", Option_t *option="")
Import a volume from a file.
virtual void Print(Option_t *option="") const
Print volume info.
TObject * GetField() const
Bool_t IsTopVolume() const
True if this is the top volume of the geometry.
TGeoVolumeMulti * fDivision
TGeoMedium * GetMedium() const
void PrintNodes() const
print nodes
virtual Bool_t IsVisible() const
void SetCurrentNodeIndex(Int_t index)
virtual void SetLineStyle(Style_t lstyle)
Set the line style for all components.
virtual void InspectShape() const =0
void SetCurrentPoint(Double_t x, Double_t y, Double_t z)
Set the current tracking point.
void SetOverlappingCandidate(Bool_t flag)
TGeoVolume * MakeReflectedVolume(const char *newname="") const
Make a copy of this volume which is reflected with respect to XY plane.
void GrabFocus()
Move perspective view focus to this volume.
static TGeoMedium * fgDummyMedium
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Get volume info for the browser.
Bool_t IsActiveDaughters() const
Bool_t Valid() const
Check if the shape of this volume is valid.
Char_t GetTransparency() const
void FindOverlaps() const
loop all nodes marked as overlaps and find overlaping brothers
TObject * At(Int_t idx) const
virtual void SetMedium(TGeoMedium *medium)
virtual Bool_t IsFolder() const
Return TRUE if volume contains nodes return (GetNdaughters()?kTRUE:kFALSE);.
Bool_t FindMatrixOfDaughterVolume(TGeoVolume *vol) const
Find a daughter node having VOL as volume and fill TGeoManager::fHMatrix with its global matrix...
std::vector< ThreadData_t * > fThreadData
void SaveAs(const char *filename, Option_t *option="") const
Save geometry having this as top volume as a C++ macro.
void SetNumber(Int_t number)
void CheckShapes()
check for negative parameters in shapes.
void SetTransparency(Char_t transparency=0)
void SelectVolume(Bool_t clear=kFALSE)
Select this volume as matching an arbitrary criteria.
Bool_t OptimizeVoxels()
Perform an exensive sampling to find which type of voxelization is most efficient.
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat, Option_t *option)
Add an overlapping node - not allowed for assemblies.
TGeoNode * FindNode(const char *name) const
search a daughter inside the list of nodes
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
void CheckGeometry(Int_t nrays=1, Double_t startx=0, Double_t starty=0, Double_t startz=0) const
Shoot nrays with random directions from starting point (startx, starty, startz) in the reference fram...
void SetNtotal(Int_t ntotal)