GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Tracking » Charge in FairTrackPar and GeaneTrackRep
icon4.gif  Charge in FairTrackPar and GeaneTrackRep [message #11112] Fri, 22 October 2010 06:11 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 140.109.130*
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:

int(0.9999999) = 0

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

Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: Geometry of STT
Next Topic: Bug in PndGenfitAdapters
Goto Forum:

Current Time: Wed Jul 17 18:46:16 CEST 2024

Total time taken to generate the page: 0.00810 seconds