Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SynchrotronRadiation.hh,v 1.9 2004/03/10 16:48:45 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// $Id: G4SynchrotronRadiation.hh,v 1.10 2004/06/07 13:49:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
@@ -91,9 +91,8 @@ class G4SynchrotronRadiation : public G4VDiscreteProcess
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
static G4double GetLambdaConst() { return fLambdaConst ; } ;
|
||||
|
||||
static G4double GetEnergyConst() { return fEnergyConst ; } ;
|
||||
static G4double GetLambdaConst();
|
||||
static G4double GetEnergyConst();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -133,85 +132,6 @@ class G4SynchrotronRadiation : public G4VDiscreteProcess
|
||||
};
|
||||
|
||||
////////////////////////// INLINE METHODS /////////////////////////////
|
||||
//
|
||||
// gives the MeanFreePath in GEANT4 internal units
|
||||
//
|
||||
|
||||
inline G4double
|
||||
G4SynchrotronRadiation::GetMeanFreePath( const G4Track& trackData,
|
||||
G4double,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
const G4DynamicParticle* aDynamicParticle;
|
||||
G4Material* aMaterial;
|
||||
G4double MeanFreePath;
|
||||
//G4bool isOutRange ;
|
||||
|
||||
*condition = NotForced ;
|
||||
|
||||
aDynamicParticle = trackData.GetDynamicParticle();
|
||||
aMaterial = trackData.GetMaterial();
|
||||
|
||||
G4double gamma = aDynamicParticle->GetTotalEnergy()/
|
||||
(aDynamicParticle->GetMass() ) ;
|
||||
|
||||
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
||||
|
||||
if (KineticEnergy < LowestKineticEnergy || gamma<1.0e3)
|
||||
{
|
||||
MeanFreePath = DBL_MAX ;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4TransportationManager* transportMgr;
|
||||
G4FieldManager* globalFieldMgr;
|
||||
|
||||
transportMgr = G4TransportationManager::GetTransportationManager() ;
|
||||
|
||||
globalFieldMgr = transportMgr->GetFieldManager() ;
|
||||
|
||||
G4bool FieldExists = globalFieldMgr->DoesFieldExist() ;
|
||||
G4ThreeVector FieldValue;
|
||||
const G4Field* pField = 0 ;
|
||||
if (FieldExists)
|
||||
{
|
||||
pField = globalFieldMgr->GetDetectorField() ;
|
||||
G4ThreeVector globPosition = trackData.GetPosition() ;
|
||||
G4double globPosVec[3], FieldValueVec[3] ;
|
||||
globPosVec[0] = globPosition.x() ;
|
||||
globPosVec[1] = globPosition.y() ;
|
||||
globPosVec[2] = globPosition.z() ;
|
||||
|
||||
pField->GetFieldValue( globPosVec, FieldValueVec ) ;
|
||||
FieldValue = G4ThreeVector( FieldValueVec[0],
|
||||
FieldValueVec[1],
|
||||
FieldValueVec[2] ) ;
|
||||
|
||||
|
||||
|
||||
G4ThreeVector unitMomentum = aDynamicParticle->GetMomentumDirection();
|
||||
G4ThreeVector unitMcrossB = FieldValue.cross(unitMomentum) ;
|
||||
G4double perpB = unitMcrossB.mag() ;
|
||||
G4double beta = aDynamicParticle->GetTotalMomentum()/
|
||||
(aDynamicParticle->GetTotalEnergy() ) ;
|
||||
if(perpB > 0.0)
|
||||
{
|
||||
MeanFreePath = fLambdaConst*beta/perpB ;
|
||||
}
|
||||
else
|
||||
{
|
||||
MeanFreePath = DBL_MAX ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MeanFreePath = DBL_MAX ;
|
||||
}
|
||||
}
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline G4bool
|
||||
G4SynchrotronRadiation::IsApplicable( const G4ParticleDefinition& particle )
|
||||
|
||||
Reference in New Issue
Block a user