GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » negative masses in geometry (TG3)
icon5.gif  negative masses in geometry (TG3) [message #11688] Wed, 20 April 2011 14:36 Go to next message
Olaf Hartmann is currently offline  Olaf Hartmann
Messages: 105
Registered: December 2003
Location: Wien-Alsergrund
continuous participant
From: *smi.oeaw.ac.at
Dear all,

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.


Re: negative masses in geometry (TG3) [message #11691 is a reply to message #11688] Wed, 20 April 2011 15:19 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hi 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 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

Mohammad




Re: negative masses in geometry (TG3) [message #11695 is a reply to message #11691] Wed, 20 April 2011 16:10 Go to previous messageGo to next message
Olaf Hartmann is currently offline  Olaf Hartmann
Messages: 105
Registered: December 2003
Location: Wien-Alsergrund
continuous participant
From: *smi.oeaw.ac.at
Hi 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.
Re: negative masses in geometry (TG3) [message #11696 is a reply to message #11695] Wed, 20 April 2011 22:56 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *dip.t-dialin.net
HI 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
Re: negative masses in geometry (TG3) [message #11697 is a reply to message #11696] Thu, 21 April 2011 08:00 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *56-82-r.retail.telecomitalia.it
The overlaps are already known, Tobias could not fix them.
Re: negative masses in geometry (TG3) [message #11698 is a reply to message #11696] Thu, 21 April 2011 08:35 Go to previous messageGo to next message
Olaf Hartmann is currently offline  Olaf Hartmann
Messages: 105
Registered: December 2003
Location: Wien-Alsergrund
continuous participant
From: *3.13.vie.surfer.at
Dear 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.
icon14.gif  Re: negative masses in geometry (TG3) [message #11700 is a reply to message #11698] Thu, 21 April 2011 10:26 Go to previous message
Olaf Hartmann is currently offline  Olaf Hartmann
Messages: 105
Registered: December 2003
Location: Wien-Alsergrund
continuous participant
From: *smi.oeaw.ac.at
Hi Mohammad,

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.

[Updated on: Thu, 21 April 2011 16:05]

Report message to a moderator

Previous Topic: TPC compilation error
Next Topic: STT tracking crash during check getMCInfo.
Goto Forum:
  


Current Time: Tue Apr 16 05:58:36 CEST 2024

Total time taken to generate the page: 0.00993 seconds