Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
G4VDecayChannel Class Referenceabstract

#include <G4VDecayChannel.hh>

Inheritance diagram for G4VDecayChannel:
G4DalitzDecayChannel G4GeneralPhaseSpaceDecay G4KL3DecayChannel G4MuonDecayChannel G4MuonRadiativeDecayChannelWithSpin G4NeutronBetaDecayChannel G4PhaseSpaceDecayChannel G4PionRadiativeDecayChannel G4TauLeptonicDecayChannel

Public Member Functions

 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
 
virtual G4DecayProducts * DecayIt (G4double parentMass=-1.0)=0
 
const G4String & GetKinematicsName () const
 
G4double GetBR () const
 
G4int GetNumberOfDaughters () const
 
G4ParticleDefinition * GetParent ()
 
G4ParticleDefinition * GetDaughter (G4int anIndex)
 
G4int GetAngularMomentum ()
 
const G4String & GetParentName () const
 
const G4String & GetDaughterName (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

void ClearDaughtersName ()
 
void FillDaughters ()
 
void FillParent ()
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChannel & operator= (const G4VDecayChannel &)
 

Protected Attributes

G4String kinematics_name
 
G4double rbranch
 
G4int numberOfDaughters
 
G4String * parent_name
 
G4String ** daughters_name
 
G4ParticleTable * particletable
 
G4int verboseLevel
 
G4ParticleDefinition * G4MT_parent
 
G4ParticleDefinition ** G4MT_daughters
 
G4double G4MT_parent_mass
 
G4double * G4MT_daughters_mass
 

Static Protected Attributes

static const G4String noName = " "
 

Detailed Description

Definition at line 101 of file G4VDecayChannel.hh.

Constructor & Destructor Documentation

G4VDecayChannel::G4VDecayChannel ( const G4String &  aName,
G4int  Verbose = 1 
)

Definition at line 82 of file G4VDecayChannel.cc.

References G4MT_daughters, G4MT_daughters_mass, G4MT_parent, G4MT_parent_mass, G4ParticleTable::GetParticleTable(), and particletable.

83  :kinematics_name(aName),
84  rbranch(0.0),
87  particletable(0),
88  verboseLevel(Verbose)
89 {
90 /////@@ instanceID = subInstanceManager.CreateSubInstance();
91  G4MT_parent = 0;
92  G4MT_daughters = 0;
93  G4MT_parent_mass = 0.0;
95 
96  // set pointer to G4ParticleTable (static and singleton object)
98 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
G4String kinematics_name
G4String * parent_name
static G4ParticleTable * GetParticleTable()
G4String ** daughters_name
G4VDecayChannel::G4VDecayChannel ( const G4String &  aName,
const G4String &  theParentName,
G4double  theBR,
G4int  theNumberOfDaughters,
const G4String &  theDaughterName1,
const G4String &  theDaughterName2 = "",
const G4String &  theDaughterName3 = "",
const G4String &  theDaughterName4 = "" 
)

Definition at line 100 of file G4VDecayChannel.cc.

References daughters_name, G4MT_daughters, G4MT_daughters_mass, G4MT_parent, G4MT_parent_mass, G4ParticleTable::GetParticleTable(), numberOfDaughters, parent_name, and particletable.

108  :kinematics_name(aName),
109  rbranch(theBR),
110  numberOfDaughters(theNumberOfDaughters),
112  particletable(0),
113  verboseLevel(1)
114 {
115 /////@@ instanceID = subInstanceManager.CreateSubInstance();
116  G4MT_parent = 0;
117  G4MT_daughters = 0;
118  G4MT_parent_mass = 0.0;
120 
121  // set pointer to G4ParticleTable (static and singleton object)
123 
124  // parent name
125  parent_name = new G4String(theParentName);
126 
127  // cleate array
129  for (G4int index=0;index<numberOfDaughters;index++) daughters_name[index]=0;
130 
131  // daughters' name
132  if (numberOfDaughters>0) daughters_name[0] = new G4String(theDaughterName1);
133  if (numberOfDaughters>1) daughters_name[1] = new G4String(theDaughterName2);
134  if (numberOfDaughters>2) daughters_name[2] = new G4String(theDaughterName3);
135  if (numberOfDaughters>3) daughters_name[3] = new G4String(theDaughterName4);
136 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
int G4int
Definition: G4Types.hh:78
G4String kinematics_name
G4String * parent_name
static G4ParticleTable * GetParticleTable()
G4String ** daughters_name
G4VDecayChannel::~G4VDecayChannel ( )
virtual

Definition at line 209 of file G4VDecayChannel.cc.

References ClearDaughtersName(), G4MT_daughters_mass, and parent_name.

210 {
212  if (parent_name != 0) delete parent_name;
213  parent_name = 0;
214  if (G4MT_daughters_mass != 0) delete [] G4MT_daughters_mass;
216 }
G4double * G4MT_daughters_mass
G4String * parent_name
G4VDecayChannel::G4VDecayChannel ( )
protected

Definition at line 64 of file G4VDecayChannel.cc.

References G4MT_daughters, G4MT_daughters_mass, G4MT_parent, G4MT_parent_mass, G4ParticleTable::GetParticleTable(), and particletable.

65  :kinematics_name(""),
66  rbranch(0.0),
69  particletable(0),
70  verboseLevel(1)
71 {
72 /////@@ instanceID = subInstanceManager.CreateSubInstance();
73  G4MT_parent = 0;
74  G4MT_daughters = 0;
75  G4MT_parent_mass = 0.0;
77 
78  // set pointer to G4ParticleTable (static and singleton object)
80 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
G4String kinematics_name
G4String * parent_name
static G4ParticleTable * GetParticleTable()
G4String ** daughters_name
G4VDecayChannel::G4VDecayChannel ( const G4VDecayChannel &  right)
protected

Definition at line 138 of file G4VDecayChannel.cc.

References daughters_name, G4MT_daughters, G4MT_daughters_mass, G4MT_parent, G4MT_parent_mass, G4ParticleTable::GetParticleTable(), kinematics_name, numberOfDaughters, parent_name, particletable, rbranch, and verboseLevel.

139 {
140 /////@@ instanceID = subInstanceManager.CreateSubInstance();
141 
143  verboseLevel = right.verboseLevel;
144  rbranch = right.rbranch;
145 
146  // copy parent name
147  parent_name = new G4String(*right.parent_name);
148  G4MT_parent = 0;
149  G4MT_parent_mass = 0.0;
150 
151  //create array
153 
154  daughters_name =0;
155  if ( numberOfDaughters >0 ) {
157  //copy daughters name
158  for (G4int index=0; index < numberOfDaughters; index++)
159  {
160  daughters_name[index] = new G4String(*right.daughters_name[index]);
161  }
162  }
163 
164  //
166  G4MT_daughters = 0;
167 
168  // particle table
170 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
int G4int
Definition: G4Types.hh:78
G4String kinematics_name
G4String * parent_name
static G4ParticleTable * GetParticleTable()
G4String ** daughters_name

Member Function Documentation

void G4VDecayChannel::ClearDaughtersName ( )
protected

Definition at line 223 of file G4VDecayChannel.cc.

References daughters_name, G4cout, G4endl, G4MT_daughters, G4MT_daughters_mass, numberOfDaughters, parent_name, and verboseLevel.

Referenced by G4KL3DecayChannel::operator=(), G4NeutronBetaDecayChannel::operator=(), G4DalitzDecayChannel::operator=(), G4TauLeptonicDecayChannel::operator=(), G4MuonDecayChannel::operator=(), G4MuonDecayChannelWithSpin::operator=(), G4PionRadiativeDecayChannel::operator=(), G4MuonRadiativeDecayChannelWithSpin::operator=(), operator=(), SetNumberOfDaughters(), and ~G4VDecayChannel().

224 {
225  if ( daughters_name != 0) {
226  if (numberOfDaughters>0) {
227 #ifdef G4VERBOSE
228  if (verboseLevel>1) {
229  G4cout << "G4VDecayChannel::ClearDaughtersName "
230  << " for " << *parent_name << G4endl;
231  }
232 #endif
233  for (G4int index=0; index < numberOfDaughters; index++) {
234  if (daughters_name[index] != 0) delete daughters_name[index];
235  }
236  }
237  delete [] daughters_name;
238  daughters_name = 0;
239  }
240  //
241  if (G4MT_daughters != 0) delete [] G4MT_daughters;
242  if (G4MT_daughters_mass != 0) delete [] G4MT_daughters_mass;
243  G4MT_daughters = 0;
245 
246  numberOfDaughters = 0;
247 }
G4double * G4MT_daughters_mass
G4ParticleDefinition ** G4MT_daughters
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4String * parent_name
#define G4endl
Definition: G4ios.hh:61
G4String ** daughters_name
virtual G4DecayProducts* G4VDecayChannel::DecayIt ( G4double  parentMass = -1.0)
pure virtual
void G4VDecayChannel::DumpInfo ( )

Definition at line 513 of file G4VDecayChannel.cc.

References daughters_name, G4cout, G4endl, kinematics_name, numberOfDaughters, and rbranch.

Referenced by G4PhaseSpaceDecayChannel::DecayIt(), G4GeneralPhaseSpaceDecay::DecayIt(), G4NuclearDecayChannel::DecayIt(), and G4KL3DecayChannel::G4KL3DecayChannel().

514 {
515  G4cout << " BR: " << rbranch << " [" << kinematics_name << "]";
516  G4cout << " : " ;
517  for (G4int index=0; index < numberOfDaughters; index++)
518  {
519  if(daughters_name[index] != 0) {
520  G4cout << " " << *(daughters_name[index]);
521  } else {
522  G4cout << " not defined ";
523  }
524  }
525  G4cout << G4endl;
526 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4String kinematics_name
#define G4endl
Definition: G4ios.hh:61
G4String ** daughters_name
void G4VDecayChannel::FillDaughters ( )
protected

Definition at line 313 of file G4VDecayChannel.cc.

References daughters_name, FatalException, FillParent(), G4ParticleTable::FindParticle(), G4cout, G4endl, G4Exception(), G4MT_daughters, G4MT_daughters_mass, G4MT_parent, G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleType(), G4ParticleDefinition::GetPDGMass(), G4ParticleDefinition::GetPDGWidth(), GetVerboseLevel(), python.hepunit::GeV, numberOfDaughters, parent_name, particletable, SetBR(), and verboseLevel.

Referenced by G4PhaseSpaceDecayChannel::DecayIt(), G4KL3DecayChannel::DecayIt(), G4NeutronBetaDecayChannel::DecayIt(), G4MuonDecayChannel::DecayIt(), G4DalitzDecayChannel::DecayIt(), G4TauLeptonicDecayChannel::DecayIt(), G4MuonDecayChannelWithSpin::DecayIt(), G4PionRadiativeDecayChannel::DecayIt(), G4GeneralPhaseSpaceDecay::DecayIt(), G4MuonRadiativeDecayChannelWithSpin::DecayIt(), G4NuclearDecayChannel::G4NuclearDecayChannel(), GetAngularMomentum(), GetDaughter(), and SetDaughter().

314 {
315  G4int index;
316 
317 #ifdef G4VERBOSE
318  if (verboseLevel>1) G4cout << "G4VDecayChannel::FillDaughters()" <<G4endl;
319 #endif
320  if (G4MT_daughters != 0) {
321  delete [] G4MT_daughters;
322  G4MT_daughters = 0;
323  }
324 
325  // parent mass
326  if (G4MT_parent == 0) FillParent();
327  G4double parentmass = G4MT_parent->GetPDGMass();
328 
329  //
330  G4double sumofdaughtermass = 0.0;
331  if ((numberOfDaughters <=0) || (daughters_name == 0) ){
332 #ifdef G4VERBOSE
333  if (verboseLevel>0) {
334  G4cout << "G4VDecayChannel::FillDaughters "
335  << "[ " << G4MT_parent->GetParticleName() << " ]"
336  << "numberOfDaughters is not defined yet";
337  }
338 #endif
339  G4MT_daughters = 0;
340  G4Exception("G4VDecayChannel::FillDaughters",
341  "PART011", FatalException,
342  "Can not fill daughters: numberOfDaughters is not defined yet");
343  }
344 
345  //create and set the array of pointers to daughter particles
347  if (G4MT_daughters_mass != 0) delete [] G4MT_daughters_mass;
349  // loop over all daughters
350  for (index=0; index < numberOfDaughters; index++) {
351  if (daughters_name[index] == 0) {
352  // daughter name is not defined
353 #ifdef G4VERBOSE
354  if (verboseLevel>0) {
355  G4cout << "G4VDecayChannel::FillDaughters "
356  << "[ " << G4MT_parent->GetParticleName() << " ]"
357  << index << "-th daughter is not defined yet" << G4endl;
358  }
359 #endif
360  G4MT_daughters[index] = 0;
361  G4Exception("G4VDecayChannel::FillDaughters",
362  "PART011", FatalException,
363  "Can not fill daughters: name of a daughter is not defined yet");
364  }
365  //search daughter particles in the particle table
367  if (G4MT_daughters[index] == 0) {
368  // can not find the daughter particle
369 #ifdef G4VERBOSE
370  if (verboseLevel>0) {
371  G4cout << "G4VDecayChannel::FillDaughters "
372  << "[ " << G4MT_parent->GetParticleName() << " ]"
373  << index << ":" << *daughters_name[index]
374  << " is not defined !!" << G4endl;
375  G4cout << " The BR of this decay mode is set to zero " << G4endl;
376  }
377 #endif
378  SetBR(0.0);
379  return;
380  }
381 #ifdef G4VERBOSE
382  if (verboseLevel>1) {
383  G4cout << index << ":" << *daughters_name[index];
384  G4cout << ":" << G4MT_daughters[index] << G4endl;
385  }
386 #endif
387  G4MT_daughters_mass[index] = G4MT_daughters[index]->GetPDGMass();
388  sumofdaughtermass += G4MT_daughters[index]->GetPDGMass();
389  } // end loop over all daughters
390 
391  // check sum of daghter mass
392  G4double widthMass = G4MT_parent->GetPDGWidth();
393  if ( (G4MT_parent->GetParticleType() != "nucleus") &&
394  (sumofdaughtermass > parentmass + 5*widthMass) ){
395  // !!! illegal mass !!!
396 #ifdef G4VERBOSE
397  if (GetVerboseLevel()>0) {
398  G4cout << "G4VDecayChannel::FillDaughters "
399  << "[ " << G4MT_parent->GetParticleName() << " ]"
400  << " Energy/Momentum conserevation breaks " <<G4endl;
401  if (GetVerboseLevel()>1) {
402  G4cout << " parent:" << *parent_name
403  << " mass:" << parentmass/GeV << "[GeV/c/c]" <<G4endl;
404  for (index=0; index < numberOfDaughters; index++){
405  G4cout << " daughter " << index << ":" << *daughters_name[index]
406  << " mass:" << G4MT_daughters[index]->GetPDGMass()/GeV
407  << "[GeV/c/c]" <<G4endl;
408  }
409  }
410  }
411 #endif
412  }
413 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetBR(G4double value)
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4ParticleTable * particletable
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4double GetPDGWidth() const
G4GLOB_DLL std::ostream G4cout
G4String * parent_name
const G4String & GetParticleType() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int GetVerboseLevel() const
G4double GetPDGMass() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4String ** daughters_name
void G4VDecayChannel::FillParent ( )
protected

Definition at line 416 of file G4VDecayChannel.cc.

References FatalException, G4ParticleTable::FindParticle(), G4cout, G4endl, G4Exception(), G4MT_parent, G4MT_parent_mass, G4ParticleDefinition::GetPDGMass(), parent_name, particletable, and verboseLevel.

Referenced by G4PhaseSpaceDecayChannel::DecayIt(), G4KL3DecayChannel::DecayIt(), G4NeutronBetaDecayChannel::DecayIt(), G4MuonDecayChannel::DecayIt(), G4DalitzDecayChannel::DecayIt(), G4TauLeptonicDecayChannel::DecayIt(), G4MuonDecayChannelWithSpin::DecayIt(), G4PionRadiativeDecayChannel::DecayIt(), G4GeneralPhaseSpaceDecay::DecayIt(), G4MuonRadiativeDecayChannelWithSpin::DecayIt(), FillDaughters(), G4NuclearDecayChannel::G4NuclearDecayChannel(), and GetParent().

417 {
418  if (parent_name == 0) {
419  // parent name is not defined
420 #ifdef G4VERBOSE
421  if (verboseLevel>0) {
422  G4cout << "G4VDecayChannel::FillParent "
423  << ": parent name is not defined !!" << G4endl;
424  }
425 #endif
426  G4MT_parent = 0;
427  G4Exception("G4VDecayChannel::FillParent()",
428  "PART012", FatalException,
429  "Can not fill parent: parent name is not defined yet");
430  return;
431  }
432  // search parent particle in the particle table
434  if (G4MT_parent == 0) {
435  // parent particle does not exist
436 #ifdef G4VERBOSE
437  if (verboseLevel>0) {
438  G4cout << "G4VDecayChannel::FillParent "
439  << *parent_name << " does not exist !!" << G4endl;
440  }
441 #endif
442  G4Exception("G4VDecayChannel::FillParent()",
443  "PART012", FatalException,
444  "Can not fill parent: parent does not exist");
445  return;
446  }
448 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4ParticleDefinition * G4MT_parent
G4double G4MT_parent_mass
G4ParticleTable * particletable
G4GLOB_DLL std::ostream G4cout
G4String * parent_name
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4double GetPDGMass() const
#define G4endl
Definition: G4ios.hh:61
G4int G4VDecayChannel::GetAngularMomentum ( )

Definition at line 455 of file G4VDecayChannel.cc.

References FillDaughters(), G4cout, G4endl, G4Exception(), G4MT_daughters, G4MT_parent, G4ParticleDefinition::GetPDGiParity(), G4ParticleDefinition::GetPDGiSpin(), JustWarning, numberOfDaughters, and verboseLevel.

456 {
457  // determine angular momentum
458 
459  // fill pointers to daughter particles if not yet set
460  if (G4MT_daughters == 0) FillDaughters();
461 
462  const G4int PiSpin = G4MT_parent->GetPDGiSpin();
463  const G4int PParity = G4MT_parent->GetPDGiParity();
464  if (2==numberOfDaughters) { // up to now we can only handle two particle decays
465  const G4int D1iSpin = G4MT_daughters[0]->GetPDGiSpin();
466  const G4int D1Parity = G4MT_daughters[0]->GetPDGiParity();
467  const G4int D2iSpin = G4MT_daughters[1]->GetPDGiSpin();
468  const G4int D2Parity = G4MT_daughters[1]->GetPDGiParity();
469  const G4int MiniSpin = std::abs (D1iSpin - D2iSpin);
470  const G4int MaxiSpin = D1iSpin + D2iSpin;
471  const G4int lMax = (PiSpin+D1iSpin+D2iSpin)/2; // l is allways int
472  G4int lMin;
473 #ifdef G4VERBOSE
474  if (verboseLevel>1) {
475  G4cout << "iSpin: " << PiSpin << " -> " << D1iSpin << " + " << D2iSpin << G4endl;
476  G4cout << "2*jmin, 2*jmax, lmax " << MiniSpin << " " << MaxiSpin << " " << lMax << G4endl;
477  }
478 #endif
479  for (G4int j=MiniSpin; j<=MaxiSpin; j+=2){ // loop over all possible spin couplings
480  lMin = std::abs(PiSpin-j)/2;
481 #ifdef G4VERBOSE
482  if (verboseLevel>1)
483  G4cout << "-> checking 2*j=" << j << G4endl;
484 #endif
485  for (G4int l=lMin; l<=lMax; l++) {
486 #ifdef G4VERBOSE
487  if (verboseLevel>1)
488  G4cout << " checking l=" << l << G4endl;
489 #endif
490  if (l%2==0) {
491  if (PParity == D1Parity*D2Parity) { // check parity for this l
492  return l;
493  }
494  } else {
495  if (PParity == -1*D1Parity*D2Parity) { // check parity for this l
496  return l;
497  }
498  }
499  }
500  }
501  } else {
502  G4Exception("G4VDecayChannel::GetAngularMomentum",
503  "PART111", JustWarning,
504  "Sorry, can't handle 3 particle decays (up to now)");
505  return 0;
506  }
507  G4Exception ("G4VDecayChannel::GetAngularMomentum",
508  "PART111", JustWarning,
509  "Can't find angular momentum for this decay");
510  return 0;
511 }
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
G4double G4VDecayChannel::GetBR ( ) const
inline
G4ParticleDefinition * G4VDecayChannel::GetDaughter ( G4int  anIndex)
inline

Definition at line 247 of file G4VDecayChannel.hh.

References FillDaughters(), G4cout, G4endl, G4MT_daughters, numberOfDaughters, and verboseLevel.

Referenced by G4KineticTrack::Decay(), G4KineticTrack::G4KineticTrack(), G4TextPPReporter::GeneratePropertyTable(), and G4MTRunManagerKernel::SetUpDecayChannels().

248  {
249  // pointers to daughter particles are filled, if they are not set yet
250  if (G4MT_daughters == 0) FillDaughters();
251 
252  // get the pointer to a daughter particle
253  if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
254  return G4MT_daughters[anIndex];
255  } else {
256  if (verboseLevel>0)
257  G4cout << "G4VDecayChannel::GetDaughter index out of range "<<anIndex<<G4endl;
258  return 0;
259  }
260 }
G4ParticleDefinition ** G4MT_daughters
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4double G4VDecayChannel::GetDaughterMass ( G4int  anIndex) const
inline

Definition at line 277 of file G4VDecayChannel.hh.

References G4cout, G4endl, G4MT_daughters_mass, numberOfDaughters, and verboseLevel.

278 {
279  if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
280  return G4MT_daughters_mass[anIndex];
281  } else {
282  if (verboseLevel>0){
283  G4cout << "G4VDecayChannel::GetDaughterMass ";
284  G4cout << "index out of range " << anIndex << G4endl;
285  }
286  return 0.0;
287  }
288 }
G4double * G4MT_daughters_mass
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const G4String & G4VDecayChannel::GetDaughterName ( G4int  anIndex) const
inline

Definition at line 263 of file G4VDecayChannel.hh.

References daughters_name, G4cout, G4endl, numberOfDaughters, and verboseLevel.

Referenced by G4KineticTrack::Decay().

264 {
265  if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
266  return *daughters_name[anIndex];
267  } else {
268  if (verboseLevel>0){
269  G4cout << "G4VDecayChannel::GetDaughterName ";
270  G4cout << "index out of range " << anIndex << G4endl;
271  }
272  return GetNoName();
273  }
274 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4String ** daughters_name
const G4String & G4VDecayChannel::GetKinematicsName ( ) const
inline

Definition at line 326 of file G4VDecayChannel.hh.

References kinematics_name.

Referenced by G4TextPPReporter::GeneratePropertyTable().

326 { return kinematics_name; }
G4String kinematics_name
G4int G4VDecayChannel::GetNumberOfDaughters ( ) const
inline
G4ParticleDefinition * G4VDecayChannel::GetParent ( )
inline

Definition at line 291 of file G4VDecayChannel.hh.

References FillParent(), and G4MT_parent.

Referenced by G4DecayTable::Insert().

292 {
293  // the pointer to the parent particle is filled, if it is not set yet
294  if (G4MT_parent == 0) FillParent();
295  // get the pointer to the parent particle
296  return G4MT_parent;
297 }
G4ParticleDefinition * G4MT_parent
G4double G4VDecayChannel::GetParentMass ( ) const
inline

Definition at line 306 of file G4VDecayChannel.hh.

References G4MT_parent_mass.

307 {
308  return G4MT_parent_mass;
309 }
G4double G4MT_parent_mass
const G4String & G4VDecayChannel::GetParentName ( ) const
inline

Definition at line 300 of file G4VDecayChannel.hh.

References parent_name.

Referenced by G4KineticTrack::Decay(), and G4MuonRadiativeDecayChannelWithSpin::DecayIt().

301 {
302  return *parent_name;
303 }
G4String * parent_name
G4int G4VDecayChannel::GetVerboseLevel ( ) const
inline

Definition at line 338 of file G4VDecayChannel.hh.

References verboseLevel.

Referenced by G4KL3DecayChannel::DalitzDensity(), G4PhaseSpaceDecayChannel::DecayIt(), G4KL3DecayChannel::DecayIt(), G4NeutronBetaDecayChannel::DecayIt(), G4MuonDecayChannel::DecayIt(), G4DalitzDecayChannel::DecayIt(), G4TauLeptonicDecayChannel::DecayIt(), G4MuonDecayChannelWithSpin::DecayIt(), G4PionRadiativeDecayChannel::DecayIt(), G4GeneralPhaseSpaceDecay::DecayIt(), G4NuclearDecayChannel::DecayIt(), G4MuonRadiativeDecayChannelWithSpin::DecayIt(), G4Decay::DecayIt(), FillDaughters(), G4AlphaDecayChannel::G4AlphaDecayChannel(), G4BetaMinusDecayChannel::G4BetaMinusDecayChannel(), G4BetaPlusDecayChannel::G4BetaPlusDecayChannel(), G4GeneralPhaseSpaceDecay::G4GeneralPhaseSpaceDecay(), G4ITDecayChannel::G4ITDecayChannel(), G4KL3DecayChannel::G4KL3DecayChannel(), G4KshellECDecayChannel::G4KshellECDecayChannel(), G4LshellECDecayChannel::G4LshellECDecayChannel(), G4MshellECDecayChannel::G4MshellECDecayChannel(), G4MuonDecayChannel::G4MuonDecayChannel(), G4MuonRadiativeDecayChannelWithSpin::G4MuonRadiativeDecayChannelWithSpin(), G4NeutronBetaDecayChannel::G4NeutronBetaDecayChannel(), G4NuclearDecayChannel::G4NuclearDecayChannel(), G4PionRadiativeDecayChannel::G4PionRadiativeDecayChannel(), G4TauLeptonicDecayChannel::G4TauLeptonicDecayChannel(), G4GeneralPhaseSpaceDecay::ManyBodyDecayIt(), G4GeneralPhaseSpaceDecay::OneBodyDecayIt(), G4KL3DecayChannel::PhaseSpace(), G4GeneralPhaseSpaceDecay::ThreeBodyDecayIt(), and G4GeneralPhaseSpaceDecay::TwoBodyDecayIt().

338 { return verboseLevel; }
G4int G4VDecayChannel::operator!= ( const G4VDecayChannel &  right) const
inline

Definition at line 125 of file G4VDecayChannel.hh.

125 {return (this != &right);}
G4int G4VDecayChannel::operator< ( const G4VDecayChannel &  right) const
inline

Definition at line 241 of file G4VDecayChannel.hh.

References rbranch.

242 {
243  return (this->rbranch < right.rbranch);
244 }
G4VDecayChannel & G4VDecayChannel::operator= ( const G4VDecayChannel &  right)
protected

Definition at line 172 of file G4VDecayChannel.cc.

References ClearDaughtersName(), daughters_name, G4MT_daughters, G4MT_daughters_mass, G4MT_parent, G4MT_parent_mass, G4ParticleTable::GetParticleTable(), kinematics_name, numberOfDaughters, parent_name, particletable, rbranch, and verboseLevel.

173 {
174  if (this != &right) {
176  verboseLevel = right.verboseLevel;
177  rbranch = right.rbranch;
178 
179  // copy parent name
180  parent_name = new G4String(*right.parent_name);
181 
182  // clear daughters_name array
184 
185  // recreate array
187  if ( numberOfDaughters >0 ) {
190  //copy daughters name
191  for (G4int index=0; index < numberOfDaughters; index++) {
192  daughters_name[index] = new G4String(*right.daughters_name[index]);
193  }
194  }
195  }
196 
197  //
198  G4MT_parent = 0;
199  G4MT_daughters = 0;
200  G4MT_parent_mass = 0.0;
202 
203  // particle table
205 
206  return *this;
207 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
int G4int
Definition: G4Types.hh:78
G4String kinematics_name
G4String * parent_name
static G4ParticleTable * GetParticleTable()
G4String ** daughters_name
G4int G4VDecayChannel::operator== ( const G4VDecayChannel &  right) const
inline

Definition at line 124 of file G4VDecayChannel.hh.

124 {return (this == &right);}
void G4VDecayChannel::SetBR ( G4double  value)
inline
void G4VDecayChannel::SetDaughter ( G4int  anIndex,
const G4ParticleDefinition *  particle_type 
)
void G4VDecayChannel::SetDaughter ( G4int  anIndex,
const G4String &  particle_name 
)

Definition at line 261 of file G4VDecayChannel.cc.

References daughters_name, FillDaughters(), G4cout, G4endl, G4MT_daughters, numberOfDaughters, and verboseLevel.

263 {
264  // check numberOfDaughters is positive
265  if (numberOfDaughters<=0) {
266 #ifdef G4VERBOSE
267  if (verboseLevel>0) {
268  G4cout << "G4VDecayChannel::SetDaughter: "
269  << "Number of daughters is not defined" << G4endl;
270  }
271 #endif
272  return;
273  }
274 
275  // check existence of daughters_name array
276  if (daughters_name == 0) {
277  // cleate array
279  for (G4int index=0;index<numberOfDaughters;index++) {
280  daughters_name[index]=0;
281  }
282  }
283 
284  // check an index
285  if ( (anIndex<0) || (anIndex>=numberOfDaughters) ) {
286 #ifdef G4VERBOSE
287  if (verboseLevel>0) {
288  G4cout << "G4VDecayChannel::SetDaughter"
289  << "index out of range " << anIndex << G4endl;
290  }
291 #endif
292  } else {
293  // delete the old name if it exists
294  if (daughters_name[anIndex]!=0) delete daughters_name[anIndex];
295  // fill the name
296  daughters_name[anIndex] = new G4String(particle_name);
297  // refill the array of daughters[] if it exists
298  if (G4MT_daughters != 0) FillDaughters();
299 #ifdef G4VERBOSE
300  if (verboseLevel>1) {
301  G4cout << "G4VDecayChannel::SetDaughter[" << anIndex <<"] :";
302  G4cout << daughters_name[anIndex] << ":" << *daughters_name[anIndex]<<G4endl;
303  }
304 #endif
305  }
306 }
G4ParticleDefinition ** G4MT_daughters
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4String ** daughters_name
void G4VDecayChannel::SetNumberOfDaughters ( G4int  value)
void G4VDecayChannel::SetParent ( const G4ParticleDefinition *  particle_type)
void G4VDecayChannel::SetParent ( const G4String &  particle_name)
inline

Definition at line 312 of file G4VDecayChannel.hh.

References G4MT_parent, and parent_name.

313 {
314  if (parent_name != 0) delete parent_name;
315  parent_name = new G4String(particle_name);
316  G4MT_parent = 0;
317 }
G4ParticleDefinition * G4MT_parent
G4String * parent_name
void G4VDecayChannel::SetVerboseLevel ( G4int  value)
inline

Definition at line 335 of file G4VDecayChannel.hh.

References verboseLevel.

Referenced by G4Decay::DecayIt().

335 { verboseLevel = value; }
const XML_Char int const XML_Char * value

Field Documentation

G4String** G4VDecayChannel::daughters_name
protected
G4ParticleDefinition** G4VDecayChannel::G4MT_daughters
protected
G4double* G4VDecayChannel::G4MT_daughters_mass
protected
G4ParticleDefinition* G4VDecayChannel::G4MT_parent
protected
G4double G4VDecayChannel::G4MT_parent_mass
protected
G4String G4VDecayChannel::kinematics_name
protected
const G4String G4VDecayChannel::noName = " "
staticprotected

Definition at line 224 of file G4VDecayChannel.hh.

G4int G4VDecayChannel::numberOfDaughters
protected
G4String* G4VDecayChannel::parent_name
protected
G4ParticleTable* G4VDecayChannel::particletable
protected

Definition at line 216 of file G4VDecayChannel.hh.

Referenced by FillDaughters(), FillParent(), G4VDecayChannel(), and operator=().

G4double G4VDecayChannel::rbranch
protected
G4int G4VDecayChannel::verboseLevel
protected

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