Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4TauLeptonicDecayChannel Class Reference

#include <G4TauLeptonicDecayChannel.hh>

Inheritance diagram for G4TauLeptonicDecayChannel:
Collaboration 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 ()
 
G4int operator== (const G4VDecayChannel &right) const
 
G4int operator!= (const G4VDecayChannel &right) const
 
G4int 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 (const G4TauLeptonicDecayChannel &)
 
G4TauLeptonicDecayChanneloperator= (const G4TauLeptonicDecayChannel &)
 
 G4TauLeptonicDecayChannel ()
 
- Protected Member Functions inherited from G4VDecayChannel
void ClearDaughtersName ()
 
void CheckAndFillDaughters ()
 
void CheckAndFillParent ()
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=+1.) const
 

Additional Inherited Members

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

Detailed Description

Definition at line 43 of file G4TauLeptonicDecayChannel.hh.

Constructor & Destructor Documentation

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

Definition at line 56 of file G4TauLeptonicDecayChannel.cc.

60  :G4VDecayChannel("Tau Leptonic Decay",1)
61 {
62  // set names for daughter particles
63  if (theParentName == "tau+") {
64  SetBR(theBR);
65  SetParent("tau+");
67  if ((theLeptonName=="e-"||theLeptonName=="e+")){
68  SetDaughter(0, "e+");
69  SetDaughter(1, "nu_e");
70  SetDaughter(2, "anti_nu_tau");
71  } else {
72  SetDaughter(0, "mu+");
73  SetDaughter(1, "nu_mu");
74  SetDaughter(2, "anti_nu_tau");
75  }
76  } else if (theParentName == "tau-") {
77  SetBR(theBR);
78  SetParent("tau-");
80  if ((theLeptonName=="e-"||theLeptonName=="e+")){
81  SetDaughter(0, "e-");
82  SetDaughter(1, "anti_nu_e");
83  SetDaughter(2, "nu_tau");
84  } else {
85  SetDaughter(0, "mu-");
86  SetDaughter(1, "anti_nu_mu");
87  SetDaughter(2, "nu_tau");
88  }
89  } else {
90 #ifdef G4VERBOSE
91  if (GetVerboseLevel()>0) {
92  G4cout << "G4TauLeptonicDecayChannel:: constructor :";
93  G4cout << " parent particle is not tau but ";
94  G4cout << theParentName << G4endl;
95  }
96 #endif
97  }
98 }
void SetBR(G4double value)
G4GLOB_DLL std::ostream G4cout
void SetNumberOfDaughters(G4int value)
G4int GetVerboseLevel() const
void SetParent(const G4ParticleDefinition *particle_type)
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4TauLeptonicDecayChannel::~G4TauLeptonicDecayChannel ( )
virtual

Definition at line 100 of file G4TauLeptonicDecayChannel.cc.

101 {
102 }
G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel ( const G4TauLeptonicDecayChannel right)
protected

Definition at line 104 of file G4TauLeptonicDecayChannel.cc.

104  :
105  G4VDecayChannel(right)
106 {
107 }
G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel ( )
protected

Definition at line 50 of file G4TauLeptonicDecayChannel.cc.

52 {
53 }

Member Function Documentation

G4DecayProducts * G4TauLeptonicDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Definition at line 136 of file G4TauLeptonicDecayChannel.cc.

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

Here is the call graph for this function:

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

Definition at line 109 of file G4TauLeptonicDecayChannel.cc.

110 {
111  if (this != &right) {
113  verboseLevel = right.verboseLevel;
114  rbranch = right.rbranch;
115 
116  // copy parent name
117  parent_name = new G4String(*right.parent_name);
118 
119  // clear daughters_name array
121 
122  // recreate array
124  if ( numberOfDaughters >0 ) {
127  //copy daughters name
128  for (G4int index=0; index < numberOfDaughters; index++) {
129  daughters_name[index] = new G4String(*right.daughters_name[index]);
130  }
131  }
132  }
133  return *this;
134 }
int G4int
Definition: G4Types.hh:78
G4String kinematics_name
G4String * parent_name
G4String ** daughters_name

Here is the call graph for this function:


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