Added to SVN repository
This commit is contained in:
parent
5253fc37b4
commit
b67a2876ac
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : AsymCheck.cc , v 1.2
|
// ID : AsymCheck.cc , v 1.3
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-08-20 10:20
|
// DATE : 2006-01-19 15:17
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,9 +18,9 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// ASYMCHECK
|
// ASYMCHECK
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#include "AsymCheck.hh"
|
|
||||||
|
|
||||||
|
#include "AsymCheck.hh"
|
||||||
#include "G4SteppingManager.hh"
|
#include "G4SteppingManager.hh"
|
||||||
#include "G4Transform3D.hh"
|
#include "G4Transform3D.hh"
|
||||||
#include "G4DynamicParticle.hh"
|
#include "G4DynamicParticle.hh"
|
||||||
@ -28,6 +28,7 @@
|
|||||||
#include "LEMuSRMuonDecayChannel.hh"
|
#include "LEMuSRMuonDecayChannel.hh"
|
||||||
#include "G4MuonDecayChannelWithSpin.hh"
|
#include "G4MuonDecayChannelWithSpin.hh"
|
||||||
|
|
||||||
|
|
||||||
AsymCheck::AsymCheck()
|
AsymCheck::AsymCheck()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ AsymCheck::AsymCheck()
|
|||||||
AsymCheck::~AsymCheck()
|
AsymCheck::~AsymCheck()
|
||||||
{
|
{
|
||||||
PrintAsym();
|
PrintAsym();
|
||||||
G4cout <<"\n Left/Right Asymmetry: L vs R = " << L <<" vs " << R <<" => A = " << A <<" for "<< L+R <<" particles.\n"<<G4endl;
|
G4cout <<"\n Left/Right Asymmetry: L vs R = " << L <<" vs " << R <<" => A = " << A <<" for "<< L+R <<" particles.\n"<<G4endl;
|
||||||
WriteRoot();
|
WriteRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,14 +63,11 @@ void AsymCheck::UserSteppingAction(const G4Step* aStep)
|
|||||||
if(CheckCondition(aStep))
|
if(CheckCondition(aStep))
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get datas
|
|
||||||
SetPositionMomentum(aStep);
|
SetPositionMomentum(aStep);
|
||||||
SetTimeEnergy(aStep);
|
SetTimeEnergy(aStep);
|
||||||
SetAngles(aStep);
|
SetAngles(aStep);
|
||||||
|
|
||||||
SetSpinDirection(aStep);
|
SetSpinDirection(aStep);
|
||||||
// Print datas to screen
|
|
||||||
// PrintDatas(aStep);
|
|
||||||
Update();
|
Update();
|
||||||
FillRoot();
|
FillRoot();
|
||||||
|
|
||||||
@ -85,19 +83,19 @@ G4bool AsymCheck::CheckCondition(const G4Step* aStep)
|
|||||||
G4bool condition=false;
|
G4bool condition=false;
|
||||||
|
|
||||||
if (v_name == "lv_AsymL" ||v_name == "lv_AsymR")
|
if (v_name == "lv_AsymL" ||v_name == "lv_AsymR")
|
||||||
{
|
{
|
||||||
if(p_name == "e+")
|
if(p_name == "e+")
|
||||||
{
|
{
|
||||||
if( aStep->GetTrack()->GetCreatorProcess())
|
if( aStep->GetTrack()->GetCreatorProcess())
|
||||||
{
|
{
|
||||||
if( aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="Decay"|| aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="DecayWithSpin")
|
if( aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="Decay"|| aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="DecayWithSpin")
|
||||||
|
|
||||||
{
|
{
|
||||||
condition=true;
|
condition=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return condition;
|
return condition;
|
||||||
|
|
||||||
@ -106,11 +104,6 @@ G4bool AsymCheck::CheckCondition(const G4Step* aStep)
|
|||||||
|
|
||||||
void AsymCheck::SetAngles(const G4Step* aStep)
|
void AsymCheck::SetAngles(const G4Step* aStep)
|
||||||
{
|
{
|
||||||
//lemu
|
|
||||||
// theta = LEMuSRMuonDecayChannel::GetInstance()->theta;
|
|
||||||
// phi = LEMuSRMuonDecayChannel::GetInstance()->phi;
|
|
||||||
|
|
||||||
// triumf
|
|
||||||
m=aStep->GetPreStepPoint()->GetMomentumDirection();
|
m=aStep->GetPreStepPoint()->GetMomentumDirection();
|
||||||
p= aStep->GetTrack()->GetDynamicParticle()->GetPolarization();
|
p= aStep->GetTrack()->GetDynamicParticle()->GetPolarization();
|
||||||
|
|
||||||
@ -127,7 +120,6 @@ void AsymCheck::SetAngles(const G4Step* aStep)
|
|||||||
|
|
||||||
void AsymCheck::SetParticleVolumeNames(const G4Step* aStep)
|
void AsymCheck::SetParticleVolumeNames(const G4Step* aStep)
|
||||||
{
|
{
|
||||||
// NAMES
|
|
||||||
p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name
|
p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name
|
||||||
v_name = aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetName(); //lv_name
|
v_name = aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetName(); //lv_name
|
||||||
pv_name = aStep->GetTrack()->GetVolume()->GetName(); //lv_name
|
pv_name = aStep->GetTrack()->GetVolume()->GetName(); //lv_name
|
||||||
@ -206,7 +198,6 @@ void AsymCheck::Update()
|
|||||||
void AsymCheck::PrintAsym()
|
void AsymCheck::PrintAsym()
|
||||||
{
|
{
|
||||||
A = (L-R)/(L+R);
|
A = (L-R)/(L+R);
|
||||||
// G4cout <<"\n Left/Right Asymmetry: L vs R = " << L <<" vs " << R <<" => A = " << A <<" for "<< L+R <<" particles.\n"<<G4endl;
|
|
||||||
asym.asym=A;
|
asym.asym=A;
|
||||||
asym.L=L;
|
asym.L=L;
|
||||||
asym.R=R;
|
asym.R=R;
|
||||||
@ -219,7 +210,7 @@ void AsymCheck::PrintDatas(const G4Step* aStep)
|
|||||||
|
|
||||||
if( aStep->GetTrack()->GetCreatorProcess())
|
if( aStep->GetTrack()->GetCreatorProcess())
|
||||||
{
|
{
|
||||||
G4cout << "NOT PRIMARY PARTICLE : created by : " << aStep->GetTrack()->GetCreatorProcess()->GetProcessName() <<" ;\n ";
|
G4cout << "NOT PRIMARY PARTICLE : created by : " << aStep->GetTrack()->GetCreatorProcess()->GetProcessName() <<" ;\n ";
|
||||||
}
|
}
|
||||||
|
|
||||||
G4cout << "particle name : " << p_name <<" ;\n "
|
G4cout << "particle name : " << p_name <<" ;\n "
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID :FieldCheck.cc , v 1.2
|
// ID :FieldCheck.cc , v 1.2
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-09-17 10:20
|
// DATE : 2006-01-19 15:17
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// FIELDCHECK
|
// FIELDCHECK
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#include "FieldCheck.hh"
|
#include "FieldCheck.hh"
|
||||||
|
|
||||||
#include "G4SteppingManager.hh"
|
#include "G4SteppingManager.hh"
|
||||||
@ -70,11 +70,7 @@ void FieldCheck::UserSteppingAction(const G4Step* aStep)
|
|||||||
|
|
||||||
SetPositionMomentum(aStep);
|
SetPositionMomentum(aStep);
|
||||||
SetTimeEnergy(aStep);
|
SetTimeEnergy(aStep);
|
||||||
// SetSpinDirection(aStep);
|
PrintField(aStep);
|
||||||
|
|
||||||
// Print datas to screen
|
|
||||||
// PrintDatas(aStep);
|
|
||||||
PrintField(aStep);
|
|
||||||
|
|
||||||
Update();
|
Update();
|
||||||
FillRoot();
|
FillRoot();
|
||||||
@ -85,18 +81,10 @@ void FieldCheck::UserSteppingAction(const G4Step* aStep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// kill useless particles
|
|
||||||
// kill useless particles
|
|
||||||
/* if(aStep->GetTrack()->GetDefinition()->GetParticleName()=="e-"
|
|
||||||
||aStep->GetTrack()->GetDefinition()->GetParticleName()=="gamma")
|
|
||||||
{
|
|
||||||
aStep->GetTrack()->SetTrackStatus(fStopAndKill);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if(p_name!="mu+" &&p_name!="Mu" &&p_name!="e+" &&p_name!="geantino")
|
if(p_name!="mu+" &&p_name!="Mu" &&p_name!="e+" &&p_name!="geantino")
|
||||||
{
|
{
|
||||||
aStep->GetTrack()->SetTrackStatus(fStopAndKill);
|
aStep->GetTrack()->SetTrackStatus(fStopAndKill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// loop killa
|
// loop killa
|
||||||
@ -242,8 +230,7 @@ void FieldCheck::Update()
|
|||||||
|
|
||||||
void FieldCheck::PrintField(const G4Step* aStep)
|
void FieldCheck::PrintField(const G4Step* aStep)
|
||||||
{
|
{
|
||||||
// G4cout<< position.z()<<G4endl;
|
if(aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager())
|
||||||
if(aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager())
|
|
||||||
{
|
{
|
||||||
G4double point[4];
|
G4double point[4];
|
||||||
G4double Bfield[6];
|
G4double Bfield[6];
|
||||||
@ -253,11 +240,9 @@ void FieldCheck::PrintField(const G4Step* aStep)
|
|||||||
point[2]=position.z();
|
point[2]=position.z();
|
||||||
|
|
||||||
aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()->GetDetectorField()->GetFieldValue(point, Bfield);
|
aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()->GetDetectorField()->GetFieldValue(point, Bfield);
|
||||||
// G4cout<< position.z()<<G4endl;
|
|
||||||
|
|
||||||
if(position.z()<-34.7*cm)
|
if(position.z()<-34.7*cm)
|
||||||
{
|
{
|
||||||
// G4cout<< position.z() <<" Case TL "<<G4endl;
|
|
||||||
fx=Bfield[0]/kilovolt*meter;
|
fx=Bfield[0]/kilovolt*meter;
|
||||||
fy=Bfield[1]/kilovolt*meter;
|
fy=Bfield[1]/kilovolt*meter;
|
||||||
fz=Bfield[2]/kilovolt*meter;
|
fz=Bfield[2]/kilovolt*meter;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID :FocalLengthTest.cc , v 1.2
|
// ID :FocalLengthTest.cc , v 1.2
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2005-03-02 09:37
|
// DATE : 2006-01-19 15:17
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,8 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// FOCALLENGTHTEST
|
// FOCALLENGTHTEST
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "FocalLengthTest.hh"
|
#include "FocalLengthTest.hh"
|
||||||
|
|
||||||
#include "G4SteppingManager.hh"
|
#include "G4SteppingManager.hh"
|
||||||
@ -190,7 +191,8 @@ void FocalLengthTest::Update()
|
|||||||
d=sqrt(momentum_direction.x()*momentum_direction.x()+momentum_direction.y()*momentum_direction.y());
|
d=sqrt(momentum_direction.x()*momentum_direction.x()+momentum_direction.y()*momentum_direction.y());
|
||||||
l=momentum_direction.z();
|
l=momentum_direction.z();
|
||||||
|
|
||||||
FL= h*l/d+22.*cm;// 22 cm from the last plane pv_f44 to the center of the lense
|
FL= h*l/d+22.*cm;
|
||||||
|
// 22 cm from the last plane pv_f44 to the center of the lense
|
||||||
//G4cout <<"Focal length for this particle : " << FL/meter <<"meter" <<G4endl;
|
//G4cout <<"Focal length for this particle : " << FL/meter <<"meter" <<G4endl;
|
||||||
muon.focal = FL/centimeter;
|
muon.focal = FL/centimeter;
|
||||||
muon.kenergy = LEMuSRPrimaryGeneratorAction::GetPGA()->energy/keV;
|
muon.kenergy = LEMuSRPrimaryGeneratorAction::GetPGA()->energy/keV;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRAtRestSpinRotation.cc , v 1.2
|
// ID : LEMuSRAtRestSpinRotation.cc , v 1.3
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-08-20 10:20
|
// DATE : 2006-01-19 16:15
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,8 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// AT REST SPIN ROTATION
|
// AT REST SPIN ROTATION
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSRAtRestSpinRotation.hh"
|
#include "LEMuSRAtRestSpinRotation.hh"
|
||||||
|
|
||||||
@ -61,17 +62,32 @@ LEMuSRAtRestSpinRotation* LEMuSRAtRestSpinRotation::GetInstance()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$ AT REST DO IT $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* This method contains the list of modifications to do when the particle come to rest state. It is the implementation of a virtual method of G4VProcess. Therefore, it's name should not be changed.
|
||||||
|
*
|
||||||
|
* The procedure is the following:
|
||||||
|
* -# Initialize the particle change object according to the particle's properties taken from the track object.
|
||||||
|
* -# Propose a status for the track, a position, momentum, energy, and time change.
|
||||||
|
* -# Check is the volume where the particle is at rest contains a magnetic field
|
||||||
|
* -# If there is a magnetic field, get the B vector and call the RotateSpin method to rotate the spin.
|
||||||
|
* -# Propose a spin change
|
||||||
|
* -# Return the particle change object.
|
||||||
|
* .
|
||||||
|
* Then the AtRestUpdateStep method is called cf LEMuSRParticleChangeForSR.
|
||||||
|
*/
|
||||||
G4VParticleChange* LEMuSRAtRestSpinRotation::AtRestDoIt(const G4Track& theTrack, const G4Step& aStep)
|
G4VParticleChange* LEMuSRAtRestSpinRotation::AtRestDoIt(const G4Track& theTrack, const G4Step& aStep)
|
||||||
{
|
{
|
||||||
|
|
||||||
theParticleChange.Initialize(theTrack);
|
theParticleChange.Initialize(theTrack);
|
||||||
theParticleChange.ProposeTrackStatus(fAlive);
|
theParticleChange.ProposeTrackStatus(fAlive);
|
||||||
// G4cout<<"AT REST::: globaltime "<< theTrack.GetGlobalTime()/ns <<G4endl;// getchar();
|
|
||||||
theParticleChange.ProposePosition(theTrack.GetPosition());
|
theParticleChange.ProposePosition(theTrack.GetPosition());
|
||||||
theParticleChange.ProposeMomentumDirection(theTrack.GetMomentumDirection());
|
theParticleChange.ProposeMomentumDirection(theTrack.GetMomentumDirection());
|
||||||
theParticleChange.ProposeEnergy(theTrack.GetKineticEnergy());
|
theParticleChange.ProposeEnergy(theTrack.GetKineticEnergy());
|
||||||
|
|
||||||
// tao :: Get Time
|
// Get Time
|
||||||
itime = theTrack.GetProperTime();
|
itime = theTrack.GetProperTime();
|
||||||
G4double gtime = theTrack.GetGlobalTime();
|
G4double gtime = theTrack.GetGlobalTime();
|
||||||
ftime = theTrack.GetDynamicParticle()->GetPreAssignedDecayProperTime();
|
ftime = theTrack.GetDynamicParticle()->GetPreAssignedDecayProperTime();
|
||||||
@ -97,10 +113,10 @@ G4VParticleChange* LEMuSRAtRestSpinRotation::AtRestDoIt(const G4Track& theTrack,
|
|||||||
{
|
{
|
||||||
|
|
||||||
#ifdef G4SRVERBOSE
|
#ifdef G4SRVERBOSE
|
||||||
G4cout<<"AT REST::: MAGNETIC FIELD HERE" <<G4endl;// getchar();
|
G4cout<<"AT REST::: MAGNETIC FIELD HERE" <<G4endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// tao :: Get Field
|
// Get B Field vector
|
||||||
point[0]=theTrack.GetPosition().x();
|
point[0]=theTrack.GetPosition().x();
|
||||||
point[1]=theTrack.GetPosition().y();
|
point[1]=theTrack.GetPosition().y();
|
||||||
point[2]=theTrack.GetPosition().z();
|
point[2]=theTrack.GetPosition().z();
|
||||||
@ -157,6 +173,14 @@ G4VParticleChange* LEMuSRAtRestSpinRotation::AtRestDoIt(const G4Track& theTrack,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$ ROTATE SPIN $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* This method rotates the spin of the particle according to the field value.It also takes the gyromagnetic parameters from the particle definition. It will make the spin precess until the particle decays. The gyromagnetic factor is taken from the particle definition.
|
||||||
|
*/
|
||||||
void LEMuSRAtRestSpinRotation::RotateSpin( const G4Step& aStep, G4ThreeVector B, G4double deltatime )
|
void LEMuSRAtRestSpinRotation::RotateSpin( const G4Step& aStep, G4ThreeVector B, G4double deltatime )
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -176,7 +200,7 @@ void LEMuSRAtRestSpinRotation::RotateSpin( const G4Step& aStep, G4ThreeVector B,
|
|||||||
a= 1.165922e-3;
|
a= 1.165922e-3;
|
||||||
fqz = 8.5062e+7*rad/(s*kilogauss);
|
fqz = 8.5062e+7*rad/(s*kilogauss);
|
||||||
|
|
||||||
gamma = aStep.GetTrack()->GetDefinition()->GetGammaFactor()*rad;
|
gamma = aStep.GetTrack()->GetDefinition()->GetGyromagneticRatio()*rad;
|
||||||
|
|
||||||
// G4cout<< fqz*(s*tesla)<<G4endl;
|
// G4cout<< fqz*(s*tesla)<<G4endl;
|
||||||
// G4cout<< gamma*(s*tesla)<<G4endl;
|
// G4cout<< gamma*(s*tesla)<<G4endl;
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRCryoField.cc , v 1.2
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 15:17
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// CRYOFIELD
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include"LEMuSRCryoField.hh"
|
#include"LEMuSRCryoField.hh"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRCryoHit.cc , v 1.2
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 15:17
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// CRYOHIT
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRCryoHit.hh"
|
#include "LEMuSRCryoHit.hh"
|
||||||
#include "G4VVisManager.hh"
|
#include "G4VVisManager.hh"
|
||||||
#include "G4Circle.hh"
|
#include "G4Circle.hh"
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRCryoSD.cc , v 1.2
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 15:17
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// CRYOSD
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRCryoSD.hh"
|
#include "LEMuSRCryoSD.hh"
|
||||||
#include "LEMuSRDetectorConstruction.hh"
|
#include "LEMuSRDetectorConstruction.hh"
|
||||||
#include "G4HCofThisEvent.hh"
|
#include "G4HCofThisEvent.hh"
|
||||||
@ -50,7 +72,7 @@ G4bool LEMuSRCryoSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
|||||||
// G4cout << "PROCESS HIT"<<G4endl;
|
// G4cout << "PROCESS HIT"<<G4endl;
|
||||||
mu=0;e=0;g=0;
|
mu=0;e=0;g=0;
|
||||||
|
|
||||||
LEMuSRCryoHit* aHit;
|
// LEMuSRCryoHit* aHit;
|
||||||
p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name
|
p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name
|
||||||
if(p_name=="mu+")mu=1;
|
if(p_name=="mu+")mu=1;
|
||||||
if(p_name=="Mu")e=1;
|
if(p_name=="Mu")e=1;
|
||||||
@ -64,11 +86,11 @@ G4bool LEMuSRCryoSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
|||||||
FillRoot();
|
FillRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Obsolete: to be removed
|
||||||
// Define Hit
|
// Define Hit
|
||||||
aHit = new LEMuSRCryoHit();
|
aHit = new LEMuSRCryoHit();
|
||||||
|
|
||||||
//++++++++++++++ set hit values _______________
|
//++++++++++++++ set hit values _______________
|
||||||
aHit->SetParticleName(p_name);
|
aHit->SetParticleName(p_name);
|
||||||
aHit->SetSpin(spin);
|
aHit->SetSpin(spin);
|
||||||
|
|
||||||
@ -77,16 +99,15 @@ G4bool LEMuSRCryoSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
|||||||
|
|
||||||
aHit->SetTimeOfFlight( tof);
|
aHit->SetTimeOfFlight( tof);
|
||||||
aHit->SetEnergyDeposition( edep );
|
aHit->SetEnergyDeposition( edep );
|
||||||
|
|
||||||
|
|
||||||
CryoCollection->insert( aHit );
|
CryoCollection->insert( aHit );
|
||||||
// aHit->Print();
|
// aHit->Print();
|
||||||
// aHit->print("Statistics/SCIS.Hits");
|
// aHit->print("Statistics/SCIS.Hits");
|
||||||
aHit->Draw();
|
aHit->Draw();
|
||||||
|
|
||||||
|
|
||||||
PrintAll();
|
PrintAll();
|
||||||
|
*/
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -105,7 +126,7 @@ G4bool LEMuSRCryoSD::CheckCondition(const G4Step* aStep)
|
|||||||
G4bool condition=false;
|
G4bool condition=false;
|
||||||
if(p_name == "mu+"||p_name == "Mu")
|
if(p_name == "mu+"||p_name == "Mu")
|
||||||
{
|
{
|
||||||
if(aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAH2"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAH3"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAH1"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_CRSH2"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_CRSH"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAPH")
|
if(aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAH2")
|
||||||
{
|
{
|
||||||
condition=true;
|
condition=true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRDecay.cc , v 1.2
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 15:17
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// LEMUSRDECAY
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include"LEMuSRDecay.hh"
|
#include"LEMuSRDecay.hh"
|
||||||
|
|
||||||
#include "G4DynamicParticle.hh"
|
#include "G4DynamicParticle.hh"
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRDepolarize.cc , v 1.2
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 15:17
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// LEMUSRDEPOLARIZE
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRDepolarize.hh"
|
#include "LEMuSRDepolarize.hh"
|
||||||
#include "G4StepStatus.hh"
|
#include "G4StepStatus.hh"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRDetectorConstruction.cc , v 1.0
|
// ID : LEMuSRDetectorConstruction.cc , v 1.0
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-06-24 16:33
|
// DATE : 2004-06-24 16:33
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// DETECTOR CONSTRUCTION
|
// DETECTOR CONSTRUCTION
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
// G4 GEOMETRIC FORMS CLASSES
|
// G4 GEOMETRIC FORMS CLASSES
|
||||||
@ -82,7 +82,7 @@
|
|||||||
#include "LEMuSRElMag_SpinEqRhs.hh"
|
#include "LEMuSRElMag_SpinEqRhs.hh"
|
||||||
#include "LEMuSRMagneticField.hh"
|
#include "LEMuSRMagneticField.hh"
|
||||||
#include "G4Mag_SpinEqRhs.hh"
|
#include "G4Mag_SpinEqRhs.hh"
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -153,9 +153,9 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::Construct()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE DETECTOR
|
// DEFINE THE DETECTOR
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V dans G4VP...
|
G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V dans G4VP...
|
||||||
{
|
{
|
||||||
@ -163,8 +163,8 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V
|
|||||||
|
|
||||||
// +++++++++++++++++++++++++++++++DEFINE THE MOTHER VOLUME: THE LABORATOY++++++++++++++++++++++
|
// +++++++++++++++++++++++++++++++DEFINE THE MOTHER VOLUME: THE LABORATOY++++++++++++++++++++++
|
||||||
// solid
|
// solid
|
||||||
G4double LABO_x = 2*m;
|
G4double LABO_x = 1*m;
|
||||||
G4double LABO_y = 2*m;
|
G4double LABO_y = 1*m;
|
||||||
G4double LABO_z = 2*m;
|
G4double LABO_z = 2*m;
|
||||||
|
|
||||||
LABO_box = new G4Box("World_box",LABO_x,LABO_y,LABO_z);
|
LABO_box = new G4Box("World_box",LABO_x,LABO_y,LABO_z);
|
||||||
@ -321,9 +321,9 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE MCP2
|
// DEFINE THE MCP2
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction::lemuMCP2()
|
void LEMuSRDetectorConstruction::lemuMCP2()
|
||||||
@ -404,12 +404,12 @@ void LEMuSRDetectorConstruction::lemuMCP2()
|
|||||||
|
|
||||||
// Apply attributes and user limit
|
// Apply attributes and user limit
|
||||||
|
|
||||||
// lv_MCPV->SetVisAttributes(Blue_style);//G4VisAttributes::Invisible);
|
lv_MCPV->SetVisAttributes(G4VisAttributes::Invisible);
|
||||||
lv_MCPS->SetVisAttributes(Blue_style);
|
lv_MCPS->SetVisAttributes(Blue_style);
|
||||||
lv_F160->SetVisAttributes(fBlue_style);
|
lv_F160->SetVisAttributes(fBlue_style);
|
||||||
lv_F100->SetVisAttributes(fBlue_style);
|
lv_F100->SetVisAttributes(fBlue_style);
|
||||||
lv_F200->SetVisAttributes(fBlue_style);
|
lv_F200->SetVisAttributes(fBlue_style);
|
||||||
// lv_GATV->SetVisAttributes(Blue_style);//G4VisAttributes::Invisible);
|
lv_GATV->SetVisAttributes(G4VisAttributes::Invisible);
|
||||||
lv_GATS->SetVisAttributes(Blue_style);
|
lv_GATS->SetVisAttributes(Blue_style);
|
||||||
|
|
||||||
|
|
||||||
@ -424,9 +424,9 @@ void LEMuSRDetectorConstruction::lemuMCP2()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE ANODE
|
// DEFINE THE ANODE
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction::lemuANODE()
|
void LEMuSRDetectorConstruction::lemuANODE()
|
||||||
{
|
{
|
||||||
@ -494,9 +494,9 @@ void LEMuSRDetectorConstruction::lemuANODE()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE CRYOSTAT
|
// DEFINE THE CRYOSTAT
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction:: lemuCRYO()
|
void LEMuSRDetectorConstruction:: lemuCRYO()
|
||||||
{
|
{
|
||||||
@ -599,9 +599,9 @@ void LEMuSRDetectorConstruction:: lemuCRYO()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE MULTIPLE CHANNEL-DETECTOR
|
// DEFINE THE MULTIPLE CHANNEL-DETECTOR
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction:: lemuMCPdet()
|
void LEMuSRDetectorConstruction:: lemuMCPdet()
|
||||||
{
|
{
|
||||||
@ -656,9 +656,9 @@ void LEMuSRDetectorConstruction:: lemuMCPdet()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE SCINTILLATOR
|
// DEFINE THE SCINTILLATOR
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
void LEMuSRDetectorConstruction::lemuSCINT()
|
void LEMuSRDetectorConstruction::lemuSCINT()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -710,9 +710,9 @@ void LEMuSRDetectorConstruction::lemuSCINT()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE THIRD LENS
|
// DEFINE THE THIRD LENS
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction::lemuLinse3()
|
void LEMuSRDetectorConstruction::lemuLinse3()
|
||||||
@ -747,7 +747,7 @@ void LEMuSRDetectorConstruction::lemuLinse3()
|
|||||||
{
|
{
|
||||||
|
|
||||||
G4ElectricField* L3Field = new LEMuSRElectricField(L3FieldVal,
|
G4ElectricField* L3Field = new LEMuSRElectricField(L3FieldVal,
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/ThirdLense/L3b.map"
|
"/home/l_paraiso/LEMuSR/FieldMaps/ThirdLense/L3b.map"
|
||||||
,"dm",-567,60,60,100);
|
,"dm",-567,60,60,100);
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -761,7 +761,7 @@ void LEMuSRDetectorConstruction::lemuLinse3()
|
|||||||
|
|
||||||
// equation considers spin or not
|
// equation considers spin or not
|
||||||
G4ChordFinder* pChordFinder = new G4ChordFinder( L3Field,
|
G4ChordFinder* pChordFinder = new G4ChordFinder( L3Field,
|
||||||
1.e-3 * mm, // Minimum step size
|
1.e-10 * mm, // Minimum step size: must be very small for a precise calculation of transport energy
|
||||||
pStepper);
|
pStepper);
|
||||||
|
|
||||||
L3FieldMgr->SetDetectorField(L3Field);
|
L3FieldMgr->SetDetectorField(L3Field);
|
||||||
@ -847,9 +847,9 @@ void LEMuSRDetectorConstruction::lemuLinse3()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE TRIGGER DETECTOR
|
// DEFINE THE TRIGGER DETECTOR
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction::lemuTrigger_Detector()
|
void LEMuSRDetectorConstruction::lemuTrigger_Detector()
|
||||||
{
|
{
|
||||||
@ -972,9 +972,9 @@ void LEMuSRDetectorConstruction::lemuTrigger_Detector()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE COMPENSATION GATE
|
// DEFINE THE COMPENSATION GATE
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction::lemuCGate()
|
void LEMuSRDetectorConstruction::lemuCGate()
|
||||||
{
|
{
|
||||||
@ -1013,9 +1013,9 @@ void LEMuSRDetectorConstruction::lemuCGate()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE FIELDS
|
// DEFINE THE FIELDS
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1031,16 +1031,16 @@ void LEMuSRDetectorConstruction::buildAnodeField()
|
|||||||
{
|
{
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_NoGuards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_NoGuards/\0"); break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_Guards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_Guards/\0"); break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/\0"); break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_Guards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_Guards/\0"); break;
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
|
|
||||||
@ -1163,7 +1163,16 @@ void LEMuSRDetectorConstruction::buildAnodeField()
|
|||||||
if(magfield==1)
|
if(magfield==1)
|
||||||
{
|
{
|
||||||
|
|
||||||
mcField = new G4UniformMagField(G4ThreeVector(0.,0.,B*gauss));
|
#ifdef LEMU_TRANSVERSE_FIELD
|
||||||
|
mcField = new LEMuSRMagneticField(G4ThreeVector(0.,B*gauss,0.));
|
||||||
|
G4cout<<"Transverse Field Applied: (0 G, " <<B <<"G, 0 G) \n"<<G4endl;
|
||||||
|
sleep(3); // wait 3 seconds
|
||||||
|
#else
|
||||||
|
mcField = new LEMuSRMagneticField(G4ThreeVector(0.,0.,B*gauss));
|
||||||
|
G4cout<<"Longtudinal Field Applied: (0 G, 0 G, " <<B <<"G) \n"<<G4endl;
|
||||||
|
sleep(3); // wait 3 seconds
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
G4MagneticField* EMField = new LEMuSRElMagField(GField,mcField,1.,1.);
|
G4MagneticField* EMField = new LEMuSRElMagField(GField,mcField,1.,1.);
|
||||||
@ -1180,10 +1189,10 @@ void LEMuSRDetectorConstruction::buildAnodeField()
|
|||||||
|
|
||||||
G4FieldManager* EMFieldMgr = new G4FieldManager(); // 1
|
G4FieldManager* EMFieldMgr = new G4FieldManager(); // 1
|
||||||
|
|
||||||
|
|
||||||
EMFieldMgr->SetDetectorField(EMField,true);
|
EMFieldMgr->SetDetectorField(EMField,true);
|
||||||
EMFieldMgr->SetChordFinder(EMChordFinder);
|
EMFieldMgr->SetChordFinder(EMChordFinder);
|
||||||
|
EMFieldMgr->SetFieldMagComponent(true);
|
||||||
|
|
||||||
|
|
||||||
lv_MCPV = new G4LogicalVolume( MCPV_tube , Vacuum ,"lv_MCPV",EMFieldMgr,0,0);
|
lv_MCPV = new G4LogicalVolume( MCPV_tube , Vacuum ,"lv_MCPV",EMFieldMgr,0,0);
|
||||||
|
|
||||||
@ -1219,13 +1228,24 @@ void LEMuSRDetectorConstruction::buildAnodeField()
|
|||||||
// 3 pure magnetic field
|
// 3 pure magnetic field
|
||||||
if(magfield==1)
|
if(magfield==1)
|
||||||
{
|
{
|
||||||
|
|
||||||
G4UniformMagField* mcField;
|
G4UniformMagField* mcField;
|
||||||
|
|
||||||
mcField = new LEMuSRMagneticField(G4ThreeVector(0.,0.,B*gauss));
|
|
||||||
|
#ifdef LEMU_TRANSVERSE_FIELD
|
||||||
G4Mag_SpinEqRhs *Mag_SpinEqRhs;
|
mcField = new LEMuSRMagneticField(G4ThreeVector(0.,B*gauss,0.));
|
||||||
|
G4cout<<"Transverse Field Applied: (0 G, " <<B <<"G, 0 G) \n"<<G4endl;
|
||||||
|
sleep(3); // wait 3 seconds
|
||||||
|
#else
|
||||||
|
mcField = new LEMuSRMagneticField(G4ThreeVector(0.,0.,B*gauss));
|
||||||
|
G4cout<<"Longitudinal Field Applied: (0 G, 0 G, " <<B <<"G) \n"<<G4endl;
|
||||||
|
sleep(3); // wait 3 seconds
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
LEMuSRMag_SpinEqRhs *Mag_SpinEqRhs;
|
||||||
G4MagIntegratorStepper *pStepper;
|
G4MagIntegratorStepper *pStepper;
|
||||||
Mag_SpinEqRhs = new G4Mag_SpinEqRhs(mcField);
|
Mag_SpinEqRhs = new LEMuSRMag_SpinEqRhs(mcField);
|
||||||
pStepper = new G4ClassicalRK4( Mag_SpinEqRhs,12 );
|
pStepper = new G4ClassicalRK4( Mag_SpinEqRhs,12 );
|
||||||
|
|
||||||
// equation considers spin or not
|
// equation considers spin or not
|
||||||
@ -1237,6 +1257,7 @@ void LEMuSRDetectorConstruction::buildAnodeField()
|
|||||||
// G4TransportationManager::GetTransportationManager()->GetFieldManager(); // 2
|
// G4TransportationManager::GetTransportationManager()->GetFieldManager(); // 2
|
||||||
mcFieldMgr->SetDetectorField(mcField,true);
|
mcFieldMgr->SetDetectorField(mcField,true);
|
||||||
mcFieldMgr->SetChordFinder(pChordFinder);
|
mcFieldMgr->SetChordFinder(pChordFinder);
|
||||||
|
mcFieldMgr->SetFieldMagComponent(true);
|
||||||
lv_MCPV = new G4LogicalVolume( MCPV_tube , Vacuum ,"lv_MCPV",mcFieldMgr,0,0);
|
lv_MCPV = new G4LogicalVolume( MCPV_tube , Vacuum ,"lv_MCPV",mcFieldMgr,0,0);
|
||||||
}
|
}
|
||||||
if(magfield==0)
|
if(magfield==0)
|
||||||
@ -1264,7 +1285,7 @@ void LEMuSRDetectorConstruction::buildCryoField()
|
|||||||
G4ThreeVector C_field(0.,0.,-V/d);
|
G4ThreeVector C_field(0.,0.,-V/d);
|
||||||
|
|
||||||
|
|
||||||
// char dir[]="/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/";
|
// char dir[]="/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/";
|
||||||
|
|
||||||
char dir[256];
|
char dir[256];
|
||||||
int k=2*Grid+Guards;
|
int k=2*Grid+Guards;
|
||||||
@ -1272,16 +1293,16 @@ void LEMuSRDetectorConstruction::buildCryoField()
|
|||||||
{
|
{
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_NoGuards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_NoGuards/\0"); break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_Guards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_Guards/\0"); break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/\0"); break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_Guards/\0"); break;
|
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_Guards/\0"); break;
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
@ -1327,17 +1348,17 @@ void LEMuSRDetectorConstruction::NEWMAPS()
|
|||||||
// left
|
// left
|
||||||
LEMuSRElectricField* LEFTMAP =
|
LEMuSRElectricField* LEFTMAP =
|
||||||
new LEMuSRElectricField(1,
|
new LEMuSRElectricField(1,
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ex.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ex.txt",
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ey.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ey.txt",
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ez.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ez.txt",
|
||||||
"mm",0.0,80,80,200);//offset in milimeters
|
"mm",0.0,80,80,200);//offset in milimeters
|
||||||
|
|
||||||
// right
|
// right
|
||||||
LEMuSRElectricField* RIGHTMAP =
|
LEMuSRElectricField* RIGHTMAP =
|
||||||
new LEMuSRElectricField(1,
|
new LEMuSRElectricField(1,
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ex.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ex.txt",
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ey.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ey.txt",
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ez.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ez.txt",
|
||||||
"mm",0.0,80,80,200);//offset in milimeters
|
"mm",0.0,80,80,200);//offset in milimeters
|
||||||
|
|
||||||
|
|
||||||
@ -1346,9 +1367,9 @@ void LEMuSRDetectorConstruction::NEWMAPS()
|
|||||||
|
|
||||||
LEMuSRElectricField* SAMPLEMAP =
|
LEMuSRElectricField* SAMPLEMAP =
|
||||||
new LEMuSRElectricField(1,
|
new LEMuSRElectricField(1,
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ex.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ex.txt",
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ey.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ey.txt",
|
||||||
"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ez.txt",
|
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ez.txt",
|
||||||
"mm",0.0,80,80,200);//offset in milimeters)
|
"mm",0.0,80,80,200);//offset in milimeters)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRDetectorMessenger.cc , v 1.2
|
// ID : LEMuSRDetectorMessenger.cc , v 1.2
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-08-20 10:20
|
// DATE : 2004-08-20 10:20
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// DETECTOR MESSENGER
|
// DETECTOR MESSENGER
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#include "LEMuSRDetectorMessenger.hh"
|
#include "LEMuSRDetectorMessenger.hh"
|
||||||
#include "LEMuSRDetectorConstruction.hh"
|
#include "LEMuSRDetectorConstruction.hh"
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ LEMuSRDetectorMessenger::LEMuSRDetectorMessenger(LEMuSRDetectorConstruction *lem
|
|||||||
|
|
||||||
|
|
||||||
// SAH MATERIAL
|
// SAH MATERIAL
|
||||||
SetSAHmaterial = new G4UIcmdWithAString("/Detector/Sample/Material",this);
|
SetSAHmaterial = new G4UIcmdWithAString("/Detector/Sample/HolderMaterial",this);
|
||||||
SetSAHmaterial->SetGuidance("\n Sample material");
|
SetSAHmaterial->SetGuidance("\n Sample material");
|
||||||
SetSAHmaterial->SetParameterName("material",false);
|
SetSAHmaterial->SetParameterName("material",false);
|
||||||
SetSAHmaterial->SetDefaultValue("copper");
|
SetSAHmaterial->SetDefaultValue("copper");
|
||||||
|
@ -1,4 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
|
// ID :LEMuSREMPhysics.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-09-17 10:20
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// ElectroMagnetic Physics List
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSREMPhysics.hh"
|
#include "LEMuSREMPhysics.hh"
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID :LEMuSRElFieldMix.cc , v 1.3
|
// ID :LEMuSRElFieldMix.cc , v 1.3
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-09-17 10:20
|
// DATE : 2004-09-17 10:20
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// Electric Field
|
// Electric Field
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#include"LEMuSRElFieldMix.hh"
|
#include"LEMuSRElFieldMix.hh"
|
||||||
#include"G4UnitsTable.hh"
|
#include"G4UnitsTable.hh"
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID :LEMuSRElMagField.cc , v 1.3
|
// ID :LEMuSRElMagField.cc , v 1.3
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-09-17 10:20
|
// DATE : 2004-09-17 10:20
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -17,8 +17,8 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// Electric Field
|
// ElectroMagnetic Field
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#include"LEMuSRElMagField.hh"
|
#include"LEMuSRElMagField.hh"
|
||||||
#include"G4UnitsTable.hh"
|
#include"G4UnitsTable.hh"
|
||||||
#include "G4ios.hh"
|
#include "G4ios.hh"
|
||||||
|
@ -1,23 +1,68 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRElMag_SpinEqRhs.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-09-17 10:20
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// ElectroMagnetic Spin Equation
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSRElMag_SpinEqRhs.hh"
|
#include "LEMuSRElMag_SpinEqRhs.hh"
|
||||||
#include "G4MagneticField.hh"
|
#include "G4MagneticField.hh"
|
||||||
#include "G4ThreeVector.hh"
|
#include "G4ThreeVector.hh"
|
||||||
|
#include "G4ios.hh"
|
||||||
|
#include "G4UnitsTable.hh"
|
||||||
|
#include "globals.hh"
|
||||||
|
|
||||||
LEMuSRElMag_SpinEqRhs::LEMuSRElMag_SpinEqRhs( G4MagneticField* MagField )
|
LEMuSRElMag_SpinEqRhs::LEMuSRElMag_SpinEqRhs( G4MagneticField* MagField )
|
||||||
: G4Mag_EqRhs( MagField ) {}
|
: G4Mag_EqRhs( MagField ) {
|
||||||
|
}
|
||||||
|
|
||||||
LEMuSRElMag_SpinEqRhs::~LEMuSRElMag_SpinEqRhs() {}
|
LEMuSRElMag_SpinEqRhs::~LEMuSRElMag_SpinEqRhs() {}
|
||||||
|
|
||||||
void
|
|
||||||
LEMuSRElMag_SpinEqRhs::SetChargeMomentumMass(G4double particleCharge, // in e+ units
|
void LEMuSRElMag_SpinEqRhs::SetChargeMomentumMass(G4double particleCharge, // in e+ units
|
||||||
G4double MomentumXc,
|
G4double MomentumXc,
|
||||||
G4double mass)
|
G4double mass)
|
||||||
{
|
{
|
||||||
// To set fCof_val
|
// To set fCof_val
|
||||||
G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, mass);
|
G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, mass);
|
||||||
|
|
||||||
omegac = 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
/* theTrackingAction= LEMuSRTrackingAction::GetInstance();
|
||||||
anomaly = 1.165923e-3*0;
|
G4double gratio=theTrackingAction->GyroMagRatio;
|
||||||
|
G4cout <<"g ratio [MHz]/[T]"<<gratio<<G4endl;
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Get the gyromagnetic ratio via the event manager
|
||||||
|
G4EventManager* evtMgr = G4EventManager::GetEventManager();
|
||||||
|
G4Track* theTrack = evtMgr->GetTrackingManager()->GetTrack();
|
||||||
|
G4double gratio= theTrack->GetDefinition()->GetGyromagneticRatio();
|
||||||
|
// G4cout <<"g ratio [MHz]/[T]"<<gratio<<G4endl;
|
||||||
|
|
||||||
|
omegac =gratio;// 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
anomaly =1.165923e-3;
|
||||||
|
oldomegac= 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
||||||
|
//G4cout<< "Old FrequencyG: " << G4BestUnit(oldomegac*gauss/(2*M_PI*rad)*cm,"Frequency") <<G4endl;
|
||||||
|
#endif
|
||||||
|
//G4cout<< "FrequencyG: " << G4BestUnit(gratio*gauss,"Frequency") <<G4endl;
|
||||||
|
|
||||||
ParticleCharge = particleCharge;
|
ParticleCharge = particleCharge;
|
||||||
|
|
||||||
E = sqrt(sqr(MomentumXc)+sqr(mass));
|
E = sqrt(sqr(MomentumXc)+sqr(mass));
|
||||||
@ -29,8 +74,8 @@ LEMuSRElMag_SpinEqRhs::SetChargeMomentumMass(G4double particleCharge, // in e+ u
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LEMuSRElMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
void LEMuSRElMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
||||||
const G4double B[6],
|
const G4double B[6],
|
||||||
G4double dydx[] ) const
|
G4double dydx[] ) const
|
||||||
{
|
{
|
||||||
@ -54,8 +99,6 @@ LEMuSRElMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
|||||||
|
|
||||||
G4ThreeVector BField(B[0],B[1],B[2]);
|
G4ThreeVector BField(B[0],B[1],B[2]);
|
||||||
|
|
||||||
G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
|
|
||||||
G4double ucb = (anomaly+1./gamma)/beta;
|
|
||||||
|
|
||||||
// Initialise the values of dydx that we do not update.
|
// Initialise the values of dydx that we do not update.
|
||||||
dydx[6] = dydx[8] = 0.0;
|
dydx[6] = dydx[8] = 0.0;
|
||||||
@ -70,19 +113,35 @@ LEMuSRElMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
|||||||
G4ThreeVector Spin(y[9],y[10],y[11]);
|
G4ThreeVector Spin(y[9],y[10],y[11]);
|
||||||
G4ThreeVector dSpin;
|
G4ThreeVector dSpin;
|
||||||
|
|
||||||
dSpin = ParticleCharge*omegac*(ucb*(Spin.cross(BField))-udb*(Spin.cross(u)));
|
#ifdef DEBUG
|
||||||
|
G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
|
||||||
|
G4double ucb = (anomaly+1./gamma)/beta;
|
||||||
|
dSpin = ParticleCharge*oldomegac*(ucb*(Spin.cross(BField))-udb*(Spin.cross(u)));
|
||||||
|
G4cout<<"Old dSpin" << dSpin<<G4endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Calculation of dSpin according to theory for ex. Cohen-Tannoudji I p449
|
||||||
|
// dSpin/dt=gyromag_ratio*S^B
|
||||||
|
// dVar/ds=dVar/dt*mass/|mom|
|
||||||
|
//
|
||||||
|
|
||||||
|
dSpin =(Spin.cross(BField))*1./velocity*omegac;//multiply by gyromag ratio
|
||||||
|
#ifdef DEBUG
|
||||||
|
G4cout<<"New dSpin" << dSpin<<G4endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
dydx[ 9] = dSpin.x();
|
dydx[ 9] = dSpin.x();
|
||||||
dydx[10] = dSpin.y();
|
dydx[10] = dSpin.y();
|
||||||
dydx[11] = dSpin.z();
|
dydx[11] = dSpin.z();
|
||||||
|
|
||||||
/* G4cout<<"LEMuSRMAg_SpinEqRhs :: dydx \n"
|
/* G4cout<<"LEMuSRMAg_SpinEqRhs :: dydx \n"
|
||||||
<< dydx[0] <<" " << dydx[1] <<" "<< dydx[2] <<" "<<"\n"
|
<< dydx[0] <<" " << dydx[1] <<" "<< dydx[2] <<" "<<"\n"
|
||||||
<< dydx[3] <<" " << dydx[4] <<" "<< dydx[5] <<" "<<"\n"
|
<< dydx[3] <<" " << dydx[4] <<" "<< dydx[5] <<" "<<"\n"
|
||||||
<< dydx[6] <<" " << dydx[7] <<" "<< dydx[8] <<" "<<"\n"
|
<< dydx[6] <<" " << dydx[7] <<" "<< dydx[8] <<" "<<"\n"
|
||||||
<< dydx[9] <<" " << dydx[10] <<" "<< dydx[11] <<" "<<"\n";
|
<< dydx[9] <<" " << dydx[10] <<" "<< dydx[11] <<" "<<"\n";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID :LEMuSRElectricField.cc , v 1.3
|
// ID :LEMuSRElectricField.cc , v 1.3
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-09-17 10:20
|
// DATE : 2004-09-17 10:20
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// Electric Field
|
// Electric Field
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#include"LEMuSRElectricField.hh"
|
#include"LEMuSRElectricField.hh"
|
||||||
#include"G4UnitsTable.hh"
|
#include"G4UnitsTable.hh"
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ void LEMuSRElectricField::GetFieldValue(const G4double point[4],
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! Scaling the distances acording to the unit.
|
||||||
G4double x = (point[0]/mm)/length_ratio;
|
G4double x = (point[0]/mm)/length_ratio;
|
||||||
G4double y = (point[1]/mm)/length_ratio;
|
G4double y = (point[1]/mm)/length_ratio;
|
||||||
G4double z = ((point[2] - zOffset)/mm)/length_ratio;
|
G4double z = ((point[2] - zOffset)/mm)/length_ratio;
|
||||||
@ -347,21 +347,15 @@ void LEMuSRElectricField::GetFieldValue(const G4double point[4],
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//G4cout<<"Field Value " << G4BestUnit(Bfield[0]*meter,"Electric potential") <<"/m " <<Bfield[1]/volt*meter <<" V/m "<< Bfield[2]/volt*meter <<" V/m " <<G4endl;
|
|
||||||
|
|
||||||
|
|
||||||
// G4cout<<"FieldVal " <<FieldVal <<" coef " << field_factor<<" \n";
|
|
||||||
|
|
||||||
Bfield[0] = Bfield[0]*FieldVal*field_factor;
|
Bfield[0] = Bfield[0]*FieldVal*field_factor;
|
||||||
Bfield[1] = Bfield[1]*FieldVal*field_factor;
|
Bfield[1] = Bfield[1]*FieldVal*field_factor;
|
||||||
Bfield[2] = Bfield[2]*FieldVal*field_factor;
|
Bfield[2] = Bfield[2]*FieldVal*field_factor;
|
||||||
|
|
||||||
// G4cout<< "Ex "<< xField[37][37][84]<<"\n Ey "<< yField[37][37][84]<<"\n Ez "<< zField[37][37][84] <<G4endl;
|
|
||||||
|
|
||||||
// G4cout<< "Ex "<< xField[37][37][884]<<"\n Ey "<< yField[37][37][884]<<"\n Ez "<< zField[37][37][884] <<G4endl;
|
|
||||||
|
|
||||||
#ifdef DEBUG_INTERPOLATING_FIELD
|
#ifdef DEBUG_INTERPOLATING_FIELD
|
||||||
G4cout<<"Field Value " << G4BestUnit(Bfield[0]*meter,"Electric potential") <<"/m " <<Bfield[1]/volt*meter <<" V/m "<< Bfield[2]/volt*meter <<" V/m " <<G4endl;
|
G4cout<<"Field Value " << G4BestUnit(Bfield[0]*meter,"Electric potential") <<"/m " <<Bfield[1]/volt*meter <<" V/m "<< Bfield[2]/volt*meter <<" V/m " <<G4endl;
|
||||||
|
G4cout<<"FieldVal " <<FieldVal <<" coef " << field_factor<<" \n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
// GEANT4 tag $Name$
|
// GEANT4 tag $Name: $
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// This is the standard right-hand side for equation of motion.
|
// This is the standard right-hand side for equation of motion.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
// ID : LEMuSREventAction.cc , v 1.0
|
// ID : LEMuSREventAction.cc , v 1.0
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-07-07 11:15
|
// DATE : 2004-07-07 11:15
|
||||||
//
|
//
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// EVENT ACTION.CC
|
// EVENT ACTION.CC
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "LEMuSREventAction.hh"
|
#include "LEMuSREventAction.hh"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRGeneralPhysics.cc , v 1.1
|
// ID : LEMuSRGeneralPhysics.cc , v 1.1
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-08-24 16:33
|
// DATE : 2004-08-24 16:33
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// GENERAL PHYSICS
|
// GENERAL PHYSICS
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRGeneralPhysics.hh"
|
#include "LEMuSRGeneralPhysics.hh"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
// GEANT4 tag $Name$
|
// From GEANT4 examples.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "LEMuSRHadronPhysics.hh"
|
#include "LEMuSRHadronPhysics.hh"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
// GEANT4 tag $Name$
|
// GEANT4 tag $Name: $
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
// GEANT4 tag $Name$
|
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||||
//
|
//
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// 16/05/01 value of cparm changed , L.Urban
|
// 16/05/01 value of cparm changed , L.Urban
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID : LEMuSRMUONIUM.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 16:15
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// MUONIUM
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
|
||||||
#include "LEMuSRMUONIUM.hh"
|
#include "LEMuSRMUONIUM.hh"
|
||||||
#include "G4StepStatus.hh"
|
#include "G4StepStatus.hh"
|
||||||
|
@ -1,3 +1,26 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID : LEMuSRMUONIUMScatt.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 16:15
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// MUONIUMScatt
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSRMUONIUMScatt.hh"
|
#include "LEMuSRMUONIUMScatt.hh"
|
||||||
#include "G4StepStatus.hh"
|
#include "G4StepStatus.hh"
|
||||||
#include "G4Navigator.hh"
|
#include "G4Navigator.hh"
|
||||||
@ -23,13 +46,19 @@ LEMuSRMUONIUMScatt:: ~LEMuSRMUONIUMScatt()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* At the end of the step, the current volume is checked and if the muonium is in a solid material (except the carbon foil where it is generated) it is stopped immediately.
|
||||||
|
*
|
||||||
|
* The RotateSpinIfMag method is also called here, in order to perform the spin precession of a muonium flying in a magnetic field. Indeed the momentum and spin propagation of neutral particles is not taken into account in \gf.
|
||||||
|
*/
|
||||||
G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt(
|
G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt(
|
||||||
const G4Track& trackData,
|
const G4Track& trackData,
|
||||||
const G4Step& aStep )
|
const G4Step& aStep )
|
||||||
{
|
{
|
||||||
|
|
||||||
fParticleChange.Initialize(trackData);
|
fParticleChange.Initialize(trackData);
|
||||||
|
|
||||||
// tao :: Get Time
|
// tao :: /*! *- Get Time information */
|
||||||
itime = trackData.GetProperTime();
|
itime = trackData.GetProperTime();
|
||||||
gtime = trackData.GetGlobalTime();
|
gtime = trackData.GetGlobalTime();
|
||||||
ftime = trackData.GetDynamicParticle()->GetPreAssignedDecayProperTime();
|
ftime = trackData.GetDynamicParticle()->GetPreAssignedDecayProperTime();
|
||||||
@ -37,7 +66,7 @@ G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt(
|
|||||||
deltatime = ftime - itime;
|
deltatime = ftime - itime;
|
||||||
fParticleChange.ProposeGlobalTime(deltatime + itime -gtime);
|
fParticleChange.ProposeGlobalTime(deltatime + itime -gtime);
|
||||||
|
|
||||||
// set position momentum energy
|
/*! - Set position, momentum, energy and time of the particle change. */
|
||||||
fParticleChange.ProposePosition(trackData.GetPosition());
|
fParticleChange.ProposePosition(trackData.GetPosition());
|
||||||
fParticleChange.ProposeMomentumDirection(trackData.GetMomentumDirection());
|
fParticleChange.ProposeMomentumDirection(trackData.GetMomentumDirection());
|
||||||
fParticleChange.ProposeEnergy(trackData.GetKineticEnergy());
|
fParticleChange.ProposeEnergy(trackData.GetKineticEnergy());
|
||||||
@ -45,24 +74,23 @@ G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt(
|
|||||||
fParticleChange.ProposeProperTime(itime);
|
fParticleChange.ProposeProperTime(itime);
|
||||||
fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ;
|
fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ;
|
||||||
|
|
||||||
|
/*! * - Verify the condition of applying the process.*/
|
||||||
if( CheckCondition(aStep))
|
if( CheckCondition(aStep))
|
||||||
{
|
{
|
||||||
// fParticleChange.ProposeEnergy(0);
|
fParticleChange.ProposePosition(trackData.GetStep()->GetPreStepPoint()->GetPosition());
|
||||||
fParticleChange.ProposePosition(trackData.GetStep()->GetPreStepPoint()->GetPosition());
|
fParticleChange.ProposeTrackStatus(fStopButAlive) ;
|
||||||
|
|
||||||
// fParticleChange.ProposePolarization(trackData.GetPolarization());
|
|
||||||
// G4cout<<" at rest "<< trackData.GetStep()->GetPreStepPoint()->GetPosition() <<G4endl;
|
|
||||||
fParticleChange.ProposeTrackStatus(fStopButAlive) ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{;}
|
||||||
// fParticleChange.ProposePolarization(trackData.GetPolarization());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/*! *- Rotate the spin if there is a magnetic field.*/
|
||||||
polar = RotateSpinIfMag(trackData, aStep);
|
polar = RotateSpinIfMag(trackData, aStep);
|
||||||
fParticleChange.ProposePolarization(polar);
|
fParticleChange.ProposePolarization(polar);
|
||||||
|
|
||||||
|
|
||||||
// fParticleChange.DumpInfo();
|
// fParticleChange.DumpInfo();
|
||||||
|
/*! * - Return the particle change object. */
|
||||||
return &fParticleChange;
|
return &fParticleChange;
|
||||||
|
|
||||||
|
|
||||||
@ -72,7 +100,9 @@ G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* The muonium will be stopped as soon as it enters a material different as the carbon foil and vacuum.
|
||||||
|
*/
|
||||||
G4bool LEMuSRMUONIUMScatt::CheckCondition( const G4Step& aStep)
|
G4bool LEMuSRMUONIUMScatt::CheckCondition( const G4Step& aStep)
|
||||||
{
|
{
|
||||||
G4bool condition=false;
|
G4bool condition=false;
|
||||||
@ -99,27 +129,11 @@ G4double LEMuSRMUONIUMScatt:: GetMeanFreePath(const G4Track& ,
|
|||||||
}
|
}
|
||||||
|
|
||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
|
/*!
|
||||||
|
* Not used.
|
||||||
|
*/
|
||||||
void LEMuSRMUONIUMScatt::GetDatas( const G4Step* aStep)
|
void LEMuSRMUONIUMScatt::GetDatas( const G4Step* aStep)
|
||||||
{
|
{;}
|
||||||
|
|
||||||
// Particle generation according to yields
|
|
||||||
particleTable=G4ParticleTable::GetParticleTable();
|
|
||||||
particle = particleTable->FindParticle("Mu");
|
|
||||||
|
|
||||||
// Set the new dynamic particle
|
|
||||||
DP = new G4DynamicParticle(particle,
|
|
||||||
aStep->GetTrack()->GetDynamicParticle()
|
|
||||||
->GetMomentumDirection(),0.0/*the kinectic energy set to zero*/
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
DP->SetProperTime(aStep->GetTrack()->GetDynamicParticle()->GetPreAssignedDecayProperTime());
|
|
||||||
DP->SetPolarization(aStep->GetTrack()->GetDynamicParticle()->GetPolarization().x(),aStep->GetTrack()->GetDynamicParticle()->GetPolarization().y(),aStep->GetTrack()->GetDynamicParticle()->GetPolarization().z());
|
|
||||||
DP->SetPreAssignedDecayProperTime(aStep->GetTrack()->GetDynamicParticle()->GetPreAssignedDecayProperTime());
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
|
|
||||||
@ -132,7 +146,9 @@ void LEMuSRMUONIUMScatt::PrepareSecondary(const G4Track& track)
|
|||||||
|
|
||||||
;}
|
;}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* If a magnetic field is present in the volume the muonium is going through the spin precession is performed.
|
||||||
|
*/
|
||||||
G4ThreeVector LEMuSRMUONIUMScatt::RotateSpinIfMag( const G4Track& theTrack, const G4Step& aStep)
|
G4ThreeVector LEMuSRMUONIUMScatt::RotateSpinIfMag( const G4Track& theTrack, const G4Step& aStep)
|
||||||
{
|
{
|
||||||
G4ThreeVector theSpin = theTrack.GetPolarization() ;
|
G4ThreeVector theSpin = theTrack.GetPolarization() ;
|
||||||
@ -145,7 +161,7 @@ G4ThreeVector LEMuSRMUONIUMScatt::RotateSpinIfMag( const G4Track& theTrack, cons
|
|||||||
|
|
||||||
|
|
||||||
// if(!fMgr->DoesFieldChangeEnergy())//then we have a magnetic field
|
// if(!fMgr->DoesFieldChangeEnergy())//then we have a magnetic field
|
||||||
if(fMgr->FieldHasMagComponent())//then we have a magnetic field
|
if(fMgr->FieldHasMagComponent()==true)//then we have a magnetic field
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef G4SRVERBOSE
|
#ifdef G4SRVERBOSE
|
||||||
@ -153,15 +169,22 @@ G4ThreeVector LEMuSRMUONIUMScatt::RotateSpinIfMag( const G4Track& theTrack, cons
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// tao :: Get Field
|
// tao :: Get Field
|
||||||
point[0]=theTrack.GetPosition().x();
|
point[0]=theTrack.GetPosition().x()/mm;
|
||||||
point[1]=theTrack.GetPosition().y();
|
point[1]=theTrack.GetPosition().y()/mm;
|
||||||
point[2]=theTrack.GetPosition().z();
|
point[2]=theTrack.GetPosition().z()/mm;
|
||||||
|
|
||||||
|
|
||||||
const G4Field* mfield;
|
const G4Field* mfield;
|
||||||
mfield = fMgr->GetDetectorField();
|
mfield = fMgr->GetDetectorField();
|
||||||
|
|
||||||
mfield->GetFieldValue(point,B);
|
mfield->GetFieldValue(point,B);
|
||||||
|
|
||||||
|
#ifdef G4SRVERBOSE
|
||||||
|
G4cout <<"IN FLIGHT::: POSITION ="<< point[0]/mm <<" mm, " << point[1]/mm <<" mm, " << point[2]/mm<<" mm" <<G4endl;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef G4SRVERBOSE
|
#ifdef G4SRVERBOSE
|
||||||
G4cout <<"IN FLIGHT::: MAGNETIC FIELD B="<< B[0]/gauss <<" G, " << B[1]/gauss <<" G, " << B[2]/gauss<<" G" <<G4endl;
|
G4cout <<"IN FLIGHT::: MAGNETIC FIELD B="<< B[0]/gauss <<" G, " << B[1]/gauss <<" G, " << B[2]/gauss<<" G" <<G4endl;
|
||||||
@ -174,9 +197,12 @@ G4ThreeVector LEMuSRMUONIUMScatt::RotateSpinIfMag( const G4Track& theTrack, cons
|
|||||||
|
|
||||||
|
|
||||||
G4ThreeVector magField(B[0],B[1],B[2]);
|
G4ThreeVector magField(B[0],B[1],B[2]);
|
||||||
theSpin= RotateSpin(aStep,magField,deltatime);
|
|
||||||
|
if(sqr(B[0]) + sqr(B[1]) +sqr(B[2]) !=0)
|
||||||
|
{
|
||||||
|
theSpin= RotateSpin(aStep,magField,deltatime);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef G4SRVERBOSE
|
#ifdef G4SRVERBOSE
|
||||||
G4cout<<"IN FLIGHT::: spin rotated";
|
G4cout<<"IN FLIGHT::: spin rotated";
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
// GEANT4 tag $Name$
|
// GEANT4 tag $Name: $
|
||||||
//
|
//
|
||||||
// This is the standard right-hand side for equation of motion.
|
// This is the standard right-hand side for equation of motion.
|
||||||
// This version of the right-hand side includes the three components
|
// This version of the right-hand side includes the three components
|
||||||
@ -37,10 +37,18 @@
|
|||||||
#include "LEMuSRMag_SpinEqRhs.hh"
|
#include "LEMuSRMag_SpinEqRhs.hh"
|
||||||
#include "G4MagneticField.hh"
|
#include "G4MagneticField.hh"
|
||||||
#include "G4ThreeVector.hh"
|
#include "G4ThreeVector.hh"
|
||||||
|
#include "G4ParticleDefinition.hh" // Include from 'tracking'
|
||||||
|
#include "G4Track.hh"
|
||||||
|
#include "G4ios.hh"
|
||||||
|
#include "G4UnitsTable.hh"
|
||||||
|
#include "globals.hh"
|
||||||
|
|
||||||
|
|
||||||
LEMuSRMag_SpinEqRhs::LEMuSRMag_SpinEqRhs( G4MagneticField* MagField )
|
LEMuSRMag_SpinEqRhs::LEMuSRMag_SpinEqRhs( G4MagneticField* MagField )
|
||||||
: G4Mag_EqRhs( MagField ) {}
|
: G4Mag_EqRhs( MagField )
|
||||||
|
{
|
||||||
|
anomaly = 1.165923e-3;
|
||||||
|
}
|
||||||
|
|
||||||
LEMuSRMag_SpinEqRhs::~LEMuSRMag_SpinEqRhs() {}
|
LEMuSRMag_SpinEqRhs::~LEMuSRMag_SpinEqRhs() {}
|
||||||
|
|
||||||
@ -52,13 +60,29 @@ LEMuSRMag_SpinEqRhs::SetChargeMomentumMass(G4double particleCharge, // in e+ uni
|
|||||||
// To set fCof_val
|
// To set fCof_val
|
||||||
G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, mass);
|
G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, mass);
|
||||||
|
|
||||||
omegac = 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
theTrackingAction= LEMuSRTrackingAction::GetInstance();
|
||||||
|
|
||||||
|
G4double gratio=theTrackingAction->GyroMagRatio;
|
||||||
|
//G4cout <<"g ratio [MHz]/[T]"<<gratio<<G4endl;
|
||||||
|
|
||||||
|
omegac =gratio;// 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
||||||
|
|
||||||
|
oldomegac = 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
||||||
|
|
||||||
anomaly = 1.165923e-3;
|
anomaly = 1.165923e-3;
|
||||||
ParticleCharge = particleCharge;
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
oldomegac= 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
||||||
|
//G4cout<< "Old FrequencyG: " << G4BestUnit(oldomegac*gauss/(2*M_PI*rad)*cm,"Frequency") <<G4endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//G4cout<< "FrequencyG: " << G4BestUnit(gratio*gauss,"Frequency") <<G4endl;
|
||||||
|
ParticleCharge = particleCharge;
|
||||||
|
|
||||||
E = sqrt(sqr(MomentumXc)+sqr(mass));
|
E = sqrt(sqr(MomentumXc)+sqr(mass));
|
||||||
beta = MomentumXc/E;
|
beta = MomentumXc/E;
|
||||||
gamma = E/mass;
|
gamma = E/mass;
|
||||||
|
m_mass=mass;
|
||||||
|
|
||||||
// G4cout<<"LEMuSRMAg_SpinEqRhs :: mass" << mass/g << " \n";
|
// G4cout<<"LEMuSRMAg_SpinEqRhs :: mass" << mass/g << " \n";
|
||||||
|
|
||||||
@ -70,9 +94,9 @@ LEMuSRMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
|||||||
G4double dydx[] ) const
|
G4double dydx[] ) const
|
||||||
{
|
{
|
||||||
G4double momentum_mag_square = sqr(y[3]) + sqr(y[4]) + sqr(y[5]);
|
G4double momentum_mag_square = sqr(y[3]) + sqr(y[4]) + sqr(y[5]);
|
||||||
// G4cout << "\n------------ LEMuSRMAg_SpinEqRhs :: mommagnitude : "<< sqrt(momentum_mag_square) <<"\n";
|
G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
|
||||||
G4double inv_momentum_magnitude = 1.0 / sqrt( momentum_mag_square );
|
|
||||||
G4double cof = FCof()*inv_momentum_magnitude;
|
G4double cof = FCof()*inv_momentum_magnitude;
|
||||||
|
// G4cout << "\n------------ LEMuSRMAg_SpinEqRhs :: mommagnitude : "<< sqrt(momentum_mag_square) <<"\n";
|
||||||
|
|
||||||
dydx[0] = y[3] * inv_momentum_magnitude; // (d/ds)x = Vx/V
|
dydx[0] = y[3] * inv_momentum_magnitude; // (d/ds)x = Vx/V
|
||||||
dydx[1] = y[4] * inv_momentum_magnitude; // (d/ds)y = Vy/V
|
dydx[1] = y[4] * inv_momentum_magnitude; // (d/ds)y = Vy/V
|
||||||
@ -82,15 +106,17 @@ LEMuSRMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
|||||||
dydx[5] = cof*(y[3]*B[1] - y[4]*B[0]) ; // Az = a*(Vx*By - Vy*Bx)
|
dydx[5] = cof*(y[3]*B[1] - y[4]*B[0]) ; // Az = a*(Vx*By - Vy*Bx)
|
||||||
|
|
||||||
|
|
||||||
G4ThreeVector pos(y[0], y[1], y[2]);
|
G4ThreeVector pos(y[0], y[1], y[2]);
|
||||||
|
|
||||||
G4ThreeVector u(y[3], y[4], y[5]);
|
G4ThreeVector u(y[3], y[4], y[5]);
|
||||||
u *= inv_momentum_magnitude;
|
u *= inv_momentum_magnitude;
|
||||||
|
|
||||||
G4ThreeVector BField(B[0],B[1],B[2]);
|
G4ThreeVector BField(B[0],B[1],B[2]);
|
||||||
|
|
||||||
G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
|
G4double velocity=(sqrt(momentum_mag_square)/m_mass)*c_light;
|
||||||
G4double ucb = (anomaly+1./gamma)/beta;
|
|
||||||
|
// G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u);
|
||||||
|
// G4double ucb = (anomaly+1./gamma)/beta;
|
||||||
|
|
||||||
// Initialise the values of dydx that we do not update.
|
// Initialise the values of dydx that we do not update.
|
||||||
dydx[6] = dydx[7] = dydx[8] = 0.0;
|
dydx[6] = dydx[7] = dydx[8] = 0.0;
|
||||||
@ -98,7 +124,9 @@ LEMuSRMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
|||||||
G4ThreeVector Spin(y[9],y[10],y[11]);
|
G4ThreeVector Spin(y[9],y[10],y[11]);
|
||||||
G4ThreeVector dSpin;
|
G4ThreeVector dSpin;
|
||||||
|
|
||||||
dSpin = 0;//ParticleCharge*omegac*(ucb*(Spin.cross(BField))-udb*(Spin.cross(u)));
|
dSpin =Spin.cross(BField)*omegac*1/velocity;
|
||||||
|
|
||||||
|
//G4cout<<"New dSpin" << dSpin<<G4endl;
|
||||||
|
|
||||||
|
|
||||||
dydx[ 9] = dSpin.x();
|
dydx[ 9] = dSpin.x();
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRMagneticField.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-09-17 10:20
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// Magnetic Field
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRMagneticField.hh"
|
#include "LEMuSRMagneticField.hh"
|
||||||
#include "G4ios.hh"
|
#include "G4ios.hh"
|
||||||
#include <iomanip.h>
|
#include <iomanip.h>
|
||||||
@ -7,7 +29,8 @@ LEMuSRMagneticField::LEMuSRMagneticField(const G4ThreeVector FieldVector)
|
|||||||
:G4UniformMagField(FieldVector )
|
:G4UniformMagField(FieldVector )
|
||||||
{
|
{
|
||||||
BField=FieldVector;
|
BField=FieldVector;
|
||||||
|
// G4cout<<"MAGNETIC FIELD DEFINED AS "<<BField.x()/gauss<<"gauss"<<BField.y()/gauss<< "gauss"<<BField.z()/gauss<< "gauss"<<G4endl;
|
||||||
|
// getchar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +50,8 @@ void LEMuSRMagneticField::GetFieldValue (const G4double pos[4],
|
|||||||
|
|
||||||
G4double X,Y,Z,factor;
|
G4double X,Y,Z,factor;
|
||||||
|
|
||||||
X= pos[0];Y=pos[1];Z=pos[2]*mm;
|
X= pos[0]*mm;Y=pos[1]*mm;Z=pos[2]*mm;
|
||||||
|
|
||||||
// G4cout<<"\n"<<pos[0]<<" "<<pos[1]<<" "<<pos[2]<<G4endl;
|
// G4cout<<"\n"<<pos[0]<<" "<<pos[1]<<" "<<pos[2]<<G4endl;
|
||||||
if(Z<20*cm&&Z>-20*cm)
|
if(Z<20*cm&&Z>-20*cm)
|
||||||
{ //G4cout<<"true!";
|
{ //G4cout<<"true!";
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRDetectorConstruction.cc , v 1.0
|
// ID : LEMuSRDetectorConstruction.cc , v 1.0
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-06-24 16:33
|
// DATE : 2004-06-24 16:33
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -17,8 +17,8 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// DETECTOR CONSTRUCTION
|
// DETECTOR CONSTRUCTION: MATERIALS
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
// G4 GEOMETRIC FORMS CLASSES
|
// G4 GEOMETRIC FORMS CLASSES
|
||||||
@ -77,23 +77,23 @@
|
|||||||
#include "G4ElectroMagneticField.hh"
|
#include "G4ElectroMagneticField.hh"
|
||||||
#include "G4EqMagElectricField.hh"
|
#include "G4EqMagElectricField.hh"
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE COLOR AND USER LIMIT ATTRIBUTES
|
// DEFINE COLOR AND USER LIMIT ATTRIBUTES
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction :: LoadAttributes()
|
void LEMuSRDetectorConstruction :: LoadAttributes()
|
||||||
{
|
{
|
||||||
|
|
||||||
// visual attributes
|
// visual attributes
|
||||||
|
G4VisAttributes InBlack = new G4VisAttributes(G4Colour(0.,0.,0.));// for special projection plot.
|
||||||
Blue_style = new G4VisAttributes(G4Colour(0.80,0.83,1.));
|
Blue_style = new G4VisAttributes(G4Colour(0.80,0.83,1.));// InBlack
|
||||||
Blue_style->SetForceSolid(true);
|
Blue_style->SetForceSolid(true);
|
||||||
//Blue_style->SetForceWireframe(false);
|
//Blue_style->SetForceWireframe(false);
|
||||||
fBlue_style = new G4VisAttributes(G4Colour(0.85,.88,0.92));
|
fBlue_style = new G4VisAttributes(G4Colour(0.85,.88,0.92));//InBlack
|
||||||
fBlue_style->SetForceSolid(true);
|
fBlue_style->SetForceSolid(true);
|
||||||
|
|
||||||
|
|
||||||
@ -156,9 +156,9 @@ void LEMuSRDetectorConstruction :: LoadAttributes()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// MATERIALS DEFINITION
|
// MATERIALS DEFINITION
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction :: MaterialsDefinition ()
|
void LEMuSRDetectorConstruction :: MaterialsDefinition ()
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRMcpHit.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-09-17 10:20
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// MCP HITS
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRMcpHit.hh"
|
#include "LEMuSRMcpHit.hh"
|
||||||
#include "G4VVisManager.hh"
|
#include "G4VVisManager.hh"
|
||||||
#include "G4Circle.hh"
|
#include "G4Circle.hh"
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSRMcpSD.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-09-17 10:20
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// MCP SD
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRMcpSD.hh"
|
#include "LEMuSRMcpSD.hh"
|
||||||
#include "LEMuSRDetectorConstruction.hh"
|
#include "LEMuSRDetectorConstruction.hh"
|
||||||
#include "G4HCofThisEvent.hh"
|
#include "G4HCofThisEvent.hh"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
// ID : LEMuSRMuonDecayChannel.cc , v 1.2
|
// ID : LEMuSRMuonDecayChannel.cc , v 1.2
|
||||||
// AUTHOR: Taofiq PARAISO based on G4MuonDecayChannel $Id$
|
// AUTHOR: Taofiq PARAISO based on G4MuonDecayChannel $Id$
|
||||||
@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
// add muonium decay, PARAISO 07/04/2005
|
// add muonium decay, PARAISO 07/04/2005
|
||||||
//
|
//
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -20,7 +20,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// MUON DECAY CHANNEL.CC
|
// MUON DECAY CHANNEL.CC
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§////
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID : LEMuSRMuonPhysics.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2006-01-19 16:15
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// MuonPhysics
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
|
|
||||||
#include "LEMuSRMuonPhysics.hh"
|
#include "LEMuSRMuonPhysics.hh"
|
||||||
|
|
||||||
#include "globals.hh"
|
#include "globals.hh"
|
||||||
@ -36,25 +58,33 @@ LEMuSRMuonPhysics::~LEMuSRMuonPhysics()
|
|||||||
|
|
||||||
void LEMuSRMuonPhysics::ConstructParticle()
|
void LEMuSRMuonPhysics::ConstructParticle()
|
||||||
{
|
{
|
||||||
// Mu
|
//! Muon
|
||||||
G4MuonPlus::MuonPlusDefinition();
|
G4MuonPlus::MuonPlusDefinition();
|
||||||
G4Muonium::MuoniumDefinition();
|
G4Muonium::MuoniumDefinition();
|
||||||
G4MuonMinus::MuonMinusDefinition();
|
G4MuonMinus::MuonMinusDefinition();
|
||||||
G4NeutrinoMu::NeutrinoMuDefinition();
|
G4NeutrinoMu::NeutrinoMuDefinition();
|
||||||
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
|
||||||
|
|
||||||
// Tau
|
//! Tau
|
||||||
G4TauMinus::TauMinusDefinition();
|
G4TauMinus::TauMinusDefinition();
|
||||||
G4TauPlus::TauPlusDefinition();
|
G4TauPlus::TauPlusDefinition();
|
||||||
G4NeutrinoTau::NeutrinoTauDefinition();
|
G4NeutrinoTau::NeutrinoTauDefinition();
|
||||||
G4AntiNeutrinoTau::AntiNeutrinoTauDefinition();
|
G4AntiNeutrinoTau::AntiNeutrinoTauDefinition();
|
||||||
|
|
||||||
|
|
||||||
|
//! The decay process
|
||||||
|
/*!
|
||||||
|
* Although the asymmetric decay process is a feature of new Geant4 versions,
|
||||||
|
* it is recommended to use the original \lemu implementation.
|
||||||
|
*/
|
||||||
#ifdef ASYM_USE_LEMU
|
#ifdef ASYM_USE_LEMU
|
||||||
G4DecayTable* MuonPlusDecayTable = new G4DecayTable();
|
G4DecayTable* MuonPlusDecayTable = new G4DecayTable();
|
||||||
MuonPlusDecayTable -> Insert(new LEMuSRMuonDecayChannel("mu+",1.00));
|
MuonPlusDecayTable -> Insert(new LEMuSRMuonDecayChannel("mu+",1.00));
|
||||||
G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable);
|
G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Half of the muonium have a completely isotropic decay.
|
||||||
|
*/
|
||||||
G4DecayTable* MuoniumDecayTable = new G4DecayTable();
|
G4DecayTable* MuoniumDecayTable = new G4DecayTable();
|
||||||
MuoniumDecayTable -> Insert(new LEMuSRMuonDecayChannel("Mu",0.5));
|
MuoniumDecayTable -> Insert(new LEMuSRMuonDecayChannel("Mu",0.5));
|
||||||
MuoniumDecayTable -> Insert(new G4MuonDecayChannel("Mu",0.5));
|
MuoniumDecayTable -> Insert(new G4MuonDecayChannel("Mu",0.5));
|
||||||
@ -92,7 +122,8 @@ void LEMuSRMuonPhysics::ConstructProcess()
|
|||||||
// Muon Plus Physics
|
// Muon Plus Physics
|
||||||
pManager = G4MuonPlus::MuonPlus()->GetProcessManager();
|
pManager = G4MuonPlus::MuonPlus()->GetProcessManager();
|
||||||
|
|
||||||
pManager->AddProcess(&fMuAtRestSpinRotation, 1, -1, -1); //(&fprocess, atrest, prestep, poststep)
|
//! Syntax: pManager->AddProcess(&fprocess, atrest, prestep, poststep). -1 means that the process is not executed under correspondant condition.
|
||||||
|
pManager->AddProcess(&fMuAtRestSpinRotation, 1, -1, -1);
|
||||||
pManager->AddProcess(&fMuFormation,-1, -1, 1);
|
pManager->AddProcess(&fMuFormation,-1, -1, 1);
|
||||||
pManager->AddProcess(&fMuPlusMultipleScattering,-1, 1, -1);// may crash when enabled as post step process
|
pManager->AddProcess(&fMuPlusMultipleScattering,-1, 1, -1);// may crash when enabled as post step process
|
||||||
pManager->AddProcess(&fMuPlusIonisation, -1, 2, 2);
|
pManager->AddProcess(&fMuPlusIonisation, -1, 2, 2);
|
||||||
@ -103,13 +134,13 @@ void LEMuSRMuonPhysics::ConstructProcess()
|
|||||||
// pManager ->SetProcessOrderingToLast(&fDepolarization, idxAtRest);
|
// pManager ->SetProcessOrderingToLast(&fDepolarization, idxAtRest);
|
||||||
// pManager ->SetProcessOrdering(&fDepolarization, idxPostStep);
|
// pManager ->SetProcessOrdering(&fDepolarization, idxPostStep);
|
||||||
|
|
||||||
// the last process: decay
|
//! the last process: decay
|
||||||
pManager->AddProcess(&fDecayProcess);
|
pManager->AddProcess(&fDecayProcess);
|
||||||
pManager ->SetProcessOrderingToLast(&fDecayProcess, idxAtRest);
|
pManager ->SetProcessOrderingToLast(&fDecayProcess, idxAtRest);
|
||||||
pManager ->SetProcessOrdering(&fDecayProcess, idxPostStep);
|
pManager ->SetProcessOrdering(&fDecayProcess, idxPostStep);
|
||||||
|
|
||||||
|
|
||||||
// Muonium Physics is the same as muon plus physics
|
//! Muonium Physics is the same as muon plus physics
|
||||||
pManager = G4Muonium::Muonium()->GetProcessManager();
|
pManager = G4Muonium::Muonium()->GetProcessManager();
|
||||||
|
|
||||||
pManager->AddProcess(&fMuAtRestSpinRotation, 1, -1, -1);
|
pManager->AddProcess(&fMuAtRestSpinRotation, 1, -1, -1);
|
||||||
@ -125,7 +156,7 @@ void LEMuSRMuonPhysics::ConstructProcess()
|
|||||||
pManager->SetProcessOrderingToLast(&fDecayProcess, idxAtRest);
|
pManager->SetProcessOrderingToLast(&fDecayProcess, idxAtRest);
|
||||||
pManager->SetProcessOrdering(&fDecayProcess, idxPostStep);
|
pManager->SetProcessOrdering(&fDecayProcess, idxPostStep);
|
||||||
|
|
||||||
// Muon Minus Physics
|
//! Muon Minus Physics
|
||||||
pManager = G4MuonMinus::MuonMinus()->GetProcessManager();
|
pManager = G4MuonMinus::MuonMinus()->GetProcessManager();
|
||||||
|
|
||||||
pManager->AddProcess(&fMuMinusMultipleScattering,-1, 1, 1);
|
pManager->AddProcess(&fMuMinusMultipleScattering,-1, 1, 1);
|
||||||
@ -138,13 +169,13 @@ void LEMuSRMuonPhysics::ConstructProcess()
|
|||||||
pManager->SetProcessOrderingToLast(&fDecayProcess, idxAtRest);
|
pManager->SetProcessOrderingToLast(&fDecayProcess, idxAtRest);
|
||||||
pManager->SetProcessOrdering(&fDecayProcess, idxPostStep);
|
pManager->SetProcessOrdering(&fDecayProcess, idxPostStep);
|
||||||
|
|
||||||
// Tau Plus Physics
|
//! Tau Plus Physics
|
||||||
pManager = G4TauPlus::TauPlus()->GetProcessManager();
|
pManager = G4TauPlus::TauPlus()->GetProcessManager();
|
||||||
|
|
||||||
pManager->AddProcess(&fTauPlusMultipleScattering, -1, 1, 1);
|
pManager->AddProcess(&fTauPlusMultipleScattering, -1, 1, 1);
|
||||||
pManager->AddProcess(&fTauPlusIonisation, -1, 2, 2);
|
pManager->AddProcess(&fTauPlusIonisation, -1, 2, 2);
|
||||||
|
|
||||||
// Tau Minus Physics
|
//! Tau Minus Physics
|
||||||
pManager = G4TauMinus::TauMinus()->GetProcessManager();
|
pManager = G4TauMinus::TauMinus()->GetProcessManager();
|
||||||
|
|
||||||
pManager->AddProcess(&fTauMinusMultipleScattering, -1, 1, 1);
|
pManager->AddProcess(&fTauMinusMultipleScattering, -1, 1, 1);
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSROScintHit.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-09-17 10:20
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// Outer SCINT HITS
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSROScintHit.hh"
|
#include "LEMuSROScintHit.hh"
|
||||||
#include "G4VVisManager.hh"
|
#include "G4VVisManager.hh"
|
||||||
#include "G4Circle.hh"
|
#include "G4Circle.hh"
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID :LEMuSROScintSD.cc , v 1.3
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-09-17 10:20
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// Outer SCINT SD
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSROScintSD.hh"
|
#include "LEMuSROScintSD.hh"
|
||||||
#include "G4HCofThisEvent.hh"
|
#include "G4HCofThisEvent.hh"
|
||||||
#include "G4TouchableHistory.hh"
|
#include "G4TouchableHistory.hh"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRParticleChangeForSR.cc , v 1.2b
|
// ID : LEMuSRParticleChangeForSR.cc , v 1.2b
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-08-20 10:36
|
// DATE : 2004-08-20 10:36
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// PARTICLE CHANGE FOR SPIN ROTATION
|
// PARTICLE CHANGE FOR SPIN ROTATION
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRParticleChangeForSR.hh"
|
#include "LEMuSRParticleChangeForSR.hh"
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRParticleGun.cc , v 1.2
|
// ID : LEMuSRParticleGun.cc , v 1.2
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-08-20 10:48
|
// DATE : 2004-08-20 10:48
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// PARTICLE GUN
|
// PARTICLE GUN
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRParticleGun.hh"
|
#include "LEMuSRParticleGun.hh"
|
||||||
#include "Randomize.hh"
|
#include "Randomize.hh"
|
||||||
@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
#include "G4ProcessVector.hh"
|
#include "G4ProcessVector.hh"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LEMuSRParticleGun::LEMuSRParticleGun()
|
LEMuSRParticleGun::LEMuSRParticleGun()
|
||||||
{
|
{
|
||||||
SetInitialValues();
|
SetInitialValues();
|
||||||
@ -60,12 +62,20 @@ void LEMuSRParticleGun::GeneratePrimaryVertex(G4Event* evt)
|
|||||||
{
|
{
|
||||||
if(particle_definition==0) return;
|
if(particle_definition==0) return;
|
||||||
|
|
||||||
// create a new vertex
|
//! \b 1. Creates a new vertex.
|
||||||
|
/*!
|
||||||
|
* The initial vertex of the particle is defined with a position-time
|
||||||
|
* and receives the information of the particle to simulate.
|
||||||
|
*/
|
||||||
G4PrimaryVertex* vertex =
|
G4PrimaryVertex* vertex =
|
||||||
new G4PrimaryVertex(particle_position,particle_time);
|
new G4PrimaryVertex(particle_position,particle_time);
|
||||||
|
|
||||||
|
|
||||||
// create new primaries and set them to the vertex
|
//! \b 2. Creates new primary particle.
|
||||||
|
/*!
|
||||||
|
* The primary particle is used in the initial vertex to
|
||||||
|
* produce the dynamic particles which will actually be tracked.
|
||||||
|
*/
|
||||||
G4double mass = particle_definition->GetPDGMass();
|
G4double mass = particle_definition->GetPDGMass();
|
||||||
G4double energy = particle_energy + mass;
|
G4double energy = particle_energy + mass;
|
||||||
G4double pmom = sqrt(energy*energy-mass*mass);
|
G4double pmom = sqrt(energy*energy-mass*mass);
|
||||||
@ -78,18 +88,19 @@ void LEMuSRParticleGun::GeneratePrimaryVertex(G4Event* evt)
|
|||||||
G4PrimaryParticle* particle =
|
G4PrimaryParticle* particle =
|
||||||
new G4PrimaryParticle(particle_definition,px,py,pz);
|
new G4PrimaryParticle(particle_definition,px,py,pz);
|
||||||
particle->SetMass( mass );
|
particle->SetMass( mass );
|
||||||
// particle->SetCharge( particle_charge );
|
|
||||||
// G4cout<<"Charge (from gun) = " << particle->GetCharge() <<" \n" <<G4endl;
|
|
||||||
particle->SetPolarization(particle_polarization.x(),
|
particle->SetPolarization(particle_polarization.x(),
|
||||||
particle_polarization.y(),
|
particle_polarization.y(),
|
||||||
particle_polarization.z());
|
particle_polarization.z());
|
||||||
particle->SetProperTime(decaytime);
|
particle->SetProperTime(decaytime);
|
||||||
// G4cout<<"Muon decay time = " << decaytime/ns <<"ns. \n" <<G4endl;
|
// G4cout<<"Muon decay time = " << decaytime/ns <<"ns. \n" <<G4endl;
|
||||||
|
|
||||||
|
//! \b 3. Set the primary particle to the vertex.
|
||||||
vertex->SetPrimary( particle );
|
vertex->SetPrimary( particle );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! \b 4. Sets the vertex to the event.
|
||||||
evt->AddPrimaryVertex( vertex );
|
evt->AddPrimaryVertex( vertex );
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID : LEMuSRParticleGunMessenger.cc , v 1.2
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-08-20 10:48
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// PARTICLE GUN MESSENGER
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRParticleGunMessenger.hh"
|
#include "LEMuSRParticleGunMessenger.hh"
|
||||||
#include "LEMuSRParticleGun.hh"
|
#include "LEMuSRParticleGun.hh"
|
||||||
#include "G4Geantino.hh"
|
#include "G4Geantino.hh"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRPgaMessenger.cc , v 1.1
|
// ID : LEMuSRPgaMessenger.cc , v 1.1
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-06-30 09:12
|
// DATE : 2004-06-30 09:12
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// PRIMARY GENERATOR ACTION MEESENGER
|
// PRIMARY GENERATOR ACTION MEESENGER
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSRPgaMessenger.hh"
|
#include "LEMuSRPgaMessenger.hh"
|
||||||
@ -36,6 +36,12 @@
|
|||||||
#include "G4ios.hh"
|
#include "G4ios.hh"
|
||||||
#include "G4UnitsTable.hh"
|
#include "G4UnitsTable.hh"
|
||||||
#include "G4ParticleTable.hh"
|
#include "G4ParticleTable.hh"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* The commands are instanciated and a new pointer is created for each of them.
|
||||||
|
* A directory and name for the commands is also defined, as well as some guidance to the user about how to use the command.
|
||||||
|
* Finally if possible some default values are defined.
|
||||||
|
*/
|
||||||
LEMuSRPgaMessenger::LEMuSRPgaMessenger(LEMuSRPrimaryGeneratorAction *thePGA)
|
LEMuSRPgaMessenger::LEMuSRPgaMessenger(LEMuSRPrimaryGeneratorAction *thePGA)
|
||||||
:lemuPGA(thePGA)
|
:lemuPGA(thePGA)
|
||||||
{
|
{
|
||||||
@ -97,7 +103,7 @@ LEMuSRPgaMessenger::LEMuSRPgaMessenger(LEMuSRPrimaryGeneratorAction *thePGA)
|
|||||||
|
|
||||||
setMuonium = new G4UIcmdWithAString("/lemuGun/particle",this);
|
setMuonium = new G4UIcmdWithAString("/lemuGun/particle",this);
|
||||||
setMuonium->SetGuidance("Particles to be shot");
|
setMuonium->SetGuidance("Particles to be shot");
|
||||||
setMuonium->SetParameterName("Particle types: mu+/Mu",true);
|
setMuonium->SetParameterName("Particle types: mu+/Mu or other.",true);
|
||||||
setMuonium->SetDefaultValue("mu+");
|
setMuonium->SetDefaultValue("mu+");
|
||||||
|
|
||||||
|
|
||||||
@ -108,7 +114,9 @@ LEMuSRPgaMessenger::LEMuSRPgaMessenger(LEMuSRPrimaryGeneratorAction *thePGA)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Kills the implemented pointers.
|
||||||
|
*/
|
||||||
LEMuSRPgaMessenger::~LEMuSRPgaMessenger()
|
LEMuSRPgaMessenger::~LEMuSRPgaMessenger()
|
||||||
{
|
{
|
||||||
delete posCmd;
|
delete posCmd;
|
||||||
@ -126,6 +134,13 @@ LEMuSRPgaMessenger::~LEMuSRPgaMessenger()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* This method registers all the operation to take when a command is
|
||||||
|
* entered in the terminal. Typically, the command is read and according to its name, is identified to a command defined in the constructor.
|
||||||
|
* Then the user value is read by the GetNewValue type methods. It can be a string, a double, a vector etc.
|
||||||
|
*
|
||||||
|
* What to do with this new value(s) is then implemented.
|
||||||
|
*/
|
||||||
void LEMuSRPgaMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
|
void LEMuSRPgaMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRPhysicsList.cc , v 1.1
|
// ID : LEMuSRPhysicsList.cc , v 1.1
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-08-24 16:33
|
// DATE : 2004-08-24 16:33
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// PHYSICS LIST
|
// PHYSICS LIST
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSRPhysicsList.hh"
|
#include "LEMuSRPhysicsList.hh"
|
||||||
@ -43,31 +43,21 @@
|
|||||||
|
|
||||||
LEMuSRPhysicsList::LEMuSRPhysicsList(): G4VModularPhysicsList()
|
LEMuSRPhysicsList::LEMuSRPhysicsList(): G4VModularPhysicsList()
|
||||||
{
|
{
|
||||||
// default cut value (1.0mm)
|
SetCuts();
|
||||||
defaultCutValue = 10.0*cm;
|
|
||||||
// SetVerboseLevel(1);
|
|
||||||
// SetCuts();
|
|
||||||
SetCutsWithDefault();
|
|
||||||
|
|
||||||
SetCutValue(1*mm, "e+");
|
|
||||||
SetCutValue(1*mm, "proton");
|
|
||||||
|
|
||||||
// SetCutValue(0.001*mm, "mu+");
|
//! Register General Processes
|
||||||
// SetCutValue(0.001*mm, "Mu");
|
|
||||||
|
|
||||||
// General Physics
|
|
||||||
RegisterPhysics( new LEMuSRGeneralPhysics("general") );
|
RegisterPhysics( new LEMuSRGeneralPhysics("general") );
|
||||||
|
|
||||||
// EM Physics
|
//! Register Electro-Magnetic Prcesses
|
||||||
RegisterPhysics( new LEMuSREMPhysics("standard EM"));
|
RegisterPhysics( new LEMuSREMPhysics("standard EM"));
|
||||||
|
|
||||||
// Muon Physics
|
//! Register Muon Processes
|
||||||
RegisterPhysics( new LEMuSRMuonPhysics("muon"));
|
RegisterPhysics( new LEMuSRMuonPhysics("muon"));
|
||||||
|
|
||||||
// Hadron Physics
|
//! Register Hadron Processes
|
||||||
RegisterPhysics( new LEMuSRHadronPhysics("hadron"));
|
RegisterPhysics( new LEMuSRHadronPhysics("hadron"));
|
||||||
|
|
||||||
// Ion Physics
|
//! Register Ion Processes
|
||||||
RegisterPhysics( new LEMuSRIonPhysics("ion"));
|
RegisterPhysics( new LEMuSRIonPhysics("ion"));
|
||||||
|
|
||||||
|
|
||||||
@ -77,15 +67,25 @@ LEMuSRPhysicsList::~LEMuSRPhysicsList()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* " G4VUserPhysicsList::SetCutsWithDefault" method sets
|
||||||
|
* the default cut value for all particle types .
|
||||||
|
* The cut value is given in distance, and is then converted
|
||||||
|
* in energy according the particle's stopping range in different
|
||||||
|
* materials.
|
||||||
|
*/
|
||||||
void LEMuSRPhysicsList::SetCuts()
|
void LEMuSRPhysicsList::SetCuts()
|
||||||
{
|
{
|
||||||
// " G4VUserPhysicsList::SetCutsWithDefault" method sets
|
defaultCutValue = 1.0*cm;
|
||||||
// the default cut value for all particle types
|
SetCutsWithDefault();
|
||||||
SetCutsWithDefault();
|
|
||||||
|
|
||||||
SetCutValue(1.*mm, "e+");
|
SetCutValue(1.*mm, "e+");
|
||||||
SetCutValue(1.*mm, "e-");
|
SetCutValue(1.*mm, "e-");
|
||||||
|
SetCutValue(1*mm, "proton");
|
||||||
|
|
||||||
|
// SetCutValue(0.001*mm, "mu+");
|
||||||
|
// SetCutValue(0.001*mm, "Mu");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRPrimaryGeneratorAction.cc , v 1.3
|
// ID : LEMuSRPrimaryGeneratorAction.cc , v 1.3
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-09-16 09:12
|
// DATE : 2004-09-16 09:12
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// PRIMARY GENERATOR ACTION
|
// PRIMARY GENERATOR ACTION
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -48,7 +48,12 @@
|
|||||||
|
|
||||||
#include "G4Muonium.hh"
|
#include "G4Muonium.hh"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* In the constructor the PGA messenger is initialized
|
||||||
|
* the particle gun is created and the default
|
||||||
|
* values are given to the variables for the particle definition
|
||||||
|
* or the scanning parameters
|
||||||
|
*/
|
||||||
LEMuSRPrimaryGeneratorAction::LEMuSRPrimaryGeneratorAction()
|
LEMuSRPrimaryGeneratorAction::LEMuSRPrimaryGeneratorAction()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -104,6 +109,10 @@ LEMuSRPrimaryGeneratorAction::LEMuSRPrimaryGeneratorAction()
|
|||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* The particle gun and the messenger pointers are deleted inthe destructor.
|
||||||
|
*/
|
||||||
|
|
||||||
LEMuSRPrimaryGeneratorAction::~LEMuSRPrimaryGeneratorAction()
|
LEMuSRPrimaryGeneratorAction::~LEMuSRPrimaryGeneratorAction()
|
||||||
{
|
{
|
||||||
delete lemuParticleGun;
|
delete lemuParticleGun;
|
||||||
@ -125,6 +134,15 @@ LEMuSRPrimaryGeneratorAction::~LEMuSRPrimaryGeneratorAction()
|
|||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* This method defines all the parameters for the particle gun and
|
||||||
|
* calls the GeneratePrimaryVertex from the LEMuSRParticleGun class.
|
||||||
|
* An important submethod is the GetScanningMode. which is called to
|
||||||
|
* get different distribution of the initial gun position.
|
||||||
|
*
|
||||||
|
* The decay time is preliminary assigned for muons and muonium particles.
|
||||||
|
*/
|
||||||
|
|
||||||
void LEMuSRPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
void LEMuSRPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -163,13 +181,6 @@ void LEMuSRPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
|||||||
|
|
||||||
// std::cout<<"Particle "<< particle->GetParticleName();
|
// std::cout<<"Particle "<< particle->GetParticleName();
|
||||||
|
|
||||||
|
|
||||||
lemuParticleGun->SetParticleDefinition(particle);
|
|
||||||
|
|
||||||
lemuParticleGun->SetParticleEnergy(energy+ke_offset);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(particle->GetParticleSubType()=="mu")
|
if(particle->GetParticleSubType()=="mu")
|
||||||
{
|
{
|
||||||
// the random time of the decay for muons
|
// the random time of the decay for muons
|
||||||
@ -182,8 +193,14 @@ void LEMuSRPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GetScanningMode(scan);
|
lemuParticleGun->SetParticleDefinition(particle);
|
||||||
// G4cout<<"Zposition "<<Z/mm<<" [mm]"<<G4endl;
|
|
||||||
|
lemuParticleGun->SetParticleEnergy(energy+ke_offset);
|
||||||
|
|
||||||
|
|
||||||
|
GetScanningMode(scan);
|
||||||
|
|
||||||
|
// G4cout<<"Zposition "<<Z/mm<<" [mm]"<<G4endl;
|
||||||
//-------------------MOMENTUM DIRECTION AND POLARIZATION>>>>>>>>>>>>>>>>>>>
|
//-------------------MOMENTUM DIRECTION AND POLARIZATION>>>>>>>>>>>>>>>>>>>
|
||||||
|
|
||||||
lemuParticleGun->SetParticleMomentumDirection(G4ThreeVector(momX,momY,momZ));
|
lemuParticleGun->SetParticleMomentumDirection(G4ThreeVector(momX,momY,momZ));
|
||||||
@ -205,7 +222,20 @@ void LEMuSRPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* The different scanning modes are distributions of the initial position of the gun.
|
||||||
|
* Few of them were implemented and one can modify them as he likes.
|
||||||
|
* The user can switch the scanning mode before each run via the user interface
|
||||||
|
* terminal thanks to the commands implemented in LEMuSRPGAMessenger.
|
||||||
|
*
|
||||||
|
* So far, one can choose between the following distributions:
|
||||||
|
* - Single position of the gun
|
||||||
|
* - Square sweeping: the gun position will be uniformely distributed in a square. The dimensions and steps along x and y directions are defined by the user.
|
||||||
|
* - Circular scan: the radius is scaned linearly and for all radius a circle is described according to the specified steps number. This distribution <I> is not</I> homogeneous.
|
||||||
|
* - Gaussian scan: x and y are randomly determined according to a gaussian distribution. The mean value and the standard deviation are user parameters.
|
||||||
|
*.
|
||||||
|
* The following picture shows different beam profiles generated by modifying the parameters of the gaussian circular scan. The maximal radius is limited to 2.5cm around the mean value.
|
||||||
|
*/
|
||||||
void LEMuSRPrimaryGeneratorAction::GetScanningMode(G4int scan)
|
void LEMuSRPrimaryGeneratorAction::GetScanningMode(G4int scan)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -285,7 +315,7 @@ void LEMuSRPrimaryGeneratorAction::GetScanningMode(G4int scan)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//----------------------CIRCULAR SCAN Gauss >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
//---------------------- GAUSSIAN SCAN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||||
|
|
||||||
|
|
||||||
if(scan==3)
|
if(scan==3)
|
||||||
@ -299,7 +329,7 @@ void LEMuSRPrimaryGeneratorAction::GetScanningMode(G4int scan)
|
|||||||
X = iRndGauss->shoot(sc_mean, sc_stddev)*cm;
|
X = iRndGauss->shoot(sc_mean, sc_stddev)*cm;
|
||||||
Y = iRndGauss->shoot(sc_mean, sc_stddev)*cm;
|
Y = iRndGauss->shoot(sc_mean, sc_stddev)*cm;
|
||||||
|
|
||||||
radius= sqrt(X*X+Y*Y);
|
radius= sqrt((X-sc_mean)*(X-sc_mean)+(Y-sc_mean)*(Y-sc_mean));
|
||||||
}while(radius>2.5*cm);
|
}while(radius>2.5*cm);
|
||||||
// SET POSITION
|
// SET POSITION
|
||||||
lemuParticleGun->SetParticlePosition(G4ThreeVector(X,Y,-114*cm));
|
lemuParticleGun->SetParticlePosition(G4ThreeVector(X,Y,-114*cm));
|
||||||
@ -324,31 +354,3 @@ LEMuSRPrimaryGeneratorAction* LEMuSRPrimaryGeneratorAction::GetPGA()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
G4double k=G4UniformRand();
|
|
||||||
if(k>0.5)
|
|
||||||
{
|
|
||||||
G4double gamma;
|
|
||||||
gamma = 0.5*((1.*eplus)/(0.1056584*GeV/(c_light*c_light))+(1.*eplus)/(0.51099906*MeV/(c_light*c_light)));
|
|
||||||
G4cout<< "PGA "<< k<< " " <<gamma<<"\n"
|
|
||||||
<< "FrequencyG: " << gamma/(2*M_PI*rad)<<"Hz/T" <<"\n";
|
|
||||||
particle->SetGammaFactor(gamma);
|
|
||||||
}
|
|
||||||
else if(k<0.5)
|
|
||||||
{
|
|
||||||
G4double gamma;
|
|
||||||
gamma = 0.5*((1.*eplus)/(0.1056584*GeV/(c_light*c_light))-(1.*eplus)/(0.51099906*MeV/(c_light*c_light)));
|
|
||||||
G4cout<< "PGA "<< k<< " " <<gamma<<"\n"
|
|
||||||
<< "FrequencyG: " << gamma/(2*M_PI*rad)<<"Hertz/T" <<"\n";
|
|
||||||
particle->SetGammaFactor(gamma);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
|
//
|
||||||
|
// ID : LEMuSRRNDMAGField.cc , v 1.2
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-08-20 10:48
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// RND MAG FIELD
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRRNDMAGField.hh"
|
#include "LEMuSRRNDMAGField.hh"
|
||||||
#include "G4ios.hh"
|
#include "G4ios.hh"
|
||||||
#include <iomanip.h>
|
#include <iomanip.h>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
// ID : LEMuSRRunAction.cc , v 1.0
|
// ID : LEMuSRRunAction.cc , v 1.0
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-07-12 16:15
|
// DATE : 2004-07-12 16:15
|
||||||
//
|
//
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// RUN ACTION.CC
|
// RUN ACTION.CC
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRRunAction.hh"
|
#include "LEMuSRRunAction.hh"
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ LEMuSRRunAction::~LEMuSRRunAction()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
|
/*! Initializes the user interface manager.*/
|
||||||
void LEMuSRRunAction::BeginOfRunAction(const G4Run* aRun)
|
void LEMuSRRunAction::BeginOfRunAction(const G4Run* aRun)
|
||||||
{
|
{
|
||||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||||
@ -68,7 +68,7 @@ void LEMuSRRunAction::BeginOfRunAction(const G4Run* aRun)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||||
|
/*! Updates the user interface manager.*/
|
||||||
void LEMuSRRunAction::EndOfRunAction(const G4Run*)
|
void LEMuSRRunAction::EndOfRunAction(const G4Run*)
|
||||||
{
|
{
|
||||||
if (G4VVisManager::GetConcreteInstance())
|
if (G4VVisManager::GetConcreteInstance())
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
|
// ID : LEMuSRScintHit.cc , v 1.0
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-07-12 16:15
|
||||||
|
//
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// INNER SCINT HIT
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include "LEMuSRScintHit.hh"
|
#include "LEMuSRScintHit.hh"
|
||||||
#include "G4VVisManager.hh"
|
#include "G4VVisManager.hh"
|
||||||
#include "G4Circle.hh"
|
#include "G4Circle.hh"
|
||||||
|
@ -1,3 +1,26 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
|
// ID : LEMuSRScintSD.cc , v 1.0
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-07-12 16:15
|
||||||
|
//
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// INNER SCINT SD
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSRScintSD.hh"
|
#include "LEMuSRScintSD.hh"
|
||||||
#include "G4HCofThisEvent.hh"
|
#include "G4HCofThisEvent.hh"
|
||||||
#include "G4TouchableHistory.hh"
|
#include "G4TouchableHistory.hh"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
// ID : LEMuSRStackingAction.cc , v 1.0
|
// ID : LEMuSRStackingAction.cc , v 1.0
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-07-07 11:15
|
// DATE : 2004-07-07 11:15
|
||||||
//
|
//
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,13 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// STACKING ACTION.CC
|
// STACKING ACTION.CC
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
|
// ID : LEMuSRStackingActionMessenger.cc , v 1.0
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-07-07 11:15
|
||||||
|
//
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// STACKING ACTION MESSENGER
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "LEMuSRStackingActionMessenger.hh"
|
#include "LEMuSRStackingActionMessenger.hh"
|
||||||
#include "LEMuSRStackingAction.hh"
|
#include "LEMuSRStackingAction.hh"
|
||||||
#include "G4UIcmdWithAnInteger.hh"
|
#include "G4UIcmdWithAnInteger.hh"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
// ID : LEMuSRSteppingAction.cc , v 1.0
|
// ID : LEMuSRSteppingAction.cc , v 1.0
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-07-07 11:15
|
// DATE : 2004-07-07 11:15
|
||||||
//
|
//
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// STEPPING ACTION.CC
|
// STEPPING ACTION.CC
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -35,14 +35,15 @@
|
|||||||
#include "G4VisAttributes.hh"
|
#include "G4VisAttributes.hh"
|
||||||
#include "G4Colour.hh"
|
#include "G4Colour.hh"
|
||||||
|
|
||||||
|
|
||||||
|
//! \ct
|
||||||
LEMuSRSteppingAction::LEMuSRSteppingAction()
|
LEMuSRSteppingAction::LEMuSRSteppingAction()
|
||||||
{
|
{
|
||||||
pointer=this ;
|
pointer=this ;
|
||||||
loop=0;
|
loop=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! \dt
|
||||||
LEMuSRSteppingAction::~LEMuSRSteppingAction()
|
LEMuSRSteppingAction::~LEMuSRSteppingAction()
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
@ -55,7 +56,12 @@ LEMuSRSteppingAction* LEMuSRSteppingAction::GetInstance()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! \mm
|
||||||
|
/*!
|
||||||
|
* The main role of the stepping action in \lemu simulation is to kill particles that are looping in electromagnetic fields.
|
||||||
|
*
|
||||||
|
* Is also illustrated here the possiblity of personalizing the color of the trajectories for visualisation.
|
||||||
|
*/
|
||||||
void LEMuSRSteppingAction::UserSteppingAction(const G4Step* aStep)
|
void LEMuSRSteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -84,6 +90,17 @@ void LEMuSRSteppingAction::UserSteppingAction(const G4Step* aStep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! Method to kill the looping partiles
|
||||||
|
/*!
|
||||||
|
* A looping particle can increase the CPU time, and in the worst case even paralize the simulation. To kill the loops, we just limit the steps number of one track to 2500. The loop killer method check the step number and kills the particle when it gets too big. Note that a usual track does not contain more that few hundred steps and experience showed that above 1000 steps, the particles were actually trapped in a loop and rarely recovered a normal trajectory.
|
||||||
|
*
|
||||||
|
* In order to verify that this method is not abusive, the word "killed" is printed to the screen each time a particle is killed. Usually, this is the case of few particles over hundred thousands.
|
||||||
|
*
|
||||||
|
* The neutrinos, gammas and electrons tracks are killed directly because they have no influence on the simulation but increasing the calculation time.
|
||||||
|
* In particular, electrons are important sources of looping tracks in electromagntic field.
|
||||||
|
*
|
||||||
|
* Of course, one can select the particles to kill or not.
|
||||||
|
*/
|
||||||
|
|
||||||
void LEMuSRSteppingAction::LoopKiller(const G4Step *aStep)
|
void LEMuSRSteppingAction::LoopKiller(const G4Step *aStep)
|
||||||
{
|
{
|
||||||
|
@ -1,29 +1,68 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
|
// ID : LEMuSRTrackingAction.cc , v 1.0
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-07-07 11:15
|
||||||
|
//
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// TRACKING ACTION.CC
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
#include"LEMuSRTrackingAction.hh"
|
#include"LEMuSRTrackingAction.hh"
|
||||||
#include"G4VProcess.hh"
|
#include"G4VProcess.hh"
|
||||||
#include"G4PrimaryParticle.hh"
|
#include"G4PrimaryParticle.hh"
|
||||||
#include"G4UnitsTable.hh"
|
#include"G4UnitsTable.hh"
|
||||||
#include"LEMuSRMuonDecayChannel.hh"
|
#include"LEMuSRMuonDecayChannel.hh"
|
||||||
|
|
||||||
|
//! \ct
|
||||||
LEMuSRTrackingAction ::LEMuSRTrackingAction()
|
LEMuSRTrackingAction ::LEMuSRTrackingAction()
|
||||||
{
|
{
|
||||||
|
pointer=this ;
|
||||||
|
tMgr=new G4TrackingManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;}
|
|
||||||
|
|
||||||
|
LEMuSRTrackingAction* LEMuSRTrackingAction::pointer=0;
|
||||||
|
|
||||||
|
//! Returns pointer to the tracking action.
|
||||||
|
LEMuSRTrackingAction* LEMuSRTrackingAction::GetInstance()
|
||||||
|
{
|
||||||
|
return pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! \dt
|
||||||
LEMuSRTrackingAction:: ~LEMuSRTrackingAction()
|
LEMuSRTrackingAction:: ~LEMuSRTrackingAction()
|
||||||
{
|
{
|
||||||
|
delete tMgr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Actions to take at the beginning of a track.
|
||||||
void LEMuSRTrackingAction::PreUserTrackingAction(const G4Track* theTrack)
|
void LEMuSRTrackingAction::PreUserTrackingAction(const G4Track* theTrack)
|
||||||
{
|
{
|
||||||
|
// G4cout << theTrack->GetDefinition()->GetParticleName()<<G4endl;
|
||||||
|
GyroMagRatio=GyroMagFactor=0;
|
||||||
}
|
if(theTrack->GetDefinition()->GetPDGMass()!=0)
|
||||||
|
{
|
||||||
|
GyroMagRatio=theTrack->GetDefinition()->GetGyromagneticRatio();
|
||||||
|
GyroMagFactor=theTrack->GetDefinition()->GetGyromagneticFactor();
|
||||||
|
}
|
||||||
|
// G4cout <<"g ratio [Hz]/[G]"<<GyroMagRatio*s/gauss<<G4endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void LEMuSRTrackingAction::Collect_datas(const G4Track* theTrack)
|
void LEMuSRTrackingAction::Collect_datas(const G4Track* theTrack)
|
||||||
@ -34,7 +73,7 @@ void LEMuSRTrackingAction::Collect_datas(const G4Track* theTrack)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//! Actions to take at the end of a track.
|
||||||
void LEMuSRTrackingAction::PostUserTrackingAction(const G4Track*)
|
void LEMuSRTrackingAction::PostUserTrackingAction(const G4Track*)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
@ -1,4 +1,24 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
|
// ID : LEMuSRVisManager.cc , v 1.0
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2004-07-07 11:15
|
||||||
|
//
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// VIS MANAGER
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#ifdef G4VIS_USE
|
#ifdef G4VIS_USE
|
||||||
|
|
||||||
#include "LEMuSRVisManager.hh"
|
#include "LEMuSRVisManager.hh"
|
||||||
@ -50,11 +70,19 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//!\ct
|
||||||
LEMuSRVisManager::LEMuSRVisManager () {;}
|
LEMuSRVisManager::LEMuSRVisManager () {;}
|
||||||
|
//!\dt
|
||||||
LEMuSRVisManager::~LEMuSRVisManager () {;}
|
LEMuSRVisManager::~LEMuSRVisManager () {;}
|
||||||
|
|
||||||
|
//!\mm
|
||||||
|
/*!
|
||||||
|
* This method registers the different graphic systems for the simulation.
|
||||||
|
* The user must prealably check that the libraries for the enabled systems
|
||||||
|
* are installed ( cf. @ref ssg4setup ).
|
||||||
|
*
|
||||||
|
* The corresponding environment variables have to be set before the compilation.
|
||||||
|
*/
|
||||||
void LEMuSRVisManager::RegisterGraphicsSystems () {
|
void LEMuSRVisManager::RegisterGraphicsSystems () {
|
||||||
|
|
||||||
// Graphics Systems not needing external packages or libraries...
|
// Graphics Systems not needing external packages or libraries...
|
||||||
@ -74,6 +102,7 @@ void LEMuSRVisManager::RegisterGraphicsSystems () {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef G4VIS_USE_OPENGLX
|
#ifdef G4VIS_USE_OPENGLX
|
||||||
|
G4OpenGLImmediateX* OPENGL=new G4OpenGLImmediateX;
|
||||||
RegisterGraphicsSystem (new G4OpenGLImmediateX);
|
RegisterGraphicsSystem (new G4OpenGLImmediateX);
|
||||||
RegisterGraphicsSystem (new G4OpenGLStoredX);
|
RegisterGraphicsSystem (new G4OpenGLStoredX);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID : LEMuSRDetectorConstruction.cc , v 1.0
|
// ID : LEMuSRDetectorConstruction.cc , v 1.0
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2004-06-24 16:33
|
// DATE : 2004-06-24 16:33
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -17,8 +17,8 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// DETECTOR CONSTRUCTION
|
// DETECTOR CONSTRUCTION: DUMMY DETECTORS
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
// G4 GEOMETRIC FORMS CLASSES
|
// G4 GEOMETRIC FORMS CLASSES
|
||||||
@ -77,13 +77,13 @@
|
|||||||
#include "G4ElectroMagneticField.hh"
|
#include "G4ElectroMagneticField.hh"
|
||||||
#include "G4EqMagElectricField.hh"
|
#include "G4EqMagElectricField.hh"
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
///$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE ASYMETRY DUMMY DETECTORS
|
// DEFINE THE ASYMETRY DUMMY DETECTORS
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
void LEMuSRDetectorConstruction::lemuAsym()
|
void LEMuSRDetectorConstruction::lemuAsym()
|
||||||
{
|
{
|
||||||
@ -125,9 +125,9 @@ void LEMuSRDetectorConstruction::lemuAsym()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
// DEFINE THE ELECTRIC FIELD DUMMY DETECTORS
|
// DEFINE THE ELECTRIC FIELD DUMMY DETECTORS
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
void LEMuSRDetectorConstruction::lemuFieldCheck()
|
void LEMuSRDetectorConstruction::lemuFieldCheck()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//*
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
|
||||||
//
|
//
|
||||||
// ID :TDCheck.cc , v 1.2
|
// ID :TDCheck.cc , v 1.2
|
||||||
// AUTHOR: Taofiq PARAISO
|
// AUTHOR: Taofiq PARAISO
|
||||||
// DATE : 2005-03-01 10:07
|
// DATE : 2005-03-01 10:07
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
//
|
//
|
||||||
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
// & & && && & &&
|
// & & && && & &&
|
||||||
@ -18,7 +18,7 @@
|
|||||||
// &
|
// &
|
||||||
// &
|
// &
|
||||||
// TDCHECK
|
// TDCHECK
|
||||||
//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
#include "TDCheck.hh"
|
#include "TDCheck.hh"
|
||||||
|
|
||||||
#include "G4SteppingManager.hh"
|
#include "G4SteppingManager.hh"
|
||||||
@ -185,7 +185,7 @@ void TDCheck::Update()
|
|||||||
muon.positionz = position.z()/cm;
|
muon.positionz = position.z()/cm;
|
||||||
|
|
||||||
muon.momdirx= LEMuSRPrimaryGeneratorAction::GetPGA()->angle/rad;//momentum_direction.x();
|
muon.momdirx= LEMuSRPrimaryGeneratorAction::GetPGA()->angle/rad;//momentum_direction.x();
|
||||||
muon.momdiry= LEMuSRPrimaryGeneratorAction::GetPGA()->radius/cm; //momentum_direction.y();
|
muon.momdiry= LEMuSRPrimaryGeneratorAction::GetPGA()->radius/cm; //momentum_direction.y();
|
||||||
muon.momdirz= momentum_direction.z();
|
muon.momdirz= momentum_direction.z();
|
||||||
|
|
||||||
muon.tenergy = kenergy/keV;
|
muon.tenergy = kenergy/keV;
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
|
// ID : MEYER.cc , v 1.0
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2005-04
|
||||||
|
//
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// MEYER
|
||||||
/*
|
/*
|
||||||
fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN
|
fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN
|
||||||
C++ CONVERSION T.K.PARAISO 04-2005
|
C++ CONVERSION T.K.PARAISO 04-2005
|
||||||
@ -14,6 +34,8 @@
|
|||||||
http://gershwin.ens.fr/vdaniel/Doc-Locale/Langages-Program-Scientific/Fortran/Tutorial/arrays.htm
|
http://gershwin.ens.fr/vdaniel/Doc-Locale/Langages-Program-Scientific/Fortran/Tutorial/arrays.htm
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
#include "meyer.h"
|
#include "meyer.h"
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
@ -1,3 +1,30 @@
|
|||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
|
||||||
|
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
|
||||||
|
// ID : YIELDS.cc , v 1.0
|
||||||
|
// AUTHOR: Taofiq PARAISO
|
||||||
|
// DATE : 2005-04
|
||||||
|
//
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
//
|
||||||
|
// & &&&&&&&&&& &&&&&&& &&&&&&&&
|
||||||
|
// & & && && & &&
|
||||||
|
// & & & & & & &&
|
||||||
|
// & &&&&&&& & & &&&&&& &&&&&&&&
|
||||||
|
// & & & && & & &&
|
||||||
|
// & & && & & && && & &
|
||||||
|
// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & &&
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// &
|
||||||
|
// YIELDS
|
||||||
|
/*
|
||||||
|
fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN
|
||||||
|
C++ CONVERSION T.K.PARAISO 04-2005
|
||||||
|
*/
|
||||||
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
|
||||||
|
|
||||||
|
|
||||||
#include "yields.h"
|
#include "yields.h"
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user