MC-dependent part of AliRun extracted in AliMC (F.Carminati)
[u/mrichter/AliRoot.git] / ZDC / AliZDCv2.cxx
index eb8eabd..8a9a4b9 100644 (file)
@@ -45,6 +45,7 @@
 #include "AliRun.h"
 #include "AliZDCHit.h"
 #include "AliZDCv2.h"
+#include "AliMC.h"
  
  
 ClassImp(AliZDCv2)
@@ -1308,7 +1309,7 @@ void AliZDCv2::StepManager()
 
 //       Int_t PcID = gMC->TrackPid();
 //       printf("Pc ID -> %d\n",PcID);
-       AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+       AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
        
        if(fNoShower==1){
          fpDetected += 1;
@@ -1328,13 +1329,13 @@ void AliZDCv2::StepManager()
           hits[9] = ekin;
           hits[7] = 0.;
           hits[8] = 0.;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
           }
         else{
           hits[9] = destep;
           hits[7] = 0.;
           hits[8] = 0.;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
           }
 //      printf(" Dep. E = %f \n",hits[9]);
       }
@@ -1416,13 +1417,13 @@ void AliZDCv2::StepManager()
           hits[7] = nphe;      //fLightPMQ
           hits[8] = 0;
           hits[9] = 0;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
         }
         else{
           hits[7] = 0;
           hits[8] = nphe;      //fLightPMC
           hits[9] = 0;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
         }
        } 
        else if((vol[0]==2)) {  // (2) ZP fibres
@@ -1435,13 +1436,13 @@ void AliZDCv2::StepManager()
           hits[7] = nphe;      //fLightPMQ
           hits[8] = 0;
           hits[9] = 0;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
         }
         else{
           hits[7] = 0;
           hits[8] = nphe;      //fLightPMC
           hits[9] = 0;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
         }
        } 
        else if((vol[0]==3)) {  // (3) ZEM fibres
@@ -1468,13 +1469,13 @@ void AliZDCv2::StepManager()
           hits[7] = 0;         
           hits[8] = nphe;      //fLightPMC (ZEM1)
           hits[9] = 0;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
         }
         else{
           hits[7] = nphe;      //fLightPMQ (ZEM2)
           hits[8] = 0;         
           hits[9] = 0;
-          AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
+          AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
         }
        }
      }