]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSvImpacts.cxx
Bug correction
[u/mrichter/AliRoot.git] / PHOS / AliPHOSvImpacts.cxx
index 805364b2230e70807c5a88a905048f4c3b2c0372..2669b48cf732c7d27e9b3c7a81febf9e076d0317 100644 (file)
@@ -206,7 +206,8 @@ void AliPHOSvImpacts::StepManager(void)
 
   // Add impact to EMC
 
-  if( gMC->CurrentVolID(copy) == gMC->VolId("PXTL") &&
+  static Int_t idPXTL = gMC->VolId("PXTL");
+  if( gMC->CurrentVolID(copy) == idPXTL &&
       gMC->IsTrackEntering() ) {
     gMC->TrackMomentum(pmom);
     gMC->TrackPosition(pos) ;
@@ -235,7 +236,8 @@ void AliPHOSvImpacts::StepManager(void)
 
   // Add impact to CPV
 
-  if( gMC->CurrentVolID(copy) == gMC->VolId("PCPQ") &&
+  static Int_t idPCPQ = gMC->VolId("PCPQ");
+  if( gMC->CurrentVolID(copy) == idPCPQ &&
       gMC->IsTrackEntering() ) {
     gMC->TrackMomentum(pmom);
     gMC->TrackPosition(pos) ;