Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PionDecayMakeSpin Class Reference

#include <G4PionDecayMakeSpin.hh>

+ Inheritance diagram for G4PionDecayMakeSpin:

Public Member Functions

 G4PionDecayMakeSpin (const G4String &processName="Decay")
 
virtual ~G4PionDecayMakeSpin ()
 
virtual void ProcessDescription (std::ostream &outFile) const override
 
- Public Member Functions inherited from G4Decay
 G4Decay (const G4String &processName="Decay")
 
virtual ~G4Decay ()
 
virtual G4VParticleChangePostStepDoIt (const G4Track &aTrack, const G4Step &aStep) override
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &aTrack, const G4Step &aStep) override
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &) override
 
virtual G4bool IsApplicable (const G4ParticleDefinition &) override
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition) override
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
virtual void StartTracking (G4Track *) override
 
virtual void EndTracking () override
 
void SetExtDecayer (G4VExtDecayer *)
 
const G4VExtDecayerGetExtDecayer () const
 
G4double GetRemainderLifeTime () const
 
virtual void ProcessDescription (std::ostream &outFile) const override
 
- Public Member Functions inherited from G4VRestDiscreteProcess
 G4VRestDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VRestDiscreteProcess (G4VRestDiscreteProcess &)
 
virtual ~G4VRestDiscreteProcess ()
 
G4VRestDiscreteProcessoperator= (const G4VRestDiscreteProcess &)=delete
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4VProcessoperator= (const G4VProcess &)=delete
 
G4bool operator== (const G4VProcess &right) const
 
G4bool operator!= (const G4VProcess &right) const
 
virtual G4VParticleChangePostStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &track, const G4Step &stepData)=0
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)=0
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition)=0
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)=0
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4bool IsApplicable (const G4ParticleDefinition &)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
virtual void ProcessDescription (std::ostream &outfile) const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

virtual void DaughterPolarization (const G4Track &aTrack, G4DecayProducts *products) override
 
- Protected Member Functions inherited from G4Decay
virtual G4VParticleChangeDecayIt (const G4Track &aTrack, const G4Step &aStep)
 
virtual void DaughterPolarization (const G4Track &aTrack, G4DecayProducts *products)
 
virtual G4double GetMeanFreePath (const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition) override
 
virtual G4double GetMeanLifeTime (const G4Track &aTrack, G4ForceCondition *condition) override
 
virtual G4double GetMeanFreePath (const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)=0
 
virtual G4double GetMeanLifeTime (const G4Track &aTrack, G4ForceCondition *condition)=0
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Attributes inherited from G4Decay
G4int verboseLevel
 
const G4double HighestValue
 
G4double fRemainderLifeTime
 
G4ParticleChangeForDecay fParticleChangeForDecay
 
G4VExtDecayerpExtDecayer
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft = -1.0
 
G4double currentInteractionLength = -1.0
 
G4double theInitialNumberOfInteractionLength = -1.0
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType = fNotDefined
 
G4int theProcessSubType = -1
 
G4double thePILfactor = 1.0
 
G4int verboseLevel = 0
 
G4bool enableAtRestDoIt = true
 
G4bool enableAlongStepDoIt = true
 
G4bool enablePostStepDoIt = true
 

Detailed Description

Definition at line 39 of file G4PionDecayMakeSpin.hh.

Constructor & Destructor Documentation

◆ G4PionDecayMakeSpin()

G4PionDecayMakeSpin::G4PionDecayMakeSpin ( const G4String processName = "Decay")

Definition at line 38 of file G4PionDecayMakeSpin.cc.

39 : G4Decay(processName)
40{
41 // set Process Sub Type
42 SetProcessSubType(static_cast<int>(DECAY_PionMakeSpin));
43
44}
@ DECAY_PionMakeSpin
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:406

◆ ~G4PionDecayMakeSpin()

G4PionDecayMakeSpin::~G4PionDecayMakeSpin ( )
virtual

Definition at line 46 of file G4PionDecayMakeSpin.cc.

46{ }

Member Function Documentation

◆ DaughterPolarization()

void G4PionDecayMakeSpin::DaughterPolarization ( const G4Track aTrack,
G4DecayProducts products 
)
overrideprotectedvirtual

Reimplemented from G4Decay.

Definition at line 48 of file G4PionDecayMakeSpin.cc.

