Geant4 10.7.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)
 
virtual ~G4TauLeptonicDecayChannel ()
 
virtual G4DecayProductsDecayIt (G4double)
 
- 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="")
 
virtual ~G4VDecayChannel ()
 
G4bool operator== (const G4VDecayChannel &r) const
 
G4bool operator!= (const G4VDecayChannel &r) const
 
G4bool operator< (const G4VDecayChannel &right) const
 
virtual G4DecayProductsDecayIt (G4double parentMass=-1.0)=0
 
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 ()
 
 G4TauLeptonicDecayChannel (const G4TauLeptonicDecayChannel &)
 
G4TauLeptonicDecayChanneloperator= (const G4TauLeptonicDecayChannel &)
 
- Protected Member Functions inherited from G4VDecayChannel
void ClearDaughtersName ()
 
void CheckAndFillDaughters ()
 
void CheckAndFillParent ()
 
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=1.0) const
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 

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 48 of file G4TauLeptonicDecayChannel.cc.

52 : G4VDecayChannel("Tau Leptonic Decay", 1)
53{
54 // set names for daughter particles
55 if (theParentName == "tau+")
56 {
57 SetBR(theBR);
58 SetParent("tau+");
60 if ((theLeptonName=="e-"||theLeptonName=="e+"))
61 {
62 SetDaughter(0, "e+");
63 SetDaughter(1, "nu_e");
64 SetDaughter(2, "anti_nu_tau");
65 }
66 else
67 {
68 SetDaughter(0, "mu+");
69 SetDaughter(1, "nu_mu");
70 SetDaughter(2, "anti_nu_tau");
71 }
72 }
73 else if (theParentName == "tau-")
74 {
75 SetBR(theBR);
76 SetParent("tau-");
78 if ((theLeptonName=="e-"||theLeptonName=="e+"))
79 {
80 SetDaughter(0, "e-");
81 SetDaughter(1, "anti_nu_e");
82 SetDaughter(2, "nu_tau");
83 }
84 else
85 {
86 SetDaughter(0, "mu-");
87 SetDaughter(1, "anti_nu_mu");
88 SetDaughter(2, "nu_tau");
89 }
90 }
91 else
92 {
93#ifdef G4VERBOSE
94 if (GetVerboseLevel()>0)
95 {
96 G4cout << "G4TauLeptonicDecayChannel:: constructor :";
97 G4cout << " parent particle is not tau but ";
98 G4cout << theParentName << G4endl;
99 }
100#endif
101 }
102}
#define G4endl
Definition: G4ios.hh:57
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)

◆ ~G4TauLeptonicDecayChannel()

G4TauLeptonicDecayChannel::~G4TauLeptonicDecayChannel ( )
virtual

Definition at line 105 of file G4TauLeptonicDecayChannel.cc.

106{
107}

◆ G4TauLeptonicDecayChannel() [2/3]

G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel ( )
protected

Definition at line 42 of file G4TauLeptonicDecayChannel.cc.

44{
45}

◆ G4TauLeptonicDecayChannel() [3/3]

G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel ( const G4TauLeptonicDecayChannel right)
protected

Definition at line 110 of file G4TauLeptonicDecayChannel.cc.

112 : G4VDecayChannel(right)
113{
114}

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4TauLeptonicDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Definition at line 149 of file G4TauLeptonicDecayChannel.cc.

