|
|
|||
File indexing completed on 2026-09-22 08:09:49
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 /// \file ExGflashPrimaryGeneratorAction.cc 0026 /// \brief Implementation of the ExGflashPrimaryGeneratorAction class 0027 0028 #include "ExGflashPrimaryGeneratorAction.hh" 0029 0030 #include "G4Electron.hh" 0031 #include "G4Event.hh" 0032 #include "G4GeneralParticleSource.hh" 0033 #include "G4SystemOfUnits.hh" 0034 0035 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0036 0037 ExGflashPrimaryGeneratorAction::ExGflashPrimaryGeneratorAction() 0038 { 0039 fParticleGun = new G4GeneralParticleSource; 0040 // fParticleGun->SetVerbosity(2); 0041 auto cursrc = fParticleGun->GetCurrentSource(); 0042 cursrc->SetParticleDefinition(G4Electron::Definition()); 0043 cursrc->GetAngDist()->SetParticleMomentumDirection(G4ParticleMomentum(0., 0., 1.)); 0044 cursrc->GetEneDist()->SetMonoEnergy(50.0 * GeV); 0045 // fParticleGun->ListSource(); 0046 } 0047 0048 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0049 0050 ExGflashPrimaryGeneratorAction::~ExGflashPrimaryGeneratorAction() 0051 { 0052 delete fParticleGun; 0053 } 0054 0055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0056 0057 void ExGflashPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) 0058 { 0059 fParticleGun->GeneratePrimaryVertex(anEvent); 0060 } 0061 0062 //....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 |
|