Import Geant4 5.2.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ImportancePostStepDoIt.cc,v 1.9 2003/04/02 16:59:08 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4ImportancePostStepDoIt.cc,v 1.10 2003/06/16 17:12:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "G4VImportanceSplitExaminer.hh"
|
||||
#include "G4Nsplit_Weight.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "g4std/strstream"
|
||||
#include <strstream>
|
||||
|
||||
|
||||
G4ImportancePostStepDoIt::
|
||||
@@ -67,7 +67,7 @@ void G4ImportancePostStepDoIt::DoIt(const G4Track& aTrack,
|
||||
else {
|
||||
// wrong answer
|
||||
char st[200];
|
||||
G4std::ostrstream os(st,200);
|
||||
std::ostrstream os(st,200);
|
||||
os << "G4ImportancePostStepDoIt::DoIt: sampler returned nw = "
|
||||
<< nw
|
||||
<< "\n"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MImportanceConfigurator.cc,v 1.4 2003/04/02 16:59:12 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MImportanceConfigurator
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MScoreConfigurator.cc,v 1.5 2003/04/02 16:59:12 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4MScoreConfigurator
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MScoreProcess.cc,v 1.10 2003/04/02 16:59:14 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MassGCellFinder.cc,v 1.2 2003/04/02 16:59:14 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MassGeometrySampler.cc,v 1.8 2003/04/02 16:59:15 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MassImportanceProcess.cc,v 1.11 2003/04/02 16:59:15 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4MassImportanceProcess.cc,v 1.14 2003/06/13 09:35:09 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "G4MassImportanceProcess.hh"
|
||||
#include "G4VImportanceAlgorithm.hh"
|
||||
#include "G4GeometryCell.hh"
|
||||
#include "G4ImportancePostStepDoIt.hh"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
|
||||
G4MassImportanceProcess::
|
||||
G4MassImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
@@ -42,11 +44,16 @@ G4MassImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
const G4String &aName)
|
||||
: G4VProcess(aName),
|
||||
fParticleChange(new G4ParticleChange),
|
||||
fTrackTerminator(TrackTerminator ? TrackTerminator : this),
|
||||
fImportanceAlgorithm(aImportanceAlgorithm),
|
||||
fImportanceFinder(aIstore),
|
||||
fImportancePostStepDoIt(*fTrackTerminator)
|
||||
fImportancePostStepDoIt(0)
|
||||
{
|
||||
if (TrackTerminator) {
|
||||
fImportancePostStepDoIt = new G4ImportancePostStepDoIt(*TrackTerminator);
|
||||
}
|
||||
else {
|
||||
fImportancePostStepDoIt = new G4ImportancePostStepDoIt(*this);
|
||||
}
|
||||
if (!fParticleChange) {
|
||||
G4Exception("ERROR:G4MassImportanceProcess::G4MassImportanceProcess: new failed to create G4ParticleChange!");
|
||||
}
|
||||
@@ -55,6 +62,7 @@ G4MassImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
|
||||
|
||||
G4MassImportanceProcess::~G4MassImportanceProcess()
|
||||
{
|
||||
delete fImportancePostStepDoIt;
|
||||
delete fParticleChange;
|
||||
}
|
||||
|
||||
@@ -91,7 +99,7 @@ G4MassImportanceProcess::PostStepDoIt(const G4Track &aTrack,
|
||||
Calculate(fImportanceFinder.GetImportance(prekey),
|
||||
fImportanceFinder.GetImportance(postkey),
|
||||
aTrack.GetWeight());
|
||||
fImportancePostStepDoIt.DoIt(aTrack, fParticleChange, nw);
|
||||
fImportancePostStepDoIt->DoIt(aTrack, fParticleChange, nw);
|
||||
}
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PImportanceConfigurator.cc,v 1.4 2003/04/02 16:59:16 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PImportanceConfigurator
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PScoreConfigurator.cc,v 1.5 2003/04/02 16:59:16 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4PScoreConfigurator
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PScoreProcess.cc,v 1.7 2003/04/02 16:59:16 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelGCellFinder.cc,v 1.2 2003/04/02 16:59:17 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelGeometrySampler.cc,v 1.7 2003/04/02 16:59:17 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelImportanceProcess.cc,v 1.9 2003/04/02 16:59:18 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4ParallelImportanceProcess.cc,v 1.14 2003/06/16 17:12:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -31,10 +31,12 @@
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
#include "G4ParallelImportanceProcess.hh"
|
||||
#include "G4VImportanceSplitExaminer.hh"
|
||||
#include "g4std/strstream"
|
||||
#include "G4VTrackTerminator.hh"
|
||||
#include "G4ImportancePostStepDoIt.hh"
|
||||
|
||||
G4ParallelImportanceProcess::
|
||||
G4ParallelImportanceProcess(const G4VImportanceSplitExaminer &aImportanceSplitExaminer,
|
||||
@@ -44,14 +46,23 @@ G4ParallelImportanceProcess(const G4VImportanceSplitExaminer &aImportanceSplitEx
|
||||
const G4String &aName)
|
||||
:
|
||||
G4ParallelTransport(pgeodriver, aStepper, aName),
|
||||
fTrackTerminator(TrackTerminator ? TrackTerminator : this),
|
||||
fParticleChange(G4ParallelTransport::fParticleChange),
|
||||
fImportanceSplitExaminer(aImportanceSplitExaminer),
|
||||
fImportancePostStepDoIt(*fTrackTerminator)
|
||||
{}
|
||||
fImportancePostStepDoIt(0)
|
||||
{
|
||||
if (TrackTerminator) {
|
||||
fImportancePostStepDoIt = new G4ImportancePostStepDoIt(*TrackTerminator);
|
||||
}
|
||||
else {
|
||||
fImportancePostStepDoIt = new G4ImportancePostStepDoIt(*this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
G4ParallelImportanceProcess::~G4ParallelImportanceProcess()
|
||||
{}
|
||||
{
|
||||
delete fImportancePostStepDoIt;
|
||||
}
|
||||
|
||||
|
||||
G4VParticleChange *G4ParallelImportanceProcess::
|
||||
@@ -65,7 +76,7 @@ PostStepDoIt(const G4Track& aTrack, const G4Step &aStep)
|
||||
// get new weight and number of clones
|
||||
G4Nsplit_Weight nw(fImportanceSplitExaminer.Examine(aTrack.GetWeight()));
|
||||
|
||||
fImportancePostStepDoIt.DoIt(aTrack, fParticleChange, nw);
|
||||
fImportancePostStepDoIt->DoIt(aTrack, fParticleChange, nw);
|
||||
return fParticleChange;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelTransport.cc,v 1.9 2003/04/02 16:59:18 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4ParallelTransport.cc,v 1.11 2003/06/16 17:12:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -31,10 +31,11 @@
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include <strstream>
|
||||
#include "G4ParallelTransport.hh"
|
||||
#include "G4VPGeoDriver.hh"
|
||||
#include "G4VParallelStepper.hh"
|
||||
#include "g4std/strstream"
|
||||
|
||||
|
||||
G4ParallelTransport::G4ParallelTransport(G4VPGeoDriver &pgeodriver,
|
||||
@@ -109,7 +110,7 @@ G4ParallelTransport::PostStepDoIt(const G4Track& aTrack,
|
||||
{
|
||||
if (!(aStep.GetStepLength() > 0.)) {
|
||||
char st[1000];
|
||||
G4std::ostrstream os(st,1000);
|
||||
std::ostrstream os(st,1000);
|
||||
os << "G4PArallelTransport::InitPostDoIt: StepLength() == 0.\n"
|
||||
<< "pos: " << aTrack.GetPosition() << ", "
|
||||
<< "dir: " << aTrack.GetMomentumDirection() << "\n"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParallelTransportConfigurator.cc,v 1.4 2003/04/02 16:59:19 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ParallelTransportConfigurator
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ProcessPlacer.cc,v 1.12 2003/04/02 16:59:19 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4ProcessPlacer.cc,v 1.13 2003/04/23 09:44:34 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -132,7 +132,7 @@ G4ProcessManager *G4ProcessPlacer::GetProcessManager()
|
||||
theParticleIterator = theParticleTable->GetIterator();
|
||||
// -------------------------------------------------------
|
||||
G4ProcessManager *processmanager = 0;
|
||||
// add parallel transport processe ---------------------------
|
||||
// find process manager ---------------------------
|
||||
theParticleIterator->reset();
|
||||
while( (*theParticleIterator)() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Transportation.cc,v 1.36 2003/04/02 10:09:21 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4Transportation.cc,v 1.38 2003/06/21 01:34:02 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 include file implementation
|
||||
@@ -130,7 +130,8 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
//
|
||||
if ( DoesGlobalFieldExist() )
|
||||
{
|
||||
fFieldPropagator->GetChordFinder()->ResetStepEstimate();
|
||||
G4ChordFinder* chordF= fFieldPropagator->GetChordFinder();
|
||||
if( chordF ) chordF->ResetStepEstimate();
|
||||
}
|
||||
|
||||
// We need to update the current transportation's touchable handle
|
||||
@@ -172,21 +173,24 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
G4ParticleDefinition* pParticleDef = pParticle->GetDefinition() ;
|
||||
G4double particleCharge = pParticleDef->GetPDGCharge() ;
|
||||
|
||||
G4bool fieldExertsForce = false ;
|
||||
fGeometryLimitedStep = false ;
|
||||
// fEndGlobalTimeComputed = false ;
|
||||
|
||||
// There is no need to locate the current volume. It is Done elsewhere:
|
||||
// On track construction
|
||||
// By the tracking, after all AlongStepDoIts, in "Relocation"
|
||||
// Does the particle have an (EM) field force exerting upon it?
|
||||
|
||||
// Check whether the particle have an (EM) field force exerting upon it
|
||||
//
|
||||
G4FieldManager* fieldMgr=0;
|
||||
G4bool fieldExertsForce = false ;
|
||||
if( (particleCharge != 0.0) )
|
||||
{
|
||||
fieldExertsForce = DoesGlobalFieldExist() ;
|
||||
//
|
||||
// Future: will/can also check whether current volume's field is Zero or
|
||||
// set by the user (in the logical volume) to be zero.
|
||||
fieldMgr= fFieldPropagator->FindAndSetFieldManager( track.GetVolume() );
|
||||
if (fieldMgr != 0) {
|
||||
// If the field manager has no field, there is no field !
|
||||
fieldExertsForce = (fieldMgr->GetDetectorField() != 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Choose the calculation of the transportation: Field or not
|
||||
@@ -248,7 +252,7 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
fMomentumChanged = false ;
|
||||
fEndGlobalTimeComputed = false ;
|
||||
}
|
||||
else
|
||||
else // A field exerts force
|
||||
{
|
||||
G4double momentumMagnitude = pParticle->GetTotalMomentum() ;
|
||||
G4ThreeVector EndUnitMomentum ;
|
||||
@@ -259,6 +263,9 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
momentumMagnitude, // in Mev/c
|
||||
restMass ) ;
|
||||
|
||||
// Message the field Manager, to configure it for this track
|
||||
fieldMgr->ConfigureForTrack( &track );
|
||||
|
||||
G4ThreeVector spin = track.GetPolarization() ;
|
||||
G4FieldTrack aFieldTrack = G4FieldTrack( startPosition,
|
||||
track.GetMomentumDirection(),
|
||||
@@ -310,9 +317,6 @@ AlongStepGetPhysicalInteractionLength( const G4Track& track,
|
||||
|
||||
fTransportEndKineticEnergy = aFieldTrack.GetKineticEnergy() ;
|
||||
|
||||
// if( (track.GetKineticEnergy() - fTransportEndKineticEnergy)
|
||||
// > perMillion * fTransportEndKineticEnergy ){
|
||||
|
||||
if( fFieldPropagator->GetCurrentFieldManager()->DoesFieldChangeEnergy() )
|
||||
{
|
||||
// If the field can change energy, then the time must be integrated
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserSpecialCuts.cc,v 1.9 2003/04/07 14:14:36 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// History
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VProcessPlacer.cc,v 1.2 2003/04/02 16:59:20 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VSampler.cc,v 1.2 2003/04/02 16:59:25 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VSamplerConfigurator.cc,v 1.2 2003/04/02 16:59:25 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VTrackTerminator.cc,v 1.2 2003/04/02 16:59:26 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightCutOffConfigurator.cc,v 1.4 2003/04/02 16:59:34 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4WeightCutOffConfigurator
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4WeightCutOffProcess.cc,v 1.5 2003/04/02 16:59:35 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
Reference in New Issue
Block a user