Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
G4TauLeptonicDecayChannel Class Reference

#include <G4TauLeptonicDecayChannel.hh>

Inheritance diagram for G4TauLeptonicDecayChannel:
G4VDecayChannel

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 ()
 

Protected Member Functions

 G4TauLeptonicDecayChannel (const G4TauLeptonicDecayChannel &)
 
G4TauLeptonicDecayChanneloperator= (const G4TauLeptonicDecayChannel &)
 
 G4TauLeptonicDecayChannel ()
 
- Protected Member Functions inherited from G4VDecayChannel
void ClearDaughtersName ()
 
void FillDaughters ()
 
void FillParent ()
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 

Additional Inherited Members

- Protected Attributes inherited from G4VDecayChannel
G4String kinematics_name
 
G4double rbranch
 
G4int numberOfDaughters
 
G4Stringparent_name
 
G4String ** daughters_name
 
G4ParticleTableparticletable
 
G4int verboseLevel
 
G4ParticleDefinitionG4MT_parent
 
G4ParticleDefinition ** G4MT_daughters
 
G4double G4MT_parent_mass
 
G4doubleG4MT_daughters_mass
 
- 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.

References G4cout, G4endl, G4VDecayChannel::GetVerboseLevel(), G4VDecayChannel::SetBR(), G4VDecayChannel::SetDaughter(), G4VDecayChannel::SetNumberOfDaughters(), and G4VDecayChannel::SetParent().

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
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.

References CLHEP::HepLorentzVector::boost(), G4DecayProducts::DumpInfo(), G4VDecayChannel::FillDaughters(), G4VDecayChannel::FillParent(), G4cout, G4endl, G4VDecayChannel::G4MT_daughters, G4VDecayChannel::G4MT_parent, G4UniformRand, G4DynamicParticle::Get4Momentum(), G4ParticleDefinition::GetPDGMass(), G4DynamicParticle::GetTotalMomentum(), G4VDecayChannel::GetVerboseLevel(), G4DecayProducts::PushProducts(), python.hepunit::rad, G4DynamicParticle::Set4Momentum(), python.hepunit::twopi, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

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

Definition at line 109 of file G4TauLeptonicDecayChannel.cc.

References G4VDecayChannel::ClearDaughtersName(), G4VDecayChannel::daughters_name, G4VDecayChannel::kinematics_name, G4VDecayChannel::numberOfDaughters, G4VDecayChannel::parent_name, G4VDecayChannel::rbranch, and G4VDecayChannel::verboseLevel.

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

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