]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenScan.cxx
Threshold for digits in RecPoint introduced
[u/mrichter/AliRoot.git] / EVGEN / AliGenScan.cxx
index ca69cb926d278b5899055d9a217beb1dc14ac510..f20f6b69d4dafd6a8e047f93d46c806051ddb08b 100644 (file)
 
 /*
 $Log$
+Revision 1.10.6.1  2002/07/30 11:30:48  alibrary
+Updating VirtualMC
+
+Revision 1.11  2002/07/30 09:09:59  morsch
+Correction in initialization.
+
+Revision 1.10  2002/02/08 16:50:50  morsch
+Add name and title in constructor.
+
+Revision 1.9  2001/07/27 17:09:36  morsch
+Use local SetTrack, KeepTrack and SetHighWaterMark methods
+to delegate either to local stack or to stack owned by AliRun.
+(Piotr Skowronski, A.M.)
+
+Revision 1.8  2000/12/06 15:11:38  morsch
+Correct double declared data members.
+
+Revision 1.7  2000/11/30 07:12:50  alibrary
+Introducing new Rndm and QA classes
+
+Revision 1.6  2000/10/02 21:28:06  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.5  2000/06/09 20:37:20  morsch
 All coding rule violations except RS3 corrected
 
@@ -28,7 +51,6 @@ Introduction of the Copyright and cvs Log
 
 #include "AliGenScan.h"
 #include "AliRun.h"
-#include "AliMC.h"
 
  ClassImp(AliGenScan)
     
@@ -36,11 +58,11 @@ Introduction of the Copyright and cvs Log
         :AliGenerator(-1)
 {
 // Constructor
-    fXmin=0;
-    fXmax=0;
+    fXCmin=0;
+    fXCmax=0;
     fNx=1;
-    fYmin=0;
-    fYmax=0;
+    fYCmin=0;
+    fYCmax=0;
     fNy=1;
     fZmin=0;
     fZmax=0;
@@ -54,11 +76,15 @@ AliGenScan::AliGenScan(Int_t npart)
     :AliGenerator(npart)
 {
 // Constructor
-    fXmin=0;
-    fXmax=0;
+    fName  = "Scan";
+    fTitle = "Generator for particles on a grid";
+
+
+    fXCmin=0;
+    fXCmax=0;
     fNx=1;
-    fYmin=0;
-    fYmax=0;
+    fYCmin=0;
+    fYCmax=0;
     fNy=1;
     fZmin=0;
     fZmax=0;
@@ -76,11 +102,11 @@ void AliGenScan::SetRange(Int_t nx, Float_t xmin, Float_t xmax,
                     Int_t nz, Float_t zmin, Float_t zmax)
 {
 // Define the grid
-    fXmin=xmin;
-    fXmax=xmax;
+    fXCmin=xmin;
+    fXCmax=xmax;
     fNx=nx;
-    fYmin=ymin;
-    fYmax=ymax;
+    fYCmin=ymin;
+    fYCmax=ymax;
     fNy=ny;
     fZmin=zmin;
     fZmax=zmax;
@@ -105,14 +131,14 @@ void AliGenScan::Generate()
   Float_t dx,dy,dz;
   
   //
-  if (fNy > 0) {
-      dx=(fXmax-fXmin)/fNx;
+  if (fNx > 0) {
+      dx=(fXCmax-fXCmin)/fNx;
   } else {
       dx=1e10;
   }
 
   if (fNy > 0) {
-      dy=(fYmax-fYmin)/fNy;
+      dy=(fYCmax-fYCmin)/fNy;
   } else {
       dy=1e10;
   }
@@ -125,9 +151,9 @@ void AliGenScan::Generate()
   for (Int_t ix=0; ix<fNx; ix++) {
       for (Int_t iy=0; iy<fNy; iy++) {
          for (Int_t iz=0; iz<fNz; iz++){
-             gMC->Rndm(random,6);
-             origin[0]=fXmin+ix*dx+2*(random[0]-0.5)*fOsigma[0];
-             origin[1]=fYmin+iy*dy+2*(random[1]-0.5)*fOsigma[1];
+             Rndm(random,6);
+             origin[0]=fXCmin+ix*dx+2*(random[0]-0.5)*fOsigma[0];
+             origin[1]=fYCmin+iy*dy+2*(random[1]-0.5)*fOsigma[1];
              origin[2]=fZmin+iz*dz+2*(random[2]-0.5)*fOsigma[2];            
              pmom=fPMin+random[3]*(fPMax-fPMin);
              theta=fThetaMin+random[4]*(fThetaMax-fThetaMin);
@@ -135,7 +161,7 @@ void AliGenScan::Generate()
              p[0] = pmom*TMath::Cos(phi)*TMath::Sin(theta);
              p[1] = pmom*TMath::Sin(phi)*TMath::Sin(theta);
              p[2] = pmom*TMath::Cos(theta);
-             gAlice->SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,"Primary",nt);
+             SetTrack(fTrackIt,-1,fIpart,p,origin,polar,0,kPPrimary,nt);
          }
       }
   }