Import Geant4 11.1.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2022-07-01 10:44:02 +02:00
parent b3bf75a2a1
commit c07cea1fe0
2172 changed files with 183300 additions and 123938 deletions
@@ -116,9 +116,24 @@ void HistoManager::Book()
analysisMan->CreateH1(
"z_fresnel", "Z momentum dir of Fresnel-refracted photons", n, xmn, xmx);
// 20
analysisMan->CreateH1("Transmitted", "Transmitted photons", n, xmn, xmx);
analysisMan->CreateH1("Fresnel refraction", "Fresnel-refracted photons", n,
xmn, xmx);
// 21
analysisMan->CreateH1("Reflected", "Reflected photons", n, xmn, xmx);
analysisMan->CreateH1("Fresnel reflection", "Fresnel-reflected photons", n,
xmn, xmx);
// 22
analysisMan->CreateH1("Total internal reflection",
"Total internal reflected photons", n, xmn, xmx);
// 23
analysisMan->CreateH1("Fresnel reflection plus TIR",
"Fresnel-reflected plus TIR photons", n, xmn, xmx);
// 24
analysisMan->CreateH1("Absorption", "Absorbed photons", n, xmn, xmx);
// 25
analysisMan->CreateH1("Transmitted", "Transmitted photons", n, xmn, xmx);
// 26
analysisMan->CreateH1("Spike reflection", "Spike reflected photons", n, xmn,
xmx);
for(G4int i = 0; i < analysisMan->GetNofH1s(); ++i)
{
@@ -50,8 +50,7 @@ PrimaryGeneratorMessenger::PrimaryGeneratorMessenger(
fPolarCmd =
new G4UIcmdWithADoubleAndUnit("/opnovice2/gun/optPhotonPolar", this);
fPolarCmd->SetGuidance("Set linear polarization");
fPolarCmd->SetGuidance(" angle w.r.t. (k,n) plane");
fPolarCmd->SetGuidance("Set linear polarization angle w.r.t. (k,n) plane");
fPolarCmd->SetParameterName("angle", true);
fPolarCmd->SetUnitCategory("Angle");
fPolarCmd->SetDefaultValue(-360.0);
@@ -60,6 +59,9 @@ PrimaryGeneratorMessenger::PrimaryGeneratorMessenger(
fRandomDirectionCmd =
new G4UIcmdWithABool("/opnovice2/gun/randomDirection", this);
fRandomDirectionCmd->SetGuidance(
"Set direction of each primary particle randomly.");
fRandomDirectionCmd->SetDefaultValue(true);
fRandomDirectionCmd->AvailableForStates(G4State_Idle, G4State_PreInit);
}
+224 -105
View File
@@ -214,11 +214,31 @@ void Run::EndOfRun()
analysisMan->SetH1XAxisTitle(id, "Direction cosine");
analysisMan->SetH1YAxisTitle(id, "Number of photons");
id = analysisMan->GetH1Id("Fresnel reflection");
analysisMan->SetH1XAxisTitle(id, "Angle [deg]");
analysisMan->SetH1YAxisTitle(id, "Fraction of photons");
id = analysisMan->GetH1Id("Fresnel refraction");
analysisMan->SetH1XAxisTitle(id, "Angle [deg]");
analysisMan->SetH1YAxisTitle(id, "Fraction of photons");
id = analysisMan->GetH1Id("Total internal reflection");
analysisMan->SetH1XAxisTitle(id, "Angle [deg]");
analysisMan->SetH1YAxisTitle(id, "Fraction of photons");
id = analysisMan->GetH1Id("Fresnel reflection plus TIR");
analysisMan->SetH1XAxisTitle(id, "Angle [deg]");
analysisMan->SetH1YAxisTitle(id, "Fraction of photons");
id = analysisMan->GetH1Id("Absorption");
analysisMan->SetH1XAxisTitle(id, "Angle [deg]");
analysisMan->SetH1YAxisTitle(id, "Fraction of photons");
id = analysisMan->GetH1Id("Transmitted");
analysisMan->SetH1XAxisTitle(id, "Angle [deg]");
analysisMan->SetH1YAxisTitle(id, "Fraction of photons");
id = analysisMan->GetH1Id("Reflected");
id = analysisMan->GetH1Id("Spike reflection");
analysisMan->SetH1XAxisTitle(id, "Angle [deg]");
analysisMan->SetH1YAxisTitle(id, "Fraction of photons");
@@ -520,101 +540,152 @@ void Run::EndOfRun()
G4cout.setf(mode, std::ios::floatfield);
G4cout.precision(prec);
G4int histo_id_trans = analysisMan->GetH1Id("Transmitted");
G4int histo_id_refl = analysisMan->GetH1Id("Reflected");
if(analysisMan->GetH1Activation(histo_id_trans))
G4int histo_id_refract = analysisMan->GetH1Id("Fresnel refraction");
G4int histo_id_reflect = analysisMan->GetH1Id("Fresnel reflection plus TIR");
G4int histo_id_spike = analysisMan->GetH1Id("Spike reflection");
G4int histo_id_absorption = analysisMan->GetH1Id("Absorption");
if(analysisMan->GetH1Activation(histo_id_refract) &&
analysisMan->GetH1Activation(histo_id_reflect))
{
G4double rindex1 = det->GetTankMaterial()
->GetMaterialPropertiesTable()
->GetProperty(kRINDEX)
->Value(fEkin);
G4double rindex2 = det->GetWorldMaterial()
->GetMaterialPropertiesTable()
->GetProperty(kRINDEX)
->Value(fEkin);
auto histo_refract = analysisMan->GetH1(histo_id_refract);
auto histo_reflect = analysisMan->GetH1(histo_id_reflect);
// std::vector<G4double> refract;
std::vector<G4double> reflect;
// std::vector<G4double> tir;
std::vector<G4double> tot;
for(size_t i = 0; i < histo_refract->axis().bins(); ++i)
{
// refract.push_back(histo_refract->bin_height(i));
reflect.push_back(histo_reflect->bin_height(i));
// tir.push_back(histo_TIR->bin_height(i));
tot.push_back(histo_refract->bin_height(i) +
histo_reflect->bin_height(i));
}
// find Brewster angle: Rp = 0
// need enough statistics for this method to work
G4double min_angle = -1.;
G4double min_val = DBL_MAX;
G4double bin_width = 0.;
for(size_t i = 0; i < reflect.size(); ++i)
{
if(reflect[i] < min_val)
{
min_val = reflect[i];
min_angle = histo_reflect->axis().bin_lower_edge(i);
bin_width = histo_reflect->axis().bin_upper_edge(i) -
histo_reflect->axis().bin_lower_edge(i);
min_angle += bin_width / 2.;
}
}
G4cout << "Polarization of primary optical photons: "
<< fPolarization / deg << " deg." << G4endl;
if(fPolarized && fPolarization == 0.0)
{
G4cout << "Reflectance shows a minimum at: " << min_angle << " +/- "
<< bin_width / 2;
G4cout << " deg. Expected Brewster angle: "
<< (360. / CLHEP::twopi) * std::atan(rindex2 / rindex1)
<< " deg. " << G4endl;
}
// find angle of total internal reflection: T -> 0
// last bin for T > 0
min_angle = -1.;
min_val = DBL_MAX;
for(size_t i = 0; i < histo_refract->axis().bins() - 1; ++i)
{
if(histo_refract->bin_height(i) > 0. &&
histo_refract->bin_height(i + 1) == 0.)
{
min_angle = histo_refract->axis().bin_lower_edge(i);
bin_width = histo_reflect->axis().bin_upper_edge(i) -
histo_reflect->axis().bin_lower_edge(i);
min_angle += bin_width / 2.;
break;
}
}
if(fPolarized)
{
G4double rindex1 = det->GetTankMaterial()
->GetMaterialPropertiesTable()
->GetProperty(kRINDEX)
->Value(fEkin);
G4double rindex2 = det->GetWorldMaterial()
->GetMaterialPropertiesTable()
->GetProperty(kRINDEX)
->Value(fEkin);
auto histo_trans = analysisMan->GetH1(histo_id_trans);
auto histo_refl = analysisMan->GetH1(histo_id_refl);
std::vector<G4double> trans;
std::vector<G4double> refl;
std::vector<G4double> tot;
for(size_t i = 0; i < histo_trans->axis().bins(); ++i)
{
trans.push_back(histo_trans->bin_height(i));
refl.push_back(histo_refl->bin_height(i));
tot.push_back(histo_trans->bin_height(i) + histo_refl->bin_height(i));
}
// find Brewster angle: Rp = 0
// need enough statistics for this method to work
G4double min_angle = -1.;
G4double min_val = DBL_MAX;
G4double bin_width = 0.;
for(size_t i = 0; i < refl.size(); ++i)
{
if(refl[i] < min_val)
{
min_val = refl[i];
min_angle = histo_refl->axis().bin_lower_edge(i);
bin_width = histo_refl->axis().bin_upper_edge(i) -
histo_refl->axis().bin_lower_edge(i);
min_angle += bin_width / 2.;
}
}
G4cout << "Polarization of primary optical photons: "
<< fPolarization / deg << " deg." << G4endl;
if(fPolarization == 0.0)
{
G4cout << "Reflectance shows a minimum at: " << min_angle << " +/- "
<< bin_width / 2;
G4cout << " deg. Expected Brewster angle: "
<< (360. / CLHEP::twopi) * std::atan(rindex2 / rindex1)
<< " deg. " << G4endl;
}
// find angle of total internal reflection: T -> 0
// last bin for T > 0
min_angle = -1.;
min_val = DBL_MAX;
for(size_t i = 0; i < histo_trans->axis().bins() - 1; ++i)
{
if(histo_trans->bin_height(i) > 0. &&
histo_trans->bin_height(i + 1) == 0.)
{
min_angle = histo_trans->axis().bin_lower_edge(i);
bin_width = histo_refl->axis().bin_upper_edge(i) -
histo_refl->axis().bin_lower_edge(i);
min_angle += bin_width / 2.;
break;
}
}
G4cout << "Transmission goes to 0 at: " << min_angle << " +/- "
G4cout << "Fresnel transmission goes to 0 at: " << min_angle << " +/- "
<< bin_width / 2. << " deg."
<< " Expected: "
<< (360. / CLHEP::twopi) * std::asin(rindex2 / rindex1) << " deg."
<< G4endl;
<< (360. / CLHEP::twopi) * std::asin(rindex2 / rindex1)
<< " deg." << G4endl;
}
// Normalize the transmission/reflection histos so that max is 1.
// Only if x values are the same
if((analysisMan->GetH1Nbins(histo_id_trans) ==
analysisMan->GetH1Nbins(histo_id_refl)) &&
(analysisMan->GetH1Xmin(histo_id_trans) ==
analysisMan->GetH1Xmin(histo_id_refl)) &&
(analysisMan->GetH1Xmax(histo_id_trans) ==
analysisMan->GetH1Xmax(histo_id_refl)))
// Normalize the transmission/reflection histos so that max is 1.
// Only if x values are the same
if((analysisMan->GetH1Nbins(histo_id_refract) ==
analysisMan->GetH1Nbins(histo_id_reflect)) &&
(analysisMan->GetH1Xmin(histo_id_refract) ==
analysisMan->GetH1Xmin(histo_id_reflect)) &&
(analysisMan->GetH1Xmax(histo_id_refract) ==
analysisMan->GetH1Xmax(histo_id_reflect)))
{
unsigned int ent;
G4double sw;
G4double sw2;
G4double sx2;
G4double sx2w;
for(size_t bin = 0; bin < histo_refract->axis().bins(); ++bin)
{
unsigned int ent;
G4double sw;
G4double sw2;
G4double sx2;
G4double sx2w;
for(size_t bin = 0; bin < histo_trans->axis().bins(); ++bin)
// "bin+1" below because bin 0 is underflow bin
// NB. We are ignoring underflow/overflow bins
histo_refract->get_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
if(tot[bin] > 0)
{
// "bin+1" below because bin 0 is underflow bin
// NB. We are ignoring underflow/overflow bins
histo_trans->get_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
sw /= tot[bin];
// bin error is sqrt(sw2)
sw2 /= (tot[bin] * tot[bin]);
sx2 /= (tot[bin] * tot[bin]);
sx2w /= (tot[bin] * tot[bin]);
histo_refract->set_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
}
histo_reflect->get_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
if(tot[bin] > 0)
{
sw /= tot[bin];
// bin error is sqrt(sw2)
sw2 /= (tot[bin] * tot[bin]);
sx2 /= (tot[bin] * tot[bin]);
sx2w /= (tot[bin] * tot[bin]);
histo_reflect->set_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
}
G4int histo_id_fresnelrefl =
analysisMan->GetH1Id("Fresnel reflection");
auto histo_fresnelreflect = analysisMan->GetH1(histo_id_fresnelrefl);
histo_fresnelreflect->get_bin_content(bin + 1, ent, sw, sw2, sx2,
sx2w);
if(tot[bin] > 0)
{
sw /= tot[bin];
// bin error is sqrt(sw2)
sw2 /= (tot[bin] * tot[bin]);
sx2 /= (tot[bin] * tot[bin]);
sx2w /= (tot[bin] * tot[bin]);
histo_fresnelreflect->set_bin_content(bin + 1, ent, sw, sw2, sx2,
sx2w);
}
G4int histo_id_TIR =
analysisMan->GetH1Id("Total internal reflection");
auto histo_TIR = analysisMan->GetH1(histo_id_TIR);
if(analysisMan->GetH1Activation(histo_id_TIR))
{
histo_TIR->get_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
if(tot[bin] > 0)
{
sw /= tot[bin];
@@ -622,28 +693,76 @@ void Run::EndOfRun()
sw2 /= (tot[bin] * tot[bin]);
sx2 /= (tot[bin] * tot[bin]);
sx2w /= (tot[bin] * tot[bin]);
histo_trans->set_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
}
}
for(size_t bin = 0; bin < histo_refl->axis().bins(); ++bin)
{
histo_refl->get_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
if(tot[bin] > 0)
{
sw /= tot[bin];
// bin error is sqrt(sw2)
sw2 /= (tot[bin] * tot[bin]);
sx2 /= (tot[bin] * tot[bin]);
sx2w /= (tot[bin] * tot[bin]);
histo_refl->set_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
histo_TIR->set_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
}
}
}
else
}
else
{
G4cout << "Not going to normalize refraction and reflection "
<< "histograms because bins are not the same." << G4endl;
}
}
// complex index of refraction; have spike reflection and absorption
// Only works for polished surfaces. Ground surfaces neglected.
else if(analysisMan->GetH1Activation(histo_id_absorption) &&
analysisMan->GetH1Activation(histo_id_spike))
{
auto histo_spike = analysisMan->GetH1(histo_id_spike);
auto histo_absorption = analysisMan->GetH1(histo_id_absorption);
std::vector<G4double> tot;
for(size_t i = 0; i < histo_absorption->axis().bins(); ++i)
{
tot.push_back(histo_absorption->bin_height(i) +
histo_spike->bin_height(i));
}
if((analysisMan->GetH1Nbins(histo_id_absorption) ==
analysisMan->GetH1Nbins(histo_id_spike)) &&
(analysisMan->GetH1Xmin(histo_id_absorption) ==
analysisMan->GetH1Xmin(histo_id_spike)) &&
(analysisMan->GetH1Xmax(histo_id_absorption) ==
analysisMan->GetH1Xmax(histo_id_spike)))
{
unsigned int ent;
G4double sw;
G4double sw2;
G4double sx2;
G4double sx2w;
for(size_t bin = 0; bin < histo_absorption->axis().bins(); ++bin)
{
G4cout << "Not going to normalize transmission and reflection "
<< "histograms because bins are not the same." << G4endl;
// "bin+1" below because bin 0 is underflow bin
// NB. We are ignoring underflow/overflow bins
histo_absorption->get_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
if(tot[bin] > 0)
{
sw /= tot[bin];
// bin error is sqrt(sw2)
sw2 /= (tot[bin] * tot[bin]);
sx2 /= (tot[bin] * tot[bin]);
sx2w /= (tot[bin] * tot[bin]);
histo_absorption->set_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
}
histo_spike->get_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
if(tot[bin] > 0)
{
sw /= tot[bin];
// bin error is sqrt(sw2)
sw2 /= (tot[bin] * tot[bin]);
sx2 /= (tot[bin] * tot[bin]);
sx2w /= (tot[bin] * tot[bin]);
histo_spike->set_bin_content(bin + 1, ent, sw, sw2, sx2, sx2w);
}
}
}
else
{
G4cout << "Not going to normalize spike reflection and absorption "
<< "histograms because bins are not the same." << G4endl;
}
}
}
@@ -243,13 +243,37 @@ void RunAction::EndOfRunAction(const G4Run*)
<< analysisManager->GetH1(id)->mean()
<< "; rms = " << analysisManager->GetH1(id)->rms() << G4endl;
}
id = analysisManager->GetH1Id("Reflected");
id = analysisManager->GetH1Id("Fresnel reflection");
if(analysisManager->GetH1Activation(id))
{
G4cout << " Angle of reflected photons: mean = "
G4cout << " Angle of Fresnel-reflected photons: mean = "
<< analysisManager->GetH1(id)->mean()
<< "; rms = " << analysisManager->GetH1(id)->rms() << G4endl;
}
id = analysisManager->GetH1Id("Total internal reflection");
if(analysisManager->GetH1Activation(id))
{
G4cout << " Angle of total internal reflected photons: mean = "
<< analysisManager->GetH1(id)->mean()
<< "; rms = " << analysisManager->GetH1(id)->rms() << G4endl;
}
id = analysisManager->GetH1Id("Fresnel refraction");
if(analysisManager->GetH1Activation(id))
{
G4cout << " Angle of Fresnel-refracted photons: mean = "
<< analysisManager->GetH1(id)->mean()
<< "; rms = " << analysisManager->GetH1(id)->rms() << G4endl;
}
id = analysisManager->GetH1Id("Absorption");
if(analysisManager->GetH1Activation(id))
{
G4cout << " Angle of absorbed photons: mean = "
<< analysisManager->GetH1(id)->mean()
<< "; rms = " << analysisManager->GetH1(id)->rms() << G4endl;
}
G4cout << G4endl;
if(analysisManager->IsActive())
@@ -183,23 +183,24 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
{
case Transmission:
run->AddTransmission();
analysisMan->FillH1(25, angle / deg);
break;
case FresnelRefraction:
run->AddFresnelRefraction();
analysisMan->FillH1(17, px1);
analysisMan->FillH1(18, py1);
analysisMan->FillH1(19, pz1);
// transmission
analysisMan->FillH1(20, angle / deg);
break;
case FresnelReflection:
run->AddFresnelReflection();
analysisMan->FillH1(21, angle / deg);
analysisMan->FillH1(23, angle / deg);
break;
case TotalInternalReflection:
run->AddTotalInternalReflection();
analysisMan->FillH1(21, angle / deg);
analysisMan->FillH1(22, angle / deg);
analysisMan->FillH1(23, angle / deg);
break;
case LambertianReflection:
run->AddLambertianReflection();
@@ -209,11 +210,13 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
break;
case SpikeReflection:
run->AddSpikeReflection();
analysisMan->FillH1(26, angle / deg);
break;
case BackScattering:
run->AddBackScattering();
break;
case Absorption:
analysisMan->FillH1(24, angle / deg);
run->AddAbsorption();
break;
case Detection:
@@ -0,0 +1,189 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
/// \file /src/SteppingVerbose.cc
/// \brief Implementation of the SteppingVerbose class
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingVerbose::SteppingVerbose()
: G4SteppingVerbose()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingVerbose::~SteppingVerbose() = default;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SteppingVerbose::StepInfo()
{
CopyState();
G4int prec = G4cout.precision(3);
if(verboseLevel >= 1)
{
if(verboseLevel >= 4)
VerboseTrack();
if(verboseLevel >= 3)
{
G4cout << G4endl;
G4cout << std::setw(5) << "#Step#"
<< " " << std::setw(6) << "X"
<< " " << std::setw(6) << "Y"
<< " " << std::setw(6) << "Z"
<< " " << std::setw(8) << "KineE"
<< " " << std::setw(9) << "Velocity"
<< std::setw(9) << "dEStep"
<< " " << std::setw(10) << "StepLeng" << std::setw(10)
<< "TrakLeng" << std::setw(10) << "Volume"
<< " " << std::setw(10) << "Process" << G4endl;
}
G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
<< std::setw(6)
<< G4BestUnit(fStep->GetPreStepPoint()->GetVelocity(), "Velocity")
<< std::setw(6)
<< G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(), "Length")
<< " ";
if(fTrack->GetNextVolume() != nullptr)
{
G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
}
else
{
G4cout << std::setw(10) << "OutOfWorld";
}
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr)
{
G4cout
<< " " << std::setw(10)
<< fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
}
else
{
G4cout << " UserLimit";
}
G4cout << G4endl;
if(verboseLevel == 2)
{
G4int tN2ndariesTot =
fN2ndariesAtRestDoIt + fN2ndariesAlongStepDoIt + fN2ndariesPostStepDoIt;
if(tN2ndariesTot > 0)
{
G4cout << " :----- List of 2ndaries - "
<< "#SpawnInStep=" << std::setw(3) << tN2ndariesTot
<< "(Rest=" << std::setw(2) << fN2ndariesAtRestDoIt
<< ",Along=" << std::setw(2) << fN2ndariesAlongStepDoIt
<< ",Post=" << std::setw(2) << fN2ndariesPostStepDoIt << "), "
<< "#SpawnTotal=" << std::setw(3) << (*fSecondary).size()
<< " ---------------" << G4endl;
for(size_t lp1 = (*fSecondary).size() - tN2ndariesTot;
lp1 < (*fSecondary).size(); lp1++)
{
G4cout << " : " << std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x(), "Length")
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y(), "Length")
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z(), "Length")
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(), "Energy")
<< std::setw(10)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
G4cout << G4endl;
}
G4cout << " :-----------------------------"
<< "----------------------------------"
<< "-- EndOf2ndaries Info ---------------" << G4endl;
}
}
}
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SteppingVerbose::TrackingStarted()
{
CopyState();
G4int prec = G4cout.precision(3);
if(verboseLevel > 0)
{
G4cout << std::setw(5) << "Step#"
<< " " << std::setw(6) << "X"
<< " " << std::setw(6) << "Y"
<< " " << std::setw(6) << "Z"
<< " " << std::setw(9) << "KineE"
<< " " << std::setw(9) << "Velocity"
<< std::setw(9) << "dEStep"
<< std::setw(10) << "StepLeng" << std::setw(10) << "TrakLeng"
<< std::setw(13) << "Volume"
<< " " << std::setw(10) << "Process" << G4endl;
G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(), "Energy")
<< std::setw(6)
<< G4BestUnit(fStep->GetPreStepPoint()->GetVelocity(), "Velocity")
<< std::setw(6)
<< G4BestUnit(fStep->GetTotalEnergyDeposit(), "Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(), "Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(), "Length")
<< " ";
if(fTrack->GetNextVolume())
{
G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
}
else
{
G4cout << std::setw(10) << "OutOfWorld";
}
G4cout << " initStep" << G4endl;
}
G4cout.precision(prec);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......