]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliLegoGeneratorPhiZ.cxx
New files for folders and Stack
[u/mrichter/AliRoot.git] / STEER / AliLegoGeneratorPhiZ.cxx
index 88556e1480cd2468992c3c92b5b8a681bcef0110..44f50f58dd4460838376fc0c7598ffb34ac1422f 100644 (file)
 
 /*
 $Log$
+Revision 1.4  2001/01/12 09:23:17  morsch
+Correct order of phi and z.
+
+Revision 1.3  2000/11/30 07:12:49  alibrary
+Introducing new Rndm and QA classes
+
+Revision 1.2  2000/10/27 11:40:01  morsch
+Error in printouts corrected
+
+Revision 1.1  2000/10/27 08:13:02  morsch
+Lego generator for phi-z binning.
+
 */
 
 #include "AliLegoGeneratorPhiZ.h"
@@ -43,14 +55,14 @@ void AliLegoGeneratorPhiZ::Generate()
        return;
      } else { 
        fCoor2Bin++;
-       printf("Generating rays in phi bin:%d\n",fCoor2Bin);
+       printf("Generating rays in z-bin:%d\n",fCoor2Bin);
        fCoor1Bin=0;
      } else fCoor1Bin++;
 
    fCurCoor1 = (fCoor1Min+(fCoor1Bin+0.5)*(fCoor1Max-fCoor1Min)/fNCoor1);
    fCurCoor2 = (fCoor2Min+(fCoor2Bin+0.5)*(fCoor2Max-fCoor2Min)/fNCoor2);
 
-   Float_t phi   = fCurCoor1*TMath::Pi()/180.;
+   Float_t phi   = fCurCoor2*TMath::Pi()/180.;
    
    cosp      = TMath::Cos(phi);
    sinp      = TMath::Sin(phi);
@@ -61,7 +73,7 @@ void AliLegoGeneratorPhiZ::Generate()
    
    // --- Where to start
    orig[0] = orig[1] = orig[2] = 0;
-   orig[2] = fCurCoor2;
+   orig[2] = fCurCoor1;
    
    Float_t dalicz = 3000;
    if (fRadMin > 0) {
@@ -74,6 +86,6 @@ void AliLegoGeneratorPhiZ::Generate()
    
    Float_t polar[3]={0.,0.,0.};
    Int_t ntr;
-   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, "LEGO ray", ntr);
+   gAlice->SetTrack(1, -1, kMpart, pmom, orig, polar, 0, kPPrimary, ntr);
    
 }