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

#include <G4TauLeptonicDecayChannel.hh>

Inheritance diagram for G4TauLeptonicDecayChannel:

Public Member Functions

 G4TauLeptonicDecayChannel (const G4String &theParentName, G4double theBR, const G4String &theLeptonName)
 ~G4TauLeptonicDecayChannel () override=default
G4DecayProductsDecayIt (G4double) override
Public Member Functions inherited from G4VDecayChannel
 G4VDecayChannel (const G4String &aName, G4int Verbose=1)
 G4VDecayChannel (const G4String &aName, const G4String &theParentName, G4double theBR, G4int theNumberOfDaughters, const G4String &theDaughterName1, const G4String &theDaughterName2="", const G4String &theDaughterName3="", const G4String &theDaughterName4="", const G4String &theDaughterName5="")
virtual ~G4VDecayChannel ()
G4bool operator== (const G4VDecayChannel &r) const
G4bool operator!= (const G4VDecayChannel &r) const
G4bool operator< (const G4VDecayChannel &right) const
const G4StringGetKinematicsName () const
G4double GetBR () const
G4int GetNumberOfDaughters () const
G4ParticleDefinitionGetParent ()
G4ParticleDefinitionGetDaughter (G4int anIndex)
G4int GetAngularMomentum ()
const G4StringGetParentName () const
const G4StringGetDaughterName (G4int anIndex) const
G4double GetParentMass () const
G4double GetDaughterMass (G4int anIndex) const
void SetParent (const G4ParticleDefinition *particle_type)
void SetParent (const G4String &particle_name)
void SetBR (G4double value)
void SetNumberOfDaughters (G4int value)
void SetDaughter (G4int anIndex, const G4ParticleDefinition *particle_type)
void SetDaughter (G4int anIndex, const G4String &particle_name)
void SetVerboseLevel (G4int value)
G4int GetVerboseLevel () const
void DumpInfo ()
G4double GetRangeMass () const
void SetRangeMass (G4double val)
virtual G4bool IsOKWithParentMass (G4double parentMass)
void SetPolarization (const G4ThreeVector &)
const G4ThreeVectorGetPolarization () const

Protected Member Functions

 G4TauLeptonicDecayChannel ()=default
 G4TauLeptonicDecayChannel (const G4TauLeptonicDecayChannel &)=default
G4TauLeptonicDecayChanneloperator= (const G4TauLeptonicDecayChannel &)
Protected Member Functions inherited from G4VDecayChannel
 G4VDecayChannel ()
 G4VDecayChannel (const G4VDecayChannel &)
G4VDecayChanneloperator= (const G4VDecayChannel &)
void ClearDaughtersName ()
void CheckAndFillDaughters ()
void CheckAndFillParent ()
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=1.0) const

Additional Inherited Members

Protected Attributes inherited from G4VDecayChannel
G4String kinematics_name = ""
G4double rbranch = 0.0
G4Stringparent_name = nullptr
G4String ** daughters_name = nullptr
G4double rangeMass = 2.5
G4ThreeVector parent_polarization
G4ParticleTableparticletable = nullptr
G4ParticleDefinitionG4MT_parent = nullptr
G4ParticleDefinition ** G4MT_daughters = nullptr
G4double G4MT_parent_mass = 0.0
G4doubleG4MT_daughters_mass = nullptr
G4doubleG4MT_daughters_width = nullptr
G4Mutex daughtersMutex
G4Mutex parentMutex
G4int numberOfDaughters = 0
G4int verboseLevel = 1
Static Protected Attributes inherited from G4VDecayChannel
static const G4String noName = " "

Detailed Description

Definition at line 43 of file G4TauLeptonicDecayChannel.hh.

Constructor & Destructor Documentation

◆ G4TauLeptonicDecayChannel() [1/3]

G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel ( const G4String & theParentName,
G4double theBR,
const G4String & theLeptonName )

Definition at line 42 of file G4TauLeptonicDecayChannel.cc.

