Message: Re: Model a crossing muon in a ccd cell  Not Logged In (login) 
Hello everyone,
I realized that it was better for me to use the GeneralParticleSource in order to simulate the radiative environment. So here is my code : 
G4VPrimaryGenerator* PrimaryGeneratorAction::InitializeGPS() { G4GeneralParticleSource* gps = new G4GeneralParticleSource();
// setup details easier via UI commands see gps.mac
// particle type G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); G4ParticleDefinition* muon = particleTable>FindParticle("mu"); gps>GetCurrentSource()>SetParticleDefinition(muon);
// set energy distribution G4SPSEneDistribution* energy_distribution = gps>GetCurrentSource()>GetEneDist() ; energy_distribution>SetEnergyDisType("Mono"); // or gauss energy_distribution>SetMonoEnergy(10*MeV);
// set position distribution G4SPSPosDistribution* position_distribution = gps>GetCurrentSource()>GetPosDist(); position_distribution>SetPosDisType("Beam"); // or Point,Plane,Volume,Beam position_distribution>SetCentreCoords(G4ThreeVector(0.0*cm,0.0*cm,0.0*cm)); position_distribution>SetBeamSigmaInX(0.0*mm); position_distribution>SetBeamSigmaInY(0.0*mm);
// set angular distribution G4SPSAngDistribution* angular_distribution = gps>GetCurrentSource()>GetAngDist(); angular_distribution>SetParticleMomentumDirection( G4ThreeVector(0., 0., 0.) );
//valid options are: // iso, cos, user, planar, beam2d, beam1d angular_distribution>SetAngDistType("iso"); angular_distribution>SetBeamSigmaInAngX(0.0*mrad); angular_distribution>SetBeamSigmaInAngY(0.0*mrad); angular_distribution>DefineAngRefAxes("angref1",G4ThreeVector(1.,0.,0.));
return gps; }  My question is how to modify the GPS in order to simulate a sphere (an isotropic source which contain a smaller detector) where particles are generated from and cross the inside in a random way ? And calculate the energy deposited in the detector by the particles which crossed the detector ? Thank you in advance, Pierre

Inline Depth:  Outline Depth:  Add message: 
to: 