|
|
|||
File indexing completed on 2025-10-26 08:02:27
0001 // ******************************************************************** 0002 // * License and Disclaimer * 0003 // * * 0004 // * The Geant4 software is copyright of the Copyright Holders of * 0005 // * the Geant4 Collaboration. It is provided under the terms and * 0006 // * conditions of the Geant4 Software License, included in the file * 0007 // * LICENSE and available at http://cern.ch/geant4/license . These * 0008 // * include a list of copyright holders. * 0009 // * * 0010 // * Neither the authors of this software system, nor their employing * 0011 // * institutes,nor the agencies providing financial support for this * 0012 // * work make any representation or warranty, express or implied, * 0013 // * regarding this software system or assume any liability for its * 0014 // * use. Please see the license in the file LICENSE and URL above * 0015 // * for the full disclaimer and the limitation of liability. * 0016 // * * 0017 // * This code implementation is the result of the scientific and * 0018 // * technical work of the GEANT4 collaboration. * 0019 // * By using, copying, modifying or distributing the software (or * 0020 // * any work based on the software) you agree to acknowledge its * 0021 // * use in resulting scientific publications, and indicate your * 0022 // * acceptance of all terms of the Geant4 Software license. * 0023 // ******************************************************************** 0024 // 0025 // 0026 /// \file ExGflashPrimaryGeneratorAction.cc 0027 /// \brief Implementation of the ExGflashPrimaryGeneratorAction class 0028 // 0029 #include "ExGflashPrimaryGeneratorAction.hh" 0030 0031 #include "G4Electron.hh" 0032 #include "G4Event.hh" 0033 #include "G4GeneralParticleSource.hh" 0034 #include "G4SystemOfUnits.hh" 0035 0036 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0037 0038 ExGflashPrimaryGeneratorAction::ExGflashPrimaryGeneratorAction() 0039 { 0040 fParticleGun = new G4GeneralParticleSource; 0041 // fParticleGun->SetVerbosity(2); 0042 auto cursrc = fParticleGun->GetCurrentSource(); 0043 cursrc->SetParticleDefinition(G4Electron::Definition()); 0044 cursrc->GetAngDist()->SetParticleMomentumDirection(G4ParticleMomentum(0., 0., 1.)); 0045 cursrc->GetEneDist()->SetMonoEnergy(50.0 * GeV); 0046 // fParticleGun->ListSource(); 0047 } 0048 0049 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0050 0051 ExGflashPrimaryGeneratorAction::~ExGflashPrimaryGeneratorAction() 0052 { 0053 delete fParticleGun; 0054 } 0055 0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0057 0058 void ExGflashPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) 0059 { 0060 fParticleGun->GeneratePrimaryVertex(anEvent); 0061 } 0062 0063 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|