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]]>

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.]]>

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

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]]>

Could you please write exactly your pion event that leads to this error?]]>

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

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.]]>

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.

]]>

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.]]>

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.]]>

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]]>

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]]>