]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - BCM/AliBCM.cxx
call ProcessTriggerAliases only after BeginSlave or before raw chain loop
[u/mrichter/AliRoot.git] / BCM / AliBCM.cxx
index 2838a7eec823016e069238c6197f02f7db5bc1be..63dc63afaf0477920877dab6f4edde7606ce547b 100644 (file)
 //  andreas.morsch@cern.ch                                                   // 
 ///////////////////////////////////////////////////////////////////////////////
  
-#include <TVirtualMC.h>
 #include <TClonesArray.h>
+#include <TGeoCompositeShape.h>
+#include <TGeoGlobalMagField.h>
+#include <TGeoManager.h>
 #include <TGeoMaterial.h>
-#include <TGeoMedium.h>
-#include <TGeoVolume.h>
 #include <TGeoMatrix.h>
+#include <TGeoMedium.h>
 #include <TGeoPgon.h>
+#include <TGeoVolume.h>
 #include <TGeoXtru.h>
-#include <TGeoCompositeShape.h>
-#include <TGeoManager.h>
+#include <TVirtualMC.h>
 
 #include "AliBCM.h"
 #include "AliBCMHit.h"
@@ -82,27 +83,27 @@ void AliBCM::StepManager()
     Int_t   copy = -1; 
     
     
-    if (gMC->TrackCharge() && 
-       gMC->CurrentVolID(copy) == fVolId) {
+    if (TVirtualMC::GetMC()->TrackCharge() && 
+       TVirtualMC::GetMC()->CurrentVolID(copy) == fVolId) {
        // Charged particle inside sensitive volume
        //
        // Entering
-       if (gMC->IsTrackEntering()) {
+       if (TVirtualMC::GetMC()->IsTrackEntering()) {
            edepT = 0.;
-           gMC->TrackPosition(xh[0],xh[1],xh[2]);
-           xh[3] = gMC->TrackTime();
+           TVirtualMC::GetMC()->TrackPosition(xh[0],xh[1],xh[2]);
+           xh[3] = TVirtualMC::GetMC()->TrackTime();
        }
        
        //
        // Any step
-       if ((edep = gMC->Edep()) > 0.) {
+       if ((edep = TVirtualMC::GetMC()->Edep()) > 0.) {
            Double_t x[3];   
-           gMC->TrackPosition(x[0],x[1],x[2]); 
+           TVirtualMC::GetMC()->TrackPosition(x[0],x[1],x[2]); 
            edepT += edep;
        }
        //
        // Exiting 
-       if(gMC->IsTrackExiting()||gMC->IsTrackStop()||gMC->IsTrackDisappeared())
+       if(TVirtualMC::GetMC()->IsTrackExiting()||TVirtualMC::GetMC()->IsTrackStop()||TVirtualMC::GetMC()->IsTrackDisappeared())
        {
            Int_t track = gAlice->GetMCApp()->GetCurrentTrackNumber();
            TClonesArray &lhits = *fHits;
@@ -169,8 +170,8 @@ void AliBCM::CreateMaterials()
     Float_t tmaxfd = -20. ;  // Maximum angle due to field deflection 
     Float_t deemax = -.01;   // Maximum fractional energy loss, DLS 
     Float_t stmin  = -.8;
-    Int_t   isxfld = gAlice->Field()->Integ();
-    Float_t sxmgmx = gAlice->Field()->Max();
+    Int_t   isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
+    Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
 
     AliMaterial(1, "PCD", 12.011, 6., rho, radl, absl);
     //
@@ -197,7 +198,7 @@ void AliBCM::Init()
 
     //
     // Here the BCM initialisation code (if any!)
-    fVolId =  gMC->VolId("BCMpcd");
+    fVolId =  TVirtualMC::GetMC()->VolId("BCMpcd");
 }
 
 void AliBCM::MakeBranch(Option_t* option)