]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDPmdTrack.cxx
A modification was recently introduced in ANALYSIS trunk that automatically creates...
[u/mrichter/AliRoot.git] / STEER / AliESDPmdTrack.cxx
index f5b85a77822191d8d33319d424dd4090d072d8cf..5a7303557f735d1d53ff0daed9b5567768841f92 100644 (file)
@@ -28,13 +28,13 @@ ClassImp(AliESDPmdTrack)
 //--------------------------------------------------------------------------//
 AliESDPmdTrack::AliESDPmdTrack () :
   TObject(),
-  fDet(0),
   fX(0),
   fY(0),
   fZ(0),
   fCluADC(0),
-  fNcell(0),
-  fCluPID(0)
+  fCluPID(0),
+  fDet(0),
+  fNcell(0)
 {
   // Default Constructor
 }
@@ -42,13 +42,13 @@ AliESDPmdTrack::AliESDPmdTrack () :
 //--------------------------------------------------------------------------//
 AliESDPmdTrack::AliESDPmdTrack (const AliESDPmdTrack& PMDTrack) : 
   TObject(PMDTrack),
-  fDet(PMDTrack.fDet),
   fX(PMDTrack.fX),
   fY(PMDTrack.fY),
   fZ(PMDTrack.fZ),
   fCluADC(PMDTrack.fCluADC),
-  fNcell(PMDTrack.fNcell),
-  fCluPID(PMDTrack.fCluPID)
+  fCluPID(PMDTrack.fCluPID),
+  fDet(PMDTrack.fDet),
+  fNcell(PMDTrack.fNcell)
 {
   // Copy Constructor
 }
@@ -58,12 +58,25 @@ AliESDPmdTrack &AliESDPmdTrack::operator=(const AliESDPmdTrack& PMDTrack)
 {
   // Copy constructor
   if(&PMDTrack == this) return *this;
-  fDet    = PMDTrack.fDet;
+  TObject::operator=(PMDTrack);
   fX      = PMDTrack.fX;
   fY      = PMDTrack.fY;
   fZ      = PMDTrack.fZ;
   fCluADC = PMDTrack.fCluADC;
-  fNcell  = PMDTrack.fNcell;
   fCluPID = PMDTrack.fCluPID;
+  fDet    = PMDTrack.fDet;
+  fNcell  = PMDTrack.fNcell;
   return *this;
 }
+
+void AliESDPmdTrack::Copy(TObject& obj) const {
+
+   // this overwrites the virtual TOBject::Copy()
+  // to allow run time copying without casting
+  // in AliESDEvent
+
+  if(this==&obj)return;
+  AliESDPmdTrack *robj = dynamic_cast<AliESDPmdTrack*>(&obj);
+  if(!robj)return; // not an aliesesdpmdtrack
+  *robj = *this;
+}