File indexing completed on 2025-01-31 09:22:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 #ifndef DMXParticleSource_h
0048 #define DMXParticleSource_h 1
0049
0050 #include "G4VPrimaryGenerator.hh"
0051 #include "G4Navigator.hh"
0052 #include "G4ParticleMomentum.hh"
0053 #include "G4ParticleDefinition.hh"
0054
0055 #include "DMXParticleSourceMessenger.hh"
0056
0057
0058 class DMXParticleSource : public G4VPrimaryGenerator {
0059
0060 public:
0061 DMXParticleSource ();
0062 ~DMXParticleSource ();
0063 void GeneratePrimaryVertex(G4Event *evt);
0064
0065 public:
0066
0067
0068 void SetPosDisType(G4String);
0069 void SetPosDisShape(G4String);
0070 void SetCentreCoords(G4ThreeVector);
0071 void SetHalfZ(G4double);
0072 void SetRadius(G4double);
0073 void GeneratePointSource();
0074 void GeneratePointsInVolume();
0075 G4bool IsSourceConfined();
0076 void ConfineSourceToVolume(G4String);
0077
0078
0079 void SetAngDistType(G4String);
0080 void SetParticleMomentumDirection(G4ParticleMomentum);
0081 void GenerateIsotropicFlux();
0082
0083
0084 void SetEnergyDisType(G4String);
0085 void SetMonoEnergy(G4double);
0086 void GenerateMonoEnergetic();
0087 inline G4double GetParticleEnergy() {return particle_energy;}
0088
0089
0090 void SetVerbosity(G4int);
0091
0092
0093 void SetParticleDefinition(G4ParticleDefinition * aParticleDefinition);
0094 inline void SetParticleCharge(G4double aCharge)
0095 { particle_charge = aCharge; }
0096
0097 private:
0098
0099
0100 G4String SourcePosType;
0101 G4String Shape;
0102 G4double halfz;
0103 G4double Radius;
0104 G4ThreeVector CentreCoords;
0105 G4bool Confine;
0106 G4String VolName;
0107 G4String AngDistType;
0108 G4double MinTheta, MaxTheta, MinPhi, MaxPhi;
0109 G4double Phi;
0110 G4String EnergyDisType;
0111 G4double MonoEnergy;
0112
0113
0114 G4int NumberOfParticlesToBeGenerated;
0115 G4ParticleDefinition* particle_definition;
0116 G4ParticleMomentum particle_momentum_direction;
0117 G4double particle_energy;
0118 G4double particle_charge;
0119 G4ThreeVector particle_position;
0120 G4double particle_time;
0121 G4ThreeVector particle_polarization;
0122
0123
0124 G4int verbosityLevel;
0125
0126 private:
0127
0128 DMXParticleSourceMessenger *theMessenger;
0129 G4Navigator *gNavigator;
0130
0131
0132 };
0133
0134
0135 #endif
0136