Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorConstruction.cc,v 1.10 2006-06-29 16:57:00 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,26 +47,27 @@
#include "G4SolidStore.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::DetectorConstruction()
:pBox(0), lBox(0), BoxSize(500*m), aMaterial(0), magField(0)
:fP_Box(0), fL_Box(0), fBoxSize(500*m), fMaterial(0), fMagField(0)
{
DefineMaterials();
SetMaterial("Iron");
// create UserLimits
userLimits = new G4UserLimits();
fUserLimits = new G4UserLimits();
// create commands for interactive definition of the detector
detectorMessenger = new DetectorMessenger(this);
fDetectorMessenger = new DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::~DetectorConstruction()
{ delete detectorMessenger;}
{ delete fDetectorMessenger;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -96,37 +99,37 @@ G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
G4SolidStore::GetInstance()->Clean();
G4Box*
sBox = new G4Box("Container", //its name
BoxSize/2,BoxSize/2,BoxSize/2); //its dimensions
lBox = new G4LogicalVolume(sBox, //its shape
aMaterial, //its material
aMaterial->GetName()); //its name
lBox->SetUserLimits(userLimits);
sBox = new G4Box("Container", //its name
fBoxSize/2,fBoxSize/2,fBoxSize/2); //its dimensions
fL_Box = new G4LogicalVolume(sBox, //its shape
fMaterial, //its material
fMaterial->GetName()); //its name
fL_Box->SetUserLimits(fUserLimits);
pBox = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
lBox, //its logical volume
aMaterial->GetName(), //its name
0, //its mother volume
false, //no boolean operation
0); //copy number
fP_Box = new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
fL_Box, //its logical volume
fMaterial->GetName(), //its name
0, //its mother volume
false, //no boolean operation
0); //copy number
PrintParameters();
//
//always return the root volume
//
return pBox;
return fP_Box;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::PrintParameters()
{
G4cout << "\n The Box is " << G4BestUnit(BoxSize,"Length")
<< " of " << aMaterial->GetName() << G4endl;
G4cout << "\n The Box is " << G4BestUnit(fBoxSize,"Length")
<< " of " << fMaterial->GetName() << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -135,14 +138,14 @@ void DetectorConstruction::SetMaterial(G4String materialChoice)
{
// search the material by its name
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
if (pttoMaterial) aMaterial = pttoMaterial;
if (pttoMaterial) fMaterial = pttoMaterial;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetSize(G4double value)
{
BoxSize = value;
fBoxSize = value;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -156,18 +159,18 @@ void DetectorConstruction::SetMagField(G4double fieldValue)
G4FieldManager* fieldMgr
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
if (magField) delete magField; //delete the existing magn field
if (fMagField) delete fMagField; //delete the existing magn field
if (fieldValue!=0.) // create a new one if non nul
if (fieldValue!=0.) // create a new one if non nul
{
magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
fieldMgr->SetDetectorField(magField);
fieldMgr->CreateChordFinder(magField);
fMagField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
fieldMgr->SetDetectorField(fMagField);
fieldMgr->CreateChordFinder(fMagField);
}
else
{
magField = 0;
fieldMgr->SetDetectorField(magField);
fMagField = 0;
fieldMgr->SetDetectorField(fMagField);
}
}
@@ -182,7 +185,7 @@ void DetectorConstruction::SetMaxStepSize(G4double val)
<< val << " out of range. Command refused" << G4endl;
return;
}
userLimits->SetMaxAllowedStep(val);
fUserLimits->SetMaxAllowedStep(val);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorMessenger.cc,v 1.5 2006-06-29 16:57:02 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/DetectorMessenger.cc
/// \brief Implementation of the DetectorMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -40,78 +42,78 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
:Detector(Det)
:fDetector(Det)
{
testemDir = new G4UIdirectory("/testem/");
testemDir->SetGuidance(" detector control.");
fTestemDir = new G4UIdirectory("/testem/");
fTestemDir->SetGuidance(" detector control.");
detDir = new G4UIdirectory("/testem/det/");
detDir->SetGuidance("detector construction commands");
fDetDir = new G4UIdirectory("/testem/det/");
fDetDir->SetGuidance("detector construction commands");
MaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
MaterCmd->SetGuidance("Select material of the box.");
MaterCmd->SetParameterName("choice",false);
MaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fMaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
fMaterCmd->SetGuidance("Select material of the box.");
fMaterCmd->SetParameterName("choice",false);
fMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
SizeCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setSize",this);
SizeCmd->SetGuidance("Set size of the box");
SizeCmd->SetParameterName("Size",false);
SizeCmd->SetRange("Size>0.");
SizeCmd->SetUnitCategory("Length");
SizeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fSizeCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setSize",this);
fSizeCmd->SetGuidance("Set size of the box");
fSizeCmd->SetParameterName("Size",false);
fSizeCmd->SetRange("Size>0.");
fSizeCmd->SetUnitCategory("Length");
fSizeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
MagFieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
MagFieldCmd->SetGuidance("Define magnetic field.");
MagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
MagFieldCmd->SetParameterName("Bz",false);
MagFieldCmd->SetUnitCategory("Magnetic flux density");
MagFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fMagFieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
fMagFieldCmd->SetGuidance("Define magnetic field.");
fMagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
fMagFieldCmd->SetParameterName("Bz",false);
fMagFieldCmd->SetUnitCategory("Magnetic flux density");
fMagFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
UpdateCmd->SetGuidance("Update calorimeter geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(G4State_Idle);
fUpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
fUpdateCmd->SetGuidance("Update calorimeter geometry.");
fUpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
fUpdateCmd->SetGuidance("if you changed geometrical value(s).");
fUpdateCmd->AvailableForStates(G4State_Idle);
MaxStepCmd = new G4UIcmdWithADoubleAndUnit("/testem/tracking/stepMax",this);
MaxStepCmd->SetGuidance("Set max allowed step size");
MaxStepCmd->SetParameterName("Size",false);
MaxStepCmd->SetRange("Size>0.");
MaxStepCmd->SetUnitCategory("Length");
MaxStepCmd->AvailableForStates(G4State_Idle);
fMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/testem/tracking/stepMax",this);
fMaxStepCmd->SetGuidance("Set max allowed step size");
fMaxStepCmd->SetParameterName("Size",false);
fMaxStepCmd->SetRange("Size>0.");
fMaxStepCmd->SetUnitCategory("Length");
fMaxStepCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::~DetectorMessenger()
{
delete MaterCmd;
delete SizeCmd;
delete MagFieldCmd;
delete UpdateCmd;
delete MaxStepCmd;
delete detDir;
delete testemDir;
delete fMaterCmd;
delete fSizeCmd;
delete fMagFieldCmd;
delete fUpdateCmd;
delete fMaxStepCmd;
delete fDetDir;
delete fTestemDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == MaterCmd )
{ Detector->SetMaterial(newValue);}
if( command == fMaterCmd )
{ fDetector->SetMaterial(newValue);}
if( command == SizeCmd )
{ Detector->SetSize(SizeCmd->GetNewDoubleValue(newValue));}
if( command == fSizeCmd )
{ fDetector->SetSize(fSizeCmd->GetNewDoubleValue(newValue));}
if( command == MagFieldCmd )
{ Detector->SetMagField(MagFieldCmd->GetNewDoubleValue(newValue));}
if( command == fMagFieldCmd )
{ fDetector->SetMagField(fMagFieldCmd->GetNewDoubleValue(newValue));}
if( command == UpdateCmd )
{ Detector->UpdateGeometry(); }
if( command == fUpdateCmd )
{ fDetector->UpdateGeometry(); }
if( command == MaxStepCmd )
{ Detector->SetMaxStepSize(MaxStepCmd->GetNewDoubleValue(newValue));}
if( command == fMaxStepCmd )
{ fDetector->SetMaxStepSize(fMaxStepCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: EventAction.cc,v 1.8 2010-06-07 05:40:46 perl Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/EventAction.cc
/// \brief Implementation of the EventAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,16 +43,16 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::EventAction()
:drawFlag("none"),printModulo(10000),eventMessenger(0)
:fDrawFlag("none"),fPrintModulo(10000),fEventMessenger(0)
{
eventMessenger = new EventActionMessenger(this);
fEventMessenger = new EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::~EventAction()
{
delete eventMessenger;
delete fEventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -60,7 +62,7 @@ void EventAction::BeginOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
//printing survey
if (evtNb%printModulo == 0)
if (evtNb%fPrintModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
}
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: EventActionMessenger.cc,v 1.6 2006-06-29 16:57:07 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/EventActionMessenger.cc
/// \brief Implementation of the EventActionMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,33 +41,33 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::EventActionMessenger(EventAction* EvAct)
:eventAction(EvAct)
:fEventAction(EvAct)
{
eventDir = new G4UIdirectory("/testem/event/");
eventDir->SetGuidance("event control");
fEventDir = new G4UIdirectory("/testem/event/");
fEventDir->SetGuidance("event control");
DrawCmd = new G4UIcmdWithAString("/testem/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
DrawCmd->SetGuidance(" Choice : none,charged, all");
DrawCmd->SetParameterName("choice",true);
DrawCmd->SetDefaultValue("all");
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(G4State_Idle);
fDrawCmd = new G4UIcmdWithAString("/testem/event/drawTracks",this);
fDrawCmd->SetGuidance("Draw the tracks in the event");
fDrawCmd->SetGuidance(" Choice : none,charged, all");
fDrawCmd->SetParameterName("choice",true);
fDrawCmd->SetDefaultValue("all");
fDrawCmd->SetCandidates("none charged all");
fDrawCmd->AvailableForStates(G4State_Idle);
PrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
PrintCmd->SetGuidance("Print events modulo n");
PrintCmd->SetParameterName("EventNb",false);
PrintCmd->SetRange("EventNb>0");
PrintCmd->AvailableForStates(G4State_Idle);
fPrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
fPrintCmd->SetGuidance("Print events modulo n");
fPrintCmd->SetParameterName("EventNb",false);
fPrintCmd->SetRange("EventNb>0");
fPrintCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::~EventActionMessenger()
{
delete DrawCmd;
delete PrintCmd;
delete eventDir;
delete fDrawCmd;
delete fPrintCmd;
delete fEventDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,11 +75,11 @@ EventActionMessenger::~EventActionMessenger()
void EventActionMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == DrawCmd)
{eventAction->SetDrawFlag(newValue);}
if(command == fDrawCmd)
{fEventAction->SetDrawFlag(newValue);}
if(command == PrintCmd)
{eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
if(command == fPrintCmd)
{fEventAction->SetPrintModulo(fPrintCmd->GetNewIntValue(newValue));}
}
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysicsList.cc,v 1.15 2010-03-31 09:26:09 vnivanch Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,6 +75,7 @@
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -80,7 +83,7 @@ PhysicsList::PhysicsList()
: G4VUserPhysicsList()
{
defaultCutValue = 1.*km;
pMes = new PhysicsListMessenger(this);
fMes = new PhysicsListMessenger(this);
SetVerboseLevel(1);
}
@@ -88,7 +91,7 @@ PhysicsList::PhysicsList()
PhysicsList::~PhysicsList()
{
delete pMes;
delete fMes;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -181,7 +184,7 @@ void PhysicsList::ConstructEM()
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
pmanager->AddDiscreteProcess(new G4ComptonScattering);
pmanager->AddDiscreteProcess(new G4GammaConversion);
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4eMultipleScattering,-1, 1,1);
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysicsListMessenger.cc,v 1.9 2009-11-27 14:54:58 hbu Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/PhysicsListMessenger.cc
/// \brief Implementation of the PhysicsListMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,44 +40,44 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* physL)
:physList(physL)
:fPhysList(physL)
{
physDir = new G4UIdirectory("/testem/phys/");
physDir->SetGuidance("physics list commands");
fPhysDir = new G4UIdirectory("/testem/phys/");
fPhysDir->SetGuidance("physics list commands");
GammaToMuPairFacCmd=new G4UIcmdWithADouble
fGammaToMuPairFacCmd=new G4UIcmdWithADouble
("/testem/phys/SetGammaToMuPairFac",this);
GammaToMuPairFacCmd->SetGuidance(
fGammaToMuPairFacCmd->SetGuidance(
"Set factor to artificially increase the GammaToMuPair cross section");
GammaToMuPairFacCmd->SetParameterName("GammaToMuPairFac",false);
GammaToMuPairFacCmd->SetRange("GammaToMuPairFac>0.0");
GammaToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fGammaToMuPairFacCmd->SetParameterName("GammaToMuPairFac",false);
fGammaToMuPairFacCmd->SetRange("GammaToMuPairFac>0.0");
fGammaToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AnnihiToMuPairFacCmd=new G4UIcmdWithADouble
fAnnihiToMuPairFacCmd=new G4UIcmdWithADouble
("/testem/phys/SetAnnihiToMuPairFac",this);
AnnihiToMuPairFacCmd->SetGuidance(
fAnnihiToMuPairFacCmd->SetGuidance(
"Set factor to artificially increase the AnnihiToMuPair cross section");
AnnihiToMuPairFacCmd->SetParameterName("AnnihiToMuPairFac",false);
AnnihiToMuPairFacCmd->SetRange("AnnihiToMuPairFac>0.0");
AnnihiToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fAnnihiToMuPairFacCmd->SetParameterName("AnnihiToMuPairFac",false);
fAnnihiToMuPairFacCmd->SetRange("AnnihiToMuPairFac>0.0");
fAnnihiToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
AnnihiToHadronFacCmd=new G4UIcmdWithADouble
fAnnihiToHadronFacCmd=new G4UIcmdWithADouble
("/testem/phys/SetAnnihiToHadronFac",this);
AnnihiToHadronFacCmd->SetGuidance(
fAnnihiToHadronFacCmd->SetGuidance(
"Set factor to artificially increase the AnnihiToHadrons cross section");
AnnihiToHadronFacCmd->SetParameterName("AnnihiToHadFac",false);
AnnihiToHadronFacCmd->SetRange("AnnihiToHadFac>0.0");
AnnihiToHadronFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fAnnihiToHadronFacCmd->SetParameterName("AnnihiToHadFac",false);
fAnnihiToHadronFacCmd->SetRange("AnnihiToHadFac>0.0");
fAnnihiToHadronFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::~PhysicsListMessenger()
{
delete GammaToMuPairFacCmd;
delete AnnihiToMuPairFacCmd;
delete AnnihiToHadronFacCmd;
delete physDir;
delete fGammaToMuPairFacCmd;
delete fAnnihiToMuPairFacCmd;
delete fAnnihiToHadronFacCmd;
delete fPhysDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -83,17 +85,17 @@ PhysicsListMessenger::~PhysicsListMessenger()
void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == GammaToMuPairFacCmd)
{ physList->SetGammaToMuPairFac(
GammaToMuPairFacCmd->GetNewDoubleValue(newValue));}
if(command == fGammaToMuPairFacCmd)
{ fPhysList->SetGammaToMuPairFac(
fGammaToMuPairFacCmd->GetNewDoubleValue(newValue));}
if( command == AnnihiToMuPairFacCmd)
{ physList->SetAnnihiToMuPairFac(
AnnihiToMuPairFacCmd->GetNewDoubleValue(newValue));}
if( command == AnnihiToHadronFacCmd)
{ physList->SetAnnihiToHadronFac(
AnnihiToHadronFacCmd->GetNewDoubleValue(newValue));}
if( command == fAnnihiToMuPairFacCmd)
{ fPhysList->SetAnnihiToMuPairFac(
fAnnihiToMuPairFacCmd->GetNewDoubleValue(newValue));}
if( command == fAnnihiToHadronFacCmd)
{ fPhysList->SetAnnihiToHadronFac(
fAnnihiToHadronFacCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PrimaryGeneratorAction.cc,v 1.3 2006-06-29 16:57:14 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/PrimaryGeneratorAction.cc
/// \brief Implementation of the PrimaryGeneratorAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,33 +40,34 @@
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::PrimaryGeneratorAction(
DetectorConstruction* DC)
:Detector(DC)
:fDetector(DC)
{
particleGun = new G4ParticleGun(1);
fParticleGun = new G4ParticleGun(1);
G4ParticleDefinition* particle
= G4ParticleTable::GetParticleTable()->FindParticle("gamma");
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleEnergy(100*TeV);
particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticleEnergy(100*TeV);
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
rndmBeam = 0.;
fRndmBeam = 0.;
//create a messenger for this class
gunMessenger = new PrimaryGeneratorMessenger(this);
fGunMessenger = new PrimaryGeneratorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
delete particleGun;
delete gunMessenger;
delete fParticleGun;
delete fGunMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,19 +76,19 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
//this function is called at the begining of event
//
G4double x0 = -0.5*(Detector->GetSize());
G4double x0 = -0.5*(fDetector->GetSize());
G4double y0 = 0.*cm, z0 = 0.*cm;
//randomize the beam, if requested.
//
if (rndmBeam > 0.)
if (fRndmBeam > 0.)
{
G4double rbeam = 0.5*(Detector->GetSize())*rndmBeam;
G4double rbeam = 0.5*(fDetector->GetSize())*fRndmBeam;
y0 = (2*G4UniformRand()-1.)*rbeam;
z0 = (2*G4UniformRand()-1.)*rbeam;
}
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
particleGun->GeneratePrimaryVertex(anEvent);
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
fParticleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PrimaryGeneratorMessenger.cc,v 1.5 2006-06-29 16:57:17 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/PrimaryGeneratorMessenger.cc
/// \brief Implementation of the PrimaryGeneratorMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,25 +41,25 @@
PrimaryGeneratorMessenger::PrimaryGeneratorMessenger(
PrimaryGeneratorAction* Gun)
:Action(Gun)
:fAction(Gun)
{
gunDir = new G4UIdirectory("/testem/gun/");
gunDir->SetGuidance("gun control");
fGunDir = new G4UIdirectory("/testem/gun/");
fGunDir->SetGuidance("gun control");
RndmCmd = new G4UIcmdWithADouble("/testem/gun/rndm",this);
RndmCmd->SetGuidance("random lateral extension on the beam");
RndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
RndmCmd->SetParameterName("rBeam",false);
RndmCmd->SetRange("rBeam>=0.&&rBeam<=1.");
RndmCmd->AvailableForStates(G4State_Idle);
fRndmCmd = new G4UIcmdWithADouble("/testem/gun/rndm",this);
fRndmCmd->SetGuidance("random lateral extension on the beam");
fRndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
fRndmCmd->SetParameterName("rBeam",false);
fRndmCmd->SetRange("rBeam>=0.&&rBeam<=1.");
fRndmCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorMessenger::~PrimaryGeneratorMessenger()
{
delete RndmCmd;
delete gunDir;
delete fRndmCmd;
delete fGunDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -65,8 +67,8 @@ PrimaryGeneratorMessenger::~PrimaryGeneratorMessenger()
void PrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if (command == RndmCmd)
{Action->SetRndmBeam(RndmCmd->GetNewDoubleValue(newValue));}
if (command == fRndmCmd)
{fAction->SetRndmBeam(fRndmCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RunAction.cc,v 1.15 2010-11-09 21:30:47 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/RunAction.cc
/// \brief Implementation of the RunAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -36,66 +38,46 @@
#include "Randomize.hh"
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunAction::RunAction()
:af(0), tree(0)
{
for (G4int j=0; j<6; j++) histo[j] = 0;
// Create analysis manager
// The choice of analysis technology is done via selection of a namespace
//
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
#ifdef G4ANALYSIS_USE
// Creating the analysis factory
af = AIDA_createAnalysisFactory();
if (af) {
// Creating the tree factory
AIDA::ITreeFactory* tf = af->createTreeFactory();
// Creating a tree mapped to an hbook file.
G4bool readOnly = false;
G4bool createNew = true;
G4String options = "";
//tree = tf->create("testem6.hbook","hbook",readOnly,createNew,options);
tree = tf->create("testem6.root", "root",readOnly,createNew,options);
//tree = tf->create("testem6.XML" ,"XML" ,readOnly,createNew,options);
delete tf;
if (tree) {
// Creating a histogram factory
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
// Creating histograms
histo[0] = hf->createHistogram1D("1","1/(1+(theta+[g]+)**2)",100, 0 ,1.);
histo[1] = hf->createHistogram1D("2","log10(theta+ [g]+)", 100,-3.,1.);
histo[2] = hf->createHistogram1D("3","log10(theta- [g]-)", 100,-3.,1.);
histo[3] = hf->createHistogram1D("4","log10(theta+ [g]+ -theta- [g]-)",
100,-3.,1.);
histo[4] = hf->createHistogram1D("5","xPlus" ,100,0.,1.);
histo[5] = hf->createHistogram1D("6","xMinus",100,0.,1.);
delete hf;
G4cout << "\n----> Histogram tree is opened" << G4endl;
}
}
#endif
// Open an output file
//
G4String fileName = "testem6";
analysisManager->OpenFile(fileName);
analysisManager->SetVerboseLevel(1);
G4String extension = analysisManager->GetFileType();
fileName = fileName + "." + extension;
// Creating histograms
//
analysisManager->SetFirstHistoId(1);
analysisManager->CreateH1("1","1/(1+(theta+[g]+)**2)",100, 0 ,1.);
analysisManager->CreateH1("2","log10(theta+ [g]+)", 100,-3.,1.);
analysisManager->CreateH1("3","log10(theta- [g]-)", 100,-3.,1.);
analysisManager->CreateH1("4","log10(theta+ [g]+ -theta- [g]-)", 100,-3.,1.);
analysisManager->CreateH1("5","xPlus" ,100,0.,1.);
analysisManager->CreateH1("6","xMinus",100,0.,1.);
G4cout << "\n----> Histogram file is opened in " << fileName << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunAction::~RunAction()
{
#ifdef G4ANALYSIS_USE
tree->commit(); // Writing the histograms to the file
tree->close(); // and closing the tree (and the file)
delete tree;
delete af;
#endif
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
analysisManager->Write();
analysisManager->CloseFile();
delete G4AnalysisManager::Instance();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -107,7 +89,7 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
// save Rndm status
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
CLHEP::HepRandom::showEngineStatus();
ProcCounter = new ProcessesCount;
fProcCounter = new ProcessesCount;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -115,12 +97,12 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
void RunAction::CountProcesses(G4String procName)
{
//does the process already encounted ?
size_t nbProc = ProcCounter->size();
size_t nbProc = fProcCounter->size();
size_t i = 0;
while ((i<nbProc)&&((*ProcCounter)[i]->GetName()!=procName)) i++;
if (i == nbProc) ProcCounter->push_back( new OneProcessCount(procName));
while ((i<nbProc)&&((*fProcCounter)[i]->GetName()!=procName)) i++;
if (i == nbProc) fProcCounter->push_back( new OneProcessCount(procName));
(*ProcCounter)[i]->Count();
(*fProcCounter)[i]->Count();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -132,13 +114,13 @@ void RunAction::EndOfRunAction(const G4Run*)
//total number of process calls
G4double countTot = 0.;
G4cout << "\n Number of process calls --->";
for (size_t i=0; i< ProcCounter->size();i++) {
G4String procName = (*ProcCounter)[i]->GetName();
if (procName != "Transportation") {
G4int count = (*ProcCounter)[i]->GetCounter();
G4cout << "\t" << procName << " : " << count;
countTot += count;
}
for (size_t i=0; i< fProcCounter->size();i++) {
G4String procName = (*fProcCounter)[i]->GetName();
if (procName != "Transportation") {
G4int count = (*fProcCounter)[i]->GetCounter();
G4cout << "\t" << procName << " : " << count;
countTot += count;
}
}
G4cout << G4endl;
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: StackingAction.cc,v 1.1 2009-11-27 14:54:58 hbu Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/StackingAction.cc
/// \brief Implementation of the StackingAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: SteppingAction.cc,v 1.11 2010-12-03 14:54:55 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm6/src/SteppingAction.cc
/// \brief Implementation of the SteppingAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,16 +37,12 @@
#include "G4VProcess.hh"
#include "G4ParticleTypes.hh"
#ifdef G4ANALYSIS_USE
#include "AIDA/IHistogram1D.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingAction::SteppingAction(RunAction* RuAct)
:runAction(RuAct)
:fRunAction(RuAct)
{
muonMass = G4MuonPlus::MuonPlus()->GetPDGMass();
fMuonMass = G4MuonPlus::MuonPlus()->GetPDGMass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -59,11 +57,10 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
const G4VProcess* process = aStep->GetPostStepPoint()->GetProcessDefinedStep();
if (process == 0) return;
G4String processName = process->GetProcessName();
runAction->CountProcesses(processName); //count processes
fRunAction->CountProcesses(processName); //count processes
if (processName != "GammaToMuPair") return;
#ifdef G4ANALYSIS_USE
G4StepPoint* PrePoint = aStep->GetPreStepPoint();
G4double EGamma = PrePoint->GetTotalEnergy();
G4ThreeVector PGamma = PrePoint->GetMomentum();
@@ -77,25 +74,26 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
Pplus = (*secondary)[lp]->GetMomentum();
} else {
Eminus = (*secondary)[lp]->GetTotalEnergy();
Pminus = (*secondary)[lp]->GetMomentum();
Pminus = (*secondary)[lp]->GetMomentum();
}
}
G4double xPlus = Eplus/EGamma, xMinus = Eminus/EGamma;
G4double thetaPlus = PGamma.angle(Pplus), thetaMinus = PGamma.angle(Pminus);
G4double GammaPlus=EGamma*xPlus/muonMass;
G4double GammaMinus=EGamma*xMinus/muonMass;
G4double GammaPlus=EGamma*xPlus/fMuonMass;
G4double GammaMinus=EGamma*xMinus/fMuonMass;
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
runAction->GetHisto(0)->fill(1./(1.+std::pow(thetaPlus*GammaPlus,2)));
runAction->GetHisto(1)->fill(std::log10(thetaPlus*GammaPlus));
analysisManager->FillH1(1,1./(1.+std::pow(thetaPlus*GammaPlus,2)));
analysisManager->FillH1(2,std::log10(thetaPlus*GammaPlus));
runAction->GetHisto(2)->fill(std::log10(thetaMinus*GammaMinus));
runAction->GetHisto(3)->fill(std::log10(std::fabs(thetaPlus *GammaPlus
analysisManager->FillH1(3,std::log10(thetaMinus*GammaMinus));
analysisManager->FillH1(4,std::log10(std::fabs(thetaPlus *GammaPlus
-thetaMinus*GammaMinus)));
runAction->GetHisto(4)->fill(xPlus);
runAction->GetHisto(5)->fill(xMinus);
#endif
analysisManager->FillH1(5,xPlus);
analysisManager->FillH1(6,xMinus);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm6/src/SteppingVerbose.cc
/// \brief Implementation of the SteppingVerbose class
//
// $Id: SteppingVerbose.cc,v 1.1 2010-09-16 16:26:13 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -58,26 +60,26 @@ void SteppingVerbose::StepInfo()
if( verboseLevel >= 3 ){
G4cout << G4endl;
G4cout << std::setw( 5) << "#Step#" << " "
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< 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->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName();
<< 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->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName();
const G4VProcess* process
= fStep->GetPostStepPoint()->GetProcessDefinedStep();
@@ -89,28 +91,28 @@ void SteppingVerbose::StepInfo()
if( verboseLevel == 2 ){
G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
fN2ndariesAlongStepDoIt +
fN2ndariesPostStepDoIt;
fN2ndariesAlongStepDoIt +
fN2ndariesPostStepDoIt;
if(tN2ndariesTot>0){
G4cout << "\n :----- List of secondaries ----------------"
<< G4endl;
G4cout << "\n :----- List of secondaries ----------------"
<< G4endl;
G4cout.precision(4);
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
lp1<(*fSecondary).size(); lp1++){
G4cout << " "
<< std::setw(13)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
<< ": energy ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
<< " time ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time");
G4cout << G4endl;
}
G4cout << " "
<< std::setw(13)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
<< ": energy ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
<< " time ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time");
G4cout << G4endl;
}
G4cout << " :------------------------------------------\n"
<< G4endl;
G4cout << " :------------------------------------------\n"
<< G4endl;
}
}
@@ -129,25 +131,25 @@ G4int prec = G4cout.precision(3);
G4cout << std::setw( 5) << "Step#" << " "
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< 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->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName()
<< " initStep" << G4endl;
<< 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->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName()
<< " initStep" << G4endl;
}
G4cout.precision(prec);
}