Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -88,7 +88,7 @@ void WLSMaterials::CreateMaterials()
|
||||
// Vacuum
|
||||
//--------------------------------------------------
|
||||
|
||||
G4Material* mat = nistMan->FindOrBuildMaterial("G4_Galactic");
|
||||
nistMan->FindOrBuildMaterial("G4_Galactic");
|
||||
|
||||
//--------------------------------------------------
|
||||
// Air
|
||||
@@ -176,7 +176,7 @@ void WLSMaterials::CreateMaterials()
|
||||
// Aluminium
|
||||
//--------------------------------------------------
|
||||
|
||||
mat = nistMan->FindOrBuildMaterial("G4_Al");
|
||||
nistMan->FindOrBuildMaterial("G4_Al");
|
||||
|
||||
//--------------------------------------------------
|
||||
// TiO2
|
||||
|
||||
@@ -208,8 +208,10 @@ void WLSPhysicsList::RemoveFromPhysicsList(const G4String& name)
|
||||
}
|
||||
}
|
||||
if (!success) {
|
||||
std::ostringstream message;
|
||||
message << "PhysicsList::RemoveFromEMPhysicsList "<< name << "not found"; G4Exception(message.str().c_str());
|
||||
G4ExceptionDescription message;
|
||||
message << "PhysicsList::RemoveFromEMPhysicsList "<< name << "not found";
|
||||
G4Exception("example WLSPhysicsList::RemoveFromPhysicsList()",
|
||||
"ExamWLSPhysicsList01",FatalException,message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,11 +107,9 @@ void WLSPrimaryGeneratorAction::BuildEmissionSpectrum()
|
||||
aMaterialPropertiesTable->GetProperty("WLSCOMPONENT");
|
||||
|
||||
if (theWLSVector) {
|
||||
theWLSVector->ResetIterator();
|
||||
++(*theWLSVector);
|
||||
G4double currentIN = theWLSVector->GetProperty();
|
||||
G4double currentIN = (*theWLSVector)[0];
|
||||
if (currentIN >= 0.0) {
|
||||
G4double currentPM = theWLSVector->GetPhotonEnergy();
|
||||
G4double currentPM = theWLSVector->Energy(0);
|
||||
G4double currentCII = 0.0;
|
||||
aPhysicsOrderedFreeVector->
|
||||
InsertValues(currentPM , currentCII);
|
||||
@@ -119,9 +117,12 @@ void WLSPrimaryGeneratorAction::BuildEmissionSpectrum()
|
||||
G4double prevCII = currentCII;
|
||||
G4double prevIN = currentIN;
|
||||
|
||||
while(++(*theWLSVector)) {
|
||||
currentPM = theWLSVector->GetPhotonEnergy();
|
||||
currentIN=theWLSVector->GetProperty();
|
||||
for (size_t i = 1;
|
||||
i < theWLSVector->GetVectorLength();
|
||||
i++)
|
||||
{
|
||||
currentPM = theWLSVector->Energy(i);
|
||||
currentIN = (*theWLSVector)[i];
|
||||
currentCII = 0.5 * (prevIN + currentIN);
|
||||
currentCII = prevCII + (currentPM - prevPM) * currentCII;
|
||||
aPhysicsOrderedFreeVector->
|
||||
@@ -144,6 +145,8 @@ void WLSPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
BuildEmissionSpectrum();
|
||||
}
|
||||
|
||||
|
||||
#ifdef use_sampledEnergy
|
||||
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
|
||||
|
||||
G4double sampledEnergy = 3*eV;
|
||||
@@ -170,6 +173,7 @@ void WLSPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
}
|
||||
|
||||
//particleGun->SetParticleEnergy(sampledEnergy);
|
||||
#endif
|
||||
|
||||
if(particleGun->GetParticleDefinition()->GetParticleName()=="opticalphoton"){
|
||||
SetOptPhotonPolar();
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "WLSDetectorConstruction.hh"
|
||||
#include "WLSSteppingAction.hh"
|
||||
|
||||
#include <ctime>
|
||||
|
||||
WLSRunAction::WLSRunAction()
|
||||
: saveRndm(0), autoSeed(false)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user