Import Geant4 8.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:55:03 +02:00
parent 216a75eeb1
commit fe73f43734
6714 changed files with 118229 additions and 68144 deletions
+77
View File
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// $Id: G4FieldTrackUpdator.cc,v 1.2 2006/12/13 15:49:45 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// M. Asai - first implementation Apr/28/2006
//
//---------------------------------------------------------------
//
// G4FieldTrackUpdator.cc
//
//---------------------------------------------------------------
#include "globals.hh"
#include "G4FieldTrackUpdator.hh"
#include "G4ThreeVector.hh"
#include "G4Track.hh"
#include "G4DynamicParticle.hh"
#include "G4TrackStatus.hh"
#include "G4FieldTrack.hh"
G4FieldTrack* G4FieldTrackUpdator::CreateFieldTrack(const G4Track* trk)
{
G4FieldTrack* ftrk = new G4FieldTrack(
trk->GetPosition(),
trk->GetGlobalTime(),
trk->GetMomentumDirection(),
trk->GetKineticEnergy(),
trk->GetDynamicParticle()->GetMass(),
trk->GetDynamicParticle()->GetCharge(),
trk->GetDynamicParticle()->GetPolarization(),
0.0 // magnetic dipole moment to be implemented
);
return ftrk;
}
void G4FieldTrackUpdator::Update(G4FieldTrack* ftrk,const G4Track* trk)
{
ftrk->UpdateState(
trk->GetPosition(),
trk->GetGlobalTime(),
trk->GetMomentumDirection(),
trk->GetKineticEnergy()
);
ftrk->SetChargeAndMoments(
trk->GetDynamicParticle()->GetCharge()
);
ftrk->SetSpin(
trk->GetDynamicParticle()->GetPolarization()
);
}
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4ParticleChange.cc,v 1.28 2006/06/29 21:15:01 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4ParticleChangeForDecay.cc,v 1.11 2006/06/29 21:15:03 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------
+27 -28
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForGamma.cc,v 1.2 2006/06/29 21:15:05 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4ParticleChangeForGamma.cc,v 1.3 2006/08/28 16:10:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------
@@ -35,7 +35,8 @@
// 15 April 2005 V.Ivanchenko for gamma EM processes
// --------------------------------------------------------------
//
// Modified:
// Modified::
// 28.08.06 V.Ivanchenko Add access to current track and polarizaion
//
// ------------------------------------------------------------
//
@@ -68,39 +69,37 @@ G4ParticleChangeForGamma::~G4ParticleChangeForGamma()
G4ParticleChangeForGamma::G4ParticleChangeForGamma(
const G4ParticleChangeForGamma &right): G4VParticleChange(right)
{
if (verboseLevel>1) {
if (verboseLevel>1)
G4cout << "G4ParticleChangeForGamma:: copy constructor is called " << G4endl;
}
currentTrack = right.currentTrack;
proposedKinEnergy = right.proposedKinEnergy;
//theProposedWeight = right.theProposedWeight;
proposedMomentumDirection = right.proposedMomentumDirection;
proposedPolarization = right.proposedPolarization;
currentTrack = right.currentTrack;
proposedKinEnergy = right.proposedKinEnergy;
proposedMomentumDirection = right.proposedMomentumDirection;
proposedPolarization = right.proposedPolarization;
}
// assignment operator
G4ParticleChangeForGamma & G4ParticleChangeForGamma::operator=(
const G4ParticleChangeForGamma &right)
const G4ParticleChangeForGamma &right)
{
if (verboseLevel>1) {
if (verboseLevel>1)
G4cout << "G4ParticleChangeForGamma:: assignment operator is called " << G4endl;
}
if (this != &right)
{
theListOfSecondaries = right.theListOfSecondaries;
theSizeOftheListOfSecondaries = right.theSizeOftheListOfSecondaries;
theNumberOfSecondaries = right.theNumberOfSecondaries;
theStatusChange = right.theStatusChange;
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
theSteppingControlFlag = right.theSteppingControlFlag;
if (this != &right) {
theListOfSecondaries = right.theListOfSecondaries;
theSizeOftheListOfSecondaries = right.theSizeOftheListOfSecondaries;
theNumberOfSecondaries = right.theNumberOfSecondaries;
theStatusChange = right.theStatusChange;
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
theSteppingControlFlag = right.theSteppingControlFlag;
theParentWeight = right.theParentWeight;
currentTrack = right.currentTrack;
proposedKinEnergy = right.proposedKinEnergy;
//theProposedWeight = right.theProposedWeight;
proposedMomentumDirection = right.proposedMomentumDirection;
proposedPolarization = right.proposedPolarization;
}
return *this;
currentTrack = right.currentTrack;
proposedKinEnergy = right.proposedKinEnergy;
proposedMomentumDirection = right.proposedMomentumDirection;
proposedPolarization = right.proposedPolarization;
}
return *this;
}
//----------------------------------------------------------------
+4 -4
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForLoss.cc,v 1.15 2006/06/29 21:15:07 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4ParticleChangeForLoss.cc,v 1.16 2006/08/28 16:10:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------
@@ -38,6 +38,7 @@
// Modified:
// 16.01.04 V.Ivanchenko update for model variant of energy loss
// 15.04.05 V.Ivanchenko inline update methods
// 28.08.06 V.Ivanchenko Add access to current track and polarizaion
//
// ------------------------------------------------------------
//
@@ -76,7 +77,6 @@ G4ParticleChangeForLoss::G4ParticleChangeForLoss(
currentTrack = right.currentTrack;
proposedKinEnergy = right.proposedKinEnergy;
currentCharge = right.currentCharge;
//theProposedWeight = right.theProposedWeight;
proposedMomentumDirection = right.proposedMomentumDirection;
}
@@ -94,11 +94,11 @@ G4ParticleChangeForLoss & G4ParticleChangeForLoss::operator=(
theStatusChange = right.theStatusChange;
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
theSteppingControlFlag = right.theSteppingControlFlag;
theParentWeight = right.theParentWeight;
currentTrack = right.currentTrack;
proposedKinEnergy = right.proposedKinEnergy;
currentCharge = right.currentCharge;
//theProposedWeight = right.theProposedWeight;
proposedMomentumDirection = right.proposedMomentumDirection;
}
return *this;
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4ParticleChangeForMSC.cc,v 1.13 2006/06/29 21:15:09 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleChangeForTransport.cc,v 1.18 2006/06/29 21:15:11 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4ParticleChangeForTransport.cc,v 1.19 2006/11/03 17:45:04 japost Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------
@@ -198,7 +198,7 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForPostStep(G4Step* pStep)
{
// A physics process always calculates the final state of the particle
// Change volume if any kinetic energy remanes
// Change volume only if some kinetic energy remains
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
if(pPostStepPoint->GetKineticEnergy() > 0.0) {
@@ -210,6 +210,11 @@ G4Step* G4ParticleChangeForTransport::UpdateStepForPostStep(G4Step* pStep)
pPostStepPoint->SetMaterialCutsCouple( theMaterialCutsCoupleChange );
pPostStepPoint->SetSensitiveDetector( theSensitiveDetectorChange );
}
if( this->GetLastStepInVolume() ){
pStep->SetLastStepFlag();
}else{
pStep->ClearLastStepFlag();
}
// It used to call base class's method
// - but this would copy uninitialised data members
// return G4ParticleChange::UpdateStepForPostStep(pStep);
+5 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Step.cc,v 1.6 2006/06/29 21:15:13 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4Step.cc,v 1.7 2006/10/30 09:50:13 kurasige Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -56,6 +56,9 @@ G4Step::G4Step()
{
fpPreStepPoint = new G4StepPoint();
fpPostStepPoint = new G4StepPoint();
fFirstStepInVolume =false;
fLastStepInVolume = false;
}
/////////////////
+2 -30
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4StepPoint.cc,v 1.11 2006/06/29 21:15:15 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4StepPoint.cc,v 1.12 2006/10/31 10:01:43 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -76,31 +76,3 @@ G4StepPoint::G4StepPoint(const G4StepPoint &right):
fCharge(right.fCharge),
fWeight(right.fWeight)
{}
//////////////////////////
G4StepPoint & G4StepPoint::operator=(const G4StepPoint &right)
//////////////////////////
{
if (this != &right) {
fPosition = right.fPosition;
fGlobalTime = right.fGlobalTime;
fLocalTime = right.fLocalTime;
fProperTime = right.fProperTime;
fMomentumDirection = right.fMomentumDirection;
fKineticEnergy = right.fKineticEnergy;
fpTouchable = right.fpTouchable;
fpMaterial = right.fpMaterial;
fpMaterialCutsCouple = right.fpMaterialCutsCouple;
fpSensitiveDetector = right.fpSensitiveDetector;
fSafety = right.fSafety;
fPolarization = right.fPolarization;
fStepStatus = right.fStepStatus;
fpProcessDefinedStep = right.fpProcessDefinedStep;
fMass = right.fMass;
fCharge = right.fCharge;
fWeight = right.fWeight;
fVelocity = right.fVelocity;
}
return *this;
}
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4Track.cc,v 1.29 2006/06/29 21:15:17 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
+19 -4
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VParticleChange.cc,v 1.18 2006/06/29 21:15:19 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4VParticleChange.cc,v 1.19 2006/10/30 09:50:13 kurasige Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------
@@ -51,6 +51,8 @@ G4VParticleChange::G4VParticleChange():
theStatusChange(fAlive),
theSteppingControlFlag(NormalCondition),
theLocalEnergyDeposit(0.0),
theFirstStepInVolume(false),
theLastStepInVolume(false),
verboseLevel(1),
theParentWeight(1.0),
fSetSecondaryWeightByProcess(false),
@@ -87,6 +89,8 @@ G4VParticleChange::G4VParticleChange(const G4VParticleChange &right):
theStatusChange(fAlive),
theSteppingControlFlag(NormalCondition),
theLocalEnergyDeposit(0.0),
theFirstStepInVolume(false),
theLastStepInVolume(false),
verboseLevel(1),
theParentWeight(1.0),
fSetSecondaryWeightByProcess(false)
@@ -105,6 +109,9 @@ G4VParticleChange::G4VParticleChange(const G4VParticleChange &right):
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
theSteppingControlFlag = right.theSteppingControlFlag;
fSetParentWeightByProcess = right.fSetParentWeightByProcess;
theFirstStepInVolume = right.theFirstStepInVolume;
theLastStepInVolume = right.theLastStepInVolume;
}
@@ -125,6 +132,9 @@ G4VParticleChange & G4VParticleChange::operator=(const G4VParticleChange &right)
theLocalEnergyDeposit = right.theLocalEnergyDeposit;
theSteppingControlFlag = right.theSteppingControlFlag;
fSetParentWeightByProcess = right.fSetParentWeightByProcess;
theFirstStepInVolume = right.theFirstStepInVolume;
theLastStepInVolume = right.theLastStepInVolume;
}
return *this;
}
@@ -192,10 +202,15 @@ void G4VParticleChange::DumpInfo() const
G4cout << " True Path Length (mm) : "
<< std::setw(20) << theTrueStepLength/mm
<< G4endl;
G4cout << " Stepping Control : "
G4cout << " Stepping Control : "
<< std::setw(20) << theSteppingControlFlag
<< G4endl;
G4cout << G4endl;
if (theFirstStepInVolume) {
G4cout << " First Step In the voulme : " << G4endl;
}
if (theLastStepInVolume) {
G4cout << " Last Step In the voulme : " << G4endl;
}
}
G4bool G4VParticleChange::CheckIt(const G4Track& )
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4VUserTrackInformation.cc,v 1.2 2006/06/29 21:15:21 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// --------------------------------------------------------------