X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliLegoGeneratorPhiZ.cxx;h=7ffaa4df63e1a53beb26fc470693752c7b35eb7a;hb=24f126079399620106ef944221d0d1ce3c4bbed2;hp=1897cfb408eec5611f4ace5b2a58f988da016d94;hpb=65fb704d5a3c40dcad260b5c6ceb87aaa8697172;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliLegoGeneratorPhiZ.cxx b/STEER/AliLegoGeneratorPhiZ.cxx index 1897cfb408e..7ffaa4df63e 100644 --- a/STEER/AliLegoGeneratorPhiZ.cxx +++ b/STEER/AliLegoGeneratorPhiZ.cxx @@ -13,18 +13,19 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.2 2000/10/27 11:40:01 morsch -Error in printouts corrected +/* $Id$ */ -Revision 1.1 2000/10/27 08:13:02 morsch -Lego generator for phi-z binning. - -*/ +//------------------------------------------------------------------------- +// Lego generator in Phi - Z bins +// Uses geantino rays to check the material distributions and detector's +// geometry +// Author: A.Morsch +//------------------------------------------------------------------------- #include "AliLegoGeneratorPhiZ.h" #include "AliRun.h" +#include "AliMC.h" +#include "AliLog.h" ClassImp(AliLegoGeneratorPhiZ) @@ -45,18 +46,17 @@ void AliLegoGeneratorPhiZ::Generate() // Prepare for next step if(fCoor1Bin>=fNCoor1-1) if(fCoor2Bin>=fNCoor2-1) { - Warning("Generate","End of Lego Generation"); + AliWarning("End of Lego Generation"); return; } else { fCoor2Bin++; - printf("Generating rays in z-bin:%d\n",fCoor2Bin); + AliDebug(1, Form("Generating rays in Phi-bin:%d",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); @@ -67,19 +67,19 @@ 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) { t = PropagateCylinder(orig,pmom,fRadMin,dalicz); - orig[0] = pmom[0]*t; - orig[1] = pmom[1]*t; - orig[2] = pmom[2]*t; + orig[0] += pmom[0]*t; + orig[1] += pmom[1]*t; + orig[2] += pmom[2]*t; if (TMath::Abs(orig[2]) > fZMax) return; } Float_t polar[3]={0.,0.,0.}; Int_t ntr; - gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, kPPrimary, ntr); + gAlice->GetMCApp()->PushTrack(1, -1, kMpart, pmom, orig, polar, 0, kPPrimary, ntr); }