13#ifndef ROOT_TGeoVolume 
   14#define ROOT_TGeoVolume 
#define ClassDefOverride(name, id)
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t SetLineWidth
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
 
Option_t Option_t SetLineColor
 
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
 
const char * GetName() const override
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.
 
TGeoVolumeAssembly & operator=(const TGeoVolumeAssembly &)=delete
 
~TGeoVolumeAssembly() override
Destructor. The assembly is owner of its "shape".
 
Int_t GetNextNodeIndex() const override
 
Bool_t IsVisible() const override
 
void CreateThreadData(Int_t nthreads) override
 
TGeoVolumeAssembly(const TGeoVolumeAssembly &)=delete
Mutex for concurrent operations.
 
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="") override
Add a component to the assembly.
 
void ClearThreadData() const override
 
TGeoVolume * CloneVolume() const override
Clone this volume.
 
void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat, Option_t *option) override
Add an overlapping node - not allowed for assemblies.
 
std::vector< ThreadData_t * > fThreadData
 
std::mutex fMutex
Thread vector size.
 
void DrawOnly(Option_t *) override
draw only this volume
 
Int_t fThreadSize
Thread specific data vector.
 
void SetNextNodeIndex(Int_t index)
 
Int_t GetCurrentNodeIndex() const override
 
void SetCurrentNodeIndex(Int_t index)
 
TGeoVolumeAssembly()
Default constructor.
 
Bool_t IsAssembly() const override
Returns true if the volume is an assembly or a scaled assembly.
 
TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="") override
Division makes no sense for assemblies.
 
ThreadData_t & GetThreadData() const
 
TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="") override
division of multiple volumes
 
void AddVolume(TGeoVolume *vol)
Add a volume with valid shape to the list of volumes.
 
TGeoVolume * MakeCopyVolume(TGeoShape *newshape) override
Make a copy of this volume build a volume with same name, shape and medium.
 
void SetMedium(TGeoMedium *medium) override
Set medium for a multiple volume.
 
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat, Option_t *option="") override
Add a new node to the list of nodes.
 
TGeoVolume * GetVolume(Int_t id) const
 
void SetVisibility(Bool_t vis=kTRUE) override
Set visibility for all components.
 
TGeoVolumeMulti & operator=(const TGeoVolumeMulti &)=delete
 
~TGeoVolumeMulti() override
Destructor.
 
Double_t GetStart() const
 
TGeoVolumeMulti * fDivision
 
TGeoVolumeMulti()
dummy constructor
 
TGeoVolumeMulti(const TGeoVolumeMulti &)=delete
 
TGeoShape * GetLastShape() const
Returns the last shape.
 
void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat, Option_t *option="") override
Add a new node to the list of nodes, This node is possibly overlapping with other daughters of the vo...
 
void SetLineStyle(Style_t lstyle) override
Set the line style for all components.
 
Int_t GetNvolumes() const
 
Bool_t IsVolumeMulti() const override
 
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.
 
void SetVisContainers(Bool_t flag=kTRUE) override
Set visibility for containers.
 
virtual void cd(Int_t inode) const
Actualize matrix of node indexed <inode>
 
virtual void ClearThreadData() const
 
void SetVisibility(Bool_t vis=kTRUE) override
set visibility of this volume
 
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.
 
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
 
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.
 
void RandomRays(Int_t nrays=10000, Double_t startx=0, Double_t starty=0, Double_t startz=0, const char *target_vol=nullptr, Bool_t check_norm=kFALSE)
Random raytracing method.
 
TGeoVolume()
dummy constructor
 
TGeoMedium * GetMedium() const
 
char * GetObjectInfo(Int_t px, Int_t py) const override
Get volume info for the browser.
 
void Print(Option_t *option="") const override
Print volume info.
 
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.
 
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
 
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
 
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
 
Bool_t OptimizeVoxels()
Perform an extensive sampling to find which type of voxelization is most efficient.
 
void Browse(TBrowser *b) override
How to browse a volume.
 
void SetCylVoxels(Bool_t flag=kTRUE)
 
void SetCurrentPoint(Double_t x, Double_t y, Double_t z)
Set the current tracking point.
 
void Paint(Option_t *option="") override
paint volume
 
void SetVisOnly(Bool_t flag=kTRUE) override
Set visibility for leaves.
 
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.
 
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute mouse actions on this volume.
 
virtual TGeoVolume * CloneVolume() const
Clone this volume.
 
void SetFinder(TGeoPatternFinder *finder)
 
Int_t GetNdaughters() const
 
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.
 
const char * GetPointerName() const
Provide a pointer name containing uid.
 
void SetTransparency(Char_t transparency=0)
 
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
 
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
 
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
 
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
compute the closest distance of approach from point px,py to 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)
 
Bool_t GetOptimalVoxels() const
Returns true if cylindrical voxelization is optimal.
 
TGeoNode * ReplaceNode(TGeoNode *nodeorig, TGeoShape *newshape=nullptr, TGeoMatrix *newpos=nullptr, TGeoMedium *newmed=nullptr)
Replace an existing daughter with a new volume having the same name but possibly a new shape,...
 
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
 
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() override
Destructor.
 
void SetShape(const TGeoShape *shape)
set the shape associated with this volume
 
static TGeoMedium * DummyMedium()
 
TObject * fField
pointer to TGeoManager owning this volume
 
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
 
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.
 
TGeoVolume & operator=(const TGeoVolume &)=delete
 
TGeoVolume(const TGeoVolume &)=delete
Transient framework-defined extension to volumes.
 
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.
 
void SaveAs(const char *filename="", Option_t *option="") const override
Save geometry having this as top volume as a C++ macro.
 
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)
 
Bool_t IsVisLeaves() const
 
Option_t * GetOption() const override
 
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.
 
const char * GetIconName() const override
Returns mime type name of object.
 
virtual void DrawOnly(Option_t *option="")
draw only this volume
 
void SetLineStyle(Style_t lstyle) override
Set the line style.
 
void SetOption(const char *option)
Set the current options (none implemented)
 
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.
 
Char_t GetTransparency() const
 
virtual Bool_t IsVisible() const
 
void SetVisLeaves(Bool_t flag=kTRUE) override
Set visibility for leaves.
 
void InspectShape() const
 
Bool_t IsFolder() const override
Return TRUE if volume contains nodes.
 
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 ResetTransparency(Char_t transparency=-1)
 
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 * At(Int_t idx) const override
 
TObject * UncheckedAt(Int_t i) 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