Generate source in all direction

salam,
please i tried to generate a positron source emittind radiation in all direction i tried with this code but there were errors please help me if you can

G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4String particleName;
G4ParticleDefinition* particle = particleTable->FindParticle(particleName=“e+”);
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleEnergy(1.MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0
cm,0.0cm,-0.0150cm));
G4double Px,Py,Pz;
G4double Pi = 3.14159;//acos(-1.);
G4double phi = 2.PiG4UniformRand();
G4double sin_theta = G4UniformRand();

Px = sin_thetacos(phi);
Py = sin_theta
sin(phi);
double teta = asin(sin_theta);
Pz = cos(teta);

//G4cout<<Px<<" * “<<Py<<” * "<<Pz<<G4endl;

//G4cout<<"-----------------------------------------------------------"<<G4endl;

Px=(0.5-G4UniformRand())*2.;
Py=(0.5-G4UniformRand())*2.;
Pz=(0.5-G4UniformRand())*2.;

double module= sqrt(PxPx+PyPy+Pz*Pz);
Px=Px/module;
Py=Py/module;
Pz=Pz/module;

particleGun->SetParticleMomentumDirection(G4ThreeVector(Px,Py,Pz));
particleGun->GeneratePrimaryVertex(anEvent);
particleGun->GeneratePrimaryVertex(anEvent);

Since this is a ROOT and not a Geant forum have a look at TRandom::Sphere.