GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » Problems with FTF/DPM with Geant4
icon8.gif  Problems with FTF/DPM with Geant4 [message #18104] Wed, 01 April 2015 17:30 Go to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Dear DPM and FTF experts,
trying to use these event generators with new packages I have found several problems once using geant4, while with geant3 everything seems fine.

In particular, if I run dpm direct with geant4 (macro/qa/dpm4/sim_complete.C) I have the following error once TGeant4 is created (I believe):

Info in <TG4RootNavMgr::SetNavigator>: TG4RootNavigator created and registered to G4TransportationManager

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : PART002
      issued by : G4ParticleTable::CheckReadiness()
Illegal use of G4ParticleTable :  Access to G4ParticleTable for finding a particle or equivalent
operation occurs before G4VUserPhysicsList is instantiated and
assigned to G4RunManager. Such an access is prohibited by
Geant4 version 8.0. To fix this problem, please make sure that
your main() instantiates G4VUserPhysicsList and set it to
G4RunManager before instantiating other user classes such as
G4VUserPrimaryParticleGeneratorAction.
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------


*** G4Exception: Aborting execution ***



If I try ftf with geant4 (macro/qa/ftf4/sim_complete.C):

Info in <TG4RootNavMgr::SetNavigator>: TG4RootNavigator created and registered to G4TransportationManager

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : Run0002
      issued by : G4RunManagerKernel::G4RunManagerKernel()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 G4RunManagerKernel fatal exception
  -- Following particles have already been registered
     before G4RunManagerKernel is instantiated.
     B+
     B-
     B0
     Bc+

Toggle Spoiler

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------


*** G4Exception: Aborting execution ***


The latter case comes from the fact that FTF is using Geant4 particle table without the G4RunManagerKernel initialization. The first i case I do not understand since it seems to me the DPM code is not using geant4.

I would like to ask the experts to check and fix, in practice now we cannot produce background events with geant4.
Re: Problems with FTF/DPM with Geant4 [message #18148 is a reply to message #18104] Tue, 21 April 2015 12:15 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 all,
I have isolated the problem, and it seems to be connected to FTF: FTF instantiate a g4 application, and geant4 finds an already existing g4 session and it crashes. Since FtfDirect and DpmDirect were in the same folder, they were interfering and also Dpm was crashing.
I have moved PndFtfDirect outside PGen inside FtfEvtGen package and now DPM can be used also with G4.
The problem of using FTF with Geant4 does persist, and I have no clue on how to fix it.
Re: Problems with FTF/DPM with Geant4 [message #20713 is a reply to message #18148] Sun, 26 March 2017 17:19 Go to previous messageGo to next message
Lu Cao is currently offline  Lu Cao
Messages: 77
Registered: February 2013
continuous participant
From: *wlan.uni-bonn.de
Dear all,

I'm trying to use FTF+Geant4 with the latest release Feb17p1, and unfortunately I found the exact same problem of FTF as posted here two years ago. Sad

Is there any updates/clues from the experts???


Best regards,
Lu
Re: Problems with FTF/DPM with Geant4 [message #20718 is a reply to message #20713] Sun, 26 March 2017 18:14 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *dyn.telefonica.de
Hi Lu,

PndFtfDirect does not work with Geant4 in our simulations. Please use the FTFGen executable located in your build/bin folder to create en event file and read that in your simulation macro (PndFtfGenertor).

Cheers!
Ralf
Re: Problems with FTF/DPM with Geant4 [message #20724 is a reply to message #20718] Mon, 27 March 2017 12:14 Go to previous messageGo to next message
Lu Cao is currently offline  Lu Cao
Messages: 77
Registered: February 2013
continuous participant
From: *wlan.uni-bonn.de
Thanks, Ralf! Your suggestion works.

In case someone else may have the same problem as me in the future, I provide the usable sim_complete.C in the attachment.

Regards,
Lu
Re: Problems with FTF/DPM with Geant4 [message #20737 is a reply to message #20724] Mon, 27 March 2017 17:53 Go to previous messageGo to next message
Lu Cao is currently offline  Lu Cao
Messages: 77
Registered: February 2013
continuous participant
From: *wlan.uni-bonn.de
Hi all,

there's a problematic issue on the "indirect" FTF+G4 event generator.

Our event filter cannot dynamically interact with it, therefore one has to prepare a large enough(?) event file beforehand to ensure the filter can select out something. This obviously reduces the convenience and functionality of event filter. If no sufficient events can be fed to the filter, the filter will just produce some fake events (no particles in event) according to the number of tries set by primGen->SetFilterMaxTries(). At the end, Geant4 is aborted due to "No primary particles found on the stack."

Is any smart ways to use FTF+G4+EventFilter ?

Best regards,
Lu

[Updated on: Mon, 27 March 2017 18:01]

Report message to a moderator

Re: Problems with FTF/DPM with Geant4 [message #20750 is a reply to message #20737] Tue, 28 March 2017 08:36 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: 185.182.81*
Dear Lu,

I do not see a simple solution for this problem because you do not know beforehand how many events you need when you use the filter. In addition there is no possibility to access the standalone FTF generator by the event filter.

Cheers,

Tobias
Re: Problems with FTF/DPM with Geant4 [message #20757 is a reply to message #20750] Tue, 28 March 2017 10:29 Go to previous messageGo to next message
Lu Cao is currently offline  Lu Cao
Messages: 77
Registered: February 2013
continuous participant
From: *dyn.telefonica.de
Dear Tobias,

Yes, I couldn't know how many events I need beforehand, but this is the exact reason why the filter is designed to call generator to produce events until the number of events set by user has been found, as far as I learn from https:// panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootEventFilterTutoria l . The filter can call the other generators, e.g. DpmDirect, EvtGenDirect, because they are "direct". The main problem is how to make FTF+G4 direct, or find out an alternative method.

Best regards,
Lu
Re: Problems with FTF/DPM with Geant4 [message #20760 is a reply to message #20757] Tue, 28 March 2017 10:45 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
The philosophy should be the same as done for the background of the tracking TDRs: Estimate how many events you need to have a decent statistics, run a very big data production only at the generator level, which in any case produces a small amount of data, and run from them your required number of events.
I.e., if your filter skims with a factor 1%, and you need 100k skimmed events, run 2M events to have a safety factor or 2.
Until somebody really spend some time to fix this FTF+G4 problem, this is the only chance. In the past I spent some time many times, but I was never able to find the clue. The solution would be to rewrite FTF generator so that it does not use g4 classes as it is doing now.
Previous Topic: Test
Next Topic: FTF stand-alone
Goto Forum:
  


Current Time: Wed Dec 04 03:51:54 CET 2024

Total time taken to generate the page: 0.00752 seconds