150{
151 // this version neglects muon polarization
152 // assumes the pure V-A coupling
153 // gives incorrect energy spectrum for neutrinos
154
155#ifdef G4VERBOSE
156 if (GetVerboseLevel()>1) G4cout << "G4TauLeptonicDecayChannel::DecayIt()";
157#endif
158
161
162 // parent mass
163 G4double parentmass = G4MT_parent->GetPDGMass();
164
165 // daughters'mass
166 const G4int N_DAUGHTER=3;
167 G4double daughtermass[N_DAUGHTER];
168 for (G4int index=0; index<N_DAUGHTER; ++index)
169 {
170 daughtermass[index] = G4MT_daughters[index]->GetPDGMass();
171 }
172
173 // create parent G4DynamicParticle at rest
174 G4ThreeVector dummy;
175 G4DynamicParticle* parentparticle
176 = new G4DynamicParticle(G4MT_parent, dummy, 0.0);
177 // create G4Decayproducts
178 G4DecayProducts* products = new G4DecayProducts(*parentparticle);
179 delete parentparticle;
180
181 // calculate daughter momentum
182 G4double daughtermomentum[N_DAUGHTER];
183
184 // calculate lepton momentum
185 G4double pmax = (parentmass*parentmass
186 - daughtermass[0]*daughtermass[0])/2./parentmass;
187 G4double p, e;
188 G4double r;
189 const std::size_t MAX_LOOP=10000;
190 for (std::size_t loop_counter=0; loop_counter<MAX_LOOP; ++loop_counter)
191 {
192 // determine momentum/energy
193 r = G4UniformRand();
194 p = pmax*G4UniformRand();
195 e = std::sqrt(p*p + daughtermass[0]*daughtermass[0]);
196 if (r < spectrum(p,e,parentmass,daughtermass[0]) ) break;
197 }
198
199 // create daughter G4DynamicParticle
200 // daughter 0 (lepton)
201 daughtermomentum[0] = p;
202 G4double costheta, sintheta, phi, sinphi, cosphi;
203 costheta = 2.*G4UniformRand()-1.0;
204 sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
205 phi = twopi*G4UniformRand()*rad;
206 sinphi = std::sin(phi);
207 cosphi = std::cos(phi);
208 G4ThreeVector direction0(sintheta*cosphi,sintheta*sinphi,costheta);
209 G4DynamicParticle * daughterparticle
210 = new G4DynamicParticle(G4MT_daughters[0], direction0*daughtermomentum[0]);
211 products->PushProducts(daughterparticle);
212
213 // daughter 1 ,2 (nutrinos)
214 // create neutrinos in the C.M frame of two neutrinos
215 G4double energy2 = parentmass-e;
216 G4double vmass = std::sqrt((energy2-daughtermomentum[0])
217 *(energy2+daughtermomentum[0]));
218 G4double beta = -1.0*daughtermomentum[0]/energy2;
219 G4double costhetan = 2.*G4UniformRand()-1.0;
220 G4double sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
221 G4double phin = twopi*G4UniformRand()*rad;
222 G4double sinphin = std::sin(phin);
223 G4double cosphin = std::cos(phin);
224
225 G4ThreeVector direction1(sinthetan*cosphin,sinthetan*sinphin,costhetan);
226 G4DynamicParticle * daughterparticle1
227 = new G4DynamicParticle( G4MT_daughters[1], direction1*(vmass/2.));
228 G4DynamicParticle * daughterparticle2
229 = new G4DynamicParticle( G4MT_daughters[2], direction1*(-1.0*vmass/2.));
230
231 // boost to the muon rest frame
233 p4 = daughterparticle1->Get4Momentum();
234 p4.boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
235 daughterparticle1->Set4Momentum(p4);
236 p4 = daughterparticle2->Get4Momentum();
237 p4.boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
238 daughterparticle2->Set4Momentum(p4);
239 products->PushProducts(daughterparticle1);
240 products->PushProducts(daughterparticle2);
241 daughtermomentum[1] = daughterparticle1->GetTotalMomentum();
242 daughtermomentum[2] = daughterparticle2->GetTotalMomentum();
243
244 // output message
245#ifdef G4VERBOSE
246 if (GetVerboseLevel()>1)
247 {
248 G4cout << "G4TauLeptonicDecayChannel::DecayIt ";
249 G4cout << " create decay products in rest frame " << G4endl;
250 products->DumpInfo();
251 }
252#endif
253 return products;
254}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4UniformRand()
Definition: Randomize.hh:52
HepLorentzVector & boost(double, double, double)
void DumpInfo() const
G4int PushProducts(G4DynamicParticle *aParticle)
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
G4double GetTotalMomentum() const
G4ParticleDefinition ** G4MT_daughters
G4ParticleDefinition * G4MT_parent
void CheckAndFillDaughters()

◆ operator=()

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

Definition at line 118 of file G4TauLeptonicDecayChannel.cc.

119{
120 if (this != &right)
121 {
124 rbranch = right.rbranch;
125
126 // copy parent name
127 parent_name = new G4String(*right.parent_name);
128
129 // clear daughters_name array
131
132 // recreate array
134 if ( numberOfDaughters >0 )
135 {
138 // copy daughters name
139 for (G4int index=0; index<numberOfDaughters; ++index)
140 {
141 daughters_name[index] = new G4String(*right.daughters_name[index]);
142 }
143 }
144 }
145 return *this;
146}
G4String * parent_name
G4String ** daughters_name
G4String kinematics_name

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