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 [43] gGeoManager->GetVolume("Supporto2")->Capacity() (const Double_t)(-4.86071999981845693e+03)

These are the geo parameters of this object:

root [42] 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.

]]>

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<fNz-1; iz++) { dz = fZ[iz+1]-fZ[iz];if (TGeoShape::IsSameWithinTolerance(dz,0)) continue; sc1 = fScale[iz]; sc2 = fScale[iz+1]; capacity += (area*dz/3.)*(sc1*sc1+sc1*sc2+sc2*sc2); } return capacity; } |

in the line

regards

Mohammad

]]>

I'm speaking about

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

in trunk/geometry/

(svn revision 10849)

Cheers

Olaf.

]]>

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 [7] gGeoManager->GetVolume("Supporto2")->Capacity() (const Double_t)2.77439999997116217e+02 |

However, checking the overlaps it looks very bad:

Quote: |

root [3] gGeoManager->CheckOverlaps() Info in <TGeoNodeMatrix::CheckOverlaps>: Checking overlaps for cave and daughters within 0.1 Warning in <TGeoChecker::CheckOverlaps>: Volume SuperconductingSolenoidov831 with 3 daughters but not voxelized Warning in <TGeoChecker::CheckOverlaps>: Volume Cryostatov830o2 with 12 daughters but not voxelized Warning in <TGeoChecker::CheckOverlaps>: Volume SuperconductingCoilov831 with 3 daughters but not voxelized Check overlaps: [==========] 477699 [100.00 %] TIME 00:18:20 Info in <TGeoNodeMatrix::CheckOverlaps>: Number of illegal overlaps/extrusions : 391 |

regards

Mohammad]]>

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 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.

]]>