GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » new FTF generator in pandaroot
new FTF generator in pandaroot [message #17243] Thu, 04 September 2014 17:06 Go to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *jinr.ru
Hi all,

I have implemented new generator FTF of Geant4 in PandaRoot
in directory trunk/pgenerators.
FTF can generate Pbar-P, Pbar-Nucleus, light Anti-nucleus-Nucleus,
Hyperon-P, Hyperon-Nucleus interactions at wide energy range
from 100 MeV to 1000 GeV.

FTF is based on ideas of DPM and extended them on Pbar-Nucleus interactions.
It works faster than UrQMD.

For FTF generator, I created sub-directory FtfEvtGen similar to DpmEvtGen.

Some words, about FTF run.
-------------------------------------------------------------
At first, you need to compile FTF.
For this, in the folder pgenerators/FtfEvtGen give a command:
> make -f FTFmake

You will obtain FTFGen executable file.

For generation of Pbar-P events, you have to use file PbarP.mac .
In the file PbarP.mac, you need to set

after line
#events
Number of Events

after line
#Plab(GeV/c)
Momentum of projectile antiproton

Then, you give command
> ./FTFGen PbarP.mac

and will obtain FTF.root file with Root-Tree, where all
information about produced particles is presented.

------------------------------------------------------------------------ ---
For generation of Pbar-A events, you can use PbarA.mac.
You need to insert some values there.
First of all, Geant4 name of material - G4_Name, for example,
for carbon - G4_C, for gold - G4_Au, for cupper -G4_Cu and so on,

after line
#material
G4_Name

after line
#targetA
mass number of target nucleus

after line
#generator
ftfp or ftfb

after line
#events
Number of Events

after line
#Plab(GeV/c)
Momentum of projectile antiproton

--------------------------------------------------------------------
"ftfp" is combination of FTF generator and simple generator Preco
for low particles proceeding in nucleus.
"ftfb" is composition of FTF generator and Binary Cascade model of Geant4.
"ftfp" works faster, but "ftfb" gives more correct information about
evaporated nucleons.
------------------------------------------------------------------------ -------

Next command must be
> ./FTFGen PbarA.mac

After run, you will obtain "FTF.root" file with all information in the Root-Tree.
------------------------------------------------------------------------ ---------

We can apply "FTF.root" for future simulation in PandaRoot,
using class PndFtfGenerator similar to PndDpmGenerator.

------------------------------------------------------------------------ ----------
Information about FTF run is also presented in the file
pgenerators/FtfEvtGen/README.txt .
If you have questions about FTF, please, write me.
Good luck
Aida
Re: new FTF generator in pandaroot [message #17244 is a reply to message #17243] Fri, 05 September 2014 08:47 Go to previous messageGo to next message
Anastasia Karavdina is currently offline  Anastasia Karavdina
Messages: 76
Registered: May 2010
Location: Mainz, Germany
continuous participant

From: *kph.uni-mainz.de
Dear Aida,
Thank you very much for making FTF available within pandaroot!

I tried to compile it according to the instruction. But after "make -f FTFmake" got following error:

Linking binary FTFGen ...
/usr/bin/ld: tmp/main.o: undefined reference to symbol 'aTouchableHistoryAllocator'
/usr/bin/ld: note: 'aTouchableHistoryAllocator' is defined in DSO /panda/fairroot/apr13Build/lib/libG4geometry.so so try adding it to the linker command line
/panda/fairroot/apr13Build/lib/libG4geometry.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [FTFGen] Error 1


Did somebody else try it with apr13 external packages?
Re: new FTF generator in pandaroot [message #17246 is a reply to message #17244] Fri, 05 September 2014 15:29 Go to previous messageGo to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *jinr.ru
Hello Anastaciya,

> Did somebody else try it with apr13 external packages?

When I implemented FTF,
I used apr13 external packages in linux cluster gsi : ica.hpc.gsi.de .
SIMPATH is
/cvmfs/fairroot.gsi.de/fairsoft/apr13

About errore
------------------------------------------
Linking binary FTFGen ...
/usr/bin/ld: tmp/main.o: undefined reference to symbol 'aTouchableHistoryAllocator'
/usr/bin/ld: note: 'aTouchableHistoryAllocator' is defined in DSO /panda/fairroot/apr13Build/lib/libG4geometry.so so try adding it to the linker command line
/panda/fairroot/apr13Build/lib/libG4geometry.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [FTFGen] Error 1
------------------------------------------------------------------------ ---------

I think, if your linker requires to add
"aTouchableHistoryAllocator" from libG4geometry.so,
add in the file common.mk

-lG4geometry

in the line
LDLIBS += $(PANDALIBS) -L$(GEANT4_LIBRARY_DIR) -lG4clhep -lG4global -lG4physicslists $(GLIBS)

after -lG4clhep .

And, try to compile FTF.

If again you have problems, please, give command
>echo $GEANT4_LIBRARY_DIR

what "path" do you obtain?
If you go to this "path", can you observe files: libG4clhep.so, libG4global.so, libG4physicslists.so ?

good luck,
Aida
Re: new FTF generator in pandaroot [message #17248 is a reply to message #17246] Fri, 05 September 2014 16:23 Go to previous messageGo to next message
Anastasia Karavdina is currently offline  Anastasia Karavdina
Messages: 76
Registered: May 2010
Location: Mainz, Germany
continuous participant

From: *kph.uni-mainz.de
Dear Aida,
Thank you for quick reply!
Indeed my LDLIBS path required some changes, following your recipe I ended up with this line:
LDLIBS += $(PANDALIBS) -L$(GEANT4_LIBRARY_DIR) -lG4clhep  -lG4geometry  -lG4materials -lG4particles -lG4processes -lG4track -lG4global -lG4physicslists  $(GLIBS) 


(just in case if somebody else will have similar problems during compilation)

Generation of FTF.root went smoothly and output looks ok Smile


Best regards,
Anastasia
Re: new FTF generator in pandaroot [message #17291 is a reply to message #17243] Tue, 16 September 2014 08:28 Go to previous messageGo to next message
Anastasia Karavdina is currently offline  Anastasia Karavdina
Messages: 76
Registered: May 2010
Location: Mainz, Germany
continuous participant

From: *kph.uni-mainz.de
Dear Aida,
I have question concerning processes included in FTF. Does it contain only inelastic or both elastic and inelastic interactions?

Best regards,
Anastasia
Re: new FTF generator in pandaroot [message #17297 is a reply to message #17291] Tue, 16 September 2014 14:33 Go to previous messageGo to next message
Anastasia Karavdina is currently offline  Anastasia Karavdina
Messages: 76
Registered: May 2010
Location: Mainz, Germany
continuous participant

From: *kph.uni-mainz.de
Dear Aida,
I had a look at main.cc file in pgenerators/FtfEvtGen and came to conclusion that elastic scattering is included, but only hadronic part of it.
Is it right?
It would be nice to have option to switch off elastic part and use only inelastic mode, as it was before in DPM.

Also I notice, that energy of final particles is stored in MeV, while pandaroot deals with GeV. I suspect due to this reason particles are treated as particles with high energy and propagation with GEANT4 (within pandaroot) is extremely slow.
I introduced conversion to GeV by changing one line in main.cc:
from
Mom.SetPxPyPzE(px,py,pz,e);

to
Mom.SetPxPyPzE(px/GeV,py/GeV,pz/GeV,e/GeV);

But I am not sure if it is correct place to do this conversion. What do you think?

Best regards,
Anastasia
Re: new FTF generator in pandaroot [message #17308 is a reply to message #17297] Wed, 17 September 2014 18:13 Go to previous messageGo to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *jinr.ru
Hello Anastasia,

>I had a look at main.cc file in pgenerators/FtfEvtGen and came
>to conclusion that elastic >scattering is included, but only hadronic part of it.
>Is it right?
>It would be nice to have option to switch off elastic part and
>use only inelastic mode, as it was before in DPM.

It is not possible, because for FTF generator in PandaRoot, I apply to
Geant4 lib and can not change compilled sourse files of FTF.

But, you can obtain only inelastic events using FtfEvtGen/main.cc .

For this, you need to add in the main.cc after line
----------------------------------------------
if(std::abs(pd->GetBaryonNumber()) < 2)
----------------------------------------------

line
---------------------------------------------
if( (n>2) || ((abs(id)!=2212)&&(n==2)) ) {
------------------------------------------------

and after line
----------------------------------------------
new((*fEvt)[cnt++]) TParticle(fparticle);
----------------------------------------------

to add
--------------------
}
--------------------

After this, it is needed to compile FTF.

About "MeV" or "GeV", thank you, I didn't draw attention to it.
Just now, I have changed and commited main.cc .
Output particles are stored in GeV.

Good luck
Aida
Re: new FTF generator in pandaroot [message #17309 is a reply to message #17308] Wed, 17 September 2014 20:03 Go to previous messageGo to next message
Anastasia Karavdina is currently offline  Anastasia Karavdina
Messages: 76
Registered: May 2010
Location: Mainz, Germany
continuous participant

From: *kph.uni-mainz.de
Dear Aida,
Thank you very much for quick reply and fix of the problem in the code.
Solution for "inelastic only" didn't work for me, because empty particles branches were still written in the TTree and PANDAroot could not handle them. Therefore I added flag for filling tree with inleastic events only.
This seems to be working Smile

Best regards,
Anastasia.

P.S: All interested people can find attached my modification of main.cc
  • Attachment: main.cc
    (Size: 12.38KB, Downloaded 296 times)
Re: new FTF generator in pandaroot [message #17310 is a reply to message #17243] Wed, 17 September 2014 21:42 Go to previous messageGo to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *dubna.ru
Hello Anastasia,

Before writing you, I included "lines" (for inelastic),
what about I wrote you,
and obtained normal Tree with about 2800 particles
in 1000 Events at 2 GeV/c initial mometum.
Without these "lines", number of particles was about 3500.

How did you obtain empty Tree?
May be, you didn't put closing "}" on the needed pkace.

Aida



Re: new FTF generator in pandaroot [message #17326 is a reply to message #17310] Sun, 21 September 2014 00:57 Go to previous messageGo to next message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *dip0.t-ipconnect.de
Hi Aida and Anastasia,

I am very interested in FTF, and now trying to compare with DPM.
Do I have to update main.cc (which is attached by Anastasia) in order to have only inelastic event?

Best wishes,
Donghee
Re: new FTF generator in pandaroot [message #17327 is a reply to message #17326] Sun, 21 September 2014 09:14 Go to previous messageGo to next message
Anastasia Karavdina is currently offline  Anastasia Karavdina
Messages: 76
Registered: May 2010
Location: Mainz, Germany
continuous participant

From: *adsl.alicedsl.de
Hi Donghee,
Very good, one more tester user Smile

In our privite discussion with Aida we resolved all misunderstanding and she also checked main.cc attached above. The conclusion, for inelastic events only the attached main.cc version is OK.

Best regards,
Anastasia
Re: new FTF generator in pandaroot [message #17328 is a reply to message #17308] Sun, 21 September 2014 10:55 Go to previous messageGo to next message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *dip0.t-ipconnect.de
Hi FTF frontier,

I have a trouble to compile it.
I changed LIBS in common.mk as you suggested but fail to produce executable object with make -f FTFmake

----------------------------------------------
collect2: error: ld returned 1 exit status
make: *** [FTFGen] Error 1
----------------------------------------------

fairsoft_apr13 and pandaroo_trunk I am currently using.

Best wishes,
Donghee
Re: new FTF generator in pandaroot [message #17329 is a reply to message #17328] Sun, 21 September 2014 13:43 Go to previous messageGo to next message
Anastasia Karavdina is currently offline  Anastasia Karavdina
Messages: 76
Registered: May 2010
Location: Mainz, Germany
continuous participant

From: *adsl.alicedsl.de
Hi Donghee,
Unfortunately I can't help much. I believe it's OS or compiler related problem. The compilation trick, which I mentioned before, works for Fedora. Compilation on our computing cluster (HIMster) works out of box. However, at my home PC with Kubuntu(14) it does not work. I just tried it now and got many "undefined reference to" errors, which in the end lead to "error: ld returned 1 exit status"
Maybe our computing experts could have a look?

Cheers,
Anastasia
Re: new FTF generator in pandaroot [message #17332 is a reply to message #17328] Mon, 22 September 2014 11:48 Go to previous messageGo to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *dubna.ru
Hi Donghee,

The main difficulty of FTF compillation is find right path
to Geant4 library files.

In your trunk directory, please give:

> echo $GEANT4_LIBRARY_DIR

what "path" do you obtain?

If you go to this "path", do you see lib-files:
libG4clhep.so, libG4global.so, libG4physicslists.so ?

Do you observe there lib-files, proposed by Anastasia:
libG4geometry, libG4materials, libG4particles, libG4processes?

Aida
Re: new FTF generator in pandaroot [message #17333 is a reply to message #17332] Mon, 22 September 2014 17:11 Go to previous messageGo to next message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *dip0.t-ipconnect.de
Hi Aida,

All libraries related Geant4 are correctly in position, where is in fairsoft_apr13.
This problem is only for some OS. At GSI and Mainz farm everything went fine but I met in my private machine with ubuntu 12.10 or some OS.
I think something gcc or other common libraries are weired.
Thank you for your help.

Best wishes,
Donghee


Re: new FTF generator in pandaroot [message #17335 is a reply to message #17333] Mon, 22 September 2014 19:10 Go to previous messageGo to next message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *dip0.t-ipconnect.de
Hi Aida,

What about random seed during the production?
If I do two times without change option string, output will be different?
./FTFGen PbarP.mac | mv FTF.root FTF_1.root
./FTFGen PbarP.mac | mv FTF.root FTF_2.root

or Do I need some more action to get different events from output?

Best wishes,
Donghee
Re: new FTF generator in pandaroot [message #17337 is a reply to message #17327] Mon, 22 September 2014 23:29 Go to previous messageGo to next message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *dip0.t-ipconnect.de
Hi Aida,

I have a question about stable particle in FTF.

In DPM, some generated particles are stable, which is Pi0, K_S0, Lambda, anti-Lambda, eta.
I am now interested in the fundamental kinematics of both generators.
At pure stand-alone generator study or fast simulation, they(stable particles) are normally turning to be unstable for DPM case.

If I want to do same study with FTFGen at fast simulation or stand-alone generator, Do I need to allow decay in order to compare with DPM generator.
What about the situation for this at FTF generator?

At full simulation, all stable particles will be decayed at GEANT level afterwards, therefore we don't need to care about it.
But generator level or fast simulation case, we have to know correctly how they are handled.

Best wishes,
Donghee
Re: new FTF generator in pandaroot [message #17338 is a reply to message #17335] Tue, 23 September 2014 10:35 Go to previous messageGo to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *dubna.ru
Hi Donghee,

> What about random seed during the production?

In Geant4 and in FTF is used a random number generator
implemented in Pythia. It is not start
from a single number. It is not start from computer time.
To download final generator state
it is needed to open in PbarP.mac or PbarA.mac the line

//#saverand

If it is given #saverand, the state will be saved in file
initial.conf after each event.
It requires some additional time. After last event,
the state will be saved.
You can continue your job with final stored state,
if you open in the mac-files the following lines

//#initrand
//initial.conf

> If I do two times without change option string, output will be
> different?

No. It will be the same.

>./FTFGen PbarP.mac | mv FTF.root FTF_1.root
> ./FTFGen PbarP.mac | mv FTF.root FTF_2.root

It will be an exact copie.

> or Do I need some more action to get different events from output?

You'll need as described above.

Best regards!
Aida
Re: new FTF generator in pandaroot [message #17339 is a reply to message #17337] Tue, 23 September 2014 10:58 Go to previous messageGo to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *dubna.ru
Hi Donghee,

> In DPM, some generated particles are stable,which is Pi0,K_S0,
> Lambda, anti-Lambda, eta.
> I am now interested in the fundamental kinematics of both
> generators. At pure stand-alone generator study or fast
> simulation, they(stable particles) are normally turning
> to be unstable for DPM case.

Mainly, these particles are stable in DPM. It is a user
responsibility to point out what particles are unstable.
We set stable all long-lived particles -
Pi0, K0_s, K0_l, Lambda and others.

The same is true for FTF generator.

> If I want to do same study with FTFGen at fast simulation or
> stand-alone generator, Do I need to allow decay in order to compare
> with DPM generator. What about the situation for this at FTF
> generator?

The lists of "stable" particles in DPM and FTF coincide.

> At full simulation, all stable particles will be decayed at GEANT
> level afterwards, therefore we don't need to care about it. But
> generator level or fast simulation case, we have to know correctly how
> they are handled.

There is a problem in FTF how to point out that we are
going to consider rho-mesons (and others)
as stable particles. It is needed for various studies.
We implemented such possibility in DPM.
It is more complicated job in the case of FTF.

Best regards!
Aida
Re: new FTF generator in pandaroot [message #17348 is a reply to message #17339] Wed, 24 September 2014 12:47 Go to previous messageGo to next message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *kph.uni-mainz.de
Hi Aida,

According to your suggestion, I solved few teechnical problems related full PADNDA simulation as like control of random seed and naming in the full simulation.

Now remaining couple of questions about physics mode.

There are 6 different theoretical approaches in the hadronic response.
ftfp and ftfb
QGSp and QGSb
Bertini and Binary
I have heard ftf and QGS already but I am not sure about the meaning of "p" or "b"

And in the Geant4 physics list, couple of theoretical models can combine in different energy region as like
FTF+Bertini, are there such feature in FTFGen? If not, what is the best approach(choice) at
Ebeam=1.5 GeV case
Ebeam=15 GeV case in our simulation?

Best wishes,
Donghee






Re: new FTF generator in pandaroot [message #17350 is a reply to message #17348] Wed, 24 September 2014 14:50 Go to previous messageGo to next message
Aida Galoyan is currently offline  Aida Galoyan
Messages: 79
Registered: May 2007
Location: Dubna
continuous participant
From: *jinr.ru
Hi Donghee,

I explained difference between ftfp and ftfb in the
file README.txt in the FtfEvtGen folder.

I do it again.

ftfp is the FTF + Preco model.
ftfb is the FTF + Binary cascade model.

FTF is taken from Geant4 lib.
Preco and Binary Cascade model are also Geant4 models and added
for low energy secondary particles interactions in the nucleus.
Binary Cascade model takes into account all cascading processes.
Preco model is simplified model, taking into account only
absorption processes.

For Pbar-P interactions use ftfp.

For Pbar-Nucleus interactions, one can use ftfp or ftfb.
There will be difference between ftfp and ftfb calculations,
(especially for heavy nuclei)
but ftfp works faster than ftfb. However, ftfb gives more
precise results for secondary nucleons.

Other models(QGSp, QGSb, Bertini,...)are not aimed for
Pbar-P or Pbar-Nucleus processes. Corresponding task can
be crash.

Best regards
Aida


Re: new FTF generator in pandaroot [message #18188 is a reply to message #17243] Thu, 30 April 2015 17:58 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Would it be possible to create a wiki page with all the information about the FTF generator, as done for DPM? In such a way we have all the event generators information in the same place and one has not to search in the forum
Thanks in advance.
Previous Topic: simpleEvtGen doesn't know deuteron target
Next Topic: Problems with PARTWAVE Model of EvtGen
Goto Forum:
  


Current Time: Tue Apr 16 12:43:05 CEST 2024

Total time taken to generate the page: 0.01166 seconds