Opened 13 years ago
Last modified 12 years ago
#49 closed Task
math related suggestions — at Version 2
Reported by: | Pavel Demin | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Delphes code | Version: | |
Keywords: | Cc: |
Description (last modified by )
Looking at the Delphes code, I've noticed a couple of things that could be improved:
- Most of the underlying libraries operate with double precision numbers. However in Delphes, some variables are single precision. Should not we switch to double for all variables?
- There are at least 13 calls to something like
sqrt(pow(x,2), pow(y,2))
. As most of them are inside loops, it would be better to replace them withhypot(x, y)
. Here is a command to find corresponding lines:grep -r "sqrt( *pow" trunk/* | grep c:
- A strange pi constant is defined as 3.14159265358979312 in
interface/D_Constants.h
and inUtilities/Fastjet/plugins/CDFCones/interface/CalTower.hh
. Normally, it should be 3.14159265358979323846. Moreover M_PI is already defined inmath.h
, pi and twopi are defined inUtilities/CLHEP/Units
/PhysicalConstants.h. It would be better to use definitions from PhysicalConstants.h.
Change History (2)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|
comment:2 by , 13 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.