1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.6 2002/05/03 12:18:24 morsch
21 Revision 1.5 2001/05/16 14:57:22 alibrary
22 New files for folders and Stack
24 Revision 1.4 2001/01/12 09:23:17 morsch
25 Correct order of phi and z.
27 Revision 1.3 2000/11/30 07:12:49 alibrary
28 Introducing new Rndm and QA classes
30 Revision 1.2 2000/10/27 11:40:01 morsch
31 Error in printouts corrected
33 Revision 1.1 2000/10/27 08:13:02 morsch
34 Lego generator for phi-z binning.
38 #include "AliLegoGeneratorPhiZ.h"
41 ClassImp(AliLegoGeneratorPhiZ)
44 //___________________________________________
45 void AliLegoGeneratorPhiZ::Generate()
47 // Create a geantino with kinematics corresponding to the current bins
53 const Int_t kMpart = 0;
54 Float_t orig[3], pmom[3];
55 Float_t t, cosp, sinp;
56 if (fCoor1Bin==-1) fCoor1Bin=fNCoor1;
57 // Prepare for next step
58 if(fCoor1Bin>=fNCoor1-1)
59 if(fCoor2Bin>=fNCoor2-1) {
60 Warning("Generate","End of Lego Generation");
64 printf("Generating rays in Phi-bin:%d\n",fCoor2Bin);
67 fCurCoor1 = (fCoor1Min+(fCoor1Bin+0.5)*(fCoor1Max-fCoor1Min)/fNCoor1);
68 fCurCoor2 = (fCoor2Min+(fCoor2Bin+0.5)*(fCoor2Max-fCoor2Min)/fNCoor2);
70 Float_t phi = fCurCoor2*TMath::Pi()/180.;
72 cosp = TMath::Cos(phi);
73 sinp = TMath::Sin(phi);
80 orig[0] = orig[1] = orig[2] = 0;
83 Float_t dalicz = 3000;
85 t = PropagateCylinder(orig,pmom,fRadMin,dalicz);
89 if (TMath::Abs(orig[2]) > fZMax) return;
92 Float_t polar[3]={0.,0.,0.};
94 gAlice->SetTrack(1, -1, kMpart, pmom, orig, polar, 0, kPPrimary, ntr);