GSI Forum - RDF feed https://forum.gsi.de/ negative masses in geometry (TG3) https://forum.gsi.de/index.php?t=rview&goto=11688&th=3088#msg_11688
when calculating the masses of the volumes in PandaRoot, I observed i.a. several masses with negative values, which actually comes from a negative volume size (!). Example:

Calculating the physical volume (which for a TGeoXtru is [length]³):
```root  gGeoManager->GetVolume("Supporto2")->Capacity()
(const Double_t)(-4.86071999981845693e+03)
```

These are the geo parameters of this object:
```root  gGeoManager->GetVolume("Supporto2")->InspectShape()
*** Shape Supporto2: TGeoXtru ***
Nz    = 2
List of (x,y) of polygon vertices:
x =   134.00000  y =   184.00000
x =   130.51000  y =   184.00000
x =   130.51000  y =   176.00000
x =   134.00000  y =   176.00000
x =   134.00000  y =   178.00000
x =   156.70000  y =   178.00000
x =   156.70000  y =   176.00000
x =   159.20000  y =   176.00000
x =   159.20000  y =   184.00000
x =   156.70000  y =   184.00000
x =   156.70000  y =   182.00000
x =   134.00000  y =   182.00000
plane 0: z=   -0.00000 x0=    0.00000 y0=    0.00000 scale=    1.00000
plane 1: z=    2.00000 x0=    0.00000 y0=    0.00000 scale=    1.00000
Bounding box:
*** Shape Supporto2: TGeoBBox ***
dX =    14.34500
dY =     4.00000
dZ =     1.00000
origin: x=  144.85500 y=  180.00000 z=    1.00000
```

Shouldn't it be that values like volume and mass always come out with positive values?
Of course I can ask for the abs value in the code to avoid negative values.

Cheers
Olaf.

]]>
Olaf Hartmann 2011-04-20T12:36:40-00:00
Re: negative masses in geometry (TG3) https://forum.gsi.de/index.php?t=rview&goto=11691&th=3088#msg_11691
it could be a bug in TGeoXtru::Capacity:

 Quote: Double_t TGeoXtru::Capacity() const { // Compute capacity [length^3] of this shape. Int_t iz; Double_t capacity = 0; Double_t area, dz, sc1, sc2; TGeoXtru *xtru = (TGeoXtru*)this; xtru->SetCurrentVertices(0.,0.,1.); area = fPoly->Area(); for (iz=0; iz

in the line dz = fZ[iz+1]-fZ[iz]; if fZ[iz+1] is smaller than fZ[iz] then you get a negative value. Anyway I did not find the volume "Supporto2" in the geometry. can you please tell me where to find it or post a root file with a TGeoManager having this problem.

regards

]]>
Re: negative masses in geometry (TG3) https://forum.gsi.de/index.php?t=rview&goto=11695&th=3088#msg_11695

```
FairModule *Magnet= new PndMagnet("MAGNET");
Magnet->SetGeometryFileName("FullSuperconductingSolenoid_v831.root");
```

in trunk/geometry/
(svn revision 10849)

Cheers
Olaf.
]]>
Olaf Hartmann 2011-04-20T14:10:05-00:00
Re: negative masses in geometry (TG3) https://forum.gsi.de/index.php?t=rview&goto=11696&th=3088#msg_11696
I am not able to reproduce this negative values! which macros you use? I tried the sim_complete_stt.C (using FullSuperconductingSolenoid_v831.root and switching off the MDT magnet ). but I get the following:

 Quote: root  gGeoManager->GetVolume("Supporto2")->Capacity() (const Double_t)2.77439999997116217e+02

However, checking the overlaps it looks very bad:
 Quote: root  gGeoManager->CheckOverlaps() Info in : Checking overlaps for cave and daughters within 0.1 Warning in : Volume SuperconductingSolenoidov831 with 3 daughters but not voxelized Warning in : Volume Cryostatov830o2 with 12 daughters but not voxelized Warning in : Volume SuperconductingCoilov831 with 3 daughters but not voxelized Check overlaps: [==========] 477699 [100.00 %] TIME 00:18:20 Info in : Number of illegal overlaps/extrusions : 391

regards

Re: negative masses in geometry (TG3) https://forum.gsi.de/index.php?t=rview&goto=11697&th=3088#msg_11697 ]]> StefanoSpataro 2011-04-21T06:00:13-00:00 Re: negative masses in geometry (TG3) https://forum.gsi.de/index.php?t=rview&goto=11698&th=3088#msg_11698
I'm still using the jan10 external packages (to avoid the problem with the huge memory usage), so maybe the problem has been fixed in the new Root version. I'll check it.

My geometry is built in the sim_radmap.C macro.

Cheers
Olaf.
]]>
Olaf Hartmann 2011-04-21T06:35:00-00:00
Re: negative masses in geometry (TG3) https://forum.gsi.de/index.php?t=rview&goto=11700&th=3088#msg_11700
 Olaf Hartmann wrote on Thu, 21 April 2011 08:35 I'm still using the jan10 external packages (to avoid the problem with the huge memory usage), so maybe the problem has been fixed in the new Root version. I'll check it.

It was indeed the case. With the feb11 the negative values vanished.
I withdraw my objection.

Cheers
Olaf.
]]>
Olaf Hartmann 2011-04-21T08:26:11-00:00