44 : G4VDecayChannel("Tau Leptonic Decay", 1)
45{
46 // set names for daughter particles
47 if (theParentName == "tau+") {
48 SetBR(theBR);
49 SetParent("tau+");
51 if ((theLeptonName == "e-" || theLeptonName == "e+")) {
52 SetDaughter(0, "e+");
53 SetDaughter(1, "nu_e");
54 SetDaughter(2, "anti_nu_tau");
55 }
56 else {
57 SetDaughter(0, "mu+");
58 SetDaughter(1, "nu_mu");
59 SetDaughter(2, "anti_nu_tau");
60 }
61 }
62 else if (theParentName == "tau-") {
63 SetBR(theBR);
64 SetParent("tau-");
66 if ((theLeptonName == "e-" || theLeptonName == "e+")) {
67 SetDaughter(0, "e-");
68 SetDaughter(1, "anti_nu_e");
69 SetDaughter(2, "nu_tau");
70 }
71 else {
72 SetDaughter(0, "mu-");
73 SetDaughter(1, "anti_nu_mu");
74 SetDaughter(2, "nu_tau");
75 }
76 }
77 else {
78#ifdef G4VERBOSE
79 if (GetVerboseLevel() > 0) {
80 G4cout << "G4TauLeptonicDecayChannel:: constructor :";
81 G4cout << " parent particle is not tau but ";
82 G4cout << theParentName << G4endl;
83 }
84#endif
85 }
86}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void SetBR(G4double value)
G4int GetVerboseLevel() const
void SetNumberOfDaughters(G4int value)
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
void SetParent(const G4ParticleDefinition *particle_type)

Referenced by G4TauLeptonicDecayChannel(), and operator=().

◆ ~G4TauLeptonicDecayChannel()

G4TauLeptonicDecayChannel::~G4TauLeptonicDecayChannel ( )
overridedefault

◆ G4TauLeptonicDecayChannel() [2/3]

G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel ( )
protecteddefault

◆ G4TauLeptonicDecayChannel() [3/3]

G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel ( const G4TauLeptonicDecayChannel & )
protecteddefault

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4TauLeptonicDecayChannel::DecayIt ( G4double )
overridevirtual

Implements G4VDecayChannel.

Definition at line 116 of file G4TauLeptonicDecayChannel.cc.

