![]() |
|
|||
File indexing completed on 2025-02-23 09:22:17
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 /// \file medical/GammaTherapy/include/PrimaryGeneratorAction.hh 0028 /// \brief Definition of the PrimaryGeneratorAction class 0029 // 0030 0031 #ifndef PrimaryGeneratorAction_h 0032 #define PrimaryGeneratorAction_h 1 0033 0034 //--------------------------------------------------------------------------- 0035 // 0036 // ClassName: PrimaryGeneratorAction 0037 // 0038 // Description: Generate primary beam 0039 // 0040 // Authors: V.Grichine, V.Ivanchenko 0041 // 0042 // Modified: 0043 // 0044 //---------------------------------------------------------------------------- 0045 // 0046 0047 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0048 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0049 0050 #include "G4Event.hh" 0051 #include "G4ParticleGun.hh" 0052 #include "G4ThreeVector.hh" 0053 #include "G4VUserPrimaryGeneratorAction.hh" 0054 #include "globals.hh" 0055 0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0057 0058 class PrimaryGeneratorMessenger; 0059 class DetectorConstruction; 0060 0061 class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction 0062 { 0063 public: 0064 // The constructor defines a ParticleGun object, which allows 0065 // shooting a beam of particles through the experimental set-up. 0066 PrimaryGeneratorAction(DetectorConstruction* pDet); 0067 0068 // The destructor. It deletes the ParticleGun. 0069 virtual ~PrimaryGeneratorAction(); 0070 0071 // It reads the parameters of the primary particles. 0072 // Generates the primary event via the ParticleGun method. 0073 void GeneratePrimaries(G4Event* anEvent); 0074 0075 // Get/Set methods 0076 void SetBeamEnergy(G4double val); 0077 0078 inline void SetBeamSigmaE(G4double val) { fSigmaE = val; }; 0079 inline void SetBeamX(G4double val) { fX0 = val; }; 0080 inline void SetBeamY(G4double val) { fY0 = val; }; 0081 inline void SetBeamZ(G4double val) { fZ0 = val; }; 0082 inline void SetBeamSigmaX(G4double val) { fSigmaX = val; }; 0083 inline void SetBeamSigmaY(G4double val) { fSigmaY = val; }; 0084 inline void SetBeamSigmaZ(G4double val) { fSigmaY = val; }; 0085 inline void SetBeamMinCosTheta(G4double val) { fMinCosTheta = val; }; 0086 inline void SetSigmaTheta(G4double val) { fSigmaTheta = val; }; 0087 inline void SetVerbose(G4int val) { fVerbose = val; }; 0088 inline void SetRandom(const G4String& type) { fGauss = type; }; 0089 0090 G4bool GetVerbose() const { return fVerbose; } 0091 0092 private: 0093 void InitializeMe(); 0094 0095 PrimaryGeneratorAction& operator=(const PrimaryGeneratorAction& right); 0096 PrimaryGeneratorAction(const PrimaryGeneratorAction&); 0097 0098 G4int fVerbose; 0099 PrimaryGeneratorMessenger* fMessenger; 0100 G4ParticleGun* fParticleGun; 0101 DetectorConstruction* fDetector; 0102 0103 G4int fCounter; 0104 G4double fX0, fY0, fZ0; 0105 G4double fSigmaX, fSigmaY, fSigmaZ; 0106 G4double fRMax2; 0107 G4double fSigmaE; 0108 G4double fSigmaTheta; 0109 G4double fEnergy; 0110 G4double fMinCosTheta; 0111 G4ThreeVector fPosition; 0112 G4ThreeVector fDirection; 0113 G4String fGauss; 0114 }; 0115 0116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 0117 0118 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |