| 94 | } |
| 95 | |
| 96 | void G4GeneralParticleSource::ListSource() |
| 97 | { |
| 98 | G4cout << "The number of particle sources is: " |
| 99 | << GPSData->GetIntensityVectorSize() << G4endl; |
| 100 | G4cout << " Multiple Vertex sources: " << GPSData->GetMultipleVertex(); |
| 101 | G4cout << " Flat Sampling flag: " << GPSData->GetFlatSampling() << G4endl; |
| 102 | const G4int currentIdx = GPSData->GetCurrentSourceIdx(); |
| 103 | for(G4int i=0; i<GPSData->GetIntensityVectorSize(); ++i) |
| 104 | { |
| 105 | G4cout << "\tsource " << i << " with intensity: " |
| 106 | << GPSData->GetIntensity(i) << G4endl; |
| 107 | const G4SingleParticleSource* thisSrc = GPSData->GetCurrentSource(i); |
| 108 | G4cout << " \t\tNum Particles: "<<thisSrc->GetNumberOfParticles() |
| 109 | << "; Particle type: " |
| 110 | << thisSrc->GetParticleDefinition()->GetParticleName() << G4endl; |
| 111 | G4cout << " \t\tEnergy: " |
| 112 | << G4BestUnit(thisSrc->GetEneDist()->GetMonoEnergy(),"Energy") << G4endl; |
| 113 | G4cout << " \t\tDirection: " |
| 114 | << thisSrc->GetAngDist()->GetDirection() << "; Position: "; |
| 115 | G4cout << G4BestUnit(thisSrc->GetPosDist()->GetCentreCoords(),"Length") |
| 116 | << G4endl; |
| 117 | G4cout << " \t\tAngular Distribution: " |
| 118 | << thisSrc->GetAngDist()->GetDistType() << G4endl; |
| 119 | G4cout << " \t\tEnergy Distribution: " |
| 120 | << thisSrc->GetEneDist()->GetEnergyDisType() << G4endl; |
| 121 | G4cout << " \t\tPosition Distribution Type: " |
| 122 | << thisSrc->GetPosDist()->GetPosDisType(); |
| 123 | G4cout << "; Position Shape: " |
| 124 | << thisSrc->GetPosDist()->GetPosDisShape() << G4endl; |
| 125 | } |
| 126 | |
| 127 | // Set back previous source |
| 128 | GPSData->GetCurrentSource(currentIdx); |
| 129 | } |
| 130 | |
| 131 | void G4GeneralParticleSource::SetCurrentSourceto(G4int aV) |
| 132 | { |
no test coverage detected