|
||||
File indexing completed on 2025-01-31 09:22:12
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 // ------------------------------------------------------------ 0028 // GEANT 4 class header file 0029 // CERN Geneva Switzerland 0030 // 0031 // 0032 // ------------ GammaRayTelPrimaryGeneratorAction ------ 0033 // by G.Santin, F.Longo & R.Giannitrapani (30 nov 2000) 0034 // 0035 // ************************************************************ 0036 0037 #ifndef GammaRayTelPrimaryGeneratorAction_h 0038 #define GammaRayTelPrimaryGeneratorAction_h 1 0039 0040 #include "G4SystemOfUnits.hh" 0041 #include "G4VUserPrimaryGeneratorAction.hh" 0042 #include "globals.hh" 0043 0044 class G4ParticleGun; 0045 class G4Event; 0046 class GammaRayTelDetectorConstruction; 0047 class GammaRayTelPrimaryGeneratorMessenger; 0048 class G4GeneralParticleSource; 0049 0050 class GammaRayTelPrimaryGeneratorAction: public G4VUserPrimaryGeneratorAction { 0051 public: 0052 explicit GammaRayTelPrimaryGeneratorAction(); 0053 0054 ~GammaRayTelPrimaryGeneratorAction() override; 0055 0056 void GeneratePrimaries(G4Event *event) override; 0057 0058 void SetRndmFlag(G4String value) { 0059 rndmFlag = value; 0060 } 0061 0062 void SetSourceType(G4int value) { 0063 sourceType = value; 0064 } 0065 0066 void SetSpectrumType(G4int value) { 0067 spectrumType = value; 0068 } 0069 0070 void SetVertexRadius(G4double value) { 0071 vertexRadius = value; 0072 } 0073 0074 void SetSourceGen(G4bool value) { 0075 sourceGun = value; 0076 } 0077 0078 private: 0079 G4ParticleGun *particleGun; 0080 0081 G4GeneralParticleSource *particleSource; 0082 0083 const GammaRayTelDetectorConstruction *detector; 0084 0085 GammaRayTelPrimaryGeneratorMessenger *gunMessenger; 0086 0087 G4String rndmFlag{"off"}; // flag for a random impact point 0088 0089 G4int sourceType{0}; 0090 0091 G4double vertexRadius{15. * cm}; 0092 0093 G4int spectrumType{0}; 0094 0095 G4bool sourceGun{false}; // false for GeneralParticleSource 0096 }; 0097 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |