GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Saving geometry inside FairBaseParSet
icon9.gif  Saving geometry inside FairBaseParSet [message #13691] Tue, 03 July 2012 12:05 Go to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Dear fairroot experts,
let's assume I want to analyse some MVD experimental data stored inside a root file. I have already a task (unpacker) reading the file and converting data into pandaroot format. My main problem is that I need to use the geometry for the reconstruction tasks (i.e. position of sensors).

If I have to run the simulation, with FairRunSim, I add my module to the geometry and it is stored inside the parameter file under the FairBaseParSet container. Ok.

If I run my unpacker (which is a task) not starting from a simulation but from an external file, I have to use FairRunAna and I cannot add the module. I have seen there is the function:

Quote:

fRun->SetGeomFile(geomFile);


which is loading my geometry file, under TGeoManager format.
My main concern is that in this way the geometry is loaded but it is not stored as FairBaseParSet, and my output param file does not contain it. I need FairBaseParSet container for further data processing.

In my task I put, in the SetParContainers() function:

  FairRuntimeDb* rtdb=ana->GetRuntimeDb(); 
  FairBaseParSet* par=(FairBaseParSet*)(rtdb->getContainer("FairBaseParSet"));
  rtdb->initContainers(ana->GetRunId());


but still FairBaseParSet is not saved.

Is it a bug of fairroot, or simply I should do something different?
Any help would be very appreciated.

Regards
Re: Saving geometry inside FairBaseParSet [message #13739 is a reply to message #13691] Wed, 11 July 2012 19:18 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
Hallo Stefano,

You need to modify your function to:

  
  FairRuntimeDb* rtdb=ana->GetRuntimeDb(); 
  FairBaseParSet* par=(FairBaseParSet*)(rtdb->getContainer("FairBaseParSet"));
  par->SetGeometry(gGeoManager);
  par->setChanged();
  par->setInputVersion(ana->GetRunId(),1);




In fact we could also automate the saving of geometry from the FairRunAna if this is needed by all, in any case please test the above stuff and let me know.

regards,

Mohammad
Re: Saving geometry inside FairBaseParSet [message #13740 is a reply to message #13739] Wed, 11 July 2012 20:09 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *7-79-r.retail.telecomitalia.it
Hi,
You mean in the digitization macro or in the reconstruction task? Or in both?
Re: Saving geometry inside FairBaseParSet [message #13741 is a reply to message #13740] Wed, 11 July 2012 20:18 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 Stefano,

In the reconstruction task, the method SetParContainers().

Mohammad
Previous Topic: Cherenkov photons. Accuracy problem with Geant3
Next Topic: config.sh and LD_LIBRARY_PATH, PATH
Goto Forum:
  


Current Time: Sun Apr 28 03:47:39 CEST 2024

Total time taken to generate the page: 0.00882 seconds