Import Geant4 11.0.0.beta source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// GEANT 4 class implementation file
|
||||
// ------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -37,53 +37,53 @@
|
||||
#include "G4Track.hh"
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
#include "G4ErrorPropagatorData.hh"
|
||||
# include "G4ErrorPropagatorData.hh"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ErrorMagFieldLimitProcess::
|
||||
G4ErrorMagFieldLimitProcess(const G4String& processName)
|
||||
: G4VErrorLimitProcess(processName)
|
||||
G4ErrorMagFieldLimitProcess::G4ErrorMagFieldLimitProcess(
|
||||
const G4String& processName)
|
||||
: G4VErrorLimitProcess(processName)
|
||||
{
|
||||
theStepLimit = kInfinity;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ErrorMagFieldLimitProcess::~G4ErrorMagFieldLimitProcess() {}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4ErrorMagFieldLimitProcess::~G4ErrorMagFieldLimitProcess()
|
||||
{ }
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
G4double G4ErrorMagFieldLimitProcess::
|
||||
PostStepGetPhysicalInteractionLength( const G4Track& aTrack, G4double ,
|
||||
G4ForceCondition* condition )
|
||||
G4double G4ErrorMagFieldLimitProcess::PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& aTrack, G4double, G4ForceCondition* condition)
|
||||
{
|
||||
*condition = NotForced;
|
||||
const G4Field* field =
|
||||
G4TransportationManager::GetTransportationManager()->GetFieldManager()
|
||||
->GetDetectorField();
|
||||
*condition = NotForced;
|
||||
const G4Field* field = G4TransportationManager::GetTransportationManager()
|
||||
->GetFieldManager()
|
||||
->GetDetectorField();
|
||||
|
||||
theStepLength = kInfinity;
|
||||
if( field != 0 ) {
|
||||
if(field != 0)
|
||||
{
|
||||
G4ThreeVector trkPosi = aTrack.GetPosition();
|
||||
G4double pos1[3];
|
||||
pos1[0] = trkPosi.x(); pos1[1] = trkPosi.y(); pos1[2] = trkPosi.z();
|
||||
pos1[0] = trkPosi.x();
|
||||
pos1[1] = trkPosi.y();
|
||||
pos1[2] = trkPosi.z();
|
||||
|
||||
G4double h1[3];
|
||||
field->GetFieldValue( pos1, h1 );
|
||||
field->GetFieldValue(pos1, h1);
|
||||
|
||||
G4ThreeVector BVec(h1[0],h1[1],h1[2]);
|
||||
G4double pmag = aTrack.GetMomentum().mag();
|
||||
G4double BPerpMom = BVec.cross( G4ThreeVector(pmag,0.,0.) ).mag() / pmag;
|
||||
G4ThreeVector BVec(h1[0], h1[1], h1[2]);
|
||||
G4double pmag = aTrack.GetMomentum().mag();
|
||||
G4double BPerpMom = BVec.cross(G4ThreeVector(pmag, 0., 0.)).mag() / pmag;
|
||||
|
||||
theStepLength = theStepLimit * pmag / BPerpMom;
|
||||
theStepLength = theStepLimit * pmag / BPerpMom;
|
||||
#ifdef G4VERBOSE
|
||||
if(G4ErrorPropagatorData::verbose() >= 3 ) {
|
||||
G4cout << "G4ErrorMagFieldLimitProcess:: stepLength "
|
||||
<< theStepLength << " B " << BPerpMom << " BVec " << BVec
|
||||
<< " pmag " << pmag << G4endl;
|
||||
}
|
||||
if(G4ErrorPropagatorData::verbose() >= 3)
|
||||
{
|
||||
G4cout << "G4ErrorMagFieldLimitProcess:: stepLength " << theStepLength
|
||||
<< " B " << BPerpMom << " BVec " << BVec << " pmag " << pmag
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user