117{
118 // this version neglects muon polarization
119 // assumes the pure V-A coupling
120 // gives incorrect energy spectrum for neutrinos
121
122#ifdef G4VERBOSE
123 if (GetVerboseLevel() > 1) G4cout << "G4TauLeptonicDecayChannel::DecayIt()";
124#endif
125
128
129 // parent mass
130 G4double parentmass = G4MT_parent->GetPDGMass();
131
132 // daughters'mass
133 const G4int N_DAUGHTER = 3;
134 G4double daughtermass[N_DAUGHTER];
135 for (G4int index = 0; index < N_DAUGHTER; ++index) {
136 daughtermass[index] = G4MT_daughters[index]->GetPDGMass();
137 }
138
139 // create parent G4DynamicParticle at rest
140 G4ThreeVector dummy;
141 auto parentparticle = new G4DynamicParticle(G4MT_parent, dummy, 0.0);
142 // create G4Decayproducts
143 auto products = new G4DecayProducts(*parentparticle);
144 delete parentparticle;
145
146 // calculate daughter momentum
147 G4double daughtermomentum[N_DAUGHTER];
148
149 // calculate lepton momentum
150 G4double pmax = (parentmass * parentmass - daughtermass[0] * daughtermass[0]) / 2. / parentmass;
151 G4double p, e;
152 G4double r;
153 const std::size_t MAX_LOOP = 10000;
154 for (std::size_t loop_counter = 0; loop_counter < MAX_LOOP; ++loop_counter) {
155 // determine momentum/energy
156 r = G4UniformRand();
157 p = pmax * G4UniformRand();
158 e = std::sqrt(p * p + daughtermass[0] * daughtermass[0]);
159 if (r < spectrum(p, e, parentmass, daughtermass[0])) break;
160 }
161
162 // create daughter G4DynamicParticle
163 // daughter 0 (lepton)
164 daughtermomentum[0] = p;
165 G4double costheta, sintheta, phi, sinphi, cosphi;
166 costheta = 2. * G4UniformRand() - 1.0;
167 sintheta = std::sqrt((1.0 - costheta) * (1.0 + costheta));
168 phi = twopi * G4UniformRand() * rad;
169 sinphi = std::sin(phi);
170 cosphi = std::cos(phi);
171 G4ThreeVector direction0(sintheta * cosphi, sintheta * sinphi, costheta);
172 auto daughterparticle =
173 new G4DynamicParticle(G4MT_daughters[0], direction0 * daughtermomentum[0]);
174 products->PushProducts(daughterparticle);
175
176 // daughter 1 ,2 (nutrinos)
177 // create neutrinos in the C.M frame of two neutrinos
178 G4double energy2 = parentmass - e;
179 G4double vmass = std::sqrt((energy2 - daughtermomentum[0]) * (energy2 + daughtermomentum[0]));
180 G4double beta = -1.0 * daughtermomentum[0] / energy2;
181 G4double costhetan = 2. * G4UniformRand() - 1.0;
182 G4double sinthetan = std::sqrt((1.0 - costhetan) * (1.0 + costhetan));
183 G4double phin = twopi * G4UniformRand() * rad;
184 G4double sinphin = std::sin(phin);
185 G4double cosphin = std::cos(phin);
186
187 G4ThreeVector direction1(sinthetan * cosphin, sinthetan * sinphin, costhetan);
188 auto daughterparticle1 = new G4DynamicParticle(G4MT_daughters[1], direction1 * (vmass / 2.));
189 auto daughterparticle2 =
190 new G4DynamicParticle(G4MT_daughters[2], direction1 * (-1.0 * vmass / 2.));
191
192 // boost to the muon rest frame
194 p4 = daughterparticle1->Get4Momentum();
195 p4.boost(direction0.x() * beta, direction0.y() * beta, direction0.z() * beta);
196 daughterparticle1->Set4Momentum(p4);
197 p4 = daughterparticle2->Get4Momentum();
198 p4.boost(direction0.x() * beta, direction0.y() * beta, direction0.z() * beta);
199 daughterparticle2->Set4Momentum(p4);
200 products->PushProducts(daughterparticle1);
201 products->PushProducts(daughterparticle2);
202 daughtermomentum[1] = daughterparticle1->GetTotalMomentum();
203 daughtermomentum[2] = daughterparticle2->GetTotalMomentum();
204
205 // output message
206#ifdef G4VERBOSE
207 if (GetVerboseLevel() > 1) {
208 G4cout << "G4TauLeptonicDecayChannel::DecayIt ";
209 G4cout << " create decay products in rest frame " << G4endl;
210 products->DumpInfo();
211 }
212#endif
213 return products;
214}
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
#define G4UniformRand()
Definition Randomize.hh:52
HepLorentzVector & boost(double, double, double)
G4ParticleDefinition ** G4MT_daughters
G4ParticleDefinition * G4MT_parent

◆ operator=()

G4TauLeptonicDecayChannel & G4TauLeptonicDecayChannel::operator= ( const G4TauLeptonicDecayChannel & right)
protected

Definition at line 89 of file G4TauLeptonicDecayChannel.cc.

90{
91 if (this != &right) {
94 rbranch = right.rbranch;
95
96 // copy parent name
97 parent_name = new G4String(*right.parent_name);
98
99 // clear daughters_name array
101
102 // recreate array
104 if (numberOfDaughters > 0) {
105 if (daughters_name != nullptr) ClearDaughtersName();
106 daughters_name = new G4String*[numberOfDaughters];
107 // copy daughters name
108 for (G4int index = 0; index < numberOfDaughters; ++index) {
109 daughters_name[index] = new G4String(*right.daughters_name[index]);
110 }
111 }
112 }
113 return *this;
114}
G4String ** daughters_name

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