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