]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliLegoGeneratorEta.cxx
New files for folders and Stack
[u/mrichter/AliRoot.git] / STEER / AliLegoGeneratorEta.cxx
index 5a4b679e0b919f0f407fde9ffc41119889250222..859f0717f0b9e41f3c35a2848a05d3eb222b44f7 100644 (file)
 
 /*
 $Log$
+Revision 1.3  2000/12/15 10:33:59  morsch
+Invert coordinates to make meaningful zylindrical plots.
+
+Revision 1.2  2000/11/30 07:12:49  alibrary
+Introducing new Rndm and QA classes
+
+Revision 1.1  2000/10/26 14:18:05  morsch
+Add new AliLegoGenerator classes:
+AliLegoGeneratorXYZ: carthesian binning
+AliLegoGeneratorEta: eta-phi binning
+
 */
 
 #include "AliLegoGeneratorEta.h"
@@ -43,15 +54,16 @@ void AliLegoGeneratorEta::Generate()
        return;
      } else { 
        fCoor2Bin++;
-       printf("Generating rays in phi bin:%d\n",fCoor2Bin);
+       printf("Generating rays in eta 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 theta = 2.*TMath::ATan(TMath::Exp(-fCurCoor1));
-   Float_t phi   = fCurCoor2*TMath::Pi()/180.;
+   Float_t phi   = fCurCoor1*TMath::Pi()/180.;
+   Float_t theta = 2.*TMath::ATan(TMath::Exp(-fCurCoor2));
+
    
    cost      = TMath::Cos(theta);
    sint      = TMath::Sin(theta);
@@ -75,6 +87,6 @@ void AliLegoGeneratorEta::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);
    
 }