SpiRIT-Collaboration / SpiRITROOT

SPiRITROOT development repository
7 stars 3 forks source link

Material data in ROOT #9

Closed geniejhang closed 9 years ago

geniejhang commented 10 years ago

I found classes named FairGeoMedia and FairGeoMedium in class reference. The media file used as an input is loaded by FairRoot framework and interpreted as those classes I think.

Currently the material information inside the geometry is written with TGeoMedium which doesn't have any relation to FairGeoMedia or FairGeoMedium. I believe there're some routines to find material information in ROOT file somewhere in the code. So, what we have to do is just tracking back those part and find out how it does that and manipulate our ROOT file structure so that FairRoot can read our ROOT file.

squeak923 commented 10 years ago

That makes sense to me. I'll see what I can track down and see if I can adjust either my geometry or the Fair structure to match. Will update you as I find out more.

On Thu, Jul 10, 2014 at 8:38 PM, Genie Jhang notifications@github.com wrote:

I found classes named FairGeoMedia https://ribfana02.riken.jp/user/spirit/fairroot/classFairGeoMedium.html and FairGeoMedium https://ribfana02.riken.jp/user/spirit/fairroot/classFairGeoMedium.html in class reference. The media file used as an input is loaded by FairRoot framework and interpreted as those classes I think.

Currently the material information inside the geometry is written with TGeoMedium which doesn't have any relation to FairGeoMedia or FairGeoMedium. I believe there're some routines to find material information in ROOT file somewhere in the code. So, what we have to do is just tracking back those part and find out how it does that and manipulate our ROOT file structure so that FairRoot can read our ROOT file.

— Reply to this email directly or view it on GitHub https://github.com/SpiRIT-Collaboration/SPiRITROOT/issues/9.

squeak923 commented 10 years ago

I have located what I think is a logic "error" in the FairModule.cxx file. Upon loading the geometry, the code loops through the nodes that exist in the ROOT geometry file. It looks to see if the name of the material of that node matches a pre-existing name of a material loaded from an ASCII file. If it does not, then it outputs a Fatal Error.

What I think we want is to have, to have it do the following: 1) Check if the material name matches an existing one from the ASCII file. 2) If it does not pass this check, attempt to build the material into the list based off the ROOT file. 3) If the ROOT file does not contain enough information, then output a fatal error.

The only way I know to do this at the moment is to add step 2) to the FairModule.cxx file. Unless there are other ideas, this is how I am planning to proceed.

geniejhang commented 9 years ago

This is done in commit 26bf6ad2aaca34648e2d3a0782c3d11af341b817.