Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VDecayChannel Class Referenceabstract

#include <G4VDecayChannel.hh>

Inheritance diagram for G4VDecayChannel:
Collaboration diagram for G4VDecayChannel:

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 G4DecayProductsDecayIt (G4double parentMass=-1.0)=0
 
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

void ClearDaughtersName ()
 
void CheckAndFillDaughters ()
 
void CheckAndFillParent ()
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=+1.) const
 

Protected Attributes

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

static const G4String noName = " "
 

Detailed Description

Definition at line 53 of file G4VDecayChannel.hh.

Constructor & Destructor Documentation

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

Definition at line 69 of file G4VDecayChannel.cc.

70  :kinematics_name(aName),
71  rbranch(0.0),
74  rangeMass(2.5),
76  particletable(0),
77  verboseLevel(Verbose),
80 {
81  G4MT_parent = 0;
82  G4MT_daughters = 0;
83  G4MT_parent_mass = 0.0;
86 
87  // set pointer to G4ParticleTable (static and singleton object)
89 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:175
G4String kinematics_name
G4String * parent_name
G4ThreeVector parent_polarization
static G4ParticleTable * GetParticleTable()
G4double * G4MT_daughters_width
G4String ** daughters_name

Here is the call graph for this function:

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 91 of file G4VDecayChannel.cc.

99  :kinematics_name(aName),
100  rbranch(theBR),
101  numberOfDaughters(theNumberOfDaughters),
103  rangeMass(1.0),
105  particletable(0),
106  verboseLevel(1),
109 {
110  G4MT_parent = 0;
111  G4MT_daughters = 0;
112  G4MT_parent_mass = 0.0;
115 
116  // set pointer to G4ParticleTable (static and singleton object)
118 
119  // parent name
120  parent_name = new G4String(theParentName);
121 
122  // cleate array
124  for (G4int index=0;index<numberOfDaughters;index++) daughters_name[index]=0;
125 
126  // daughters' name
127  if (numberOfDaughters>0) daughters_name[0] = new G4String(theDaughterName1);
128  if (numberOfDaughters>1) daughters_name[1] = new G4String(theDaughterName2);
129  if (numberOfDaughters>2) daughters_name[2] = new G4String(theDaughterName3);
130  if (numberOfDaughters>3) daughters_name[3] = new G4String(theDaughterName4);
131 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
int G4int
Definition: G4Types.hh:78
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:175
G4String kinematics_name
G4String * parent_name
G4ThreeVector parent_polarization
static G4ParticleTable * GetParticleTable()
G4double * G4MT_daughters_width
G4String ** daughters_name

Here is the call graph for this function:

G4VDecayChannel::~G4VDecayChannel ( )
virtual

Definition at line 214 of file G4VDecayChannel.cc.

215 {
217  if (parent_name != 0) delete parent_name;
218  parent_name = 0;
219  if (G4MT_daughters_mass != 0) delete [] G4MT_daughters_mass;
221  if (G4MT_daughters_width != 0) delete [] G4MT_daughters_width;
225 }
G4double * G4MT_daughters_mass
G4String * parent_name
G4double * G4MT_daughters_width
#define G4MUTEXDESTROY(mutex)
Definition: G4Threading.hh:178

Here is the call graph for this function:

G4VDecayChannel::G4VDecayChannel ( )
protected

Definition at line 49 of file G4VDecayChannel.cc.

50  :kinematics_name(""),
51  rbranch(0.0),
54  rangeMass(2.5),
56  particletable(0),
57  verboseLevel(1)
58 {
59  G4MT_parent = 0;
60  G4MT_daughters = 0;
61  G4MT_parent_mass = 0.0;
64 
65  // set pointer to G4ParticleTable (static and singleton object)
67 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4ParticleTable * particletable
G4String kinematics_name
G4String * parent_name
G4ThreeVector parent_polarization
static G4ParticleTable * GetParticleTable()
G4double * G4MT_daughters_width
G4String ** daughters_name

Here is the call graph for this function:

G4VDecayChannel::G4VDecayChannel ( const G4VDecayChannel right)
protected

Definition at line 133 of file G4VDecayChannel.cc.

134 {
136  verboseLevel = right.verboseLevel;
137  rbranch = right.rbranch;
138  rangeMass = right.rangeMass;
139 
140  // copy parent name
141  parent_name = new G4String(*right.parent_name);
142  G4MT_parent = 0;
143  G4MT_parent_mass = 0.0;
144 
145  //create array
147 
148  daughters_name =0;
149  if ( numberOfDaughters >0 ) {
151  //copy daughters name
152  for (G4int index=0; index < numberOfDaughters; index++)
153  {
154  daughters_name[index] = new G4String(*right.daughters_name[index]);
155  }
156  }
157 
158  //
160  G4MT_daughters = 0;
162 
163  // particle table
165 
167 
170 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
#define G4MUTEXINIT(mutex)
Definition: G4Threading.hh:177
G4double G4MT_parent_mass
G4ParticleTable * particletable
int G4int
Definition: G4Types.hh:78
G4String kinematics_name
G4String * parent_name
G4ThreeVector parent_polarization
static G4ParticleTable * GetParticleTable()
G4double * G4MT_daughters_width
G4String ** daughters_name

Here is the call graph for this function:

Member Function Documentation

void G4VDecayChannel::CheckAndFillDaughters ( )
inlineprotected

Definition at line 324 of file G4VDecayChannel.hh.

324  {
326  if ( G4MT_daughters ==0 ) {
327  l.unlock();
328  FillDaughters();
329  }
330 }
G4ParticleDefinition ** G4MT_daughters

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VDecayChannel::CheckAndFillParent ( )
inlineprotected

Definition at line 332 of file G4VDecayChannel.hh.

332  {
334  if ( G4MT_parent == 0 ) {
335  l.unlock();
336  FillParent();
337  }
338 }
G4ParticleDefinition * G4MT_parent

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VDecayChannel::ClearDaughtersName ( )
protected

Definition at line 227 of file G4VDecayChannel.cc.

228 {
230  if ( daughters_name != 0) {
231  if (numberOfDaughters>0) {
232 #ifdef G4VERBOSE
233  if (verboseLevel>1) {
234  G4cout << "G4VDecayChannel::ClearDaughtersName "
235  << " for " << *parent_name << G4endl;
236  }
237 #endif
238  for (G4int index=0; index < numberOfDaughters; index++) {
239  if (daughters_name[index] != 0) delete daughters_name[index];
240  }
241  }
242  delete [] daughters_name;
243  daughters_name = 0;
244  }
245  //
246  if (G4MT_daughters != 0) delete [] G4MT_daughters;
247  if (G4MT_daughters_mass != 0) delete [] G4MT_daughters_mass;
248  if (G4MT_daughters_width != 0) delete [] G4MT_daughters_width;
250  G4MT_daughters = 0;
253 
254  numberOfDaughters = 0;
255 }
G4double * G4MT_daughters_mass
G4ParticleDefinition ** G4MT_daughters
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4String * parent_name
G4double * G4MT_daughters_width
#define G4endl
Definition: G4ios.hh:61
G4String ** daughters_name

Here is the caller graph for this function:

void G4VDecayChannel::DumpInfo ( )

Definition at line 548 of file G4VDecayChannel.cc.

549 {
550  G4cout << " BR: " << rbranch << " [" << kinematics_name << "]";
551  G4cout << " : " ;
552  for (G4int index=0; index < numberOfDaughters; index++){
553  if(daughters_name[index] != 0) {
554  G4cout << " " << *(daughters_name[index]);
555  } else {
556  G4cout << " not defined ";
557  }
558  }
559  G4cout << G4endl;
560 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4String kinematics_name
#define G4endl
Definition: G4ios.hh:61
G4String ** daughters_name

Here is the caller graph for this function:

G4double G4VDecayChannel::DynamicalMass ( G4double  massPDG,
G4double  width,
G4double  maxDev = +1. 
) const
protected

Definition at line 568 of file G4VDecayChannel.cc.

569 {
570  if (width<=0.0) return massPDG;
571  if (maxDev >rangeMass) maxDev = rangeMass;
572  if (maxDev <=-1.*rangeMass) return massPDG; // can not calculate
573 
574  G4double x = G4UniformRand()*(maxDev+rangeMass) - rangeMass;
575  G4double y = G4UniformRand();
576  const size_t MAX_LOOP=10000;
577  for (size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
578  if ( y * (width*width*x*x + massPDG*massPDG*width*width) <= massPDG*massPDG*width*width ) break;
579  x = G4UniformRand()*(maxDev+rangeMass) - rangeMass;
580  y = G4UniformRand();
581  }
582  G4double mass = massPDG + x*width;
583  return mass;
584 }
#define width
tuple x
Definition: test.py:50
#define G4UniformRand()
Definition: Randomize.hh:97
double G4double
Definition: G4Types.hh:76
G4int G4VDecayChannel::GetAngularMomentum ( )

Definition at line 490 of file G4VDecayChannel.cc.

491 {
492  // determine angular momentum
493 
494  // fill pointers to daughter particles if not yet set
496 
497  const G4int PiSpin = G4MT_parent->GetPDGiSpin();
498  const G4int PParity = G4MT_parent->GetPDGiParity();
499  if (2==numberOfDaughters) { // up to now we can only handle two particle decays
500  const G4int D1iSpin = G4MT_daughters[0]->GetPDGiSpin();
501  const G4int D1Parity = G4MT_daughters[0]->GetPDGiParity();
502  const G4int D2iSpin = G4MT_daughters[1]->GetPDGiSpin();
503  const G4int D2Parity = G4MT_daughters[1]->GetPDGiParity();
504  const G4int MiniSpin = std::abs (D1iSpin - D2iSpin);
505  const G4int MaxiSpin = D1iSpin + D2iSpin;
506  const G4int lMax = (PiSpin+D1iSpin+D2iSpin)/2; // l is allways int
507  G4int lMin;
508 #ifdef G4VERBOSE
509  if (verboseLevel>1) {
510  G4cout << "iSpin: " << PiSpin << " -> " << D1iSpin << " + " << D2iSpin << G4endl;
511  G4cout << "2*jmin, 2*jmax, lmax " << MiniSpin << " " << MaxiSpin << " " << lMax << G4endl;
512  }
513 #endif
514  for (G4int j=MiniSpin; j<=MaxiSpin; j+=2){ // loop over all possible spin couplings
515  lMin = std::abs(PiSpin-j)/2;
516 #ifdef G4VERBOSE
517  if (verboseLevel>1)
518  G4cout << "-> checking 2*j=" << j << G4endl;
519 #endif
520  for (G4int l=lMin; l<=lMax; l++) {
521 #ifdef G4VERBOSE
522  if (verboseLevel>1)
523  G4cout << " checking l=" << l << G4endl;
524 #endif
525  if (l%2==0) {
526  if (PParity == D1Parity*D2Parity) { // check parity for this l
527  return l;
528  }
529  } else {
530  if (PParity == -1*D1Parity*D2Parity) { // check parity for this l
531  return l;
532  }
533  }
534  }
535  }
536  } else {
537  G4Exception("G4VDecayChannel::GetAngularMomentum",
538  "PART111", JustWarning,
539  "Sorry, can't handle 3 particle decays (up to now)");
540  return 0;
541  }
542  G4Exception ("G4VDecayChannel::GetAngularMomentum",
543  "PART111", JustWarning,
544  "Can't find angular momentum for this decay");
545  return 0;
546 }
void CheckAndFillDaughters()
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

Here is the call graph for this function:

G4double G4VDecayChannel::GetBR ( ) const
inline

Definition at line 297 of file G4VDecayChannel.hh.

297 { return rbranch; }

Here is the caller graph for this function:

G4ParticleDefinition * G4VDecayChannel::GetDaughter ( G4int  anIndex)
inline

Definition at line 212 of file G4VDecayChannel.hh.

213  {
214  // pointers to daughter particles are filled, if they are not set yet
216 
217  // get the pointer to a daughter particle
218  if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
219  return G4MT_daughters[anIndex];
220  } else {
221  if (verboseLevel>0)
222  G4cout << "G4VDecayChannel::GetDaughter index out of range "<<anIndex<<G4endl;
223  return 0;
224  }
225 }
void CheckAndFillDaughters()
G4ParticleDefinition ** G4MT_daughters
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4VDecayChannel::GetDaughterMass ( G4int  anIndex) const
inline

Definition at line 242 of file G4VDecayChannel.hh.

243 {
244  if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
245  return G4MT_daughters_mass[anIndex];
246  } else {
247  if (verboseLevel>0){
248  G4cout << "G4VDecayChannel::GetDaughterMass ";
249  G4cout << "index out of range " << anIndex << G4endl;
250  }
251  return 0.0;
252  }
253 }
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 228 of file G4VDecayChannel.hh.

229 {
230  if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
231  return *daughters_name[anIndex];
232  } else {
233  if (verboseLevel>0){
234  G4cout << "G4VDecayChannel::GetDaughterName ";
235  G4cout << "index out of range " << anIndex << G4endl;
236  }
237  return GetNoName();
238  }
239 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4String ** daughters_name

Here is the caller graph for this function:

const G4String & G4VDecayChannel::GetKinematicsName ( ) const
inline

Definition at line 291 of file G4VDecayChannel.hh.

291 { return kinematics_name; }
G4String kinematics_name

Here is the caller graph for this function:

G4int G4VDecayChannel::GetNumberOfDaughters ( ) const
inline

Definition at line 285 of file G4VDecayChannel.hh.

286 {
287  return numberOfDaughters;
288 }

Here is the caller graph for this function:

G4ParticleDefinition * G4VDecayChannel::GetParent ( )
inline

Definition at line 256 of file G4VDecayChannel.hh.

257 {
258  // the pointer to the parent particle is filled, if it is not set yet
260  // get the pointer to the parent particle
261  return G4MT_parent;
262 }
G4ParticleDefinition * G4MT_parent

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4VDecayChannel::GetParentMass ( ) const
inline

Definition at line 271 of file G4VDecayChannel.hh.

272 {
273  return G4MT_parent_mass;
274 }
G4double G4MT_parent_mass
const G4String & G4VDecayChannel::GetParentName ( ) const
inline

Definition at line 265 of file G4VDecayChannel.hh.

266 {
267  return *parent_name;
268 }
G4String * parent_name

Here is the caller graph for this function:

const G4ThreeVector & G4VDecayChannel::GetPolarization ( ) const
inline

Definition at line 318 of file G4VDecayChannel.hh.

319 {
320  return parent_polarization;
321 }
G4ThreeVector parent_polarization
G4double G4VDecayChannel::GetRangeMass ( ) const
inline

Definition at line 306 of file G4VDecayChannel.hh.

306 { return rangeMass; }
G4int G4VDecayChannel::GetVerboseLevel ( ) const
inline

Definition at line 303 of file G4VDecayChannel.hh.

303 { return verboseLevel; }

Here is the caller graph for this function:

G4bool G4VDecayChannel::IsOKWithParentMass ( G4double  parentMass)
virtual

Reimplemented in G4PhaseSpaceDecayChannel.

Definition at line 586 of file G4VDecayChannel.cc.

587 {
588  G4double sumOfDaughterMassMin=0.0;
591  // skip one body decay
592  if (numberOfDaughters==1) return true;
593 
594  for (G4int index=0; index < numberOfDaughters; index++) {
595  sumOfDaughterMassMin +=
597  }
598  return (parentMass >= sumOfDaughterMassMin);
599 }
void CheckAndFillDaughters()
G4double * G4MT_daughters_mass
int G4int
Definition: G4Types.hh:78
G4double * G4MT_daughters_width
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4VDecayChannel::operator!= ( const G4VDecayChannel right) const
inline

Definition at line 77 of file G4VDecayChannel.hh.

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

Definition at line 206 of file G4VDecayChannel.hh.

207 {
208  return (this->rbranch < right.rbranch);
209 }
G4VDecayChannel & G4VDecayChannel::operator= ( const G4VDecayChannel right)
protected

Definition at line 172 of file G4VDecayChannel.cc.

173 {
174  if (this != &right) {
176  verboseLevel = right.verboseLevel;
177  rbranch = right.rbranch;
178  rangeMass = right.rangeMass;
180  // copy parent name
181  parent_name = new G4String(*right.parent_name);
182 
183  // clear daughters_name array
185 
186  // recreate array
188  if ( numberOfDaughters >0 ) {
191  //copy daughters name
192  for (G4int index=0; index < numberOfDaughters; index++) {
193  daughters_name[index] = new G4String(*right.daughters_name[index]);
194  }
195  }
196  }
197 
198  //
199  G4MT_parent = 0;
200  G4MT_daughters = 0;
201  G4MT_parent_mass = 0.0;
204 
205  // particle table
207 
210 
211  return *this;
212 }
G4double * G4MT_daughters_mass
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
#define G4MUTEXINIT(mutex)
Definition: G4Threading.hh:177
G4double G4MT_parent_mass
G4ParticleTable * particletable
int G4int
Definition: G4Types.hh:78
G4String kinematics_name
G4String * parent_name
G4ThreeVector parent_polarization
static G4ParticleTable * GetParticleTable()
G4double * G4MT_daughters_width
G4String ** daughters_name

Here is the call graph for this function:

G4int G4VDecayChannel::operator== ( const G4VDecayChannel right) const
inline

Definition at line 76 of file G4VDecayChannel.hh.

76 {return (this == &right);}
void G4VDecayChannel::SetBR ( G4double  value)
inline

Definition at line 294 of file G4VDecayChannel.hh.

294 { rbranch = value; }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

void G4VDecayChannel::SetDaughter ( G4int  anIndex,
const G4ParticleDefinition particle_type 
)

Definition at line 325 of file G4VDecayChannel.cc.

326 {
327  if (parent_type != 0) SetDaughter(anIndex, parent_type->GetParticleName());
328 }
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VDecayChannel::SetDaughter ( G4int  anIndex,
const G4String particle_name 
)

Definition at line 269 of file G4VDecayChannel.cc.

271 {
272  // check numberOfDaughters is positive
273  if (numberOfDaughters<=0) {
274 #ifdef G4VERBOSE
275  if (verboseLevel>0) {
276  G4cout << "G4VDecayChannel::SetDaughter: "
277  << "Number of daughters is not defined" << G4endl;
278  }
279 #endif
280  return;
281  }
282 
283  //ANDREA:-> Feb 25 2016
284  // An analysis of this code, shows that this method is called
285  // only in the constructor of derived classes.
286  // The general idea of this method is probably to support
287  // the possibility to re-define daughters on the fly, however
288  // this design is extremely problematic for MT mode, we thus
289  // require (as practically happens) that the method is called only
290  // at construction, i.e. when G4MT_daugheters == 0
291  // moreover this method can be called only after SetNumberOfDaugthers
292  // has been called (see previous if), in such a case daughters_name != 0
293  if ( daughters_name == 0 ) {
294  G4Exception("G4VDecayChannel::SetDaughter","PART112",FatalException,
295  "Trying to add a daughter without specifying number of secondaries, useSetNumberOfDaughters first");
296  return;
297  }
298  if ( G4MT_daughters != 0 ) {
299  G4Exception("G4VDecayChannel::SetDaughter","PART111",FatalException,
300  "Trying to modify a daughter of a decay channel, but decay channel already has daughters.");
301  return;
302  }
303  //<-:ANDREA
304 
305  // check an index
306  if ( (anIndex<0) || (anIndex>=numberOfDaughters) ) {
307 #ifdef G4VERBOSE
308  if (verboseLevel>0) {
309  G4cout << "G4VDecayChannel::SetDaughter"
310  << "index out of range " << anIndex << G4endl;
311  }
312 #endif
313  } else {
314  // fill the name
315  daughters_name[anIndex] = new G4String(particle_name);
316 #ifdef G4VERBOSE
317  if (verboseLevel>1) {
318  G4cout << "G4VDecayChannel::SetDaughter[" << anIndex <<"] :";
319  G4cout << daughters_name[anIndex] << ":" << *daughters_name[anIndex]<<G4endl;
320  }
321 #endif
322  }
323 }
G4ParticleDefinition ** G4MT_daughters
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
G4String ** daughters_name

Here is the call graph for this function:

void G4VDecayChannel::SetNumberOfDaughters ( G4int  value)

Definition at line 257 of file G4VDecayChannel.cc.

258 {
259  if (size >0) {
260  // remove old contents
262  // cleate array
263  daughters_name = new G4String*[size];
264  for (G4int index=0;index<size;index++) daughters_name[index]=0;
265  numberOfDaughters = size;
266  }
267 }
int G4int
Definition: G4Types.hh:78
G4String ** daughters_name

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VDecayChannel::SetParent ( const G4ParticleDefinition particle_type)

Definition at line 485 of file G4VDecayChannel.cc.

486 {
487  if (parent_type != 0) SetParent(parent_type->GetParticleName());
488 }
void SetParent(const G4ParticleDefinition *particle_type)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VDecayChannel::SetParent ( const G4String particle_name)
inline

Definition at line 277 of file G4VDecayChannel.hh.

278 {
279  if (parent_name != 0) delete parent_name;
280  parent_name = new G4String(particle_name);
281  G4MT_parent = 0;
282 }
G4ParticleDefinition * G4MT_parent
G4String * parent_name
void G4VDecayChannel::SetPolarization ( const G4ThreeVector polar)
inline

Definition at line 312 of file G4VDecayChannel.hh.

313 {
314  parent_polarization = polar;
315 }
G4ThreeVector parent_polarization

Here is the caller graph for this function:

void G4VDecayChannel::SetRangeMass ( G4double  val)
inline

Definition at line 309 of file G4VDecayChannel.hh.

309 { if(val>=0.) rangeMass=val; }
void G4VDecayChannel::SetVerboseLevel ( G4int  value)
inline

Definition at line 300 of file G4VDecayChannel.hh.

300 { verboseLevel = value; }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

Member Data Documentation

G4String** G4VDecayChannel::daughters_name
protected

Definition at line 173 of file G4VDecayChannel.hh.

G4Mutex G4VDecayChannel::daughtersMutex
protected

Definition at line 197 of file G4VDecayChannel.hh.

G4ParticleDefinition** G4VDecayChannel::G4MT_daughters
protected

Definition at line 193 of file G4VDecayChannel.hh.

G4double* G4VDecayChannel::G4MT_daughters_mass
protected

Definition at line 195 of file G4VDecayChannel.hh.

G4double* G4VDecayChannel::G4MT_daughters_width
protected

Definition at line 196 of file G4VDecayChannel.hh.

G4ParticleDefinition* G4VDecayChannel::G4MT_parent
protected

Definition at line 192 of file G4VDecayChannel.hh.

G4double G4VDecayChannel::G4MT_parent_mass
protected

Definition at line 194 of file G4VDecayChannel.hh.

G4String G4VDecayChannel::kinematics_name
protected

Definition at line 165 of file G4VDecayChannel.hh.

const G4String G4VDecayChannel::noName = " "
staticprotected

Definition at line 190 of file G4VDecayChannel.hh.

G4int G4VDecayChannel::numberOfDaughters
protected

Definition at line 169 of file G4VDecayChannel.hh.

G4String* G4VDecayChannel::parent_name
protected

Definition at line 171 of file G4VDecayChannel.hh.

G4ThreeVector G4VDecayChannel::parent_polarization
protected

Definition at line 179 of file G4VDecayChannel.hh.

G4Mutex G4VDecayChannel::parentMutex
protected

Definition at line 198 of file G4VDecayChannel.hh.

G4ParticleTable* G4VDecayChannel::particletable
protected

Definition at line 182 of file G4VDecayChannel.hh.

G4double G4VDecayChannel::rangeMass
protected

Definition at line 176 of file G4VDecayChannel.hh.

G4double G4VDecayChannel::rbranch
protected

Definition at line 167 of file G4VDecayChannel.hh.

G4int G4VDecayChannel::verboseLevel
protected

Definition at line 185 of file G4VDecayChannel.hh.


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