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)

Protected Member Functions

 G4DalitzDecayChannel (const G4DalitzDecayChannel &)
G4DalitzDecayChanneloperator= (const G4DalitzDecayChannel &)

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

00058                    :G4VDecayChannel("Dalitz Decay",1)
00059 {
00060   // set names for daughter particles
00061   SetParent(theParentName);
00062   SetBR(theBR);
00063   SetNumberOfDaughters(3);
00064   G4String gammaName = "gamma";
00065   SetDaughter(idGamma, gammaName);
00066   SetDaughter(idLepton, theLeptonName);
00067   SetDaughter(idAntiLepton, theAntiLeptonName);
00068 }

G4DalitzDecayChannel::~G4DalitzDecayChannel (  )  [virtual]

Definition at line 70 of file G4DalitzDecayChannel.cc.

00071 {
00072 }

G4DalitzDecayChannel::G4DalitzDecayChannel ( const G4DalitzDecayChannel  )  [protected]

Definition at line 74 of file G4DalitzDecayChannel.cc.

References G4DalitzDecayChannel().

00074                                                                            :
00075   G4VDecayChannel(right)
00076 {
00077 }


Member Function Documentation

G4DecayProducts * G4DalitzDecayChannel::DecayIt ( G4double   )  [virtual]

Implements G4VDecayChannel.

Definition at line 106 of file G4DalitzDecayChannel.cc.

References G4VDecayChannel::daughters, G4DecayProducts::DumpInfo(), G4VDecayChannel::FillDaughters(), G4VDecayChannel::FillParent(), G4cout, G4endl, G4UniformRand, G4DynamicParticle::Get4Momentum(), G4ParticleDefinition::GetPDGMass(), G4VDecayChannel::GetVerboseLevel(), G4VDecayChannel::parent, G4PhaseSpaceDecayChannel::Pmx(), G4DecayProducts::PushProducts(), and G4DynamicParticle::Set4Momentum().

00107 {
00108 #ifdef G4VERBOSE
00109   if (GetVerboseLevel()>1) G4cout << "G4DalitzDecayChannel::DecayIt ";
00110 #endif 
00111   if (parent == 0) FillParent();  
00112   if (daughters == 0) FillDaughters();
00113 
00114   // parent mass
00115   G4double parentmass = parent->GetPDGMass();
00116  
00117  //create parent G4DynamicParticle at rest
00118   G4ThreeVector dummy;
00119   G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
00120  
00121   //daughters'mass
00122   G4double leptonmass = daughters[idLepton]->GetPDGMass(); 
00123 
00124  // Generate t ( = std::exp(x):mass Square of (l+ l-) system) 
00125   G4double xmin  = 2.0*std::log(2.0*leptonmass);
00126   G4double xmax  = 2.0*std::log(parentmass);
00127   G4double wmax = 1.5;
00128   G4double x, w, ww, w1, w2, w3, t;
00129   do {
00130     x = G4UniformRand()*(xmax-xmin) + xmin;
00131     w = G4UniformRand()*wmax;
00132     t = std::exp(x);
00133     w1 = (1.0-4.0*leptonmass*leptonmass/t);
00134     if ( w1 > 0.0) {
00135       w2 = ( 1.0 + 2.0*leptonmass*leptonmass/t );
00136       w3 = ( 1.0 - t/parentmass/parentmass );
00137       w3 = w3 * w3 * w3;
00138       ww = w3 * w2 * std::sqrt(w1);
00139     } else {
00140       ww = 0.0;
00141     }
00142   } while (w > ww);    
00143  
00144   // calculate gamma momentum
00145   G4double Pgamma = 
00146       G4PhaseSpaceDecayChannel::Pmx(parentmass, 0.0, std::sqrt(t)); 
00147   G4double costheta = 2.*G4UniformRand()-1.0;
00148   G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
00149   G4double phi  = twopi*G4UniformRand()*rad;
00150   G4ThreeVector gdirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
00151 
00152   //create G4DynamicParticle for gamma 
00153   G4DynamicParticle * gammaparticle
00154       = new G4DynamicParticle(daughters[idGamma] , gdirection, Pgamma);
00155 
00156   // calcurate beta of (l+ l-)system
00157   G4double beta = Pgamma/(parentmass-Pgamma);
00158 
00159   // calculate lepton momentum in the rest frame of (l+ l-)system
00160   G4double Plepton = 
00161       G4PhaseSpaceDecayChannel::Pmx(std::sqrt(t),leptonmass, leptonmass); 
00162   G4double Elepton = std::sqrt(Plepton*Plepton + leptonmass*leptonmass );
00163   costheta = 2.*G4UniformRand()-1.0;
00164   sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
00165   phi  = twopi*G4UniformRand()*rad;
00166   G4ThreeVector ldirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
00167   //create G4DynamicParticle for leptons  in the rest frame of (l+ l-)system
00168   G4DynamicParticle * leptonparticle 
00169     = new G4DynamicParticle(daughters[idLepton] , 
00170                             ldirection, Elepton-leptonmass );
00171   G4DynamicParticle * antileptonparticle 
00172     = new G4DynamicParticle(daughters[idAntiLepton] , 
00173                             -1.0*ldirection, Elepton-leptonmass );
00174   //boost leptons in the rest frame of the parent 
00175   G4LorentzVector p4 = leptonparticle->Get4Momentum();
00176   p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
00177   leptonparticle->Set4Momentum(p4);
00178   p4 = antileptonparticle->Get4Momentum();
00179   p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
00180   antileptonparticle->Set4Momentum(p4);
00181 
00182   //create G4Decayproducts
00183   G4DecayProducts *products = new G4DecayProducts(*parentparticle);
00184   delete parentparticle;
00185   products->PushProducts(gammaparticle);
00186   products->PushProducts(leptonparticle);
00187   products->PushProducts(antileptonparticle);
00188 
00189 #ifdef G4VERBOSE
00190   if (GetVerboseLevel()>1) {
00191      G4cout << "G4DalitzDecayChannel::DecayIt ";
00192      G4cout << "  create decay products in rest frame " <<G4endl;
00193      products->DumpInfo();
00194   }
00195 #endif
00196   return products;
00197 }

G4DalitzDecayChannel & G4DalitzDecayChannel::operator= ( const G4DalitzDecayChannel  )  [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.

00080 {
00081   if (this != &right) { 
00082     kinematics_name = right.kinematics_name;
00083     verboseLevel = right.verboseLevel;
00084     rbranch = right.rbranch;
00085 
00086     // copy parent name
00087     parent_name = new G4String(*right.parent_name);
00088 
00089     // clear daughters_name array
00090     ClearDaughtersName();
00091 
00092     // recreate array
00093     numberOfDaughters = right.numberOfDaughters;
00094     if ( numberOfDaughters >0 ) {
00095       if (daughters_name !=0) ClearDaughtersName();
00096       daughters_name = new G4String*[numberOfDaughters];
00097       //copy daughters name
00098       for (G4int index=0; index < numberOfDaughters; index++) {
00099           daughters_name[index] = new G4String(*right.daughters_name[index]);
00100       }
00101     }
00102   }
00103   return *this;
00104 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:44 2013 for Geant4 by  doxygen 1.4.7