GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Crash in DIRC with G4
icon8.gif  Crash in DIRC with G4 [message #12923] Wed, 18 January 2012 18:24 Go to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 134.158.79*
Hi,
I have tried to run DIRC simulation with G4 and I have the following crash:

Toggle Spoiler


In order to see this I have run macro/drc/sim_dirc.C. If I use G3 I have no crash. This affects all the macros using G4. Could somebody please check what is going wrong?
I am using jan12 and latest trunk.
Re: Crash in DIRC with G4 [message #12928 is a reply to message #12923] Thu, 19 January 2012 11:36 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 134.158.79*
Hi,
just a small addendum.
Dirc works wth the option "geomRootToGeant4" in g4Config.C, but in such a case STT and MVD geoemtries are not working anymore.

Is there a way to have all these detectors working under geant4 at the same time?
Re: Crash in DIRC with G4 [message #12929 is a reply to message #12928] Thu, 19 January 2012 11:45 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: *ikp.kfa-juelich.de
Hi,
the MVD cannot run with a native Geant4 geometry because it uses assemblies which are not supported in Geant4.

Cheers,

Tobias
Re: Crash in DIRC with G4 [message #13185 is a reply to message #12929] Tue, 13 March 2012 10:54 Go to previous messageGo to next message
Ivana Hrivnacova
Messages: 6
Registered: March 2012
occasional visitor
From: 134.158.93*
Dear all,

There is no problem with assemblies for converting geometry from Root in Geant4. They are fully supported in the VGM converter.
Also, the crash when using geomRoot option in some detectors is not normal.
Could you, please, send me a geometry files with these geometries (one with the detector having a problem with geomRootToGeant4 and another one with those crashing with geomRoot) so that I can investigate it outside the PandaRoot framework?

Thank you,

Ivana
Re: Crash in DIRC with G4 [message #13190 is a reply to message #13185] Tue, 13 March 2012 15:31 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Dear Ivana,
if you like to play with our geometry files Smile,
this is the one working with geomRootToGeant4, and this is the other whch is working with geomRoot.

Good luck!
Re: Crash in DIRC with G4 [message #13194 is a reply to message #13190] Tue, 13 March 2012 16:17 Go to previous messageGo to next message
Ivana Hrivnacova
Messages: 6
Registered: March 2012
occasional visitor
From: 134.158.93*
I am getting error when trying to open these files in root:
root [0] TGeoManager::Import("dirc_l0_p0.root")
Info in <TGeoManager::Import>: Reading geometry from file: dirc_l0_p0.root
(class TGeoManager*)0x0

Maybe there has to be first loaded some top file?

Thanks,
Re: Crash in DIRC with G4 [message #13199 is a reply to message #13194] Wed, 14 March 2012 02:41 Go to previous messageGo to next message
Maria Patsyuk is currently offline  Maria Patsyuk
Messages: 58
Registered: April 2010
continuous participant
From: 202.122.36*
Hello,

I'm the responsible person for the DIRC simulation in PandaRoot, but now I'm away. If it is possible to wait a week until I'm back at GSI, I'll take a look into all these bugs. I'm following this thread, but unfortunately right now I can't do anything.

Best regards,
Maria
Re: Crash in DIRC with G4 [message #13201 is a reply to message #13199] Wed, 14 March 2012 12:34 Go to previous messageGo to next message
Ivana Hrivnacova
Messages: 6
Registered: March 2012
occasional visitor
From: 134.158.93*
Dear Marina,

I need just a geometry file which I can open outside pandaroot framework, so maybe Stefano or someone else can re-generate a complete Root file in meantime.
But it can wait when you are back as well.

Best regards,

Ivana
Re: Crash in DIRC with G4 [message #13203 is a reply to message #13201] Wed, 14 March 2012 18:10 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
I attach here the root file where I have exported the TGeoManager of our DIRC, I don't know if you are able to read it from the forum.

The macro to create it is the following, but it has inside panda dependencies.
  • Attachment: test.root
    (Size: 10.53KB, Downloaded 260 times)
Re: Crash in DIRC with G4 [message #13210 is a reply to message #13203] Thu, 15 March 2012 14:00 Go to previous messageGo to next message
Ivana Hrivnacova
Messages: 6
Registered: March 2012
occasional visitor
From: 134.158.93*
The file is ok; I was able to reproduce the crash with G4Root (used in geomRoot) option. I will report the problem to Andrei Gheata who developed this tool.

Could you also re-generate Root files with the other geometries failing with geomRootToGeant4?

Thank you,

Ivana
Re: Crash in DIRC with G4 [message #13212 is a reply to message #13210] Thu, 15 March 2012 14:52 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
It seems with geomRootToGeant4 we have many strange warnigns not appearing in the gemRoot case:

-I- Initializing PndSdsDetector()
++++  TG4Warning:  ++++
    TG4SDServices::GetVolumeID:
    Unknown Volume Id for PixelActiveo5oPartAss
+++++++++++++++++++++++

++++  TG4Warning:  ++++
    TG4SDServices::GetVolumeID:
    Unknown Volume Id for PixelActiveo5oPartAss
+++++++++++++++++++++++


++++  TG4Warning:  ++++
    TG4SDServices::GetVolumeID:
    Unknown Volume Id for SciTiloPartAss
+++++++++++++++++++++++


During event loop:

++++  TG4Warning:  ++++
    TG4MCGeometry::GetTransformation:
    Daughter volume &stt01assembly in /cave_1/&stt01assembly_0%stt01tube_57/stt01gas_1 does not exist.
+++++++++++++++++++++++


and

Negative element index in EMC, name=cave


...
maybe detector experts should comment about, I don't have the macros to produce such geometries with TGeoManager (it is more than one detector, as you can see).

Re: Crash in DIRC with G4 [message #13213 is a reply to message #13212] Thu, 15 March 2012 15:16 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
yes,
from my experience that is due to the fact that when one uses the option GeomRootToGeant4 the path to the sensitive volume
within the volume hierarchy is not separated by "/" but "&" .....


best regards
Alicia.
Re: Crash in DIRC with G4 [message #13265 is a reply to message #12923] Wed, 28 March 2012 14:04 Go to previous messageGo to next message
Oliver Merle is currently offline  Oliver Merle
Messages: 13
Registered: December 2010
occasional visitor
From: *wlan.uni-giessen.de
I've observed the same problem when I started implementing the Disc DIRC geometry earlier this year. To understand how you construct the geometry within PandaRoot, I had to read your code (thanks for the missing documentation, really helpfull) and expected undefined behavior if the first volume (v1 in void FairModule::ConstructRootGeometry()) is not a TGeoAssembly.

The reason is simple: the material of the first volume is ignored. Hard to believe that these geometry files have ever worked in Geant4 - how was it possible without proper material information? Somehow I doubt that they worked ever. With which version of pandaroot and external packages did they actually work? I would like to check that.

I've implemented a fix which works fine for me. Try the attached version FairModule and see if it solves your problem.


Regards,
Oliver
Re: Crash in DIRC with G4 [message #13266 is a reply to message #13265] Wed, 28 March 2012 16:40 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 Oliver,

The ConstructRootGeometry was specially implemented for ROOT files which are produced by the CAD2ROOT converter where the keeping volumes are always "Assemblies" and maybe that is the reason we did not see any see the crash there, in any case if you discover an error there then thanks a lot we will check that and correct it and write in the credits that you discover it!

now if you read the posts before yours, you will notice that the crash was reproducible without FairModule and without the error you discover.

Quote:

The reason is simple: the material of the first volume is ignored. Hard to believe that these geometry files have ever worked in Geant4 - how was it possible without proper material information? Somehow I doubt that they worked ever. With which version of pandaroot and external packages did they actually work? I would like to check that.


This is very easy to test, in the g4Config.C set the option: geomRootToGeant4
This works with the same DIRC geometry and the (according to your comments) crappy code in FairModule, for your info, this option means use the native G4 geometry and navigation, and this works with all versions of PandaRoot and external packages, the problem when you set this option is that some detectors (STT and emc) relay on the herachy of volumes to create set some variables, in ROOT the Assembly has an ID and can be a mother of a volume, in G4 the assemblies do not show up at all during the simulation, and this create some problems (Stefano mentioned this in the second post here!)


About the documentation I cannot promise to document every single line in the code, but we will try our best!


regards

Mohammad
Re: Crash in DIRC with G4 [message #13268 is a reply to message #13266] Wed, 28 March 2012 18:39 Go to previous messageGo to next message
Oliver Merle is currently offline  Oliver Merle
Messages: 13
Registered: December 2010
occasional visitor
From: *wlan.uni-giessen.de
Thanks Mohammad,

Mohammad Al-Turany wrote on Wed, 28 March 2012 16:40


This is very easy to test, in the g4Config.C set the option: geomRootToGeant4
This works with the same DIRC geometry and the (according to your comments) crappy code in FairModule,


I thought I had tested this with native navigation, but it seems I switched to G4 after the update of FairModule. Silly me. Anyhow, even if it doesn't crash with G4 native navigation, the material of v1 is not guaranteed to be equal to the one defined in the media file because it was not obtained via your factory.

The "crappy" code works, it just has to be called for v1, too. Fixing this is no big deal, so I don't care about any credit. I guess it wouldn't hurt to use the Logger instead of std::out, too. (BTW: I was a bit pissed when I fixed the issue Wink )

Quote:


About the documentation I cannot promise to document every single line in the code, but we will try our best!



It is NOT about commenting a line of code. I can read C++. It is about commenting how the algorithms are intended to work, why things are implemented that way and how things are intended to be used.

Regards,
Oliver
Re: Crash in DIRC with G4 [message #13270 is a reply to message #13268] Wed, 28 March 2012 20:46 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
Hallo Oliver,

Ok, I added your changes to SVN (r 15136) I also get rid of COUTs and add a few lines explaining some functionality, but still many things to document!

regards

Mohammad
Previous Topic: problem with DIRC geometry (TGeant3) ?
Next Topic: fatal error in Event generation
Goto Forum:
  


Current Time: Sun Nov 10 19:38:31 CET 2024

Total time taken to generate the page: 0.00989 seconds