]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/util/AliHLTGlobalBarrelTrack.cxx
adding copy constructor to create AliHLTGlobalBarrelTrack from AliHLTExternalTrackParam
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTGlobalBarrelTrack.cxx
index 46553956b419e62c457088efce99a25fd77ac178..c1c2eb46af526dd75bad8363b442412898d757bc 100644 (file)
@@ -70,13 +70,24 @@ AliHLTGlobalBarrelTrack::AliHLTGlobalBarrelTrack(const AliHLTExternalTrackParam&
 
   // the 5 track parameters are named in the AliHLTExternalTrackParam
   // while AliExternalTrackParam just uses an array[5]
-  // the members have the some order, fY is the first one
+  // the members have the same order, fY is the first one
   Set(p.fX, p.fAlpha, &p.fY, p.fC);
   SetPoints(p.fPointIDs, p.fNPoints);
   SetNumberOfClusters(p.fNPoints);
   //SetIntegratedLength(GetPathLengthTo( GetLastPointX(), b);
 }
 
+AliHLTGlobalBarrelTrack::AliHLTGlobalBarrelTrack(const AliExternalTrackParam& p )
+  : AliKalmanTrack()
+  , fPoints()
+  , fLastX(0)
+  , fLastY(0)
+  , fTrackID(0)
+{
+  // see header file for class documentation
+  *(dynamic_cast<AliExternalTrackParam*>(this))=p;
+}
+
 template <class c>
 AliHLTGlobalBarrelTrack& AliHLTGlobalBarrelTrack::operator=(const c& p)
 {