Log of /trunk/geom/geom/src/TGeoPhysicalNode.cxx
Parent Directory
Revision
47228 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 13 17:09:38 2012 UTC (2 years, 2 months ago) by
agheata
File length: 20123 byte(s)
Diff to
previous 44634
Added possibility to prevent known overlaps produced by misalignment by assignig priority to one of the candidates. This is not using the error prone AddNodeOverlap method, but composite shapes. One has to create the unprioritized shape as the subtraction of the original one and the shape of the node to prioritize, then position this composite shape colume with identity matrix. The prioritized volume should be added as node using the same local matrix as the one used in the subtraction operation. The matrix itself has to be declared shared via SetShared() method. Added few parameters to the RandomRays method.
Revision
36632 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 12 15:57:07 2010 UTC (4 years, 2 months ago) by
agheata
File length: 16158 byte(s)
Diff to
previous 35130
Fixed dynamic computation of assembly bounding boxes during alignment. The bounding box needs to be valid at all times, still does not need to be recomputed if no node is added or misaligned
Revision
35047 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 27 14:38:41 2010 UTC (4 years, 4 months ago) by
agheata
File length: 15878 byte(s)
Diff to
previous 34278
Bounding box for assemblies is now computed dynamically when needed instead of after every AddNode operation.
The patch reduces the number of calls to TGeoShapeAssembly::ComputeBBox from 4.8 million to 12700 (!) in ALICE and gains 40% speedup in initialization time (~30sec).
Thanks to Matevz for spotting this. Also added Matevz's code for improving access by index to PNEntries.
Revision
25123 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 12 09:59:46 2008 UTC (6 years, 5 months ago) by
brun
File length: 16045 byte(s)
Diff to
previous 22923
From Andrei:
- outline sampling points used for overlap checking were wrongly generated in case navigation/drawing methods were invoked before CheckOverlaps()
- new method TGeoManager::SetNmeshPoints(npoints) can be used to modify the number of mesh points used in overlap checking. Default value is 1000.
- prototype of TGeoPhysicalNode::Align(TGeoMatrix *, TGeoShape *, Bool_t check, Double_t ovlp) changed - last parameter added. Representing the overlap tolerance in case the physical node is aligned with check=true option. Default value 0.001 (10 microns). In this case only the overlaps of the aligned object (or daughters if an assembly) are reported.
- Checking only overlaps of a single node possible by calling: TGeoManager::SetCheckedNode(TGeoNode *node). User responsibility to restore checked node to NULL after the check.
Revision
19650 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 20 08:49:08 2007 UTC (7 years, 5 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 13354 byte(s)
Diff to
previous 18135
From Andrei:
- TGeoPNEntry class has now an additional pointer to the original matrix, which is set in the class ctor and works provided that all PNEntry objects are created BEFORE applying any alignment. The getter for this original (LOCAL) matrix of the last TGeoNode in the branch is:
TGeoMatrix *TGeoPNEntry::GetMatrixOrig()
- Modified method:
TGeoPNEntry * TGeoManager::SetAlignableEntry(const char *unique_name, const char *path, Int_t uid=-1);
If UID is provided, one can do a (fast) retrieval by UID (based on binary search):
TGeoPNEntry *TGeoManager::GetAlignableEntryByUID(Int_t uid) const;
The UID mapping becomes persistent with the geometry. To retrieve the number of entries having (or not) uid's defined, I modified:
Int_t TGeoManager::GetNAlignable(Bool_t with_uid=kFALSE) const
- Added method TGeoOverlap::SampleOverlap(Int_t npoints) for overlaps/extrusions in the context menu of overlaps. This normally produces a picture of the overlap having random red points in the overlapping region. Helps a lot to check how big the overlap is (prints the volume of the overlapping region) and to validate if the overlap is valid or not.
- TGeoVolume::CheckOverlaps(Double_t ovlp, Option_t *option) produces now overlap objects in the list of overlaps of TGeoManager in case option="s" (sampling). Very useful for doing an extensive check on ovelaps as an alternative to the fast method.
Note: when checking assembly vs. assembly (or volume) only one overlap is reported (the check does not show which node in the assembly produced the overlap). A graphical output giving hints is still provided in this case.
Revision
18135 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 2 08:52:03 2007 UTC (7 years, 10 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 12816 byte(s)
Diff to
previous 18074
From Andrei:
TGeo: - implementation of TGeoManager::CdNext() allowing positioning the current state to the next entered volume - used by g4root interface
- implementation of TGeoManager::RefreshPhysicalNodes() that need to be called after applying misalignment to ideal geometry to update the node pointers so they will reflect the new geometry objects created. This will also lock geometry. TGeoPhysicalNode is now a TNamed.
- adjustments in G4 root to deal with MANY's and assemblies by using TGeoManager::CdNext()
Revision
16298 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 19 14:37:13 2006 UTC (8 years, 4 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 11820 byte(s)
Diff to
previous 15997
From Mihaela:
some changes in the class TGeoPNEntry (needed for alignment purposes):
1. Constructor of TGeoPNEntry performs a check upon definition of a symbolic link to a physical node. The check is done redundantly also upon creation of a physical node starting from a symbolic link to prevent mis-usage of these objects in-between geometries.
2. Allows storage of an additional user-defined TGeoHMatrix. The matrix should be created by the user but
once TGeoPNEntry::SetMatrix() is called becomes owned by TGeoManager.
Revision
15134 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 10558 byte(s)
Diff to
previous 14895
From Federico Carminati:
"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."
Revision
14895 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 2 18:25:35 2006 UTC (8 years, 8 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 9907 byte(s)
Diff to
previous 14423
From Andrei:
TGeoPNEntry
============
Generic aligneable objects are represented now by the new class TGeoPNEntry.
This is just a TNamed that stores as name the unique identifier and as title
the corresponding path in the geometry. They correspond each to a
TGeoPhysicalNode object to which they have a pointer (for fast access).
These generic aligneable objects should be created during the geometry
creation stage using the following interface in the TGeoManager class:
TGeoPNEntry *TGeoManager::SetAlignableEntry(const char *unique_name, const
char *path)
====================================================================
Ex:
AliTPCv2::CreateGeometry()
{
... geom. creation
// at the end of this, several generic aligneable objects
// declarations. The name should be unique and the path VALID for the
// detector version AliTPCv2
gGeoManager->AddAligneable("TPC_Sect1", "ALIC_1/TPC_M_1/TPMW_2/...");
... again and again, maybe in a loop
}
====================================================================
Access methods:
const char *TGeoPNEntry::GetPath(); // returns the path
TGeoPhysicalNode * TGeoPNEntry::GetPhysicalNode(); // returns pointer to
physical node
These can be also created after the geometry is closed. Upon creation the
consistency of the path cannot be checked (geometry not closed), so no
physical node is actually created by SetAlignableEntry(). This is done later
(see below).
Internally TGeoManager stores these objects in a persistent THashList. The
following methods (in TGeoManager) allow fast retreival by unique_name and
looping the existing objects:
TGeoPNEntry *TGeoManager::GetAlignableEntry(const char *name) const;
TGeoPNEntry *TGeoManager::GetAlignableEntry(Int_t index) const;
Int_t TGeoManager::GetNAlignable() const;
The physical nodes corresponding to a given TGeoPNEntry can be created by:
TGeoPhysicalNode *TGeoManager::MakeAlignablePN(const char *name);
TGeoPhysicalNode *TGeoManager::MakeAlignablePN(TGeoPNEntry *entry);
Using these methods instead of TGeoManager::MakePhysicalNode gives the
additional flexibility of accessing physical nodes by a path-independent
identifier. The access is also faster due to hashing.
Revision
14423 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 27 09:28:10 2006 UTC (8 years, 10 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 9124 byte(s)
Diff to
previous 14372
From Andrei:
I added a static lock to TGeoManager (attached patch). This prevents:
1. Loading or creating a new geometry while the current one is in lock state.
2. Calling TGeoPhysicalNode::Align() while in lock state.
TGeoManager::LockGeometry(); // to lock
TGeoManager::UnlockGeometry(); // to unlock ;-)
Bool_t TGeoManager::IsLocked(); // to check
The second method is (of course...) for the 'smart' geometry experts that will
immediately notice that they cannnot load the geometry anymore unless they unlock it
:-D . If we throw away the key we will not be able to unlock ourselves...
Revision
14043 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 14 02:55:08 2006 UTC (8 years, 11 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 8903 byte(s)
Diff to
previous 13918
From Andrei:
Fix a problem in a recent modification of trying
to minimize duplication of geometry objects during Align(). For
non-replicated volumes the matrix was directly changed (without cloning
the volume/node) and this was obviously wrong if the parent of the
volume was replicated (changing at the same time the positions in all
replicated branches).
Revision
13373 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 28 12:55:35 2005 UTC (9 years, 1 month ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 8866 byte(s)
Diff to
previous 13282
From Andrei:
some optimizations for creating physical nodes:
- re-voxelization no more done afer each Align() call - instead a signal is sent to
the existing voxels; the first navigation query to this voxel will rebuild it.
- volumes are aware if they were positioned more than once (replicated). If this is
not the case the volume is not cloned anymore for alignment.
Revision
13271 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 17 13:17:55 2005 UTC (9 years, 2 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 8797 byte(s)
Diff to
previous 12669
From Andrei & Mihaela:
a diff containing the implementation of TGeoShape::Capacity. There are also
few other fixes (see below):
Mihaela:
New method:
Double_t TGeoShape::Capacity() const;
implemented for all supported shapes. The algorithms provide analytical computation of
shape capacity in [cm^3]. All algorithms are accurate with 2 exceptions:
- TGeoCtub : the formula is just an approximation due to the difficulties to integrate
over the phi angle in the general case.
- TGeoCompositeShape: the computation of the capacity is done by sampling, with an
accuracy of 1%.
Based on this method I extended the implementation of TGeoVolume::Weight(Double_t
precision, Option_t *option). The default value of option is now "va" meaning: verbose
+ analytical. Removing "a" from the default option performs computation of volume
weight using the old algorithm of sampling. I have checked the 2 ways of computing the
weight one against the other and they are consistent.
Andrei:
- fixed a memory leak related to TGeoShapeAssembly ownership
- fixed some tracking problems for assemblies (when the top volume was an assembly)
Revision
12669 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 6 12:34:57 2005 UTC (9 years, 4 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 8732 byte(s)
Diff to
previous 12592
From Andrei:
a small patch that:
- fixes new method TGeoManager::FindNextBoundaryAndStep() in case of assemblies
and adds computation of safety as option
- fixes initialization of a data member in TGeoPhysicalNode
The new raytracing is a bit faster and much less error-prone due to fixes in the
navigation related to MANY's.
Revision
12592 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 2 13:54:38 2005 UTC (9 years, 4 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 8710 byte(s)
Diff to
previous 8648
From Andrei:
a rather big patch containing a fix for the sphere mesh from Mihaela
as well as several other small fixes related to navigation + new methods. Before
doing it I included your code checker-related changes.
Mihaela:
- all sphere types (according rmin,rmax,theta1,theta2,phi1,phi2) have now the
minimum needed set of points/segments/polygons. For instance, the spheres with
rmin=0 does not have anymore the mesh for the inner sphere. Also, if there is no
phi segmentation, you do not have anymore the polygons related to the phi
slices.
- ongoing work for the same for cones (not in this patch)
Andrei:
- memory leak in TGeoPhysicalNode::Align() (hopefully) fixed. Original (ideal)
matrix now kept.
- several fixes in TGeoManager::Safety, TGeoManager::SearchNode for properly
checking all extrusions types MANY->ONLY or ONLY->MANY for all current branch.
- fix for overlapping flag bookkeeping when moving up from a divided node. The
number of MANY's in the current branch is now kept as data member of
TGeoManager. Changes in TGeoCache according to this
- Prototype for TGeoManager::FindNextDaughterBoundary() changed to return
crossed daughter index
- new method TGeoManager::FindNextBoundaryAndStep() that in addition to
computing the distance to next boundary propagates current point and finds the
new location. Changes in the raytracing algorithm to use this - seem to work
properly, but I still have to double-check some geometries.
Revision
8648 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 22 14:07:15 2004 UTC (10 years, 9 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 8412 byte(s)
Diff to
previous 8565
From Andrei Gheata:
- TGeoXtru navigation now fully implemented by Mihaela
- Improvements in the ray-tracing algorithm
- Added TGeoShape::GetNmeshVertices() to be used by visualization and by
the overlap checker in case of composite shapes (currently the checker
does not work with composites)
- I have created a new demo macro (see /tutorials/geodemo.C in the
attachment) to replace /tutorials/geoshapes.C. Functionality:
- all previous functionality of geoshapes.C
- new shapes examples added: TGeoTorus, TGeoXtru, TGeoCompositeShape
- can call rootgeom.C
- ray-tracing can be switched on/off
- comments can be switched on/off
- demonstrates alignment
Revision
8565 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 13 07:04:42 2004 UTC (10 years, 9 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 8360 byte(s)
Diff to
previous 8260
From Andrei Gheata:
- All shapes.cxx - added shape name in InspectShape() + some corrections
in error messages (Bjorn requirement)
- TGeoAtt.cxx - activity flag added (not yet taken into account by tracking)
- TGeoMaterial/Medium - added Cerenkov properties by Andreas (for FLUKA)
- TGeoVolume.h, TGeoManager.k - added *TOGGLE* 's
- TGeoPhysicalNode - possibility to align a physical node. One can
define a physical node according a path, then change its local
transformation matrix OR shape - the corresponding branch is decoupled
from the logical tree and a new trackable branch is created. A
post-alignment check for overlaps can be perfomed for the aligned node.
Revision
8260 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Thu Feb 19 15:00:41 2004 UTC (10 years, 11 months ago) by
brun
Original Path:
trunk/geom/src/TGeoPhysicalNode.cxx
File length: 5415 byte(s)
from Andrei
modifications for the inclusion of the new class
TGeoPhysicalNode (new files TGeoPhysicalNode.h/.cxx). This represents a
branch of the geometry tree (represented by a path) and can be
visualized in addition to the default visualization. They will be used
also for aligning the geometry, but this is not yet implemented.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.