GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » CBM » CBMROOT » General » Moving the Geometry from data file to the parameters
Moving the Geometry from data file to the parameters [message #9443] Wed, 23 September 2009 12:33 Go 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
Hello,

The geometry is moved from the data files to the parameter file, this make the fRun->LoadGeomerty() method obsolete, and requires loading the parameters wherever the geometry is needed. usually this is the case for digi and reco macro.

please test it and let me know.

Mohammad
Re: Moving the Geometry from data file to the parameters [message #9604 is a reply to message #9443] Fri, 23 October 2009 16:21 Go to previous messageGo to next message
Elena Litvinenko is currently offline  Elena Litvinenko
Messages: 20
Registered: March 2004
Location: JINR, Dubna
occasional visitor
From: *jinr.ru
Hello,

I performed a simulation using "cbmroot/trunk/macro/run/run_sim.C" and tried to display geometry using correspondingly updated "eventDisplay.C" macro. The result is here:

- RTDB container factory FairBaseContFact 
- RTDB container factory CbmFieldContFact 
- RTDB container factory CbmPassiveContFact 
- RTDB container factory CbmMvdContFact 
- RTDB container factory CbmStsContFact 
- RTDB container factory CbmRichContFact 
- RTDB container factory CbmTofContFact 
- RTDB container factory CbmEcalContFact 
-I- FairRunAna: Opening Input file: data/test.mc.root
Warning in <TClass::TClass>: no dictionary for class CbmTrd is available

-I- FairRunAna::Init : 
data/test.mc.root  is connected with:

-I-  Geometry was not found in the input file we will look in the friends if any!
create CbmFieldPar container CbmFieldPar

*************************************************************
     initialisation for run id 1501042957
*************************************************************
Error in <TBufferFile::ReadObject>: trying to read an emulated class (CbmTrd) to store in a compiled pointer (TObject)
Info in <TGeoManager::TGeoManager>: Geometry Geometry, default geometry created
Warning in <TGeoManager::Init>: Deleting previous geometry: Geometry/default geometry
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave
Info in <TGeoManager::Voxelize>: Voxelizing...
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::CloseGeometry>: 827935 nodes/ 235 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
Container FairBaseParSet initialized from ROOT file.
Container CbmFieldPar initialized from ROOT file.
New field at 0x2e6bdb0, type 3
-I- CbmFieldMap: Reading field map from ROOT file /u/litvinen/cbm/trunk/input/FieldMuonMagnet.root
======================================================
----   : FieldMuonMagnet
----
----  Field type     : Map sym3
----
----  Field map grid : 
----  x = 0.000 to 300.0 cm, 151 grid points, dx = 2.000 cm
----  y = 0.000 to 300.0 cm, 151 grid points, dy = 2.000 cm
----  z = 0.000 to 448.0 cm, 225 grid points, dz = 2.000 cm

----  Field centre position: (  0.000,  0.000,  50.00) cm
----  Field scaling factor: 1.000
----
----  Field at origin is (  0.000, -7.275, -2.727e-09) kG
======================================================
-E- FairRootManager Branch: GeoTracks not found in Tree
-E- FairRootManager Branch: GeoTracks not found in Tree
FairMCPointDraw::Init()  branch Monte-Carlo Tracks Not found! Task will be deactivated 
Info in <TGeoManager::SetVisLevel>: Automatic visible depth disabled
Warning in <TGLScene::RenderElements>: Timeout reached, not all elements rendered.
root [1] Warning in <TGLScene::RenderElements>: Timeout reached, not all elements rendered.



In other tests I also can not find the geometry information. Which class is now responsible for the real writing this information to the parameter file? My "cbmroot/trunk" revision number is 6780


Re: Moving the Geometry from data file to the parameters [message #9608 is a reply to message #9443] Mon, 26 October 2009 09:09 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,

Quote:

Error in <TBufferFile::ReadObject>: trying to read an emulated class (CbmTrd) to store in a compiled pointer (TObject)


you are missing the Trd library!


Quote:

-E- FairRootManager Branch: GeoTracks not found in Tree
-E- FairRootManager Branch: GeoTracks not found in Tree
FairMCPointDraw::Init() branch Monte-Carlo Tracks Not found! Task will be deactivated


in the run_sim.C macro the visualization flag is not set to true.



The geometry is now stored in the parameters (FairBaseParSet) exactly like the field. if you load the parameters the geometry will be loaded. if you would like to see the geometry in plain ROOT, then:



Quote:



//Load the libraries you need, then

TFile* file = new TFile("testparams.root");
file->Get("FairBaseParSet");

// now the geometry is available as TGeo in memory

gGeoManager->GetMasterVolume()->Draw("ogl");




regards

Mohammad


Re: Moving the Geometry from data file to the parameters [message #9609 is a reply to message #9608] Mon, 26 October 2009 09:27 Go to previous messageGo to next message
Elena Litvinenko is currently offline  Elena Litvinenko
Messages: 20
Registered: March 2004
Location: JINR, Dubna
occasional visitor
From: *jinr.ru
Hi. Mohammad,

Thanks for the hint with

file->Get("FairBaseParSet");



(I knew about libTrd Razz )

Regards,
Elena

[Updated on: Mon, 26 October 2009 09:28]

Report message to a moderator

Re: Moving the Geometry from data file to the parameters [message #9612 is a reply to message #9443] Mon, 26 October 2009 11:30 Go to previous messageGo to next message
Arun Prakash is currently offline  Arun Prakash
Messages: 11
Registered: March 2008
Location: Department of Physics,BHU...
occasional visitor
From: *gsi.de
I am performing the simulations for MuCh. I could successfully perform the transport and segmnetation. Now when I am running the much_hits_gem.C (with simple gem) I am getting the following error .

Processing much_hits_gem.C...

PSaid instance created... access via gSaid->f()

- RTDB container factory FairBaseContFact
- RTDB container factory CbmFieldContFact
- RTDB container factory CbmPassiveContFact
- RTDB container factory CbmStsContFact
- RTDB container factory CbmRichContFact
- RTDB container factory CbmTrdContFact
- RTDB container factory CbmTofContFact
- RTDB container factory CbmEcalContFact
- RTDB container factory CbmMuchContFact
-I- FairRunAna: Opening Input file: /u/cbmgast5/arun/cbmroot/macro/much/data/mc.box.0009.root
Info in <CbmMuchGeoScheme::CbmMuchGeoScheme>: CbmMuchGeoScheme created

-I- FairRunAna::Init :
/u/cbmgast5/arun/cbmroot/macro/much/data/mc.box.0009.root is connected with:

-I- Geometry was not found in the input file we will look in the friends if any!
create CbmFieldPar container CbmFieldPar

*************************************************************
initialisation for run id 1456339567
*************************************************************
Info in <TGeoManager::TGeoManager>: Geometry Geometry, default geometry created
Warning in <TGeoManager::Init>: Deleting previous geometry: Geometry/default geometry
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave
Info in <TGeoManager::Voxelize>: Voxelizing...
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::CloseGeometry>: 5512 nodes/ 4513 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
Container FairBaseParSet initialized from ROOT file.
Container CbmFieldPar initialized from ROOT file.
New field at 0xad00308, type 3
-I- CbmFieldMap: Reading field map from ROOT file /u/cbmgast5/arun/cbmroot/input/FieldMuonMagnet.root
======================================================
---- : FieldMuonMagnet
----
---- Field type : Map sym3
----
---- Field map grid :
---- x = 0.000 to 150.0 cm, 151 grid points, dx = 1.000 cm
---- y = 0.000 to 150.0 cm, 151 grid points, dy = 1.000 cm
---- z = 0.000 to 250.0 cm, 251 grid points, dz = 1.000 cm

---- Field centre position: ( 0.000, 0.000, 50.00) cm
---- Field scaling factor: 1.000
----
---- Field at origin is ( 0.000, -7.272, -2.724e-09) kG
======================================================

*** Break *** segmentation violation
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc

Kindly advise me as how to rectify this error
Re: Moving the Geometry from data file to the parameters [message #9613 is a reply to message #9612] Mon, 26 October 2009 11:32 Go to previous messageGo to next message
Arun Prakash is currently offline  Arun Prakash
Messages: 11
Registered: March 2008
Location: Department of Physics,BHU...
occasional visitor
From: *gsi.de
I am using the trunk version of cbmroot

Best Regards

Arun Prakash
Re: Moving the Geometry from data file to the parameters [message #9617 is a reply to message #9613] Mon, 26 October 2009 21:48 Go to previous 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,

please run with gdb and send the output. I.e:

>gdb root.exe
root>.x much_hits_gem.C

regards

Mohammad
Previous Topic: Control of Cuts for Geant4 in CBMRoot
Next Topic: CBMROOT release DEC09
Goto Forum:
  


Current Time: Sun Oct 06 00:29:37 CEST 2024

Total time taken to generate the page: 0.00692 seconds