Checks on the return value of AliExternalTrackParam::Rotate() added
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Oct 2011 14:21:39 +0000 (14:21 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Oct 2011 14:21:39 +0000 (14:21 +0000)
HMPID/AliHMPIDTracker.cxx
HMPID/AliHMPIDtrack.cxx

index 1690482..36fe303 100644 (file)
@@ -295,12 +295,12 @@ Int_t AliHMPIDTracker::Recon(AliESDEvent *pEsd,TObjArray *pClus,TObjArray *pNmea
     if (AliHMPIDReconstructor::StreamLevel()>0) {      
       AliExternalTrackParam * trackTPC=new AliExternalTrackParam(*(ftrack->GetTPCOut()));
       AliExternalTrackParam * trackCurrent=new AliExternalTrackParam(*pTrk);      
-      trackTPC->Rotate(alpha);
-      trackCurrent->Rotate(alpha);      
+      if(!trackTPC->Rotate(alpha)) continue;
+      if(!trackCurrent->Rotate(alpha)) continue;      
       Bool_t statusTPC= AliTracker::PropagateTrackToBxByBz(trackTPC,radiusH,pTrk->GetMass(),1,kFALSE,kMaxSnp,-1);      
       Bool_t statusCurrent=AliTracker::PropagateTrackToBxByBz(trackCurrent,radiusH,pTrk->GetMass(),1,kFALSE,kMaxSnp,-1);  
       AliExternalTrackParam * trackTPCNB=new AliExternalTrackParam(*(ftrack->GetTPCOut()));
-      trackTPCNB->Rotate(alpha);
+      if(!trackTPCNB->Rotate(alpha)) continue;
       Bool_t statusTPCNB=kTRUE;
       Double_t bfield[3]={0,0,0};
       for (Double_t radius=trackTPCNB->GetX(); radius<radiusH; radius+=1){
@@ -423,15 +423,15 @@ Int_t AliHMPIDTracker::Recon(AliESDEvent *pEsd,TObjArray *pClus,TObjArray *pNmea
     if (AliHMPIDReconstructor::StreamLevel()>0) {      
       AliExternalTrackParam * trackTPC=new AliExternalTrackParam(*(ftrack->GetTPCOut()));
       AliExternalTrackParam * trackCurrent=new AliExternalTrackParam(*pTrk);      
-      trackTPC->Rotate(alpha);
-      trackCurrent->Rotate(alpha);      
+      if(!trackTPC->Rotate(alpha)) continue;
+      if(!trackCurrent->Rotate(alpha)) continue;      
       Bool_t statusTPC= AliTracker::PropagateTrackToBxByBz(trackTPC,radiusH,pTrk->GetMass(),1,kFALSE,kMaxSnp,-1);      
       Bool_t statusCurrent=AliTracker::PropagateTrackToBxByBz(trackCurrent,radiusH,pTrk->GetMass(),1,kFALSE,kMaxSnp,-1);    
       Double_t tanAlpha=TMath::Tan(TMath::ASin(trackTPC->GetSnp()));
       Double_t deltaC= trackTPC->GetC(AliTrackerBase::GetBz())-ftrack->GetTPCOut()->GetC(AliTrackerBase::GetBz());    
       //
       AliExternalTrackParam * trackTPCNB=new AliExternalTrackParam(*(ftrack->GetTPCOut()));
-      trackTPCNB->Rotate(alpha);
+      if(!trackTPCNB->Rotate(alpha)) continue;
       Bool_t statusTPCNB=kTRUE;
       Double_t bfield[3]={0,0,0};
       for (Double_t radius=trackTPCNB->GetX(); radius<radiusH; radius+=1){
index 4a1d615..451a83c 100644 (file)
@@ -139,7 +139,7 @@ Bool_t   AliHMPIDtrack::PropagateToR(Double_t r,Double_t step)
 
     GetXYZ(xyz0);      
     Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
-    Rotate(alpha,kTRUE);
+    if(!Rotate(alpha,kTRUE)) return kFALSE;
     GetXYZ(xyz0);      
     if (!GetProlongation(x,y,z)) return kFALSE;
     xyz1[0] = x * TMath::Cos(alpha) + y * TMath::Sin(alpha); 
@@ -156,7 +156,7 @@ Bool_t   AliHMPIDtrack::PropagateToR(Double_t r,Double_t step)
 
   GetXYZ(xyz0);        
   Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
-  Rotate(alpha,kTRUE);
+  if(!Rotate(alpha,kTRUE)) return kFALSE;
   GetXYZ(xyz0);        
   if (!GetProlongation(r,y,z)) return kFALSE;
   xyz1[0] = r * TMath::Cos(alpha) + y * TMath::Sin(alpha);