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

#include <G4DalitzDecayChannel.hh>

Inheritance diagram for G4DalitzDecayChannel:
Collaboration diagram for G4DalitzDecayChannel:

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 ()
 
G4double GetRangeMass () const
 
void SetRangeMass (G4double val)
 
virtual G4bool IsOKWithParentMass (G4double parentMass)
 
void SetPolarization (const G4ThreeVector &)
 
const G4ThreeVectorGetPolarization () const
 

Protected Member Functions

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

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)

Here is the call graph for this function:

Here is the caller graph for this function:

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.

74  :
75  G4VDecayChannel(right)
76 {
77 }

Here is the call graph for this function:

Member Function Documentation

G4DecayProducts * G4DalitzDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Definition at line 106 of file G4DalitzDecayChannel.cc.

107 {
108 #ifdef G4VERBOSE
109  if (GetVerboseLevel()>1) G4cout << "G4DalitzDecayChannel::DecayIt ";
110 #endif
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  const size_t MAX_LOOP = 10000;
130  for (size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
131  x = G4UniformRand()*(xmax-xmin) + xmin;
132  w = G4UniformRand()*wmax;
133  t = std::exp(x);
134  w1 = (1.0-4.0*leptonmass*leptonmass/t);
135  if ( w1 > 0.0) {
136  w2 = ( 1.0 + 2.0*leptonmass*leptonmass/t );
137  w3 = ( 1.0 - t/parentmass/parentmass );
138  w3 = w3 * w3 * w3;
139  ww = w3 * w2 * std::sqrt(w1);
140  } else {
141  ww = 0.0;
142  }
143  if (w <= ww) break;
144  }
145 
146  // calculate gamma momentum
147  G4double Pgamma =
148  G4PhaseSpaceDecayChannel::Pmx(parentmass, 0.0, std::sqrt(t));
149  G4double costheta = 2.*G4UniformRand()-1.0;
150  G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
152  G4ThreeVector gdirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
153 
154  //create G4DynamicParticle for gamma
155  G4DynamicParticle * gammaparticle
156  = new G4DynamicParticle(G4MT_daughters[idGamma] , gdirection, Pgamma);
157 
158  // calcurate beta of (l+ l-)system
159  G4double beta = Pgamma/(parentmass-Pgamma);
160 
161  // calculate lepton momentum in the rest frame of (l+ l-)system
162  G4double Plepton =
163  G4PhaseSpaceDecayChannel::Pmx(std::sqrt(t),leptonmass, leptonmass);
164  G4double Elepton = std::sqrt(Plepton*Plepton + leptonmass*leptonmass );
165  costheta = 2.*G4UniformRand()-1.0;
166  sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
167  phi = twopi*G4UniformRand()*rad;
168  G4ThreeVector ldirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
169  //create G4DynamicParticle for leptons in the rest frame of (l+ l-)system
170  G4DynamicParticle * leptonparticle
171  = new G4DynamicParticle(G4MT_daughters[idLepton] ,
172  ldirection, Elepton-leptonmass );
173  G4DynamicParticle * antileptonparticle
174  = new G4DynamicParticle(G4MT_daughters[idAntiLepton] ,
175  -1.0*ldirection, Elepton-leptonmass );
176  //boost leptons in the rest frame of the parent
177  G4LorentzVector p4 = leptonparticle->Get4Momentum();
178  p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
179  leptonparticle->Set4Momentum(p4);
180  p4 = antileptonparticle->Get4Momentum();
181  p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
182  antileptonparticle->Set4Momentum(p4);
183 
184  //create G4Decayproducts
185  G4DecayProducts *products = new G4DecayProducts(*parentparticle);
186  delete parentparticle;
187  products->PushProducts(gammaparticle);
188  products->PushProducts(leptonparticle);
189  products->PushProducts(antileptonparticle);
190 
191 #ifdef G4VERBOSE
192  if (GetVerboseLevel()>1) {
193  G4cout << "G4DalitzDecayChannel::DecayIt ";
194  G4cout << " create decay products in rest frame " <<G4endl;
195  products->DumpInfo();
196  }
197 #endif
198  return products;
199 }
void CheckAndFillDaughters()
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
static constexpr double rad
Definition: G4SIunits.hh:149
static constexpr double twopi
Definition: G4SIunits.hh:76
#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
static G4double Pmx(G4double e, G4double p1, G4double p2)

Here is the call graph for this function:

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

Definition at line 79 of file G4DalitzDecayChannel.cc.

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

Here is the call graph for this function:


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