Home » PANDA » PandaRoot » Tracking » Charge in FairTrackPar and GeaneTrackRep
Charge in FairTrackPar and GeaneTrackRep [message #11112] |
Fri, 22 October 2010 06:11 |
StefanoSpataro
Messages: 2736 Registered: June 2005 Location: Torino
|
first-grade participant |
From: 140.109.130*
|
|
Hi,
I have seen that in the constructors of FairTrackPar and GeaneTrackRep the charge is defined as integer and double respectively.
This leaves the following warning:
/.../trunk/GenfitTools/trackrep/GeaneTrackRep/GeaneTrackRep.cxx:53: warning: passing 'double' for argument 5 to 'FairTrackParP::FairTrackParP(TVector3, TVector3, TVector3, TVector3, Int_t, TVector3, TVector3, TVector3)'
and not only, due to the following lines:
GeaneTrackRep::GeaneTrackRep(FairGeanePro* geane,
const GFDetPlane& plane,
const TVector3& mom,
const TVector3& poserr,
const TVector3& momerr,
double q,
int PDGCode)
: GFAbsTrackRep(5), _geane(geane), _pdg(PDGCode), _backw(0)
{
FairTrackParP par(plane.getO(),mom,poserr,momerr,q,plane.getO(),plane.getU(),plane.getV()); (5th parameter -> q).
I think both objects should use the same kind of variable, to be much less "error prone". Indeed, the conversion from double to integer is dangerous:
I think this is quite important! Even other tracking codes should be changed to use a common standard for the particle charge, by substitution of all the current conversions (once fixed if it is better to use int or double).
|
|
|
Re: Charge in FairTrackPar and GeaneTrackRep [message #11113 is a reply to message #11112] |
Fri, 22 October 2010 06:16 |
Anonymous Poster
|
|
From: *aspublic.wlan.sinica.edu.tw
|
|
Hi,
in principle the charge could be eliminated from the ctor of GeaneTrackRep, since it is fixed by the PDG id.
I am not sure what is the better choice for the charge (int vs. double). I guess int is enough. I absolutely agree that we should fix it to one of them.
Cheers, Christian
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Dec 21 15:53:29 CET 2024
Total time taken to generate the page: 0.00752 seconds
|