FairRunAna::SetGeomFile seems not to work [message #14842] |
Wed, 05 June 2013 22:08 |
Volker Friese
Messages: 365 Registered: April 2004 Location: GSI CBM
|
first-grade participant |
From: *gsi.de
|
|
The method SetGeomFile of FairRunAna should enable to use a different geometry in the analysis run than was used in the simulation and stored in the parameter database, a feature which is needed e.g. for studying the effects of mis-alignment.
Unfortunately, the implementation seems not to be correct. Whatever geometry file is set in this method, what you get in the end is the geometry from the parameters. This can be seen from the screen output:
Quote: | [INFO ] Opening Geometry input file: data/000.geofile.root
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
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 <TGeoManager::CloseGeometry>: 2640 nodes/ 63 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
[INFO ] The input consists out of the following trees and files:
[INFO ] - cbmsim
[INFO ] - data/x200.mc.root
[INFO ] - FriendTree_1
[INFO ] - data/x200.raw.root
[INFO ] Parameter and input file are available, Assure that basic info is there for the run!
[INFO ] The number of entries in chain is 100
*************************************************************
initialisation for run id 1370261320
*************************************************************
-I- FairRunTimeDB::InitContainer() FairBaseParSet
Warning in <TGeoManager::Init>: Deleting previous geometry: FAIRGeom/FAIR 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 <TGeoManager::CloseGeometry>: 2640 nodes/ 63 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
Container FairBaseParSet initialized from ROOT file.
|
Evidently, the geometry is first read from the specified geometry file and then deleted and replaced with the one from the parameter container.
I tried to locate where that happens and followed from FairRunAna::Init() to FairRunTimeDb::initContainers to FairParSet::init() to FairParSet::init(FairParIo*) to FairParGenericSet::init(FairParIo*) to FairParDetIo::init(FairParGenericSet*).... but eventually gave up, being lost in this jungle.
|
|
|
Re: FairRunAna::SetGeomFile seems not to work [message #14844 is a reply to message #14842] |
Thu, 06 June 2013 09:43 |
Mohammad Al-Turany
Messages: 518 Registered: April 2004 Location: GSI, Germany
|
first-grade participant |
From: *gsi.de
|
|
Hallo Volker,
Yes, this is true! This method was implemented at the time where the the geometry was saved in the data file, and as we move the geometry to the parameters we did not think about it (Sorry!!). Anyway, I created a new Parameter container for the the geometry now and this will be filled by the simulation and case you do not set your geometry manually it will be initialized. So nothing should changed for you except that it should work now! (Fairbase Trunk 20129)
I test it with our tutorials: runing run_digi macro in example/Tutorial3
Quote: |
root run_digi.C -l
root [0]
Processing run_digi.C...
FairRootManager::OpenOutFile("data/testdigi.root")
[INFO ] The input consists out of the following trees and files:
[INFO ] - cbmsim
[INFO ] - data/testrun.root
[INFO ] Parameter and input file are available, Assure that basic info is there for the run!
[INFO ] The number of entries in chain is 10
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] No event Header was found!!!
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
*************************************************************
initialisation for run id 1370503422
*************************************************************
-I- FairRunTimeDB::InitContainer() FairGeoParSet
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::Voxelize>: Voxelizing...
Info in <TGeoManager::CountLevels>: max level = 1, max placements = 8
Info in <TGeoManager::CloseGeometry>: 9 nodes/ 5 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
Container FairGeoParSet initialized from ROOT file.
-I- FairRunTimeDB::InitContainer() FairBaseParSet
Container FairBaseParSet initialized from ROOT file.
*************************************************************
initialisation for run id 1370503422
*************************************************************
-I- FairRunTimeDB::InitContainer() FairGeoParSet
-I- FairRunTimeDB::InitContainer() FairBaseParSet
*************************************************************
initialisation for run id 1370503422
*************************************************************
-I- FairRunTimeDB::InitContainer() FairGeoParSet
-I- FairRunTimeDB::InitContainer() FairBaseParSet
[INFO ] The number of entries in chain is 10
Macro finished successfully.
Output file is data/testdigi.root
Parameter file is data/testparams.root
Real time 0.039017 s, CPU time 0.03 s
Test passed
All ok
root [1]
|
and if you add the line fRun->SetGeomFile("data/geofile_full.root") to the macro you get:
Quote: | root run_digi.C -l
root [0]
Processing run_digi.C...
FairRootManager::OpenOutFile("data/testdigi.root")
[INFO ] Opening Geometry input file: data/geofile_full.root
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::Voxelize>: Voxelizing...
Info in <TGeoManager::CountLevels>: max level = 1, max placements = 8
Info in <TGeoManager::CloseGeometry>: 9 nodes/ 5 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
[INFO ] The input consists out of the following trees and files:
[INFO ] - cbmsim
[INFO ] - data/testrun.root
[INFO ] Parameter and input file are available, Assure that basic info is there for the run!
[INFO ] The number of entries in chain is 10
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] No event Header was found!!!
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
*************************************************************
initialisation for run id 1370503422
*************************************************************
-I- FairRunTimeDB::InitContainer() FairBaseParSet
Container FairBaseParSet initialized from ROOT file.
*************************************************************
initialisation for run id 1370503422
*************************************************************
-I- FairRunTimeDB::InitContainer() FairBaseParSet
*************************************************************
initialisation for run id 1370503422
*************************************************************
-I- FairRunTimeDB::InitContainer() FairBaseParSet
[INFO ] The number of entries in chain is 10
Macro finished successfully.
Output file is data/testdigi.root
Parameter file is data/testparams.root
Real time 0.0395799 s, CPU time 0.04 s
Test passed
All ok
|
Cheers,
Mohammad
|
|
|
|
Re: Still some problems [message #14858 is a reply to message #14857] |
Mon, 10 June 2013 21:53 |
Mohammad Al-Turany
Messages: 518 Registered: April 2004 Location: GSI, Germany
|
first-grade participant |
From: *dip0.t-ipconnect.de
|
|
Hallo Volker,
I just try it with the standard macros in cbmroot/macro/run and the trunk of today, it works fine for me. Could it be that something went wrong with switching cbmroot to use the trunk of FairRoot in your local repository!
cheers,
Mohammad
Quote: | run_reco.C...
[INFO ] Opening Geometry input file: geo.root
FairRootManager::OpenOutFile("data/test.eds.root")
Starting CbmMvdDigitizeL::CbmMvdDigitizeL()
CbmTofHitProducerNew instantiated with verbose = 1
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::Voxelize>: Voxelizing...
Error in <TGeoVoxelFinder::SortAll>: Cannot voxelize pole_alu :less than 2 boundaries on Z
Info in <TGeoManager::CountLevels>: max level = 6, max placements = 286
Info in <TGeoManager::CloseGeometry>: 419024 nodes/ 184 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
[INFO ] The input consists out of the following trees and files:
[INFO ] - cbmsim
[INFO ] - data/test.mc.root
[INFO ] Parameter and input file are available, Assure that basic info is there for the run!
[INFO ] The number of entries in chain is 2
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] No event Header was found!!!
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
*************************************************************
initialisation for run id 1370892023
*************************************************************
-I- FairRunTimeDB::InitContainer() FairBaseParSet
Container FairBaseParSet initialized from ROOT file.
-I container name CbmMvdGeoPar
-I container name CbmGeoStsPar
-I container name CbmStsDigiPar
-I container name CbmGeoMuchPar
-I container name CbmGeoTofPar
Error in <FairRuntimeDb::getContainer(Text_t*)>: Container CbmGeoSttPar not created!
create CbmFieldPar container CbmFieldPar
[INFO ] Get the digi parameters for tof
-I container name CbmTofDigiPar
|
and without geometry file:
Quote: |
Processing run_reco.C...
FairRootManager::OpenOutFile("data/test.eds.root")
Starting CbmMvdDigitizeL::CbmMvdDigitizeL()
CbmTofHitProducerNew instantiated with verbose = 1
[INFO ] The input consists out of the following trees and files:
[INFO ] - cbmsim
[INFO ] - data/test.mc.root
[INFO ] Parameter and input file are available, Assure that basic info is there for the run!
[INFO ] The number of entries in chain is 2
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] No event Header was found!!!
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
*************************************************************
initialisation for run id 1370892023
*************************************************************
-I- FairRunTimeDB::InitContainer() FairGeoParSet
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::Voxelize>: Voxelizing...
Error in <TGeoVoxelFinder::SortAll>: Cannot voxelize pole_alu :less than 2 boundaries on Z
Info in <TGeoManager::CountLevels>: max level = 6, max placements = 286
Info in <TGeoManager::CloseGeometry>: 419024 nodes/ 184 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
Container FairGeoParSet initialized from ROOT file.
-I- FairRunTimeDB::InitContainer() FairBaseParSet
Container FairBaseParSet initialized from ROOT file.
-I container name CbmMvdGeoPar
-I container name CbmGeoStsPar
-I container name CbmStsDigiPar
-I container name CbmGeoMuchPar
-I container name CbmGeoTofPar
Error in <FairRuntimeDb::getContainer(Text_t*)>: Container CbmGeoSttPar not created!
create CbmFieldPar container CbmFieldPar
[INFO ] Get the digi parameters for tof
-I container name CbmTofDigiPar
*************************************************************
initialisation for run id 1370892023
*************************************************************
|
|
|
|