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

#include <G4DalitzDecayChannel.hh>

Inheritance diagram for G4DalitzDecayChannel:
G4VDecayChannel

Public Member Functions

 G4DalitzDecayChannel (const G4String &theParentName, G4double theBR, const G4String &theLeptonName, const G4String &theAntiLeptonName)
 
virtual ~G4DalitzDecayChannel ()
 
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

 G4DalitzDecayChannel (const G4DalitzDecayChannel &)
 
G4DalitzDecayChanneloperator= (const G4DalitzDecayChannel &)
 
- 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 G4DalitzDecayChannel.hh.

Constructor & Destructor Documentation

G4DalitzDecayChannel::G4DalitzDecayChannel ( const G4String theParentName,
G4double  theBR,
const G4String theLeptonName,
const G4String theAntiLeptonName 
)

Definition at line 53 of file G4DalitzDecayChannel.cc.

References G4DalitzDecayChannel(), G4VDecayChannel::SetBR(), G4VDecayChannel::SetDaughter(), G4VDecayChannel::SetNumberOfDaughters(), and G4VDecayChannel::SetParent().

Referenced by G4DalitzDecayChannel().

58  :G4VDecayChannel("Dalitz Decay",1)
59 {
60  // set names for daughter particles
61  SetParent(theParentName);
62  SetBR(theBR);
64  G4String gammaName = "gamma";
65  SetDaughter(idGamma, gammaName);
66  SetDaughter(idLepton, theLeptonName);
67  SetDaughter(idAntiLepton, theAntiLeptonName);
68 }
void SetBR(G4double value)
void SetNumberOfDaughters(G4int value)
void SetParent(const G4ParticleDefinition *particle_type)
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
G4DalitzDecayChannel::~G4DalitzDecayChannel ( )
virtual

Definition at line 70 of file G4DalitzDecayChannel.cc.

71 {
72 }
G4DalitzDecayChannel::G4DalitzDecayChannel ( const G4DalitzDecayChannel right)
protected

Definition at line 74 of file G4DalitzDecayChannel.cc.

References G4DalitzDecayChannel().

74  :
75  G4VDecayChannel(right)
76 {
77 }

Member Function Documentation

G4DecayProducts * G4DalitzDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Definition at line 106 of file G4DalitzDecayChannel.cc.

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

107 {
108 #ifdef G4VERBOSE
109  if (GetVerboseLevel()>1) G4cout << "G4DalitzDecayChannel::DecayIt ";
110 #endif
111  if (G4MT_parent == 0) FillParent();
112  if (G4MT_daughters == 0) FillDaughters();
113 
114  // parent mass
115  G4double parentmass = G4MT_parent->GetPDGMass();
116 
117  //create parent G4DynamicParticle at rest
118  G4ThreeVector dummy;
119  G4DynamicParticle * parentparticle = new G4DynamicParticle( G4MT_parent, dummy, 0.0);
120 
121  //daughters'mass
122  G4double leptonmass = G4MT_daughters[idLepton]->GetPDGMass();
123 
124  // Generate t ( = std::exp(x):mass Square of (l+ l-) system)
125  G4double xmin = 2.0*std::log(2.0*leptonmass);
126  G4double xmax = 2.0*std::log(parentmass);
127  G4double wmax = 1.5;
128  G4double x, w, ww, w1, w2, w3, t;
129  do {
130  x = G4UniformRand()*(xmax-xmin) + xmin;
131  w = G4UniformRand()*wmax;
132  t = std::exp(x);
133  w1 = (1.0-4.0*leptonmass*leptonmass/t);
134  if ( w1 > 0.0) {
135  w2 = ( 1.0 + 2.0*leptonmass*leptonmass/t );
136  w3 = ( 1.0 - t/parentmass/parentmass );
137  w3 = w3 * w3 * w3;
138  ww = w3 * w2 * std::sqrt(w1);
139  } else {
140  ww = 0.0;
141  }
142  } while (w > ww);
143 
144  // calculate gamma momentum
145  G4double Pgamma =
146  G4PhaseSpaceDecayChannel::Pmx(parentmass, 0.0, std::sqrt(t));
147  G4double costheta = 2.*G4UniformRand()-1.0;
148  G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
150  G4ThreeVector gdirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
151 
152  //create G4DynamicParticle for gamma
153  G4DynamicParticle * gammaparticle
154  = new G4DynamicParticle(G4MT_daughters[idGamma] , gdirection, Pgamma);
155 
156  // calcurate beta of (l+ l-)system
157  G4double beta = Pgamma/(parentmass-Pgamma);
158 
159  // calculate lepton momentum in the rest frame of (l+ l-)system
160  G4double Plepton =
161  G4PhaseSpaceDecayChannel::Pmx(std::sqrt(t),leptonmass, leptonmass);
162  G4double Elepton = std::sqrt(Plepton*Plepton + leptonmass*leptonmass );
163  costheta = 2.*G4UniformRand()-1.0;
164  sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
165  phi = twopi*G4UniformRand()*rad;
166  G4ThreeVector ldirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
167  //create G4DynamicParticle for leptons in the rest frame of (l+ l-)system
168  G4DynamicParticle * leptonparticle
169  = new G4DynamicParticle(G4MT_daughters[idLepton] ,
170  ldirection, Elepton-leptonmass );
171  G4DynamicParticle * antileptonparticle
172  = new G4DynamicParticle(G4MT_daughters[idAntiLepton] ,
173  -1.0*ldirection, Elepton-leptonmass );
174  //boost leptons in the rest frame of the parent
175  G4LorentzVector p4 = leptonparticle->Get4Momentum();
176  p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
177  leptonparticle->Set4Momentum(p4);
178  p4 = antileptonparticle->Get4Momentum();
179  p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
180  antileptonparticle->Set4Momentum(p4);
181 
182  //create G4Decayproducts
183  G4DecayProducts *products = new G4DecayProducts(*parentparticle);
184  delete parentparticle;
185  products->PushProducts(gammaparticle);
186  products->PushProducts(leptonparticle);
187  products->PushProducts(antileptonparticle);
188 
189 #ifdef G4VERBOSE
190  if (GetVerboseLevel()>1) {
191  G4cout << "G4DalitzDecayChannel::DecayIt ";
192  G4cout << " create decay products in rest frame " <<G4endl;
193  products->DumpInfo();
194  }
195 #endif
196  return products;
197 }
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
#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
static G4double Pmx(G4double e, G4double p1, G4double p2)
G4DalitzDecayChannel & G4DalitzDecayChannel::operator= ( const G4DalitzDecayChannel right)
protected

Definition at line 79 of file G4DalitzDecayChannel.cc.

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

80 {
81  if (this != &right) {
83  verboseLevel = right.verboseLevel;
84  rbranch = right.rbranch;
85 
86  // copy parent name
87  parent_name = new G4String(*right.parent_name);
88 
89  // clear daughters_name array
91 
92  // recreate array
94  if ( numberOfDaughters >0 ) {
97  //copy daughters name
98  for (G4int index=0; index < numberOfDaughters; index++) {
99  daughters_name[index] = new G4String(*right.daughters_name[index]);
100  }
101  }
102  }
103  return *this;
104 }
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: