]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - START/AliSTARTv2.cxx
bug fixed while filling the object AliPMDcluster
[u/mrichter/AliRoot.git] / START / AliSTARTv2.cxx
index cdd8fe99761135f441c77adcfc3be19eb444d5b3..2188db9fb3dc69ae81b4578750fd2c1f2c8dac06 100644 (file)
@@ -13,6 +13,8 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 /////////////////////////////////////////////////////////////////////
 //                                                                 //
 // START ( T-zero) detector  version 0                        //
 #define RIGHT_ARRAY            1
 #define LEFT_ARRAY             2
 
-#include <TMath.h>
+#include <Riostream.h>
+#include <stdlib.h>
+
 #include <TGeometry.h>
-#include <TTUBE.h>
-#include <TNode.h>
 #include <TLorentzVector.h>
+#include <TMath.h>
+#include <TNode.h>
+#include <TTUBE.h>
+#include <TVirtualMC.h>
 
-#include "AliSTARTv2.h"
-#include "AliRun.h"
 #include "AliMagF.h"
+#include "AliRun.h"
 #include "AliSTARThit.h"
-
-#include <Riostream.h>
-
-#include <stdlib.h>
+#include "AliSTARTv2.h"
+//#include "AliSTARThitPhoton.h"
+//#include "TGeant3.h"
 
 ClassImp(AliSTARTv2)
 
@@ -97,8 +101,8 @@ void AliSTARTv2::CreateGeometry()
     
   gMC->Gsvolu ("0RST", "TUBE", idtmed[3], pstart, 3);
   gMC->Gsvolu ("0LST", "TUBE", idtmed[3], pstart, 3);
-  gMC->Gspos ("0RST", 1, "ALIC", 0., 0., zRight, 0, "ONLY");
-  gMC->Gspos ("0LST", 1, "ALIC", 0., 0., -zLeft, idrotm[901], "ONLY");
+  gMC->Gspos ("0RST", 1, "ALIC", 0., 0., -zRight, 0, "ONLY");
+  gMC->Gspos ("0LST", 1, "ALIC", 0., 0., zLeft, idrotm[901], "ONLY");
 
 //  12 unit: PMT + divider
   gMC->Gsvolu("0INS", "TUBE", idtmed[3], pinstart, 3);   
@@ -239,7 +243,7 @@ void AliSTARTv2::CreateMaterials()
    
    AliMixture (3, "Al2O3   $", aal2o3, zal2o3, denscer, -2, wal2o3);
    AliMixture (4, "PMT glass   $", aglass, zglass, dglass, -2, wglass);
-   char namate[21];
+   char namate[21]="";
    gMC->Gfmate ((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
    acer[0] = a;
    zcer[0] = z;
@@ -368,7 +372,7 @@ void AliSTARTv2::StepManager()
           hitPhoton[4] = 1e9 * gMC->TrackTime();
           hitPhoton[5] = 1e9 * gMC->Etot();
           
-          AddHitPhoton (gAlice->CurrentTrack(), vol, hitPhoton);
+          AddHitPhoton (gAlice->GetCurrentTrackNumber(), vol, hitPhoton);
        }
        gMC->StopTrack();
      }
@@ -432,7 +436,7 @@ void AliSTARTv2::StepManager()
       //        printf(" HITS on START Exit %f\n",hits[i]); } 
       //for (i=0; i<=1; i++) { printf("START vol %d\n",vol[i]);}
      
-      new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->CurrentTrack(),vol,hits);      
+      new(lhits[fNhits++]) AliSTARThit(fIshunt,gAlice->GetCurrentTrackNumber(),vol,hits);      
     }
   }