This is the first version of the muSR simulation code (musrSim) based on the merged codes of Kamil Sedlak and Toni Shiroka. It should be a running version of the simulation code, however it has not been very well tested, therefore it will probably need some further development.
58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
// Geant4 simulation for MuSR
|
|
// AUTHOR: Toni SHIROKA, Paul Scherrer Institut, PSI
|
|
// DATE : 2008-05
|
|
//
|
|
|
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
|
// Muonium "Scattering"
|
|
// Id : musrMuScatter.hh, v 1.4
|
|
// Author: Taofiq PARAISO, T. Shiroka
|
|
// Date : 2007-12
|
|
// Notes : Simplified model for Mu scattering. Spin effects have been excluded.
|
|
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
|
|
|
/*!
|
|
* musrMuScatter class defines the Muonium scattering process. It implements a very
|
|
* basic model which assumes Muonium looses its electron as soon as it enters any
|
|
* material (except for vacuum and CFoil). The class has only a PostStepDoIt method.
|
|
* The in-flight Muonium spin precession has been supressed. */
|
|
|
|
#ifndef musrMuScatter_h
|
|
#define musrMuScatter_h 1
|
|
|
|
#include "G4VDiscreteProcess.hh"
|
|
|
|
class musrMuScatter : public G4VDiscreteProcess
|
|
{
|
|
public:
|
|
musrMuScatter(const G4String& name="MuScatt", // process description
|
|
G4ProcessType aType = fGeneral);
|
|
|
|
~musrMuScatter();
|
|
|
|
//! \mm The actions are taken at the end of the step.
|
|
G4VParticleChange* PostStepDoIt(const G4Track&,
|
|
const G4Step&);
|
|
|
|
G4double GetMeanFreePath(const G4Track& aTrack,
|
|
G4double previousStepSize,
|
|
G4ForceCondition* condition);
|
|
|
|
//! The condition for applying the process.
|
|
G4bool CheckCondition(const G4Step& aStep);
|
|
|
|
|
|
G4bool condition;
|
|
G4double itime, gtime, ftime,deltatime;
|
|
G4String p_name;
|
|
G4DynamicParticle *DP;
|
|
G4ParticleChange fParticleChange;
|
|
|
|
void PrepareSecondary(const G4Track&);
|
|
G4Track* aSecondary;
|
|
|
|
void InitializeSecondaries(const G4Track&);
|
|
};
|
|
|
|
#endif
|