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