GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » TGeoManager and TGeoVolume
Re: TGeoManager and TGeoVolume [message #5978 is a reply to message #5963] Tue, 26 February 2008 17:15 Go to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 141.30.85*
Hi again,

I Did some checks and there are no overlapping volumes. If I run only one event it does not crash and in the resulting sim file the geometry is there! This are the good news. I can drw them, everything seems to be fine.

Now coming to the Problems: After the 7th event Geant4 crashed, Geant3 too.
After commenting the line which set the momentum range it ran... This is not a good sign and here might come soon some further problems. We will see.



So my conclusion is now as simple as this:
To get the geometry out of a file with a TGeoManager objec, just make a script with
Quote:

TFile* file = new TFile("../geometry/geo_with_manager.root");
TGeoManager *geoMan = (TGeoManager*) file->Get("ManagerName");
TGeoVolume* topvol = geoMan->GetMasterVolume();
topvol->Export("../geometry/geo_volumes_only.root","VolumeName","recreate ");


And then load these Volumes like in PndMvdDetector::ConstructRootGeometry() (pandaroot/mvd/MvdMC/MvdDetector.cxx)

Thanks for the help.
Happy greetings from Dresden, Ralf.

[Updated on: Tue, 26 February 2008 17:20]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Includes for MacOs X for different detectors.
Next Topic: root files with the same hitcolection structure
Goto Forum:
  


Current Time: Mon Dec 02 18:52:12 CET 2024

Total time taken to generate the page: 0.00944 seconds