Import Geant4 10.0.0 source tree
This commit is contained in:
Executable → Regular
+16
-16
@@ -26,7 +26,7 @@
|
||||
/// \file exoticphysics/phonon/src/XPrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the XPrimaryGeneratorAction class
|
||||
//
|
||||
// $Id$
|
||||
// $Id: XPrimaryGeneratorAction.cc 76246 2013-11-08 11:17:29Z gcosmo $
|
||||
//
|
||||
|
||||
#include "XPrimaryGeneratorAction.hh"
|
||||
@@ -35,9 +35,9 @@
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4RandomDirection.hh"
|
||||
|
||||
#include "XTPhononFast.hh"
|
||||
#include "XTPhononSlow.hh"
|
||||
#include "XLPhonon.hh"
|
||||
#include "G4PhononTransFast.hh"
|
||||
#include "G4PhononTransSlow.hh"
|
||||
#include "G4PhononLong.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
@@ -46,13 +46,13 @@ using namespace std;
|
||||
XPrimaryGeneratorAction::XPrimaryGeneratorAction()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
particleGun = new G4ParticleGun(n_particle);
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
// default particle kinematic
|
||||
particleGun->SetParticleDefinition(XLPhonon::PhononDefinition());
|
||||
particleGun->SetParticleMomentumDirection(G4RandomDirection());
|
||||
particleGun->SetParticlePosition(G4ThreeVector(0.0,0.0,0.0));
|
||||
particleGun->SetParticleEnergy(1e-4*eV);
|
||||
fParticleGun->SetParticleDefinition(G4PhononLong::PhononDefinition());
|
||||
fParticleGun->SetParticleMomentumDirection(G4RandomDirection());
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(0.0,0.0,0.0));
|
||||
fParticleGun->SetParticleEnergy(1e-4*eV);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -60,7 +60,7 @@ XPrimaryGeneratorAction::XPrimaryGeneratorAction()
|
||||
|
||||
XPrimaryGeneratorAction::~XPrimaryGeneratorAction()
|
||||
{
|
||||
delete particleGun;
|
||||
delete fParticleGun;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -69,25 +69,25 @@ XPrimaryGeneratorAction::~XPrimaryGeneratorAction()
|
||||
void XPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
|
||||
particleGun->SetParticleMomentumDirection(G4RandomDirection());
|
||||
fParticleGun->SetParticleMomentumDirection(G4RandomDirection());
|
||||
|
||||
G4double selector = G4UniformRand();
|
||||
if(selector<0.53539) {
|
||||
particleGun->SetParticleDefinition(XTPhononSlow::PhononDefinition());
|
||||
fParticleGun->SetParticleDefinition(G4PhononTransSlow::PhononDefinition());
|
||||
}
|
||||
else if(selector<0.90217) {
|
||||
particleGun->SetParticleDefinition(XTPhononFast::PhononDefinition());
|
||||
fParticleGun->SetParticleDefinition(G4PhononTransFast::PhononDefinition());
|
||||
}
|
||||
else {
|
||||
particleGun->SetParticleDefinition(XLPhonon::PhononDefinition());
|
||||
fParticleGun->SetParticleDefinition(G4PhononLong::PhononDefinition());
|
||||
}
|
||||
|
||||
//Set phonon energy.
|
||||
//Do not set momentum direction here.
|
||||
//Any momentum direction set here will be overwritten
|
||||
//by XPhononStackingAction::ClassifyNewTrack
|
||||
particleGun->SetParticleEnergy(0.0075*eV);
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
fParticleGun->SetParticleEnergy(0.0075*eV);
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user