Geant4 Cross Reference |
1 // ******************************************* 1 // ******************************************************************** 2 // * License and Disclaimer 2 // * License and Disclaimer * 3 // * 3 // * * 4 // * The Geant4 software is copyright of th 4 // * The Geant4 software is copyright of the Copyright Holders of * 5 // * the Geant4 Collaboration. It is provided 5 // * the Geant4 Collaboration. It is provided under the terms and * 6 // * conditions of the Geant4 Software License 6 // * conditions of the Geant4 Software License, included in the file * 7 // * LICENSE and available at http://cern.ch/ 7 // * LICENSE and available at http://cern.ch/geant4/license . These * 8 // * include a list of copyright holders. 8 // * include a list of copyright holders. * 9 // * 9 // * * 10 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 11 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 12 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 13 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 14 // * use. Please see the license in the file 14 // * use. Please see the license in the file LICENSE and URL above * 15 // * for the full disclaimer and the limitatio 15 // * for the full disclaimer and the limitation of liability. * 16 // * 16 // * * 17 // * This code implementation is the result 17 // * This code implementation is the result of the scientific and * 18 // * technical work of the GEANT4 collaboratio 18 // * technical work of the GEANT4 collaboration. * 19 // * By using, copying, modifying or distri 19 // * By using, copying, modifying or distributing the software (or * 20 // * any work based on the software) you ag 20 // * any work based on the software) you agree to acknowledge its * 21 // * use in resulting scientific publicati 21 // * use in resulting scientific publications, and indicate your * 22 // * acceptance of all terms of the Geant4 Sof 22 // * acceptance of all terms of the Geant4 Software license. * 23 // ******************************************* 23 // ******************************************************************** 24 // 24 // 25 // 25 // 26 /// \file ExGflashPrimaryGeneratorAction.cc 26 /// \file ExGflashPrimaryGeneratorAction.cc 27 /// \brief Implementation of the ExGflashPrima 27 /// \brief Implementation of the ExGflashPrimaryGeneratorAction class 28 // 28 // 29 #include "ExGflashPrimaryGeneratorAction.hh" 29 #include "ExGflashPrimaryGeneratorAction.hh" 30 30 31 #include "G4Electron.hh" << 32 #include "G4Event.hh" 31 #include "G4Event.hh" 33 #include "G4GeneralParticleSource.hh" 32 #include "G4GeneralParticleSource.hh" 34 #include "G4SystemOfUnits.hh" << 35 33 36 //....oooOO0OOooo........oooOO0OOooo........oo 34 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 37 35 38 ExGflashPrimaryGeneratorAction::ExGflashPrimar 36 ExGflashPrimaryGeneratorAction::ExGflashPrimaryGeneratorAction() 39 { 37 { 40 fParticleGun = new G4GeneralParticleSource; 38 fParticleGun = new G4GeneralParticleSource; 41 // fParticleGun->SetVerbosity(2); << 42 auto cursrc = fParticleGun->GetCurrentSource << 43 cursrc->SetParticleDefinition(G4Electron::De << 44 cursrc->GetAngDist()->SetParticleMomentumDir << 45 cursrc->GetEneDist()->SetMonoEnergy(50.0 * G << 46 // fParticleGun->ListSource(); << 47 } 39 } 48 40 49 //....oooOO0OOooo........oooOO0OOooo........oo 41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 50 42 51 ExGflashPrimaryGeneratorAction::~ExGflashPrima 43 ExGflashPrimaryGeneratorAction::~ExGflashPrimaryGeneratorAction() 52 { 44 { 53 delete fParticleGun; 45 delete fParticleGun; 54 } 46 } 55 47 56 //....oooOO0OOooo........oooOO0OOooo........oo 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 57 49 58 void ExGflashPrimaryGeneratorAction::GenerateP 50 void ExGflashPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) 59 { 51 { 60 fParticleGun->GeneratePrimaryVertex(anEvent) 52 fParticleGun->GeneratePrimaryVertex(anEvent); 61 } 53 } 62 54 63 //....oooOO0OOooo........oooOO0OOooo........oo 55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 64 56