]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/AliRICHv0.cxx
GetMedium replaced by CurrentMedium (I.Hrivnacova)
[u/mrichter/AliRoot.git] / RICH / AliRICHv0.cxx
index 06adbc84857cd65633798fdd836cb13b6dba8f7a..e5a57c6ac8db8157ff5723cf5562561182887f3f 100644 (file)
@@ -76,11 +76,11 @@ void AliRICHv0::StepManager()
                       gMC->CurrentVolOffName(2),
                       gMC->CurrentVolOffName(3));
   
-  Float_t a,z,den,rad,abs; a=z=den=rad=abs=kBad;
+  Float_t a,z,den,rad,abs; a=z=den=rad=abs=-1;
   Int_t mid=gMC->CurrentMaterial(a,z,den,rad,abs);
   Info("Material","id=%i a=%7.2f z=%7.2f den=%9.4f rad=%9.2f abs=%9.2f",mid,a,z,den,rad,abs);
   
-  Int_t iTmedId=gMC->GetMedium();
+  Int_t iTmedId=gMC->CurrentMedium();
   const char *sTmed;
   switch(iTmedId){
     case kAir:        sTmed="Air"      ;break;
@@ -102,15 +102,15 @@ void AliRICHv0::StepManager()
   }
   Info("Medium","id=%i (%s)",iTmedId,sTmed);
   
-  TLorentzVector x4;
-  gMC->TrackPosition(x4);
+  TLorentzVector x4; gMC->TrackPosition(x4);
   Float_t glo[3],loc[3];
   glo[0]=x4.X();glo[1]=x4.Y();glo[2]=x4.Z();  
   gMC->Gmtod(glo,loc,1);
   Info("X4 glo","(x,y,z)=(%+8.3f,%+8.3f,%+8.3f) (r,theta,phi)=(%8.3f,%8.3f,%8.3f)",
                       glo[0],glo[1],glo[2],x4.Rho(),x4.Theta()*TMath::RadToDeg(),x4.Phi()*TMath::RadToDeg());  
   Info("X4 loc","(x,y,z)=(%+8.3f,%+8.3f,%8.3f) by gMC->Gmtod()",loc[0],loc[1],loc[2]);  
-  if(gMC->VolId("GAP ")==gMC->CurrentVolID(copy0)){
+  static Int_t idGAP = gMC->VolId("GAP ");
+  if(idGAP==gMC->CurrentVolID(copy0)){
     Int_t iChamber;
     gMC->CurrentVolOffID(2,iChamber);
     TVector2 x2=C(iChamber)->Mrs2Pc(x4);
@@ -118,4 +118,3 @@ void AliRICHv0::StepManager()
   }
   Info(Form("Step %i",iStepN++),"end of current step\n");
 }//StepManager()
-