Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: TrackingAction.cc,v 1.16 2007/11/28 12:37:57 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: TrackingAction.cc,v 1.18 2008/08/28 15:28:04 maire Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -64,10 +64,11 @@ void TrackingAction::PreUserTrackingAction(const G4Track* aTrack )
void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
{
G4ThreeVector position = aTrack->GetPosition();
G4double charge = aTrack->GetDefinition()->GetPDGCharge();
G4ThreeVector vertex = aTrack->GetVertexPosition();
G4double charge = aTrack->GetDefinition()->GetPDGCharge();
G4bool transmit = (position.x() >= xendAbs);
G4bool reflect = (position.x() <= xstartAbs);
G4bool transmit = ((position.x() >= xendAbs) && (vertex.x() < xendAbs));
G4bool reflect = (position.x() <= xstartAbs);
G4bool notabsor = (transmit || reflect);
//transmitted + reflected particles counter
@@ -81,17 +82,18 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//
//histograms
//
G4int id = 0;
G4bool charged = (charge != 0.);
G4bool neutral = !charged;
//energy spectrum at exit
//
G4int id = 0;
if (transmit && charged) id = 10;
else if (transmit && neutral) id = 20;
else if (reflect && charged) id = 30;
else if (reflect && neutral) id = 40;
if (id>0)
histoManager->FillHisto(id, aTrack->GetKineticEnergy());
//energy leakage
@@ -107,13 +109,14 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//space angle distribution at exit : dN/dOmega
//
G4ThreeVector direction = aTrack->GetMomentumDirection();
id = 0;
if (transmit && charged) id = 12;
else if (transmit && neutral) id = 22;
else if (reflect && charged) id = 32;
else if (reflect && neutral) id = 42;
G4ThreeVector direction = aTrack->GetMomentumDirection();
if (histoManager->HistoExist(id)) {
if (id>0) {
G4double theta = std::acos(direction.x());
G4double dteta = histoManager->GetBinWidth(id);
G4double unit = histoManager->GetHistoUnit(id);
@@ -123,12 +126,13 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//energy fluence at exit : dE(MeV)/dOmega
//
id = 0;
if (transmit && charged) id = 11;
else if (transmit && neutral) id = 21;
else if (reflect && charged) id = 31;
else if (reflect && neutral) id = 41;
if (histoManager->HistoExist(id)) {
if (id>0) {
G4double theta = std::acos(direction.x());
G4double dteta = histoManager->GetBinWidth(id);
G4double unit = histoManager->GetHistoUnit(id);
@@ -139,6 +143,7 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//projected angles distribution at exit
//
id = 0;
if (transmit && charged) id = 13;
else if (transmit && neutral) id = 23;
else if (reflect && charged) id = 33;
@@ -156,6 +161,7 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
//projected position and radius at exit
//
id = 0;
if (transmit && charged) id = 14;
if (id>0) {