Bug in PndGenfitAdapters [message #11126] |
Wed, 27 October 2010 11:33 |
StefanoSpataro
Messages: 2736 Registered: June 2005 Location: Torino
|
first-grade participant |
From: *vpn.unito.it
|
|
Exploring the warnings, I have found something very interesting. This is one of the main reasons why I stress that it is important to remove all the warnings, even if they are just warnings!
In particular:
[ 80%] Building CXX object GenfitTools/adapters/CMakeFiles/genfitAdapters.dir/PndGenfitAdapters.o
/home/spataro/test/trunk/GenfitTools/adapters/PndGenfitAdapters.cxx: In function `GFTrackCand* PndTrackCand2GenfitTrackCand(PndTrackCand*)':
/home/spataro/test/trunk/GenfitTools/adapters/PndGenfitAdapters.cxx:36: warning: passing `Double_t' for converting 4 of `void GFTrackCand::addHit(unsigned int, unsigned int, double, unsigned int)'
Linking CXX shared library ../../lib/libgenfitAdapters.so
[ 80%] Built target genfitAdapters
If you check PndGenfitAdapters.cxx line 36 you find:
retVal->addHit(candHit.GetDetId(),candHit.GetHitId(),0,candHit.GetRho());
In reality, the correct GFTrackCand::addHit function is:
void addHit(unsigned int detId, unsigned int hitId, double rho=0., unsigned int planeId=0);
Then, in the adapter the order criterion "rho" is switched with the detector plane "planeId". We are giving alway the same rho=0, and giving rho as plane id!!
Before committng the correction, I would like to ask to genfit expert if this is correct and in particular if this could affect the kalman global fit performances.
Many thanks.
|
|
|
Re: Bug in PndGenfitAdapters [message #11131 is a reply to message #11126] |
Wed, 27 October 2010 14:04 |
Anonymous Poster
|
|
From: 129.187.154*
|
|
Hi Stefano,
you are right, this is a bug. The call in the adapter should be:
retVal->addHit(candHit.GetDetId(),candHit.GetHitId(),candHit.GetRho(),0);
The planeId parameter has no relevance for the Kalman filter of GENFIT. I do not think that this bug had any bad effects so far, but it should be fixed nevertheless.
Could you change the code, please?
Cheers, Christian
|
|
|
|