GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » EvtGen Output Fixed Point Precision
EvtGen Output Fixed Point Precision [message #9003] Thu, 16 July 2009 16:57 Go to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi all,

to my understanding the canonical way to use EvtGen generated events within pandaroot means that one firstly generates the corresponding .evt file which is then imported into pandaroot.

My problem is that the output file format uses 4 digit fixed point precision for the non-integral values. Since these numbers are given in GeV, the potential rounding errors can cause a mass error in the order of more than an MeV.

Since the mass is clamped to the PDG mass for each particle once it crossed the interface to pandaroot, I am not sure about the actual impact of this behaviour.
However, is it be possible to increase precision in the output file or (as Ralf suggested in an earlier post) add another interface to pandaroot which then provides higher precision?

Best regards,

Marius
Re: EvtGen Output Fixed Point Precision [message #9005 is a reply to message #9003] Thu, 16 July 2009 17: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
Hi,
in the class:

pgenerators/EvtGen/EvtgenBase/EvtStdHep.cc

you can find that the precision is set to 4.
If required one could even improve it and put it to 5, but I think the difference is neglibigle for our eyese. An approssimation of about 0.1 MeV is completely covered by our momentum resolution, at our scales.
If you can prove that precision 4 could give us problems and that we need to move it to 5, then this modification could be easily done.
Re: EvtGen Output Fixed Point Precision [message #9006 is a reply to message #9005] Thu, 16 July 2009 17:37 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi Stefano, hi all,

actually I was hoping that somebody might already have fixed some numbers on the required input precision Wink

As of now, because the mass is not explicitly stored, a Pion for example can (depending on its momentum) have a mass which is wrong by +-2.5MeV when you calculate it from its total energy and momentum.
But I don't have any feeling yet if there might be a situation where this could turn out to be harmful. I'd also be interested in more opinions on the desired precision for the input values.

Best regards,

Marius
Re: EvtGen Output Fixed Point Precision [message #9007 is a reply to message #9006] Thu, 16 July 2009 17:46 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
Hi,
+-2.5MeV seems to high for a 0.1MeV rounding precision.
Could you please write exactly your pion event that leads to this error?
Re: EvtGen Output Fixed Point Precision [message #9008 is a reply to message #9007] Thu, 16 July 2009 18:07 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi Stefano,

one example I just took from an event file looks like this:

Toggle Spoiler


When you calculate the mass of particle 4, it evaluates to 142.266MeV.

The maximum error in mass due to rounding at 4 digits precision is
err_max=0.05MeV*(E+px+py+pz)/sqrt(E^2-px^2-py^2-pz^2)
It is admittedly not very likely that the maximum error is indeed achieved, but it does happen.
Re: EvtGen Output Fixed Point Precision [message #9009 is a reply to message #9008] Thu, 16 July 2009 19:16 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *15-87-r.retail.telecomitalia.it
I have the feeling that the error comes from EvtGen calculations, rather than from rounding precision.

Could you please modify the class of my previous post, setting the precision to 6, and then recompile evtgen and produce the same event file? Just to understand if the discrepancy depends on the rounding or on EvtGen itself.
Re: EvtGen Output Fixed Point Precision [message #9011 is a reply to message #9009] Thu, 16 July 2009 20:26 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi Stefano,

I increased precision to 6, as well as width to 9.

With these parameters the maximum deviation is 100 times smaller than before, according to the formula for the maximum error it should be now less than 0.025MeV which is well confirmed by the 17259 Pions I just determined the mass of.

That's a precision I could certainly live with. If there are no concerns about the increased output file size, I'd be happy with these values as a default setting.
Re: EvtGen Output Fixed Point Precision [message #9012 is a reply to message #9011] Thu, 16 July 2009 21:02 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *15-87-r.retail.telecomitalia.it
Just a question, which is the file size difference with the two options?
Re: EvtGen Output Fixed Point Precision [message #9013 is a reply to message #9012] Thu, 16 July 2009 21:11 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Stefano Spataro wrote on Thu, 16 July 2009 21:02

Just a question, which is the file size difference with the two options?


For 10000 events of the type in my previous post, the file size increased from 26MByte to 29MByte after increasing width/precision from 7/4 to 9/6.
Re: EvtGen Output Fixed Point Precision [message #9049 is a reply to message #9013] Thu, 23 July 2009 15:06 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Hi Stefano,

in an internal discussion it was just brought up that it would be nice to have a summary of the connection between precision and potential inaccuracies due to rounding in EvtGen output files so there is a bigger chance that people are actually made aware of it and can change the output precision themselves if they would like to do so.
Could you add a corresponding section to the Wiki page?

Thank you,

Marius
Re: EvtGen Output Fixed Point Precision [message #9053 is a reply to message #9049] Thu, 23 July 2009 15:50 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 think that there should be one official precision value used by everybody, and not a parameter that could be changed by the users.
If you are doing such kind of analysis, just write some sort of report somewhere (wiki/forum) and then we can decide and apply the change in the official code.
Re: EvtGen Output Fixed Point Precision [message #9055 is a reply to message #9053] Thu, 23 July 2009 16:50 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Unfortunately I do not have the time to do a thorough analysis of this. However, I can show the results I already have at the next PandaRoot EVO meeting to raise the topic of increasing EvtGen output precision there.
Re: EvtGen Output Fixed Point Precision [message #9230 is a reply to message #9055] Wed, 26 August 2009 10:13 Go to previous messageGo to next message
Marius Mertens is currently offline  Marius Mertens
Messages: 55
Registered: January 2009
continuous participant
From: *ikp.kfa-juelich.de
Graphical Representation
Re: EvtGen Output Fixed Point Precision [message #9236 is a reply to message #9230] Wed, 26 August 2009 15:56 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *0-87-r.retail.telecomitalia.it
I have set the precision to "8" by default.
In order to use it, you have to go to your EvtGen directory and compile it again (just typing "make" should work).

I have also modified the "configure" script, so that now only the c and fortran compilers are requested, there is no need anymore to put the other options by hands.
Regards
Previous Topic: DpmGen set start Event
Next Topic: simpleEvtGen default EvtRandomEngine
Goto Forum:
  


Current Time: Mon Jan 17 02:04:47 CET 2022

Total time taken to generate the page: 0.02180 seconds