]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSvImpacts.cxx
Update n expected fields (26->27) for shuttle_logbook
[u/mrichter/AliRoot.git] / PHOS / AliPHOSvImpacts.cxx
index 2f4ce7736f5119ac930c717c38ece4c687584b12..a9451d62d0bcbcbd7323cada2e9d835c7c53233e 100644 (file)
@@ -49,6 +49,7 @@
 //#include <TTree.h>
 #include <TClonesArray.h>
 #include <TVirtualMC.h>
+#include <TTree.h>
 
 // --- Standard library ---
 
@@ -58,6 +59,7 @@
 #include "AliPHOSImpact.h"
 #include "AliPHOSvImpacts.h"
 #include "AliRun.h"
+#include "AliLoader.h"
 #include "AliMC.h"
 #include "AliLog.h"
 
@@ -67,7 +69,10 @@ ClassImp(AliPHOSvImpacts)
 AliPHOSvImpacts::AliPHOSvImpacts():
   fEMCImpacts(new TList),
   fCPVImpacts(new TList),
-  fPPSDImpacts(new TList)
+  fPPSDImpacts(new TList),
+  fNEMCImpacts(),
+  fNCPVImpacts(),
+  fNPPSDImpacts()
 {
   // ctor
 }
@@ -77,7 +82,10 @@ AliPHOSvImpacts::AliPHOSvImpacts(const char *name, const char *title):
   AliPHOSv1(name,title),
   fEMCImpacts(new TList),
   fCPVImpacts(new TList),
-  fPPSDImpacts(0)
+  fPPSDImpacts(0),
+  fNEMCImpacts(),
+  fNCPVImpacts(),
+  fNPPSDImpacts()
 {
   // ctor : title is used to identify the layout
   //
@@ -218,11 +226,11 @@ void AliPHOSvImpacts::StepManager(void)
 
   // Add impact to EMC
 
-  static Int_t idPXTL = gMC->VolId("PXTL");
-  if( gMC->CurrentVolID(copy) == idPXTL &&
-      gMC->IsTrackEntering() ) {
-    gMC->TrackMomentum(pmom);
-    gMC->TrackPosition(pos) ;
+  static Int_t idPXTL = TVirtualMC::GetMC()->VolId("PXTL");
+  if( TVirtualMC::GetMC()->CurrentVolID(copy) == idPXTL &&
+      TVirtualMC::GetMC()->IsTrackEntering() ) {
+    TVirtualMC::GetMC()->TrackMomentum(pmom);
+    TVirtualMC::GetMC()->TrackPosition(pos) ;
 
     Int_t i;
     for (i=0; i<3; i++) xyzm[i] = pos[i];
@@ -231,16 +239,16 @@ void AliPHOSvImpacts::StepManager(void)
       xyzm[i] = pos[i] ;
       pm[i]   = pmom[i];
     }
-    gMC -> Gmtod (xyzm, xyzd, 1);    // transform coordinate from master to daughter system
-    gMC -> Gmtod (pm,   pd,   2);    // transform 3-momentum from master to daughter system
+    TVirtualMC::GetMC() -> Gmtod (xyzm, xyzd, 1);    // transform coordinate from master to daughter system
+    TVirtualMC::GetMC() -> Gmtod (pm,   pd,   2);    // transform 3-momentum from master to daughter system
 
     // Select tracks coming to the crystal from up or down sides
     if ((pd[1]<0 && xyzd[1] >  GetGeometry()->GetCrystalSize(1)/2-0.1) ||
        (pd[1]>0 && xyzd[1] < -GetGeometry()->GetCrystalSize(1)/2+0.1)) {
     // Select tracks coming to the crystal from up or down sides
-      Int_t pid = gMC->TrackPid();
+      Int_t pid = TVirtualMC::GetMC()->TrackPid();
       Int_t module;
-      gMC->CurrentVolOffID(10,module);
+      TVirtualMC::GetMC()->CurrentVolOffID(10,module);
       module--;
       AddImpact("EMC ",fIshunt, primary,tracknumber, module, pid, pmom, xyzm);
     }
@@ -248,11 +256,11 @@ void AliPHOSvImpacts::StepManager(void)
 
   // Add impact to CPV
 
-  static Int_t idPCPQ = gMC->VolId("PCPQ");
-  if( gMC->CurrentVolID(copy) == idPCPQ &&
-      gMC->IsTrackEntering() ) {
-    gMC->TrackMomentum(pmom);
-    gMC->TrackPosition(pos) ;
+  static Int_t idPCPQ = TVirtualMC::GetMC()->VolId("PCPQ");
+  if( TVirtualMC::GetMC()->CurrentVolID(copy) == idPCPQ &&
+      TVirtualMC::GetMC()->IsTrackEntering() ) {
+    TVirtualMC::GetMC()->TrackMomentum(pmom);
+    TVirtualMC::GetMC()->TrackPosition(pos) ;
 
     Int_t i;
     for (i=0; i<3; i++) xyzm[i] = pos[i];
@@ -261,9 +269,9 @@ void AliPHOSvImpacts::StepManager(void)
       xyzm[i] = pos[i] ;
       pm[i]   = pmom[i];
     }
-    Int_t pid = gMC->TrackPid();
+    Int_t pid = TVirtualMC::GetMC()->TrackPid();
     Int_t module;
-    gMC->CurrentVolOffID(3,module);
+    TVirtualMC::GetMC()->CurrentVolOffID(3,module);
     module--;
     AddImpact("CPV ",fIshunt, primary,tracknumber, module, pid, pmom, xyzm);
   }