Remove G4ParticleDefinition dependance.
This commit is contained in:
parent
10b30dd9a5
commit
df77d6b888
@ -51,6 +51,8 @@
|
|||||||
#include "G4ProcessVector.hh"
|
#include "G4ProcessVector.hh"
|
||||||
#include "G4ProcessManager.hh"
|
#include "G4ProcessManager.hh"
|
||||||
|
|
||||||
|
#include "G4EventManager.hh"
|
||||||
|
|
||||||
|
|
||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
/*!
|
/*!
|
||||||
@ -111,8 +113,6 @@ class LEMuSRMUONIUMScatt : public G4VDiscreteProcess
|
|||||||
G4ThreeVector polar;
|
G4ThreeVector polar;
|
||||||
G4ThreeVector RotateSpin(const G4Step&, G4ThreeVector, G4double);
|
G4ThreeVector RotateSpin(const G4Step&, G4ThreeVector, G4double);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PrepareSecondary(const G4Track&);
|
void PrepareSecondary(const G4Track&);
|
||||||
G4Track* aSecondary;
|
G4Track* aSecondary;
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ void LEMuSRAtRestSpinRotation::RotateSpin( const G4Step& aStep, G4ThreeVector B,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//! Return the gyromagnetic ratio
|
// Return the gyromagnetic ratio
|
||||||
/*!
|
/*!
|
||||||
* This method call the event manager to get the tracking manager and then the current track in order to get the particle name. According to the name of the particle it returns the gyromagnetic ratio.
|
* This method call the event manager to get the tracking manager and then the current track in order to get the particle name. According to the name of the particle it returns the gyromagnetic ratio.
|
||||||
*/
|
*/
|
||||||
|
@ -74,7 +74,7 @@ G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt(
|
|||||||
fParticleChange.ProposeProperTime(itime);
|
fParticleChange.ProposeProperTime(itime);
|
||||||
fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ;
|
fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ;
|
||||||
|
|
||||||
/*! * - Verify the condition of applying the process.*/
|
/*! * - Verify the condition of applying the process: if the Mu is in a material different than vacuum and carbon foil, then stop it directly.*/
|
||||||
if( CheckCondition(aStep))
|
if( CheckCondition(aStep))
|
||||||
{
|
{
|
||||||
fParticleChange.ProposePosition(trackData.GetStep()->GetPreStepPoint()->GetPosition());
|
fParticleChange.ProposePosition(trackData.GetStep()->GetPreStepPoint()->GetPosition());
|
||||||
@ -84,7 +84,7 @@ G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt(
|
|||||||
else
|
else
|
||||||
{;}
|
{;}
|
||||||
|
|
||||||
/*! *- Rotate the spin if there is a magnetic field.*/
|
/*! *- If the Mu is in flight, then rotate the spin if there is a magnetic field.*/
|
||||||
polar = RotateSpinIfMag(trackData, aStep);
|
polar = RotateSpinIfMag(trackData, aStep);
|
||||||
fParticleChange.ProposePolarization(polar);
|
fParticleChange.ProposePolarization(polar);
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ G4double LEMuSRMUONIUMScatt:: GetMeanFreePath(const G4Track& ,
|
|||||||
/*!
|
/*!
|
||||||
* Not used.
|
* Not used.
|
||||||
*/
|
*/
|
||||||
void LEMuSRMUONIUMScatt::GetDatas( const G4Step* aStep)
|
void LEMuSRMUONIUMScatt::GetDatas( const G4Step* )
|
||||||
{;}
|
{;}
|
||||||
|
|
||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
@ -235,9 +235,10 @@ G4ThreeVector LEMuSRMUONIUMScatt::RotateSpin( const G4Step& aStep, G4ThreeVector
|
|||||||
G4double gamma;
|
G4double gamma;
|
||||||
q= aStep.GetTrack()->GetDefinition()->GetPDGCharge();
|
q= aStep.GetTrack()->GetDefinition()->GetPDGCharge();
|
||||||
a= 1.165922e-3;
|
a= 1.165922e-3;
|
||||||
|
// Muon's value.. not used. just for comparison in debugging.
|
||||||
fqz = 8.5062e+7*rad/(s*kilogauss);
|
fqz = 8.5062e+7*rad/(s*kilogauss);
|
||||||
|
|
||||||
gamma = aStep.GetTrack()->GetDefinition()->GetGyromagneticRatio()*rad;
|
gamma = 0.5*((1.*eplus)/(0.1056584*GeV/(c_light*c_light))-(1.*eplus)/(0.51099906*MeV/(c_light*c_light)));
|
||||||
|
|
||||||
// G4cout<< fqz*(s*tesla)<<G4endl;
|
// G4cout<< fqz*(s*tesla)<<G4endl;
|
||||||
// G4cout<< gamma*(s*tesla)<<G4endl;
|
// G4cout<< gamma*(s*tesla)<<G4endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user