50{
51 // This routine deals only with particles that can decay into a muon
52 // pi+, pi-, K+, K- and K0_long
53
54 // get particle
55
56 const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
57 const G4ParticleDefinition* aParticleDef = aParticle->GetDefinition();
58
59 G4ParticleDefinition* aMuonPlus =
61 G4ParticleDefinition* aMuonMinus =
63 G4ParticleDefinition* aPionPlus =
65 G4ParticleDefinition* aPionMinus =
67 G4ParticleDefinition* aKaonPlus =
69 G4ParticleDefinition* aKaonMinus =
71 G4ParticleDefinition* aKaon0Long =
73 G4ParticleDefinition* aNeutrinoMu =
75 G4ParticleDefinition* aAntiNeutrinoMu =
77
78 if( aParticleDef == aPionPlus ||
79 aParticleDef == aPionMinus ||
80 aParticleDef == aKaonPlus ||
81 aParticleDef == aKaonMinus ||
82 aParticleDef == aKaon0Long ) {
83 } else {
84 return;
85 }
86
87 G4DynamicParticle* aMuon = nullptr;
88
89 G4double emu(0), eneutrino(0);
90 G4ThreeVector p_muon, p_neutrino;
91
92 G4int numberOfSecondaries = products->entries();
93
94 if (numberOfSecondaries > 0) {
95 for (G4int index=0; index < numberOfSecondaries; index++){
96 G4DynamicParticle* aSecondary = (*products)[index];
97 const G4ParticleDefinition* aSecondaryDef = aSecondary->GetDefinition();
98
99 if (aSecondaryDef == aMuonPlus ||
100 aSecondaryDef == aMuonMinus ) {
101 // Muon+ or Muon-
102 aMuon = aSecondary;
103 emu = aSecondary->GetTotalEnergy();
104 p_muon = aSecondary->GetMomentum();
105 } else if (aSecondaryDef == aNeutrinoMu ||
106 aSecondaryDef == aAntiNeutrinoMu ) {
107 // Muon-Neutrino / Muon-Anti-Neutrino
108 eneutrino = aSecondary->GetTotalEnergy();
109 p_neutrino = aSecondary->GetMomentum();
110 }
111 }
112 }
113
114 // This routine deals only with decays with a
115 // muon and mu-(anti)neutrinos in the final state
116 if (aMuon == nullptr) return;
117 if (eneutrino==0||emu==0) return;
118
119 G4ThreeVector spin(0,0,0);
120
121 const G4DynamicParticle* theParentParticle = products->GetParentParticle();
122
123 G4double amass = theParentParticle->GetMass();
124 G4double emmu = aMuonPlus->GetPDGMass();
125
126 if (numberOfSecondaries == 2 ) {
127 G4double scale = - (eneutrino - ( p_muon * p_neutrino )/(emu+emmu));
128
129 p_muon = scale * p_muon;
130 p_neutrino = emmu * p_neutrino;
131 spin = p_muon + p_neutrino;
132
133 scale = 2./(amass*amass-emmu*emmu);
134 spin = scale * spin;
135
136 if (aParticle->GetCharge() < 0.0) spin = -spin;
137
138 } else {
139 spin = G4RandomDirection();
140
141 }
142
143 spin = spin.unit();
144
145 aMuon->SetPolarization(spin.x(),spin.y(),spin.z());
146
147 return;
148}
G4ThreeVector G4RandomDirection()
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4int entries() const
const G4DynamicParticle * GetParentParticle() const
G4double GetMass() const
void SetPolarization(const G4ThreeVector &)
G4double GetCharge() const
G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
const G4DynamicParticle * GetDynamicParticle() const

◆ ProcessDescription()

void G4PionDecayMakeSpin::ProcessDescription ( std::ostream &  outFile) const
overridevirtual

Reimplemented from G4Decay.

Definition at line 150 of file G4PionDecayMakeSpin.cc.

151{
152 outFile << GetProcessName()
153 << ": Decay of mesons that can decay into a muon \n"
154 << " i.e. pi+, pi-, K+, K- and K0_long \n"
155 << " kinematics of daughters are dertermined by DecayChannels \n"
156 << " polarization of daughter particles are take into account. \n";
157}
const G4String & GetProcessName() const
Definition: G4VProcess.hh:382

The documentation for this class was generated from the following files: