Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -525,7 +525,6 @@ void G4ErrorPropagator::GetFinalTrajState( G4ErrorTrajState* currentTS,
|
||||
//-------------------------------------------------------------------------
|
||||
G4bool G4ErrorPropagator::CheckIfLastStep( G4Track* aTrack )
|
||||
{
|
||||
G4bool exception = 0;
|
||||
G4bool lastG4eStep = false;
|
||||
G4ErrorPropagatorData* g4edata =
|
||||
G4ErrorPropagatorData::GetErrorPropagatorData();
|
||||
@@ -558,48 +557,26 @@ G4bool G4ErrorPropagator::CheckIfLastStep( G4Track* aTrack )
|
||||
// give a n error/warning
|
||||
//
|
||||
lastG4eStep = true;
|
||||
if( exception )
|
||||
if( verbose >= 1 )
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Track extrapolated until end of World" << G4endl
|
||||
<< "without finding the defined target!";
|
||||
<< "without finding the defined target.";
|
||||
G4Exception("G4ErrorPropagator::CheckIfLastStep()",
|
||||
"InvalidSetup", FatalException, message);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( verbose >= 1 )
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Track extrapolated until end of World" << G4endl
|
||||
<< "without finding the defined target.";
|
||||
G4Exception("G4ErrorPropagator::CheckIfLastStep()",
|
||||
"GEANT4e-Notification", JustWarning, message);
|
||||
}
|
||||
"GEANT4e-Notification", JustWarning, message);
|
||||
}
|
||||
} //----- not last step from G4e, but track is stopped (energy exhausted)
|
||||
else if( aTrack->GetTrackStatus() == fStopAndKill )
|
||||
{
|
||||
if( exception )
|
||||
if( verbose >= 1 )
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Track extrapolated until energy is exhausted" << G4endl
|
||||
<< "without finding the defined target!";
|
||||
<< "without finding the defined target.";
|
||||
G4Exception("G4ErrorPropagator::CheckIfLastStep()",
|
||||
"InvalidSetup", FatalException, message);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( verbose >= 1 )
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Track extrapolated until energy is exhausted" << G4endl
|
||||
<< "without finding the defined target.";
|
||||
G4Exception("G4ErrorPropagator::CheckIfLastStep()",
|
||||
"GEANT4e-Notification", JustWarning, message);
|
||||
}
|
||||
lastG4eStep = 1;
|
||||
"GEANT4e-Notification", JustWarning, message);
|
||||
}
|
||||
lastG4eStep = 1;
|
||||
}
|
||||
|
||||
#ifdef G4EVERBOSE
|
||||
|
||||
@@ -41,13 +41,73 @@ G4ErrorTrajState::G4ErrorTrajState( const G4String& partType,
|
||||
const G4Point3D& pos,
|
||||
const G4Vector3D& mom,
|
||||
const G4ErrorTrajErr& errmat)
|
||||
: fParticleType(partType), fPosition(pos), fMomentum(mom), fCharge(0.),
|
||||
fError(errmat), theTSType(G4eTS_FREE), theG4Track(0)
|
||||
: fParticleType(partType), fPosition(pos), fMomentum(mom),
|
||||
fError(errmat), theTSType(G4eTS_FREE)
|
||||
{
|
||||
iverbose = G4ErrorPropagatorData::verbose();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ErrorTrajState::G4ErrorTrajState(const G4ErrorTrajState& ts)
|
||||
{
|
||||
*this = ts;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ErrorTrajState::G4ErrorTrajState(G4ErrorTrajState&& ts)
|
||||
: fParticleType(ts.fParticleType), fPosition(ts.fPosition),
|
||||
fMomentum(ts.fMomentum), fCharge(ts.fCharge),
|
||||
fError(ts.fError), theTSType(ts.theTSType),
|
||||
theG4Track(ts.theG4Track), iverbose(ts.iverbose)
|
||||
{
|
||||
// Release data from source object
|
||||
ts.theG4Track = nullptr;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ErrorTrajState& G4ErrorTrajState::operator = (const G4ErrorTrajState& ts)
|
||||
{
|
||||
if(this != &ts)
|
||||
{
|
||||
fParticleType = ts.fParticleType;
|
||||
fPosition = ts.fPosition;
|
||||
fMomentum = ts.fMomentum;
|
||||
fCharge = ts.fCharge;
|
||||
fError = ts.fError;
|
||||
theTSType = ts.theTSType;
|
||||
iverbose = ts.iverbose;
|
||||
delete theG4Track;
|
||||
theG4Track = new G4Track(*ts.theG4Track);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4ErrorTrajState& G4ErrorTrajState::operator = (G4ErrorTrajState&& ts)
|
||||
{
|
||||
if(this != &ts)
|
||||
{
|
||||
fParticleType = ts.fParticleType;
|
||||
fPosition = ts.fPosition;
|
||||
fMomentum = ts.fMomentum;
|
||||
fCharge = ts.fCharge;
|
||||
fError = ts.fError;
|
||||
theTSType = ts.theTSType;
|
||||
iverbose = ts.iverbose;
|
||||
delete theG4Track;
|
||||
theG4Track = ts.theG4Track;
|
||||
|
||||
// Release data from source object
|
||||
ts.theG4Track = nullptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
G4int G4ErrorTrajState::PropagateError( const G4Track* )
|
||||
{
|
||||
@@ -85,7 +145,7 @@ void G4ErrorTrajState::BuildCharge()
|
||||
{
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* particle = particleTable->FindParticle(fParticleType);
|
||||
if( particle == 0)
|
||||
if( particle == nullptr )
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Particle type not defined: " << fParticleType;
|
||||
|
||||
Reference in New Issue
Block a user