Clone finctionality removed
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Aug 2011 15:30:01 +0000 (15:30 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Aug 2011 15:30:01 +0000 (15:30 +0000)
PWG0/dNdPt/AlidNdPtTrackDumpTask.cxx

index fbb6fe8..2075741 100644 (file)
@@ -320,7 +320,7 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
       if(!isOK) continue;\r
 \r
       // clone TPCinner has to be deleted\r
-      AliExternalTrackParam * tpcInnerC = (AliExternalTrackParam *)(track->GetTPCInnerParam()->Clone());\r
+      AliExternalTrackParam * tpcInnerC = new AliExternalTrackParam(*(track->GetTPCInnerParam()));\r
       if (!tpcInnerC) continue;\r
  \r
       // constrain TPCinner \r
@@ -342,7 +342,7 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
       // to vertex\r
       //\r
       // clone track InnerParams has to be deleted\r
-      AliExternalTrackParam * trackInnerC = (AliExternalTrackParam *)(track->GetInnerParam()->Clone());\r
+      AliExternalTrackParam * trackInnerC =  new AliExternalTrackParam(*(track->GetInnerParam()));\r
       if (!trackInnerC) continue;\r
  \r
       // constrain track InnerParams \r
@@ -400,7 +400,7 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
       const Double_t kStep=3; \r
 \r
       // clone track InnerParams has to be deleted\r
-      AliExternalTrackParam *trackInnerC2 = (AliExternalTrackParam *)(track->GetInnerParam()->Clone());\r
+      AliExternalTrackParam *trackInnerC2 = new AliExternalTrackParam(*(track->GetInnerParam()));\r
       if (!trackInnerC2) continue;\r
       if(!AliTracker::PropagateTrackToBxByBz(trackInnerC2,kTPCRadius,track->GetMass(),kStep,kFALSE))\r
       {\r
@@ -421,7 +421,7 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
 \r
         if(friendTrack) \r
        {\r
-          if( (outerITSc = (AliExternalTrackParam *)(friendTrack->GetITSOut()->Clone())) ) \r
+          if( (outerITSc = new AliExternalTrackParam(*friendTrack->GetITSOut())) ) \r
          {\r
            if(AliTracker::PropagateTrackToBxByBz(outerITSc,kTPCRadius,track->GetMass(),kStep,kFALSE))\r
            {\r
@@ -486,7 +486,7 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
 \r
       AliTrackReference *refTPCIn = NULL;\r
       AliTrackReference *refITS = NULL;\r
-      AliExternalTrackParam *trackInnerC3 = (AliExternalTrackParam *)(track->GetInnerParam()->Clone());\r
+      AliExternalTrackParam *trackInnerC3 = new AliExternalTrackParam(*(track->GetInnerParam()));\r
       if(!trackInnerC3) continue;\r
 \r
       if(IsUseMCInfo()) \r