#include "TRandom.h"
#include "AliLegoGeneratorEtaR.h"
#include "AliRun.h"
#include "AliMC.h"
#include "AliLog.h"
ClassImp(AliLegoGeneratorEtaR)
void AliLegoGeneratorEtaR::Generate()
{
const Int_t kMpart = 0;
Float_t orig[3], pmom[3];
Float_t t, cost, sint, cosp, sinp;
fCurCoor1 = fCoor1Min + (fCoor1Max - fCoor1Min) * gRandom->Rndm();
fCurCoor2 = fCoor2Min + (fCoor2Max - fCoor2Min) * gRandom->Rndm();
Float_t phi = fCurCoor1 * TMath::Pi() / 180.;
Float_t theta = 2. * TMath::ATan(TMath::Exp(-fCurCoor2));
cost = TMath::Cos(theta);
sint = TMath::Sin(theta);
cosp = TMath::Cos(phi);
sinp = TMath::Sin(phi);
pmom[0] = cosp * sint;
pmom[1] = sinp * sint;
pmom[2] = cost;
orig[0] = orig[1] = orig[2] = 0;
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;
if (TMath::Abs(orig[2]) > fZMax) return;
}
Float_t polar[3]={0.,0.,0.};
Int_t ntr;
gAlice->GetMCApp()->PushTrack(1, -1, kMpart, pmom, orig, polar, 0, kPPrimary, ntr);
}
AliLegoGeneratorEtaR.cxx:1 AliLegoGeneratorEtaR.cxx:2 AliLegoGeneratorEtaR.cxx:3 AliLegoGeneratorEtaR.cxx:4 AliLegoGeneratorEtaR.cxx:5 AliLegoGeneratorEtaR.cxx:6 AliLegoGeneratorEtaR.cxx:7 AliLegoGeneratorEtaR.cxx:8 AliLegoGeneratorEtaR.cxx:9 AliLegoGeneratorEtaR.cxx:10 AliLegoGeneratorEtaR.cxx:11 AliLegoGeneratorEtaR.cxx:12 AliLegoGeneratorEtaR.cxx:13 AliLegoGeneratorEtaR.cxx:14 AliLegoGeneratorEtaR.cxx:15 AliLegoGeneratorEtaR.cxx:16 AliLegoGeneratorEtaR.cxx:17 AliLegoGeneratorEtaR.cxx:18 AliLegoGeneratorEtaR.cxx:19 AliLegoGeneratorEtaR.cxx:20 AliLegoGeneratorEtaR.cxx:21 AliLegoGeneratorEtaR.cxx:22 AliLegoGeneratorEtaR.cxx:23 AliLegoGeneratorEtaR.cxx:24 AliLegoGeneratorEtaR.cxx:25 AliLegoGeneratorEtaR.cxx:26 AliLegoGeneratorEtaR.cxx:27 AliLegoGeneratorEtaR.cxx:28 AliLegoGeneratorEtaR.cxx:29 AliLegoGeneratorEtaR.cxx:30 AliLegoGeneratorEtaR.cxx:31 AliLegoGeneratorEtaR.cxx:32 AliLegoGeneratorEtaR.cxx:33 AliLegoGeneratorEtaR.cxx:34 AliLegoGeneratorEtaR.cxx:35 AliLegoGeneratorEtaR.cxx:36 AliLegoGeneratorEtaR.cxx:37 AliLegoGeneratorEtaR.cxx:38 AliLegoGeneratorEtaR.cxx:39 AliLegoGeneratorEtaR.cxx:40 AliLegoGeneratorEtaR.cxx:41 AliLegoGeneratorEtaR.cxx:42 AliLegoGeneratorEtaR.cxx:43 AliLegoGeneratorEtaR.cxx:44 AliLegoGeneratorEtaR.cxx:45 AliLegoGeneratorEtaR.cxx:46 AliLegoGeneratorEtaR.cxx:47 AliLegoGeneratorEtaR.cxx:48 AliLegoGeneratorEtaR.cxx:49 AliLegoGeneratorEtaR.cxx:50 AliLegoGeneratorEtaR.cxx:51 AliLegoGeneratorEtaR.cxx:52 AliLegoGeneratorEtaR.cxx:53 AliLegoGeneratorEtaR.cxx:54 AliLegoGeneratorEtaR.cxx:55 AliLegoGeneratorEtaR.cxx:56 AliLegoGeneratorEtaR.cxx:57 AliLegoGeneratorEtaR.cxx:58 AliLegoGeneratorEtaR.cxx:59 AliLegoGeneratorEtaR.cxx:60 AliLegoGeneratorEtaR.cxx:61 AliLegoGeneratorEtaR.cxx:62 AliLegoGeneratorEtaR.cxx:63 AliLegoGeneratorEtaR.cxx:64 AliLegoGeneratorEtaR.cxx:65 AliLegoGeneratorEtaR.cxx:66 AliLegoGeneratorEtaR.cxx:67 AliLegoGeneratorEtaR.cxx:68 AliLegoGeneratorEtaR.cxx:69 AliLegoGeneratorEtaR.cxx:70 AliLegoGeneratorEtaR.cxx:71 AliLegoGeneratorEtaR.cxx:72 AliLegoGeneratorEtaR.cxx:73 AliLegoGeneratorEtaR.cxx:74 AliLegoGeneratorEtaR.cxx:75 AliLegoGeneratorEtaR.cxx:76 AliLegoGeneratorEtaR.cxx:77 AliLegoGeneratorEtaR.cxx:78