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

#include <G4RadioactiveDecay.hh>

Inheritance diagram for G4RadioactiveDecay:
G4VRestDiscreteProcess G4VProcess

Public Member Functions

 G4RadioactiveDecay (const G4String &processName="RadioactiveDecay")
 
 ~G4RadioactiveDecay ()
 
G4bool IsApplicable (const G4ParticleDefinition &)
 
G4DecayTableGetDecayTable (G4ParticleDefinition *)
 
void SelectAVolume (const G4String aVolume)
 
void DeselectAVolume (const G4String aVolume)
 
void SelectAllVolumes ()
 
void DeselectAllVolumes ()
 
void SetDecayBias (G4String filename)
 
void SetHLThreshold (G4double hl)
 
void SetICM (G4bool icm)
 
void SetARM (G4bool arm)
 
void SetSourceTimeProfile (G4String filename)
 
G4bool IsRateTableReady (const G4ParticleDefinition &)
 
void AddDecayRateTable (const G4ParticleDefinition &)
 
void GetDecayRateTable (const G4ParticleDefinition &)
 
void SetDecayRate (G4int, G4int, G4double, G4int, std::vector< G4double >, std::vector< G4double >)
 
std::vector
< G4RadioactivityTable * > 
GetTheRadioactivityTables ()
 
G4DecayTableLoadDecayTable (G4ParticleDefinition &theParentNucleus)
 
void AddUserDecayDataFile (G4int Z, G4int A, G4String filename)
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
void SetNucleusLimits (G4NucleusLimits theNucleusLimits1)
 
G4NucleusLimits GetNucleusLimits () const
 
void SetAnalogueMonteCarlo (G4bool r)
 
void SetFBeta (G4bool r)
 
G4bool IsAnalogueMonteCarlo ()
 
void SetBRBias (G4bool r)
 
void SetSplitNuclei (G4int r)
 
G4int GetSplitNuclei ()
 
void SetDecayDirection (const G4ThreeVector &theDir)
 
const G4ThreeVectorGetDecayDirection () const
 
void SetDecayHalfAngle (G4double halfAngle=0.*CLHEP::deg)
 
G4double GetDecayHalfAngle () const
 
void SetDecayCollimation (const G4ThreeVector &theDir, G4double halfAngle=0.*CLHEP::deg)
 
void BuildPhysicsTable (const G4ParticleDefinition &)
 
- Public Member Functions inherited from G4VRestDiscreteProcess
 G4VRestDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VRestDiscreteProcess (G4VRestDiscreteProcess &)
 
virtual ~G4VRestDiscreteProcess ()
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4int operator== (const G4VProcess &right) const
 
G4int operator!= (const G4VProcess &right) const
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

G4VParticleChangeDecayIt (const G4Track &theTrack, const G4Step &theStep)
 
G4DecayProductsDoDecay (G4ParticleDefinition &theParticleDef)
 
void CollimateDecay (G4DecayProducts *products)
 
void CollimateDecayProduct (G4DynamicParticle *product)
 
G4ThreeVector ChooseCollimationDirection () const
 
G4double GetMeanFreePath (const G4Track &theTrack, G4double previousStepSize, G4ForceCondition *condition)
 
G4double GetMeanLifeTime (const G4Track &theTrack, G4ForceCondition *condition)
 
G4double GetTaoTime (const G4double, const G4double)
 
G4double GetDecayTime ()
 
G4int GetDecayTimeBin (const G4double aDecayTime)
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager
 
G4VParticleChangepParticleChange
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft
 
G4double currentInteractionLength
 
G4double theInitialNumberOfInteractionLength
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType
 
G4int theProcessSubType
 
G4double thePILfactor
 
G4bool enableAtRestDoIt
 
G4bool enableAlongStepDoIt
 
G4bool enablePostStepDoIt
 
G4int verboseLevel
 

Detailed Description

Definition at line 82 of file G4RadioactiveDecay.hh.

Constructor & Destructor Documentation

G4RadioactiveDecay::G4RadioactiveDecay ( const G4String processName = "RadioactiveDecay")

Definition at line 146 of file G4RadioactiveDecay.cc.

References fRadioactiveDecay, G4cout, G4endl, G4ParticleTable::GetIonTable(), G4ParticleTable::GetParticleTable(), GetVerboseLevel(), python.hepunit::nanosecond, G4VProcess::pParticleChange, G4IonTable::RegisterIsotopeTable(), SelectAllVolumes(), and G4VProcess::SetProcessSubType().

147  : G4VRestDiscreteProcess(processName, fDecay), isInitialised(false),
148  forceDecayDirection(0.,0.,0.), forceDecayHalfAngle(0.*deg), verboseLevel(0)
149 {
150 #ifdef G4VERBOSE
151  if (GetVerboseLevel() > 1) {
152  G4cout << "G4RadioactiveDecay constructor: processName = " << processName
153  << G4endl;
154  }
155 #endif
156 
158 
159  theRadioactiveDecaymessenger = new G4RadioactiveDecaymessenger(this);
160  pParticleChange = &fParticleChangeForRadDecay;
161  theIsotopeTable = new G4RIsotopeTable();
162 
163  // Regsiter the isotope table to the ion table.
164  // Although we are touching the ion table, which is shared, we are not
165  // adding particles in this operation. We can therefore do the registration
166  // for each instance of the RDM process and do not need to restrict it to the
167  // master process. It's possible that future, more optimized versions of
168  // G4IonTable will require to test for master.
169 
171  theIonTable->RegisterIsotopeTable(theIsotopeTable);
172 
173  // Reset the list of user defined data files
174  theUserRadioactiveDataFiles.clear();
175 
176  // Instantiate the map of decay tables
177 #ifdef G4MULTITHREADED
178  if(!master_dkmap) master_dkmap = new DecayTableMap;
179 #endif
180  dkmap = new DecayTableMap;
181 
182  // Apply default values.
183  NSourceBin = 1;
184  SBin[0] = 0.* s;
185  SBin[1] = 1.* s;
186  SProfile[0] = 1.;
187  SProfile[1] = 0.;
188  NDecayBin = 1;
189  DBin[0] = 0. * s ;
190  DBin[1] = 1. * s;
191  DProfile[0] = 1.;
192  DProfile[1] = 0.;
193  decayWindows[0] = 0;
195  theRadioactivityTables.push_back(rTable);
196  NSplit = 1;
197  AnalogueMC = true ;
198  FBeta = false ;
199  BRBias = true ;
200  applyICM = true ;
201  applyARM = true ;
202  halflifethreshold = nanosecond;
203 
204  // RDM applies to xall logical volumes as default
205  isAllVolumesMode = true;
207 }
void RegisterIsotopeTable(G4VIsotopeTable *table)
Definition: G4IonTable.cc:1440
std::map< G4String, G4DecayTable * > DecayTableMap
const XML_Char * s
G4int GetVerboseLevel() const
G4IonTable * GetIonTable() const
G4GLOB_DLL std::ostream G4cout
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:432
int nanosecond
Definition: hepunit.py:82
static G4ParticleTable * GetParticleTable()
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:283
#define G4endl
Definition: G4ios.hh:61
G4RadioactiveDecay::~G4RadioactiveDecay ( )

Definition at line 210 of file G4RadioactiveDecay.cc.

211 {
212  delete theRadioactiveDecaymessenger;
213  delete theIsotopeTable;
214  for (DecayTableMap::iterator i = dkmap->begin(); i != dkmap->end(); i++) {
215  delete i->second;
216  }
217  dkmap->clear();
218 }

Member Function Documentation

void G4RadioactiveDecay::AddDecayRateTable ( const G4ParticleDefinition theParentNucleus)

Definition at line 1073 of file G4RadioactiveDecay.cc.

References G4NuclearLevel::Energy(), G4DecayTable::entries(), G4cout, G4endl, G4VDecayChannel::GetBR(), G4NuclearDecayChannel::GetDaughterExcitation(), G4NuclearDecayChannel::GetDaughterNucleus(), G4DecayTable::GetDecayChannel(), G4NuclearDecayChannel::GetDecayMode(), GetDecayTable(), G4NuclearLevelStore::GetInstance(), G4IonTable::GetIon(), G4ParticleTable::GetIonTable(), G4NuclearLevelStore::GetManager(), G4ParticleDefinition::GetParticleName(), G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetPDGLifeTime(), GetVerboseLevel(), G4NuclearLevel::HalfLife(), G4DecayTable::Insert(), IsApplicable(), IT, python.hepunit::MeV, G4NuclearLevelManager::NearestLevel(), ns, G4NuclearLevelManager::NumberOfLevels(), SetDecayRate(), G4RadioactiveDecayRateVector::SetIonName(), and G4RadioactiveDecayRateVector::SetItsRates().

Referenced by DecayIt().

1074 {
1075  // 1) To calculate all the coefficiecies required to derive the
1076  // radioactivities for all progeny of theParentNucleus
1077  //
1078  // 2) Add the coefficiencies to the decay rate table vector
1079  //
1080 
1081  //
1082  // Create and initialise variables used in the method.
1083  //
1084  theDecayRateVector.clear();
1085 
1086  G4int nGeneration = 0;
1087  std::vector<G4double> rates;
1088  std::vector<G4double> taos;
1089 
1090  // start rate is -1.
1091  // Eq.4.26 of the Technical Note
1092  rates.push_back(-1.);
1093  //
1094  //
1095  G4int A = ((const G4Ions*)(&theParentNucleus))->GetAtomicMass();
1096  G4int Z = ((const G4Ions*)(&theParentNucleus))->GetAtomicNumber();
1097  G4double E = ((const G4Ions*)(&theParentNucleus))->GetExcitationEnergy();
1098  G4double tao = theParentNucleus.GetPDGLifeTime();
1099  if (tao < 0.) tao = 1e-100;
1100  taos.push_back(tao);
1101  G4int nEntry = 0;
1102 
1103  //fill the decay rate with the intial isotope data
1104  SetDecayRate(Z,A,E,nGeneration,rates,taos);
1105 
1106  // store the decay rate in decay rate vector
1107  theDecayRateVector.push_back(theDecayRate);
1108  nEntry++;
1109 
1110  // now start treating the sencondary generations..
1111 
1112  G4bool stable = false;
1113  G4int i;
1114  G4int j;
1115  G4VDecayChannel* theChannel = 0;
1116  G4NuclearDecayChannel* theNuclearDecayChannel = 0;
1117  G4ITDecayChannel* theITChannel = 0;
1118  G4BetaMinusDecayChannel *theBetaMinusChannel = 0;
1119  G4BetaPlusDecayChannel *theBetaPlusChannel = 0;
1120  G4AlphaDecayChannel *theAlphaChannel = 0;
1121  G4RadioactiveDecayMode theDecayMode;
1122  G4double theBR = 0.0;
1123  G4int AP = 0;
1124  G4int ZP = 0;
1125  G4int AD = 0;
1126  G4int ZD = 0;
1127  G4double EP = 0.;
1128  std::vector<G4double> TP;
1129  std::vector<G4double> RP;
1130  G4ParticleDefinition *theDaughterNucleus;
1131  G4double daughterExcitation;
1132  G4ParticleDefinition *aParentNucleus;
1133  G4IonTable* theIonTable;
1134  G4DecayTable *aTempDecayTable;
1135  G4double theRate;
1136  G4double TaoPlus;
1137  G4int nS = 0;
1138  G4int nT = nEntry;
1139  G4double brs[7];
1140  //
1141  theIonTable =
1143 
1144  while (!stable) {
1145  nGeneration++;
1146  for (j = nS; j < nT; j++) {
1147  ZP = theDecayRateVector[j].GetZ();
1148  AP = theDecayRateVector[j].GetA();
1149  EP = theDecayRateVector[j].GetE();
1150  RP = theDecayRateVector[j].GetDecayRateC();
1151  TP = theDecayRateVector[j].GetTaos();
1152  if (GetVerboseLevel() > 0) {
1153  G4cout << "G4RadioactiveDecay::AddDecayRateTable : daughters of ("
1154  << ZP << ", " << AP << ", " << EP
1155  << ") are being calculated, generation = " << nGeneration
1156  << G4endl;
1157  }
1158 
1159  aParentNucleus = theIonTable->GetIon(ZP,AP,EP);
1160  aTempDecayTable = GetDecayTable(aParentNucleus);
1161 
1162  G4DecayTable* theDecayTable = new G4DecayTable();
1163  for (G4int k = 0; k < 7; k++) brs[k] = 0.0;
1164 
1165  // Go through the decay table and to combine the same decay channels
1166  for (i = 0; i < aTempDecayTable->entries(); i++) {
1167  theChannel = aTempDecayTable->GetDecayChannel(i);
1168  theNuclearDecayChannel = static_cast<G4NuclearDecayChannel*>(theChannel);
1169  theDecayMode = theNuclearDecayChannel->GetDecayMode();
1170  daughterExcitation = theNuclearDecayChannel->GetDaughterExcitation();
1171  theDaughterNucleus = theNuclearDecayChannel->GetDaughterNucleus() ;
1172  AD = ((const G4Ions*)(theDaughterNucleus))->GetAtomicMass();
1173  ZD = ((const G4Ions*)(theDaughterNucleus))->GetAtomicNumber();
1174  G4NuclearLevelManager* levelManager =
1176  if (levelManager->NumberOfLevels() ) {
1177  const G4NuclearLevel* level =
1178  levelManager->NearestLevel (daughterExcitation);
1179 
1180  if (std::abs(daughterExcitation - level->Energy()) < levelTolerance) {
1181  // Level half-life is in ns and the threshold is set to 1 micros
1182  // by default, user can set it via the UI command
1183  if (level->HalfLife()*ns >= halflifethreshold){
1184  // save the metastable nucleus
1185  theDecayTable->Insert(theChannel);
1186  } else {
1187  brs[theDecayMode] += theChannel->GetBR();
1188  }
1189  } else {
1190  brs[theDecayMode] += theChannel->GetBR();
1191  }
1192  } else {
1193  brs[theDecayMode] += theChannel->GetBR();
1194  }
1195  }
1196  brs[2] = brs[2]+brs[3]+brs[4]+brs[5];
1197  brs[3] = brs[4] =brs[5] = 0.0;
1198  for (i= 0; i<7; i++){
1199  if (brs[i] > 0.) {
1200  switch ( i ) {
1201  case 0:
1202  // Decay mode is isomeric transition
1203  theITChannel = new G4ITDecayChannel(0,
1204  (const G4Ions*) aParentNucleus, brs[0]);
1205  theDecayTable->Insert(theITChannel);
1206  break;
1207 
1208  case 1:
1209  // Decay mode is beta-
1210  theBetaMinusChannel = new G4BetaMinusDecayChannel(0, aParentNucleus,
1211  brs[1], 0.*MeV, 0.*MeV, 1, false, 0);
1212  theDecayTable->Insert(theBetaMinusChannel);
1213  break;
1214 
1215  case 2:
1216  // Decay mode is beta+ + EC.
1217  theBetaPlusChannel = new G4BetaPlusDecayChannel(GetVerboseLevel(),
1218  aParentNucleus, brs[2], 0.*MeV, 0.*MeV, 1, false, 0);
1219  theDecayTable->Insert(theBetaPlusChannel);
1220  break;
1221 
1222  case 6:
1223  // Decay mode is alpha.
1224  theAlphaChannel = new G4AlphaDecayChannel(GetVerboseLevel(),
1225  aParentNucleus,
1226  brs[6], 0.*MeV, 0.*MeV);
1227  theDecayTable->Insert(theAlphaChannel);
1228  break;
1229 
1230  default:
1231  break;
1232  }
1233  }
1234  }
1235 
1236  // loop over all branches in theDecayTable
1237  //
1238  for (i = 0; i < theDecayTable->entries(); i++){
1239  theChannel = theDecayTable->GetDecayChannel(i);
1240  theNuclearDecayChannel = static_cast<G4NuclearDecayChannel*>(theChannel);
1241  theBR = theChannel->GetBR();
1242  theDaughterNucleus = theNuclearDecayChannel->GetDaughterNucleus();
1243  // First check if the decay of the original nucleus is an IT channel,
1244  // if true create a new groud-level nucleus
1245  if (theNuclearDecayChannel->GetDecayMode() == IT && nGeneration == 1) {
1246  A = ((const G4Ions*)(theDaughterNucleus))->GetAtomicMass();
1247  Z = ((const G4Ions*)(theDaughterNucleus))->GetAtomicNumber();
1248  theDaughterNucleus=theIonTable->GetIon(Z,A,0.);
1249  }
1250  if (IsApplicable(*theDaughterNucleus) && theBR &&
1251  aParentNucleus != theDaughterNucleus) {
1252  // need to make sure daughter has decay table
1253  aTempDecayTable = GetDecayTable(theDaughterNucleus);
1254 
1255  if (aTempDecayTable->entries() ) {
1256  A = ((const G4Ions*)(theDaughterNucleus))->GetAtomicMass();
1257  Z = ((const G4Ions*)(theDaughterNucleus))->GetAtomicNumber();
1258  E = ((const G4Ions*)(theDaughterNucleus))->GetExcitationEnergy();
1259 
1260  TaoPlus = theDaughterNucleus->GetPDGLifeTime();
1261  if (TaoPlus <= 0.) TaoPlus = 1e-100;
1262 
1263  // first set the taos, one simply need to add to the parent ones
1264  taos.clear();
1265  taos = TP;
1266  size_t k;
1267  //check that TaoPlus differs from other taos from at least 1.e5 relative difference
1268  //for (k = 0; k < TP.size(); k++){
1269  //if (std::abs((TaoPlus-TP[k])/TP[k])<1.e-5 ) TaoPlus=1.00001*TP[k];
1270  //}
1271  taos.push_back(TaoPlus);
1272  // now calculate the coefficiencies
1273  //
1274  // they are in two parts, first the less than n ones
1275  // Eq 4.24 of the TN
1276  rates.clear();
1277  long double ta1,ta2;
1278  ta2 = (long double)TaoPlus;
1279  for (k = 0; k < RP.size(); k++){
1280  ta1 = (long double)TP[k];
1281  if (ta1 == ta2) {
1282  theRate = 1.e100;
1283  } else {
1284  theRate = ta1/(ta1-ta2);
1285  }
1286  theRate = theRate * theBR * RP[k];
1287  rates.push_back(theRate);
1288  }
1289 
1290  // the sencond part: the n:n coefficiency
1291  // Eq 4.25 of the TN. Note Yn+1 is zero apart from Y1 which is -1
1292  // as treated at line 1013
1293  theRate = 0.;
1294  long double aRate, aRate1;
1295  aRate1 = 0.L;
1296  for (k = 0; k < RP.size(); k++){
1297  ta1 = (long double)TP[k];
1298  if (ta1 == ta2 ) {
1299  aRate = 1.e100;
1300  } else {
1301  aRate = ta2/(ta1-ta2);
1302  }
1303  aRate = aRate * (long double)(theBR * RP[k]);
1304  aRate1 += aRate;
1305  }
1306  theRate = -aRate1;
1307  rates.push_back(theRate);
1308  SetDecayRate (Z,A,E,nGeneration,rates,taos);
1309  theDecayRateVector.push_back(theDecayRate);
1310  nEntry++;
1311  }
1312  } // end of testing daughter nucleus
1313  } // end of i loop( the branches)
1314  // delete theDecayTable;
1315 
1316  } //end of for j loop
1317  nS = nT;
1318  nT = nEntry;
1319  if (nS == nT) stable = true;
1320  }
1321 
1322  // end of while loop
1323  // the calculation completed here
1324 
1325 
1326  // fill the first part of the decay rate table
1327  // which is the name of the original particle (isotope)
1328  theDecayRateTable.SetIonName(theParentNucleus.GetParticleName());
1329 
1330  // now fill the decay table with the newly completed decay rate vector
1331  theDecayRateTable.SetItsRates(theDecayRateVector);
1332 
1333  // finally add the decayratetable to the tablevector
1334  theDecayRateTableVector.push_back(theDecayRateTable);
1335 }
G4double GetBR() const
G4double HalfLife() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:449
G4double Energy() const
G4VDecayChannel * GetDecayChannel(G4int index) const
G4int GetVerboseLevel() const
static G4NuclearLevelStore * GetInstance()
G4bool IsApplicable(const G4ParticleDefinition &)
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
void SetItsRates(G4RadioactiveDecayRates arate)
G4int entries() const
G4IonTable * GetIonTable() const
G4GLOB_DLL std::ostream G4cout
Definition: G4Ions.hh:51
void SetDecayRate(G4int, G4int, G4double, G4int, std::vector< G4double >, std::vector< G4double >)
G4DecayTable * GetDecayTable(G4ParticleDefinition *)
bool G4bool
Definition: G4Types.hh:79
G4RadioactiveDecayMode
G4NuclearLevelManager * GetManager(G4int Z, G4int A)
G4ParticleDefinition * GetDaughterNucleus()
void Insert(G4VDecayChannel *aChannel)
Definition: G4DecayTable.cc:60
static G4ParticleTable * GetParticleTable()
G4RadioactiveDecayMode GetDecayMode()
G4double GetPDGLifeTime() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
const G4NuclearLevel * NearestLevel(G4double energy, G4double eDiffMax=9999.*CLHEP::GeV) const
#define ns
Definition: xmlparse.cc:597
void G4RadioactiveDecay::AddUserDecayDataFile ( G4int  Z,
G4int  A,
G4String  filename 
)

Definition at line 1042 of file G4RadioactiveDecay.cc.

References G4RIsotopeTable::AddUserDecayDataFile(), G4cout, and G4endl.

Referenced by G4RadioactiveDecaymessenger::SetNewValue().

1043 {
1044  if (Z < 1 || A < 2) G4cout << "Z and A not valid!" << G4endl;
1045 
1046  std::ifstream DecaySchemeFile(filename);
1047  if (DecaySchemeFile) {
1048  G4int ID_ion = A*1000 + Z;
1049  theUserRadioactiveDataFiles[ID_ion] = filename;
1050  theIsotopeTable->AddUserDecayDataFile(Z,A,filename);
1051  } else {
1052  G4cout << "The file " << filename << " does not exist!" << G4endl;
1053  }
1054 }
void AddUserDecayDataFile(G4int Z, G4int A, G4String filename)
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void G4RadioactiveDecay::BuildPhysicsTable ( const G4ParticleDefinition )
virtual

Reimplemented from G4VProcess.

Definition at line 666 of file G4RadioactiveDecay.cc.

References G4LossTableManager::AtomDeexcitation(), G4VAtomDeexcitation::InitialiseAtomicDeexcitation(), and G4LossTableManager::Instance().

667 {
668  if (!isInitialised) {
669  isInitialised = true;
671  G4VAtomDeexcitation* p = theManager->AtomDeexcitation();
672  if(p) { p->InitialiseAtomicDeexcitation(); }
673  }
674 }
static G4LossTableManager * Instance()
const char * p
Definition: xmltok.h:285
G4VAtomDeexcitation * AtomDeexcitation()
G4ThreeVector G4RadioactiveDecay::ChooseCollimationDirection ( ) const
protected

Definition at line 1849 of file G4RadioactiveDecay.cc.

References python.hepunit::deg, G4cout, G4endl, G4UniformRand, GetVerboseLevel(), CLHEP::Hep3Vector::phi(), python.hepunit::pi, CLHEP::Hep3Vector::setPhi(), CLHEP::Hep3Vector::setTheta(), and CLHEP::Hep3Vector::theta().

Referenced by CollimateDecayProduct().

1849  {
1850  if (origin == forceDecayDirection) return origin; // Don't do collimation
1851  if (forceDecayHalfAngle == 180.*deg) return origin;
1852 
1853  G4ThreeVector dir = forceDecayDirection;
1854 
1855  // Return direction offset by random throw
1856  if (forceDecayHalfAngle > 0.) {
1857  // Generate uniform direction around central axis
1858  G4double phi = 2.*pi*G4UniformRand();
1859  G4double cosMin = std::cos(forceDecayHalfAngle);
1860  G4double cosTheta = (1.-cosMin)*G4UniformRand() + cosMin; // [cosMin,1.)
1861 
1862  dir.setPhi(dir.phi()+phi);
1863  dir.setTheta(dir.theta()+std::acos(cosTheta));
1864  }
1865 
1866 #ifdef G4VERBOSE
1867  if (GetVerboseLevel()>1)
1868  G4cout << " ChooseCollimationDirection returns " << dir << G4endl;
1869 #endif
1870 
1871  return dir;
1872 }
void setPhi(double)
G4int GetVerboseLevel() const
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
double phi() const
void setTheta(double)
double theta() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void G4RadioactiveDecay::CollimateDecay ( G4DecayProducts products)
protected

Definition at line 1807 of file G4RadioactiveDecay.cc.

References CollimateDecayProduct(), G4Electron::Definition(), G4Positron::Definition(), G4Neutron::Definition(), G4Alpha::Definition(), G4Gamma::Definition(), python.hepunit::deg, G4InuclParticleNames::electron, G4DecayProducts::entries(), G4cout, G4endl, G4DynamicParticle::GetParticleDefinition(), GetVerboseLevel(), neutron, and G4InuclParticleNames::positron.

Referenced by DoDecay().

1807  {
1808  if (origin == forceDecayDirection) return; // No collimation requested
1809  if (180.*deg == forceDecayHalfAngle) return;
1810  if (0 == products || 0 == products->entries()) return;
1811 
1812 #ifdef G4VERBOSE
1813  if (GetVerboseLevel() > 0) G4cout << "Begin of CollimateDecay..." << G4endl;
1814 #endif
1815 
1816  // Particles suitable for directional biasing (for if-blocks below)
1820  static const G4ParticleDefinition* gamma = G4Gamma::Definition();
1822 
1823  G4ThreeVector newDirection; // Re-use to avoid memory churn
1824  for (G4int i=0; i<products->entries(); i++) {
1825  G4DynamicParticle* daughter = (*products)[i];
1826  const G4ParticleDefinition* daughterType =
1827  daughter->GetParticleDefinition();
1828  if (daughterType == electron || daughterType == positron ||
1829  daughterType == neutron || daughterType == gamma ||
1830  daughterType == alpha) CollimateDecayProduct(daughter);
1831  }
1832 }
static G4Alpha * Definition()
Definition: G4Alpha.cc:49
static G4Electron * Definition()
Definition: G4Electron.cc:49
G4int GetVerboseLevel() const
static G4Positron * Definition()
Definition: G4Positron.cc:49
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
void CollimateDecayProduct(G4DynamicParticle *product)
const G4ParticleDefinition * GetParticleDefinition() const
static G4Neutron * Definition()
Definition: G4Neutron.cc:54
#define G4endl
Definition: G4ios.hh:61
G4int entries() const
static G4Gamma * Definition()
Definition: G4Gamma.cc:49
void G4RadioactiveDecay::CollimateDecayProduct ( G4DynamicParticle product)
protected

Definition at line 1834 of file G4RadioactiveDecay.cc.

References ChooseCollimationDirection(), G4cout, G4endl, G4DynamicParticle::GetParticleDefinition(), G4ParticleDefinition::GetParticleName(), GetVerboseLevel(), and G4DynamicParticle::SetMomentumDirection().

Referenced by CollimateDecay().

1834  {
1835 #ifdef G4VERBOSE
1836  if (GetVerboseLevel() > 1) {
1837  G4cout << "CollimateDecayProduct for daughter "
1838  << daughter->GetParticleDefinition()->GetParticleName() << G4endl;
1839  }
1840 #endif
1841 
1843  if (origin != collimate) daughter->SetMomentumDirection(collimate);
1844 }
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4ThreeVector ChooseCollimationDirection() const
#define G4endl
Definition: G4ios.hh:61
G4VParticleChange * G4RadioactiveDecay::DecayIt ( const G4Track theTrack,
const G4Step theStep 
)
protected

Definition at line 1433 of file G4RadioactiveDecay.cc.

References AddDecayRateTable(), G4ParticleChangeForRadDecay::AddSecondary(), G4DecayProducts::Boost(), G4VProcess::ClearNumberOfInteractionLengthLeft(), python.hepunit::cm, DoDecay(), G4DecayProducts::DumpInfo(), G4DecayTable::DumpInfo(), G4DecayTable::entries(), G4DecayProducts::entries(), fStopAndKill, fStopButAlive, G4cerr, G4cout, G4endl, G4UniformRand, G4ParticleDefinition::GetBaryonNumber(), G4DecayTable::GetDecayChannel(), GetDecayRateTable(), GetDecayTable(), GetDecayTime(), GetDecayTimeBin(), G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4Track::GetGlobalTime(), G4IonTable::GetIon(), G4ParticleTable::GetIonTable(), G4DynamicParticle::GetKineticEnergy(), G4Track::GetLocalTime(), G4VPhysicalVolume::GetLogicalVolume(), G4DynamicParticle::GetMomentumDirection(), G4LogicalVolume::GetName(), G4DynamicParticle::GetParticleDefinition(), G4ParticleDefinition::GetParticleName(), G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetPDGLifeTime(), G4ParticleDefinition::GetPDGMass(), G4Track::GetPosition(), GetTaoTime(), G4Track::GetTouchableHandle(), G4Track::GetTrackStatus(), GetVerboseLevel(), G4Track::GetVolume(), G4Track::GetWeight(), G4ParticleChangeForDecay::Initialize(), IsApplicable(), G4DecayProducts::IsChecked(), IsRateTableReady(), n, ns, G4DecayProducts::PopProducts(), G4VParticleChange::ProposeLocalEnergyDeposit(), G4ParticleChangeForDecay::ProposeLocalTime(), G4VParticleChange::ProposeTrackStatus(), G4Track::SetGoodForTrackingFlag(), G4VParticleChange::SetNumberOfSecondaries(), G4Track::SetTouchableHandle(), G4Track::SetWeight(), test::x, and z.

1434 {
1435  // Initialize G4ParticleChange object, get particle details and decay table
1436 
1437  fParticleChangeForRadDecay.Initialize(theTrack);
1438  const G4DynamicParticle* theParticle = theTrack.GetDynamicParticle();
1439 
1440  G4ParticleDefinition* theParticleDef = theParticle->GetDefinition();
1441 
1442  // First check whether RDM applies to the current logical volume
1443  if (!isAllVolumesMode) {
1444  if (!std::binary_search(ValidVolumes.begin(), ValidVolumes.end(),
1445  theTrack.GetVolume()->GetLogicalVolume()->GetName())) {
1446 #ifdef G4VERBOSE
1447  if (GetVerboseLevel()>0) {
1448  G4cout <<"G4RadioactiveDecay::DecayIt : "
1449  << theTrack.GetVolume()->GetLogicalVolume()->GetName()
1450  << " is not selected for the RDM"<< G4endl;
1451  G4cout << " There are " << ValidVolumes.size() << " volumes" << G4endl;
1452  G4cout << " The Valid volumes are " << G4endl;
1453  for (size_t i = 0; i< ValidVolumes.size(); i++)
1454  G4cout << ValidVolumes[i] << G4endl;
1455  }
1456 #endif
1457  fParticleChangeForRadDecay.SetNumberOfSecondaries(0);
1458 
1459  // Kill the parent particle.
1460  fParticleChangeForRadDecay.ProposeTrackStatus(fStopAndKill) ;
1461  fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0);
1463  return &fParticleChangeForRadDecay;
1464  }
1465  }
1466 
1467  // Now check if particle is valid for RDM
1468  if (!(IsApplicable(*theParticleDef) ) ) {
1469  // Particle is not an ion or is outside the nucleuslimits for decay
1470 
1471 #ifdef G4VERBOSE
1472  if (GetVerboseLevel()>0) {
1473  G4cerr << "G4RadioactiveDecay::DecayIt : "
1474  << theParticleDef->GetParticleName()
1475  << " is not a valid nucleus for the RDM"<< G4endl;
1476  }
1477 #endif
1478  fParticleChangeForRadDecay.SetNumberOfSecondaries(0);
1479 
1480  // Kill the parent particle
1481  fParticleChangeForRadDecay.ProposeTrackStatus(fStopAndKill) ;
1482  fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0);
1484  return &fParticleChangeForRadDecay;
1485  }
1486 
1487  G4DecayTable* theDecayTable = GetDecayTable(theParticleDef);
1488 
1489  if (theDecayTable == 0 || theDecayTable->entries() == 0) {
1490  // No data in the decay table. Set particle change parameters
1491  // to indicate this.
1492 #ifdef G4VERBOSE
1493  if (GetVerboseLevel() > 0) {
1494  G4cerr <<"G4RadioactiveDecay::DecayIt : decay table not defined for ";
1495  G4cerr <<theParticleDef->GetParticleName() <<G4endl;
1496  }
1497 #endif
1498  fParticleChangeForRadDecay.SetNumberOfSecondaries(0);
1499 
1500  // Kill the parent particle.
1501  fParticleChangeForRadDecay.ProposeTrackStatus(fStopAndKill) ;
1502  fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0);
1504  return &fParticleChangeForRadDecay;
1505 
1506  } else {
1507  // Data found. Try to decay nucleus
1508  G4double energyDeposit = 0.0;
1509  G4double finalGlobalTime = theTrack.GetGlobalTime();
1510  G4double finalLocalTime = theTrack.GetLocalTime();
1511  G4int index;
1512  G4ThreeVector currentPosition;
1513  currentPosition = theTrack.GetPosition();
1514 
1515  // Check whether use Analogue or VR implementation
1516  if (AnalogueMC) {
1517 #ifdef G4VERBOSE
1518  if (GetVerboseLevel() > 0)
1519  G4cout <<"DecayIt: Analogue MC version " << G4endl;
1520 #endif
1521 
1522  G4DecayProducts* products = DoDecay(*theParticleDef);
1523 
1524  // Check if the product is the same as input and kill the track if
1525  // necessary to prevent infinite loop (11/05/10, F.Lei)
1526  if ( products->entries() == 1) {
1527  fParticleChangeForRadDecay.SetNumberOfSecondaries(0);
1528  fParticleChangeForRadDecay.ProposeTrackStatus(fStopAndKill);
1529  fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(0.0);
1531  return &fParticleChangeForRadDecay;
1532  }
1533 
1534  // Get parent particle information and boost the decay products to the
1535  // laboratory frame based on this information.
1536 
1537  //The Parent Energy used for the boost should be the total energy of
1538  // the nucleus of the parent ion without the energy of the shell electrons
1539  // (correction for bug 1359 by L. Desorgher)
1540  G4double ParentEnergy = theParticle->GetKineticEnergy()
1541  + theParticle->GetParticleDefinition()->GetPDGMass();
1542  G4ThreeVector ParentDirection(theParticle->GetMomentumDirection());
1543 
1544  if (theTrack.GetTrackStatus() == fStopButAlive) {
1545  //this condition seems to be always True, further investigation is needed (L.Desorgher)
1546 
1547  // The particle is decayed at rest.
1548  // since the time is still for rest particle in G4 we need to add the
1549  // additional time lapsed between the particle come to rest and the
1550  // actual decay. This time is simply sampled with the mean-life of
1551  // the particle. But we need to protect the case PDGTime < 0.
1552  // (F.Lei 11/05/10)
1553  G4double temptime = -std::log( G4UniformRand())
1554  *theParticleDef->GetPDGLifeTime();
1555  if (temptime < 0.) temptime = 0.;
1556  finalGlobalTime += temptime;
1557  finalLocalTime += temptime;
1558  energyDeposit += theParticle->GetKineticEnergy();
1559  }
1560  products->Boost(ParentEnergy, ParentDirection);
1561 
1562  // Add products in theParticleChangeForRadDecay.
1563  G4int numberOfSecondaries = products->entries();
1564  fParticleChangeForRadDecay.SetNumberOfSecondaries(numberOfSecondaries);
1565 #ifdef G4VERBOSE
1566  if (GetVerboseLevel()>1) {
1567  G4cout <<"G4RadioactiveDecay::DecayIt : Decay vertex :";
1568  G4cout <<" Time: " <<finalGlobalTime/ns <<"[ns]";
1569  G4cout <<" X:" <<(theTrack.GetPosition()).x() /cm <<"[cm]";
1570  G4cout <<" Y:" <<(theTrack.GetPosition()).y() /cm <<"[cm]";
1571  G4cout <<" Z:" <<(theTrack.GetPosition()).z() /cm <<"[cm]";
1572  G4cout << G4endl;
1573  G4cout <<"G4Decay::DecayIt : decay products in Lab. Frame" <<G4endl;
1574  products->DumpInfo();
1575  products->IsChecked();
1576  }
1577 #endif
1578  for (index=0; index < numberOfSecondaries; index++) {
1579  G4Track* secondary = new G4Track(products->PopProducts(),
1580  finalGlobalTime, currentPosition);
1581  secondary->SetGoodForTrackingFlag();
1582  secondary->SetTouchableHandle(theTrack.GetTouchableHandle());
1583  fParticleChangeForRadDecay.AddSecondary(secondary);
1584  }
1585  delete products;
1586  // end of analogue MC algorithm
1587 
1588  } else {
1589  // Variance Reduction Method
1590 #ifdef G4VERBOSE
1591  if (GetVerboseLevel()>0)
1592  G4cout << "DecayIt: Variance Reduction version " << G4endl;
1593 #endif
1594  if (!IsRateTableReady(*theParticleDef)) {
1595  // if the decayrates are not ready, calculate them and
1596  // add to the rate table vector
1597  AddDecayRateTable(*theParticleDef);
1598  }
1599  //retrieve the rates
1600  GetDecayRateTable(*theParticleDef);
1601 
1602  // declare some of the variables required in the implementation
1603  G4ParticleDefinition* parentNucleus;
1604  G4IonTable* theIonTable;
1605  G4int PZ;
1606  G4int PA;
1607  G4double PE;
1608  G4String keyName;
1609  std::vector<G4double> PT;
1610  std::vector<G4double> PR;
1611  G4double taotime;
1612  long double decayRate;
1613 
1614  size_t i;
1615  size_t j;
1616  G4int numberOfSecondaries;
1617  G4int totalNumberOfSecondaries = 0;
1618  G4double currentTime = 0.;
1619  G4int ndecaych;
1620  G4DynamicParticle* asecondaryparticle;
1621  std::vector<G4DynamicParticle*> secondaryparticles;
1622  std::vector<G4double> pw;
1623  std::vector<G4double> ptime;
1624  pw.clear();
1625  ptime.clear();
1626 
1627  //now apply the nucleus splitting
1628  for (G4int n = 0; n < NSplit; n++) {
1629  // Get the decay time following the decay probability function
1630  // suppllied by user
1631  G4double theDecayTime = GetDecayTime();
1632  G4int nbin = GetDecayTimeBin(theDecayTime);
1633 
1634  // calculate the first part of the weight function
1635  G4double weight1 = 1.;
1636  if (nbin == 1) {
1637  weight1 = 1./DProfile[nbin-1]
1638  *(DBin[nbin]-DBin[nbin-1])/NSplit;
1639  } else if (nbin > 1) {
1640  weight1 = 1./(DProfile[nbin]-DProfile[nbin-2])
1641  *(DBin[nbin]-DBin[nbin-1])/NSplit;
1642  }
1643 
1644  // it should be calculated in seconds
1645  weight1 /= s ;
1646 
1647  // loop over all the possible secondaries of the nucleus
1648  // the first one is itself.
1649  for (i = 0; i < theDecayRateVector.size(); i++) {
1650  PZ = theDecayRateVector[i].GetZ();
1651  PA = theDecayRateVector[i].GetA();
1652  PE = theDecayRateVector[i].GetE();
1653  PT = theDecayRateVector[i].GetTaos();
1654  PR = theDecayRateVector[i].GetDecayRateC();
1655 
1656  // Calculate the decay rate of the isotope
1657  // decayRate is the radioactivity of isotope (PZ,PA,PE) at the
1658  // time 'theDecayTime'
1659  // it will be used to calculate the statistical weight of the
1660  // decay products of this isotope
1661 
1662  // G4cout <<"PA= "<< PA << " PZ= " << PZ << " PE= "<< PE <<G4endl;
1663  decayRate = 0.L;
1664  for (j = 0; j < PT.size(); j++) {
1665  taotime = GetTaoTime(theDecayTime,PT[j]);
1666  decayRate -= PR[j] * (long double)taotime;
1667  // Eq.4.23 of of the TN
1668  // note the negative here is required as the rate in the
1669  // equation is defined to be negative,
1670  // i.e. decay away, but we need positive value here.
1671 
1672  // G4cout << j << "\t"<< PT[j]/s <<"\t"<<PR[j]<< "\t"
1673  // << decayRate << G4endl;
1674  }
1675 
1676  // add the isotope to the radioactivity tables
1677  // G4cout <<theDecayTime/s <<"\t"<<nbin<<G4endl;
1678  // G4cout << theTrack.GetWeight() <<"\t"<<weight1<<"\t"<<decayRate<< G4endl;
1679  theRadioactivityTables[decayWindows[nbin-1]]->AddIsotope(PZ,PA,PE,weight1*decayRate,theTrack.GetWeight());
1680 
1681  // Now calculate the statistical weight
1682  // One needs to fold the source bias function with the decaytime
1683  // also need to include the track weight! (F.Lei, 28/10/10)
1684  G4double weight = weight1*decayRate*theTrack.GetWeight();
1685 
1686  // decay the isotope
1688  parentNucleus = theIonTable->GetIon(PZ,PA,PE);
1689 
1690  // Create a temprary products buffer.
1691  // Its contents to be transfered to the products at the end of the loop
1692  G4DecayProducts* tempprods = 0;
1693 
1694  // Decide whether to apply branching ratio bias or not
1695  if (BRBias) {
1696  G4DecayTable* decayTable = GetDecayTable(parentNucleus);
1697 
1698  ndecaych = G4int(decayTable->entries()*G4UniformRand());
1699  G4VDecayChannel* theDecayChannel = decayTable->GetDecayChannel(ndecaych);
1700  if (theDecayChannel == 0) {
1701  // Decay channel not found.
1702 #ifdef G4VERBOSE
1703  if (GetVerboseLevel()>0) {
1704  G4cerr << " G4RadioactiveDecay::DoIt : cannot determine decay channel ";
1705  G4cerr << " for this nucleus; decay as if no biasing active ";
1706  G4cerr << G4endl;
1707  decayTable ->DumpInfo();
1708  }
1709 #endif
1710  tempprods = DoDecay(*parentNucleus); // DHW 6 Dec 2010 - do decay as if no biasing
1711  // to avoid deref of temppprods = 0
1712  } else {
1713  // A decay channel has been identified, so execute the DecayIt.
1714  G4double tempmass = parentNucleus->GetPDGMass();
1715  tempprods = theDecayChannel->DecayIt(tempmass);
1716  weight *= (theDecayChannel->GetBR())*(decayTable->entries());
1717  }
1718  } else {
1719  tempprods = DoDecay(*parentNucleus);
1720  }
1721 
1722  // save the secondaries for buffers
1723  numberOfSecondaries = tempprods->entries();
1724  currentTime = finalGlobalTime + theDecayTime;
1725  for (index = 0; index < numberOfSecondaries; index++) {
1726  asecondaryparticle = tempprods->PopProducts();
1727  if (asecondaryparticle->GetDefinition()->GetBaryonNumber() < 5) {
1728  pw.push_back(weight);
1729  ptime.push_back(currentTime);
1730  secondaryparticles.push_back(asecondaryparticle);
1731  }
1732  }
1733  delete tempprods;
1734 
1735  } // end of i loop
1736  } // end of n loop
1737 
1738  // now deal with the secondaries in the two stl containers
1739  // and submmit them back to the tracking manager
1740  totalNumberOfSecondaries = pw.size();
1741  fParticleChangeForRadDecay.SetNumberOfSecondaries(totalNumberOfSecondaries);
1742  for (index=0; index < totalNumberOfSecondaries; index++) {
1743  G4Track* secondary = new G4Track(secondaryparticles[index],
1744  ptime[index], currentPosition);
1745  secondary->SetGoodForTrackingFlag();
1746  secondary->SetTouchableHandle(theTrack.GetTouchableHandle());
1747  secondary->SetWeight(pw[index]);
1748  fParticleChangeForRadDecay.AddSecondary(secondary);
1749  }
1750  // make sure the original track is set to stop and its kinematic energy collected
1751  //
1752  //theTrack.SetTrackStatus(fStopButAlive);
1753  //energyDeposit += theParticle->GetKineticEnergy();
1754 
1755  } // End of Variance Reduction
1756 
1757  // Kill the parent particle
1758  fParticleChangeForRadDecay.ProposeTrackStatus(fStopAndKill) ;
1759  fParticleChangeForRadDecay.ProposeLocalEnergyDeposit(energyDeposit);
1760  fParticleChangeForRadDecay.ProposeLocalTime(finalLocalTime);
1761  // Reset NumberOfInteractionLengthLeft.
1763 
1764  return &fParticleChangeForRadDecay ;
1765  }
1766 }
G4double GetLocalTime() const
G4String GetName() const
G4double GetKineticEnergy() const
G4bool IsRateTableReady(const G4ParticleDefinition &)
const G4DynamicParticle * GetDynamicParticle() const
const XML_Char * s
G4double z
Definition: TRTMaterials.hh:39
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:449
const G4ThreeVector & GetPosition() const
void AddSecondary(G4Track *aSecondary)
G4TrackStatus GetTrackStatus() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4VDecayChannel * GetDecayChannel(G4int index) const
G4int GetVerboseLevel() const
G4ParticleDefinition * GetDefinition() const
G4bool IsApplicable(const G4ParticleDefinition &)
void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection)
void ClearNumberOfInteractionLengthLeft()
Definition: G4VProcess.hh:447
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
void SetWeight(G4double aValue)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4int entries() const
virtual void Initialize(const G4Track &)
G4IonTable * GetIonTable() const
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
G4DecayTable * GetDecayTable(G4ParticleDefinition *)
void DumpInfo() const
const G4ThreeVector & GetMomentumDirection() const
void DumpInfo() const
G4int GetDecayTimeBin(const G4double aDecayTime)
G4DecayProducts * DoDecay(G4ParticleDefinition &theParticleDef)
const G4ParticleDefinition * GetParticleDefinition() const
const G4int n
G4double GetGlobalTime() const
G4double GetTaoTime(const G4double, const G4double)
const G4TouchableHandle & GetTouchableHandle() const
G4LogicalVolume * GetLogicalVolume() const
G4double GetPDGMass() const
static G4ParticleTable * GetParticleTable()
void GetDecayRateTable(const G4ParticleDefinition &)
void SetNumberOfSecondaries(G4int totSecondaries)
G4DynamicParticle * PopProducts()
void AddDecayRateTable(const G4ParticleDefinition &)
G4VPhysicalVolume * GetVolume() const
G4double GetWeight() const
G4double GetPDGLifeTime() const
#define G4endl
Definition: G4ios.hh:61
G4bool IsChecked() const
G4int entries() const
double G4double
Definition: G4Types.hh:76
void ProposeTrackStatus(G4TrackStatus status)
#define ns
Definition: xmlparse.cc:597
void SetGoodForTrackingFlag(G4bool value=true)
G4GLOB_DLL std::ostream G4cerr
void G4RadioactiveDecay::DeselectAllVolumes ( )

Definition at line 337 of file G4RadioactiveDecay.cc.

References G4cout, G4endl, and GetVerboseLevel().

338 {
339  ValidVolumes.clear();
340  isAllVolumesMode=false;
341 #ifdef G4VERBOSE
342  if (GetVerboseLevel() > 0) G4cout << "RDM removed from all volumes" << G4endl;
343 #endif
344 }
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void G4RadioactiveDecay::DeselectAVolume ( const G4String  aVolume)

Definition at line 282 of file G4RadioactiveDecay.cc.

References G4cerr, G4cout, G4endl, G4LogicalVolumeStore::GetInstance(), G4LogicalVolume::GetName(), GetVerboseLevel(), and sort().

283 {
284  G4LogicalVolumeStore* theLogicalVolumes;
285  G4LogicalVolume* volume;
286  theLogicalVolumes = G4LogicalVolumeStore::GetInstance();
287  for (size_t i = 0; i < theLogicalVolumes->size(); i++){
288  volume=(*theLogicalVolumes)[i];
289  if (volume->GetName() == aVolume) {
290  std::vector<G4String>::iterator location;
291  location = std::find(ValidVolumes.begin(),ValidVolumes.end(),aVolume);
292  if (location != ValidVolumes.end()) {
293  ValidVolumes.erase(location);
294  std::sort(ValidVolumes.begin(), ValidVolumes.end());
295  isAllVolumesMode =false;
296  } else {
297  G4cerr << " DeselectVolume:" << aVolume << " is not in the list "
298  << G4endl;
299  }
300 #ifdef G4VERBOSE
301  if (GetVerboseLevel() > 0)
302  G4cout << " DeselectVolume: " << aVolume << " is removed from list "
303  << G4endl;
304 #endif
305  } else if (i == theLogicalVolumes->size()) {
306  G4cerr << " DeselectVolume:" << aVolume
307  << "is not a valid logical volume name" << G4endl;
308  }
309  }
310 }
G4String GetName() const
G4int GetVerboseLevel() const
subroutine sort(A, N)
Definition: dpm25nuc7.f:4670
G4GLOB_DLL std::ostream G4cout
static G4LogicalVolumeStore * GetInstance()
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr
G4DecayProducts * G4RadioactiveDecay::DoDecay ( G4ParticleDefinition theParticleDef)
protected

Definition at line 1770 of file G4RadioactiveDecay.cc.

References CollimateDecay(), G4VDecayChannel::DecayIt(), G4cerr, G4cout, G4endl, GetDecayTable(), G4ParticleDefinition::GetPDGMass(), GetVerboseLevel(), and G4DecayTable::SelectADecayChannel().

Referenced by DecayIt().

1771 {
1772  G4DecayProducts* products = 0;
1773  G4DecayTable* theDecayTable = GetDecayTable(&theParticleDef);
1774 
1775  // Choose a decay channel.
1776 #ifdef G4VERBOSE
1777  if (GetVerboseLevel() > 0) G4cout << "Select a channel..." << G4endl;
1778 #endif
1779 
1780  G4VDecayChannel* theDecayChannel = theDecayTable->SelectADecayChannel();
1781 
1782  if (theDecayChannel == 0) {
1783  // Decay channel not found.
1784  G4cerr << "G4RadioactiveDecay::DoIt : can not determine decay channel";
1785  G4cerr << G4endl;
1786  } else {
1787  // A decay channel has been identified, so execute the DecayIt.
1788 #ifdef G4VERBOSE
1789  if (GetVerboseLevel() > 1) {
1790  G4cerr << "G4RadioactiveDecay::DoIt : selected decay channel addr:";
1791  G4cerr << theDecayChannel << G4endl;
1792  }
1793 #endif
1794  G4double tempmass = theParticleDef.GetPDGMass();
1795  products = theDecayChannel->DecayIt(tempmass);
1796 
1797  // Apply directional bias if requested by user
1798  CollimateDecay(products);
1799  }
1800 
1801  return products;
1802 }
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4DecayTable * GetDecayTable(G4ParticleDefinition *)
G4VDecayChannel * SelectADecayChannel()
Definition: G4DecayTable.cc:81
G4double GetPDGMass() const
#define G4endl
Definition: G4ios.hh:61
virtual G4DecayProducts * DecayIt(G4double parentMass=-1.0)=0
double G4double
Definition: G4Types.hh:76
void CollimateDecay(G4DecayProducts *products)
G4GLOB_DLL std::ostream G4cerr
const G4ThreeVector& G4RadioactiveDecay::GetDecayDirection ( ) const
inline

Definition at line 217 of file G4RadioactiveDecay.hh.

217  {
218  return forceDecayDirection;
219  }
G4double G4RadioactiveDecay::GetDecayHalfAngle ( ) const
inline

Definition at line 225 of file G4RadioactiveDecay.hh.

225 {return forceDecayHalfAngle;}
void G4RadioactiveDecay::GetDecayRateTable ( const G4ParticleDefinition aParticle)

Definition at line 363 of file G4RadioactiveDecay.cc.

References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), and GetVerboseLevel().

Referenced by DecayIt().

364 {
365  G4String aParticleName = aParticle.GetParticleName();
366 
367  for (size_t i = 0; i < theDecayRateTableVector.size(); i++) {
368  if (theDecayRateTableVector[i].GetIonName() == aParticleName) {
369  theDecayRateVector = theDecayRateTableVector[i].GetItsRates();
370  }
371  }
372 #ifdef G4VERBOSE
373  if (GetVerboseLevel() > 0) {
374  G4cout << "The DecayRate Table for " << aParticleName << " is selected."
375  << G4endl;
376  }
377 #endif
378 }
G4int GetVerboseLevel() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4DecayTable * G4RadioactiveDecay::GetDecayTable ( G4ParticleDefinition aNucleus)

Definition at line 242 of file G4RadioactiveDecay.cc.

References G4ParticleDefinition::GetParticleName(), and LoadDecayTable().

Referenced by AddDecayRateTable(), DecayIt(), and DoDecay().

243 {
244  G4String key = aNucleus->GetParticleName();
245  DecayTableMap::iterator table_ptr = dkmap->find(key);
246 
247  G4DecayTable* theDecayTable = 0;
248  if (table_ptr == dkmap->end() ) { // If table not there,
249  theDecayTable = LoadDecayTable(*aNucleus); // load from file and
250  (*dkmap)[key] = theDecayTable; // store in library
251  } else {
252  theDecayTable = table_ptr->second;
253  }
254 
255  return theDecayTable;
256 }
const G4String & GetParticleName() const
G4DecayTable * LoadDecayTable(G4ParticleDefinition &theParentNucleus)
G4double G4RadioactiveDecay::GetDecayTime ( )
protected

Definition at line 533 of file G4RadioactiveDecay.cc.

References G4cout, G4endl, G4UniformRand, and GetVerboseLevel().

Referenced by DecayIt().

534 {
535  G4double decaytime = 0.;
536  G4double rand = G4UniformRand();
537  G4int i = 0;
538  while ( DProfile[i] < rand) i++;
539  rand = G4UniformRand();
540  decaytime = DBin[i] + rand*(DBin[i+1]-DBin[i]);
541 #ifdef G4VERBOSE
542  if (GetVerboseLevel()>1)
543  {G4cout <<" Decay time: " <<decaytime/s <<"[s]" <<G4endl;}
544 #endif
545  return decaytime;
546 }
const XML_Char * s
G4int GetVerboseLevel() const
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4int G4RadioactiveDecay::GetDecayTimeBin ( const G4double  aDecayTime)
protected

Definition at line 549 of file G4RadioactiveDecay.cc.

Referenced by DecayIt().

550 {
551  G4int i = 0;
552  while ( aDecayTime > DBin[i] ) i++;
553  return i;
554 }
int G4int
Definition: G4Types.hh:78
G4double G4RadioactiveDecay::GetMeanFreePath ( const G4Track theTrack,
G4double  previousStepSize,
G4ForceCondition condition 
)
protectedvirtual

Implements G4VRestDiscreteProcess.

Definition at line 605 of file G4RadioactiveDecay.cc.

References python.hepunit::c_light, DBL_MAX, DBL_MIN, G4cout, G4endl, G4Exception(), G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMass(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGLifeTime(), G4DynamicParticle::GetTotalMomentum(), GetVerboseLevel(), python.hepunit::GeV, JustWarning, python.hepunit::keV, and python.hepunit::m.

607 {
608  const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
609  G4ParticleDefinition* aParticleDef = aParticle->GetDefinition();
610  G4double tau = aParticleDef->GetPDGLifeTime();
611  G4double aMass = aParticle->GetMass();
612 
613 #ifdef G4VERBOSE
614  if (GetVerboseLevel() > 2) {
615  G4cout << "G4RadioactiveDecay::GetMeanFreePath() " << G4endl;
616  G4cout << " KineticEnergy: " << aParticle->GetKineticEnergy()/GeV
617  << " GeV, Mass: " << aMass/GeV << " GeV, tau: " << tau << " ns "
618  << G4endl;
619  }
620 #endif
621  G4double pathlength = DBL_MAX;
622  if (tau != -1) {
623  // Ion can decay
624 
625  if (tau < 0.0) {
627  ed << "Ion has negative lifetime " << tau
628  << " but is not stable. Setting mean free path to DBL_MAX" << G4endl;
629  G4Exception("G4RadioactiveDecay::GetMeanFreePath()", "HAD_RDM_011",
630  JustWarning, ed);
631  pathlength = DBL_MAX;
632 
633  } else {
634  // Calculate mean free path
635  G4double betaGamma = aParticle->GetTotalMomentum()/aMass;
636  pathlength = c_light*tau*betaGamma;
637 
638  if (pathlength < DBL_MIN) {
639  pathlength = DBL_MIN;
640 #ifdef G4VERBOSE
641  if (GetVerboseLevel() > 2) {
642  G4cout << "G4Decay::GetMeanFreePath: "
643  << aParticleDef->GetParticleName()
644  << " stops, kinetic energy = "
645  << aParticle->GetKineticEnergy()/keV <<" keV " << G4endl;
646  }
647 #endif
648  }
649  }
650  }
651 
652 #ifdef G4VERBOSE
653  if (GetVerboseLevel() > 1) {
654  G4cout << "mean free path: "<< pathlength/m << " m" << G4endl;
655  }
656 #endif
657  return pathlength;
658 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4double GetKineticEnergy() const
G4int GetVerboseLevel() const
G4ParticleDefinition * GetDefinition() const
const G4String & GetParticleName() const
G4double GetTotalMomentum() const
G4GLOB_DLL std::ostream G4cout
G4double GetMass() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define DBL_MIN
Definition: templates.hh:75
G4double GetPDGLifeTime() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
float c_light
Definition: hepunit.py:257
G4double G4RadioactiveDecay::GetMeanLifeTime ( const G4Track theTrack,
G4ForceCondition condition 
)
protectedvirtual

Implements G4VRestDiscreteProcess.

Definition at line 562 of file G4RadioactiveDecay.cc.

References DBL_MAX, G4cout, G4endl, G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMass(), G4ParticleDefinition::GetPDGLifeTime(), G4ParticleDefinition::GetPDGStable(), GetVerboseLevel(), python.hepunit::GeV, and ns.

564 {
565  // For varience reduction implementation the time is set to 0 so as to
566  // force the particle to decay immediately.
567  // In analogueMC mode it return the particle's mean-life.
568 
569  G4double meanlife = 0.;
570  if (AnalogueMC) {
571  const G4DynamicParticle* theParticle = theTrack.GetDynamicParticle();
572  G4ParticleDefinition* theParticleDef = theParticle->GetDefinition();
573  G4double theLife = theParticleDef->GetPDGLifeTime();
574 
575 #ifdef G4VERBOSE
576  if (GetVerboseLevel() > 2) {
577  G4cout << "G4RadioactiveDecay::GetMeanLifeTime() " << G4endl;
578  G4cout << "KineticEnergy: " << theParticle->GetKineticEnergy()/GeV
579  << " GeV, Mass: " << theParticle->GetMass()/GeV
580  << " GeV, Life time: " << theLife/ns << " ns " << G4endl;
581  }
582 #endif
583  if (theParticleDef->GetPDGStable()) {meanlife = DBL_MAX;}
584  else if (theLife < 0.0) {meanlife = DBL_MAX;}
585  else {meanlife = theLife;}
586  // Set meanlife to zero for excited istopes which are not in the
587  // RDM database
588  if (((const G4Ions*)(theParticleDef))->GetExcitationEnergy() > 0. &&
589  meanlife == DBL_MAX) {meanlife = 0.;}
590  }
591 #ifdef G4VERBOSE
592  if (GetVerboseLevel() > 1)
593  G4cout << " mean life time: " << meanlife/s << " s " << G4endl;
594 #endif
595 
596  return meanlife;
597 }
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
const XML_Char * s
G4bool GetPDGStable() const
G4int GetVerboseLevel() const
G4ParticleDefinition * GetDefinition() const
G4GLOB_DLL std::ostream G4cout
Definition: G4Ions.hh:51
G4double GetMass() const
G4double GetPDGLifeTime() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
#define ns
Definition: xmlparse.cc:597
G4NucleusLimits G4RadioactiveDecay::GetNucleusLimits ( ) const
inline

Definition at line 179 of file G4RadioactiveDecay.hh.

180  {return theNucleusLimits;}
G4int G4RadioactiveDecay::GetSplitNuclei ( )
inline

Definition at line 210 of file G4RadioactiveDecay.hh.

210 {return NSplit;}
G4double G4RadioactiveDecay::GetTaoTime ( const G4double  t,
const G4double  tao 
)
protected

Definition at line 382 of file G4RadioactiveDecay.cc.

References G4cout, G4endl, and GetVerboseLevel().

Referenced by DecayIt().

383 {
384  long double taotime = 0.L;
385  G4int nbin;
386  if ( t > SBin[NSourceBin]) {
387  nbin = NSourceBin;}
388  else {
389  nbin = 0;
390  while (t > SBin[nbin]) nbin++;
391  nbin--;}
392  long double lt = t ;
393  long double ltao = tao;
394 
395  if (nbin > 0) {
396  for (G4int i = 0; i < nbin; i++) {
397  taotime += (long double)SProfile[i] *
398  (std::exp(-(lt-(long double)SBin[i+1])/ltao)-std::exp(-(lt-(long double)SBin[i])/ltao));
399  }
400  }
401  taotime += (long double)SProfile[nbin] * (1.L-std::exp(-(lt-(long double)SBin[nbin])/ltao));
402  if (taotime < 0.) {
403  G4cout <<" Tao time =: " <<taotime << " reset to zero!"<<G4endl;
404  G4cout <<" t = " << t <<" tao = " <<tao <<G4endl;
405  G4cout << SBin[nbin] << " " <<SBin[0] << G4endl;
406  taotime = 0.;
407  }
408 #ifdef G4VERBOSE
409  if (GetVerboseLevel()>1)
410  {G4cout <<" Tao time: " <<taotime <<G4endl;}
411 #endif
412  return (G4double)taotime ;
413 }
G4int GetVerboseLevel() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
std::vector<G4RadioactivityTable*> G4RadioactiveDecay::GetTheRadioactivityTables ( )
inline

Definition at line 156 of file G4RadioactiveDecay.hh.

Referenced by exrdmAnalysisManager::BeginOfRun(), and exrdmAnalysisManager::EndOfRun().

157  {return theRadioactivityTables;}
G4int G4RadioactiveDecay::GetVerboseLevel ( ) const
inline
G4bool G4RadioactiveDecay::IsAnalogueMonteCarlo ( )
inline

Definition at line 194 of file G4RadioactiveDecay.hh.

Referenced by exrdmAnalysisManager::BeginOfRun(), and exrdmAnalysisManager::EndOfRun().

194 {return AnalogueMC;}
G4bool G4RadioactiveDecay::IsApplicable ( const G4ParticleDefinition aParticle)
virtual

Reimplemented from G4VProcess.

Definition at line 221 of file G4RadioactiveDecay.cc.

References G4NucleusLimits::GetAMax(), G4NucleusLimits::GetAMin(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleType(), G4ParticleDefinition::GetPDGLifeTime(), G4NucleusLimits::GetZMax(), and G4NucleusLimits::GetZMin().

Referenced by AddDecayRateTable(), and DecayIt().

222 {
223  // All particles other than G4Ions, are rejected by default
224  if (((const G4Ions*)(&aParticle))->GetExcitationEnergy() > 0.) {return true;}
225  if (aParticle.GetParticleName() == "GenericIon") {
226  return true;
227  } else if (!(aParticle.GetParticleType() == "nucleus")
228  || aParticle.GetPDGLifeTime() < 0. ) {
229  return false;
230  }
231 
232  // Determine whether the nuclide falls into the correct A and Z range
233  G4int A = ((const G4Ions*) (&aParticle))->GetAtomicMass();
234  G4int Z = ((const G4Ions*) (&aParticle))->GetAtomicNumber();
235  if (A > theNucleusLimits.GetAMax() || A < theNucleusLimits.GetAMin())
236  {return false;}
237  else if (Z > theNucleusLimits.GetZMax() || Z < theNucleusLimits.GetZMin())
238  {return false;}
239  return true;
240 }
G4int GetZMax() const
int G4int
Definition: G4Types.hh:78
G4int GetAMin() const
const G4String & GetParticleName() const
Definition: G4Ions.hh:51
G4int GetAMax() const
const G4String & GetParticleType() const
G4double GetPDGLifeTime() const
G4int GetZMin() const
G4bool G4RadioactiveDecay::IsRateTableReady ( const G4ParticleDefinition aParticle)

Definition at line 348 of file G4RadioactiveDecay.cc.

References G4ParticleDefinition::GetParticleName().

Referenced by DecayIt().

349 {
350  // Check whether the radioactive decay rates table for the ion has already
351  // been calculated.
352  G4String aParticleName = aParticle.GetParticleName();
353  for (size_t i = 0; i < theDecayRateTableVector.size(); i++) {
354  if (theDecayRateTableVector[i].GetIonName() == aParticleName) return true;
355  }
356  return false;
357 }
const G4String & GetParticleName() const
G4DecayTable * G4RadioactiveDecay::LoadDecayTable ( G4ParticleDefinition theParentNucleus)

Definition at line 689 of file G4RadioactiveDecay.cc.

References test::a, allowed, Alpha, test::b, BetaMinus, BetaPlus, test::c, G4DecayTable::DumpInfo(), G4DecayTable::entries(), FatalException, G4BetaDecayCorrections::FermiFunction(), G4cerr, G4cout, G4endl, G4Exception(), G4RandGeneral, G4VDecayChannel::GetBR(), G4DecayTable::GetDecayChannel(), G4NuclearDecayChannel::GetDecayMode(), G4ParticleDefinition::GetParticleName(), GetVerboseLevel(), G4DecayTable::Insert(), IT, KshellEC, LshellEC, python.hepunit::MeV, MshellEC, RDM_ERROR, G4NuclearDecayChannel::SetARM(), G4VDecayChannel::SetBR(), G4NuclearDecayChannel::SetHLThreshold(), G4NuclearDecayChannel::SetICM(), G4BetaDecayCorrections::ShapeFactor(), SpFission, and G4String::strip().

Referenced by GetDecayTable().

690 {
691  // Generate input data file name using Z and A of the parent nucleus
692  // file containing radioactive decay data.
693  G4int A = ((const G4Ions*)(&theParentNucleus))->GetAtomicMass();
694  G4int Z = ((const G4Ions*)(&theParentNucleus))->GetAtomicNumber();
695  G4int lvl = ((const G4Ions*)(&theParentNucleus))->GetIsomerLevel();
696  G4DecayTable* theDecayTable = 0;
697 
698 #ifdef G4MULTITHREADED
699  G4AutoLock lk(&G4RadioactiveDecay::radioactiveDecayMutex);
700 
701  G4String key = theParentNucleus.GetParticleName();
702  DecayTableMap::iterator master_table_ptr = master_dkmap->find(key);
703 
704  if (master_table_ptr != master_dkmap->end() ) { // If table is there
705  return master_table_ptr->second;
706  }
707 #endif
708 
709  // Create and initialise variables used in the method.
710  theDecayTable = new G4DecayTable();
711 
712  //Check if data have been provided by the user
713  G4String file= theUserRadioactiveDataFiles[1000*A+Z];
714 
715  if (file =="") {
716  if (!getenv("G4RADIOACTIVEDATA") ) {
717  G4cout << "Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files."
718  << G4endl;
719  throw G4HadronicException(__FILE__, __LINE__, " Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files.");
720  }
721  G4String dirName = getenv("G4RADIOACTIVEDATA");
722 
723  std::ostringstream os;
724  os <<dirName <<"/z" <<Z <<".a" <<A <<'\0';
725  file = os.str();
726  }
727 
728  std::ifstream DecaySchemeFile(file);
729 
730  G4bool found(false);
731  if (DecaySchemeFile) {
732  // Initialise variables used for reading in radioactive decay data.
733  G4int nMode = 7;
734  G4bool modeFirstRecord[7];
735  G4double modeTotalBR[7] = {0.0};
736  G4double modeSumBR[7];
737  for (G4int i = 0; i < nMode; i++) {
738  modeFirstRecord[i] = true;
739  modeSumBR[i] = 0.0;
740  }
741 
742  G4bool complete(false);
743  char inputChars[100]={' '};
744  G4String inputLine;
745  G4String recordType("");
746  G4RadioactiveDecayMode theDecayMode;
747  G4double a(0.0);
748  G4double b(0.0);
749  G4double c(0.0);
750  G4int levelCounter = 0;
751  G4BetaDecayType betaType(allowed);
752  G4double e0;
753 
754  // Loop through each data file record until you identify the decay
755  // data relating to the nuclide of concern.
756 
757  while (!complete && !DecaySchemeFile.getline(inputChars, 100).eof()) {
758  inputLine = inputChars;
759  inputLine = inputLine.strip(1);
760  if (inputChars[0] != '#' && inputLine.length() != 0) {
761  std::istringstream tmpStream(inputLine);
762 
763  if (inputChars[0] == 'P') {
764  // Nucleus is a parent type. Check excitation level to see if it
765  // matches that of theParentNucleus
766  tmpStream >> recordType >> a >> b;
767  if (found) {
768  complete = true;
769 // else {found = (std::abs(a*keV - E) < levelTolerance);}
770  } else {
771  found = (levelCounter == lvl);
772  }
773  levelCounter++;
774 
775  } else if (found) {
776  // The right part of the radioactive decay data file has been found. Search
777  // through it to determine the mode of decay of the subsequent records.
778  if (inputChars[0] == 'W') {
779 #ifdef G4VERBOSE
780  if (GetVerboseLevel() > 0) {
781  // a comment line identified and print out the message
782  G4cout << " Warning in G4RadioactiveDecay::LoadDecayTable " << G4endl;
783  G4cout << " In data file " << file << G4endl;
784  G4cout << " " << inputLine << G4endl;
785  }
786 #endif
787  } else {
788  tmpStream >> theDecayMode >> a >> b >> c >> betaType;
789 
790  // Allowed transitions are the default. Forbidden transitions are
791  // indicated in the last column.
792  if (inputLine.length() < 80) betaType = allowed;
793  a /= 1000.;
794  c /= 1000.;
795 
796  switch (theDecayMode) {
797 
798  case IT: // Isomeric transition
799  {
800  G4ITDecayChannel* anITChannel =
802  (const G4Ions*)& theParentNucleus, b);
803  anITChannel->SetICM(applyICM);
804  anITChannel->SetARM(applyARM);
805  anITChannel->SetHLThreshold(halflifethreshold);
806  theDecayTable->Insert(anITChannel);
807  }
808  break;
809 
810  case BetaMinus:
811  {
812  if (modeFirstRecord[1]) {
813  modeFirstRecord[1] = false;
814  modeTotalBR[1] = b;
815  } else {
816  if (c > 0.) {
817  e0 = c*MeV/0.511;
818  G4BetaDecayCorrections corrections(Z+1, A);
819 
820  // array to store function shape
821  G4int npti = 100;
822  G4double* pdf = new G4double[npti];
823 
824  G4double e; // Total electron energy in units of electron mass
825  G4double p; // Electron momentum in units of electron mass
826  G4double f; // Spectral shape function value
827  for (G4int ptn = 0; ptn < npti; ptn++) {
828  // Calculate simple phase space spectrum
829  e = 1. + e0*(ptn+0.5)/100.;
830  p = std::sqrt(e*e - 1.);
831  f = p*e*(e0-e+1)*(e0-e+1);
832 
833  // Apply Fermi factor to get allowed shape
834  f *= corrections.FermiFunction(e);
835 
836  // Apply shape factor for forbidden transitions
837  f *= corrections.ShapeFactor(betaType, p, e0-e+1.);
838  pdf[ptn] = f;
839  }
840 
841  G4RandGeneral* aRandomEnergy = new G4RandGeneral( pdf, npti);
842  G4BetaMinusDecayChannel *aBetaMinusChannel = new
843  G4BetaMinusDecayChannel(GetVerboseLevel(), &theParentNucleus,
844  b, c*MeV, a*MeV, 0, FBeta, aRandomEnergy);
845  aBetaMinusChannel->SetICM(applyICM);
846  aBetaMinusChannel->SetARM(applyARM);
847  aBetaMinusChannel->SetHLThreshold(halflifethreshold);
848  theDecayTable->Insert(aBetaMinusChannel);
849  modeSumBR[1] += b;
850  delete[] pdf;
851  } // c > 0
852  } // if not first record
853  }
854  break;
855 
856  case BetaPlus:
857  {
858  if (modeFirstRecord[2]) {
859  modeFirstRecord[2] = false;
860  modeTotalBR[2] = b;
861  } else {
862  e0 = c*MeV/0.510999 - 2.;
863  // Need to test e0 for nuclei which have Q < 2Me in their
864  // data files (e.g. z67.a162)
865  if (e0 > 0.) {
866  G4BetaDecayCorrections corrections(1-Z, A);
867 
868  // array to store function shape
869  G4int npti = 100;
870  G4double* pdf = new G4double[npti];
871 
872  G4double e; // Total positron energy in units of electron mass
873  G4double p; // Positron momentum in units of electron mass
874  G4double f; // Spectral shape function value
875  for (G4int ptn = 0; ptn < npti; ptn++) {
876  // Calculate simple phase space spectrum
877  e = 1. + e0*(ptn+0.5)/100.;
878  p = std::sqrt(e*e - 1.);
879  f = p*e*(e0-e+1)*(e0-e+1);
880 
881  // Apply Fermi factor to get allowed shape
882  f *= corrections.FermiFunction(e);
883 
884  // Apply shape factor for forbidden transitions
885  f *= corrections.ShapeFactor(betaType, p, e0-e+1.);
886  pdf[ptn] = f;
887  }
888  G4RandGeneral* aRandomEnergy = new G4RandGeneral(pdf, npti);
889  G4BetaPlusDecayChannel* aBetaPlusChannel = new
891  &theParentNucleus, b,
892  (c-1.021998)*MeV, a*MeV, 0,
893  FBeta, aRandomEnergy);
894  aBetaPlusChannel->SetICM(applyICM);
895  aBetaPlusChannel->SetARM(applyARM);
896  aBetaPlusChannel->SetHLThreshold(halflifethreshold);
897  theDecayTable->Insert(aBetaPlusChannel);
898  modeSumBR[2] += b;
899  delete[] pdf;
900  } // if e0 > 0
901  } // if not first record
902  }
903  break;
904 
905  case KshellEC: // K-shell electron capture
906 
907  if (modeFirstRecord[3]) {
908  modeFirstRecord[3] = false;
909  modeTotalBR[3] = b;
910  } else {
911  G4KshellECDecayChannel* aKECChannel =
913  &theParentNucleus,
914  b, c*MeV, a*MeV);
915  aKECChannel->SetICM(applyICM);
916  aKECChannel->SetARM(applyARM);
917  aKECChannel->SetHLThreshold(halflifethreshold);
918  theDecayTable->Insert(aKECChannel);
919  modeSumBR[3] += b;
920  }
921  break;
922 
923  case LshellEC: // L-shell electron capture
924 
925  if (modeFirstRecord[4]) {
926  modeFirstRecord[4] = false;
927  modeTotalBR[4] = b;
928  } else {
929  G4LshellECDecayChannel *aLECChannel = new
930  G4LshellECDecayChannel (GetVerboseLevel(), &theParentNucleus,
931  b, c*MeV, a*MeV);
932  aLECChannel->SetICM(applyICM);
933  aLECChannel->SetARM(applyARM);
934  aLECChannel->SetHLThreshold(halflifethreshold);
935  theDecayTable->Insert(aLECChannel);
936  modeSumBR[4] += b;
937  }
938  break;
939 
940  case MshellEC: // M-shell electron capture
941  // In this implementation it is added to L-shell case
942  if (modeFirstRecord[5]) {
943  modeFirstRecord[5] = false;
944  modeTotalBR[5] = b;
945  } else {
946  G4MshellECDecayChannel* aMECChannel =
948  &theParentNucleus,
949  b, c*MeV, a*MeV);
950  aMECChannel->SetICM(applyICM);
951  aMECChannel->SetARM(applyARM);
952  aMECChannel->SetHLThreshold(halflifethreshold);
953  theDecayTable->Insert(aMECChannel);
954  modeSumBR[5] += b;
955  }
956  break;
957 
958  case Alpha:
959  if (modeFirstRecord[6]) {
960  modeFirstRecord[6] = false;
961  modeTotalBR[6] = b;
962  } else {
963  G4AlphaDecayChannel* anAlphaChannel =
965  &theParentNucleus,
966  b, c*MeV, a*MeV);
967  anAlphaChannel->SetICM(applyICM);
968  anAlphaChannel->SetARM(applyARM);
969  anAlphaChannel->SetHLThreshold(halflifethreshold);
970  theDecayTable->Insert(anAlphaChannel);
971  modeSumBR[6] += b;
972  }
973  break;
974  case SpFission:
975  //Still needed to be implemented
976  //G4cout<<"Sp fission channel"<<a<<'\t'<<b<<'\t'<<c<<std::endl;
977  break;
978  case RDM_ERROR:
979 
980  default:
981  G4Exception("G4RadioactiveDecay::LoadDecayTable()", "HAD_RDM_000",
982  FatalException, "Selected decay mode does not exist");
983  } // switch
984  } // if char == W
985  } // if char == P
986  } // if char != #
987  } // While
988 
989  // Go through the decay table and make sure that the branching ratios are
990  // correctly normalised.
991 
992  G4VDecayChannel* theChannel = 0;
993  G4NuclearDecayChannel* theNuclearDecayChannel = 0;
994  G4String mode = "";
995 
996  G4double theBR = 0.0;
997  for (G4int i = 0; i < theDecayTable->entries(); i++) {
998  theChannel = theDecayTable->GetDecayChannel(i);
999  theNuclearDecayChannel = static_cast<G4NuclearDecayChannel*>(theChannel);
1000  theDecayMode = theNuclearDecayChannel->GetDecayMode();
1001 
1002  if (theDecayMode != IT) {
1003  theBR = theChannel->GetBR();
1004  theChannel->SetBR(theBR*modeTotalBR[theDecayMode]/modeSumBR[theDecayMode]);
1005  }
1006  }
1007  } // if (DecaySchemeFile)
1008  DecaySchemeFile.close();
1009 
1010  if (!found && lvl > 0) {
1011  // Case where IT cascade for excited isotopes has no entries in RDM database
1012  // Decay mode is isomeric transition.
1013  G4ITDecayChannel* anITChannel = new G4ITDecayChannel
1014  (GetVerboseLevel(), (const G4Ions*) &theParentNucleus, 1);
1015  anITChannel->SetICM(applyICM);
1016  anITChannel->SetARM(applyARM);
1017  anITChannel->SetHLThreshold(halflifethreshold);
1018  theDecayTable->Insert(anITChannel);
1019  }
1020  if (!theDecayTable) {
1021 
1022  // There is no radioactive decay data for this nucleus. Return a null
1023  // decay table.
1024  G4cerr << "G4RadoactiveDecay::LoadDecayTable() : cannot find ion radioactive decay file "
1025  << G4endl;
1026  theDecayTable = 0;
1027  return theDecayTable;
1028  }
1029 
1030  if (theDecayTable && GetVerboseLevel() > 1) {
1031  G4cout << "G4RadioactiveDecay::LoadDecayTable()" << G4endl;
1032  theDecayTable->DumpInfo();
1033  }
1034 
1035 #ifdef G4MULTITHREADED
1036  (*master_dkmap)[key] = theDecayTable; // store in master library
1037 #endif
1038  return theDecayTable;
1039 }
G4double GetBR() const
void SetBR(G4double value)
G4String strip(G4int strip_Type=trailing, char c=' ')
const char * p
Definition: xmltok.h:285
G4VDecayChannel * GetDecayChannel(G4int index) const
G4int GetVerboseLevel() const
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4int entries() const
G4GLOB_DLL std::ostream G4cout
Definition: G4Ions.hh:51
bool G4bool
Definition: G4Types.hh:79
#define G4RandGeneral
Definition: Randomize.hh:84
void DumpInfo() const
G4RadioactiveDecayMode
G4BetaDecayType
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
void Insert(G4VDecayChannel *aChannel)
Definition: G4DecayTable.cc:60
G4RadioactiveDecayMode GetDecayMode()
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void SetHLThreshold(G4double hl)
G4GLOB_DLL std::ostream G4cerr
void G4RadioactiveDecay::SelectAllVolumes ( )

Definition at line 313 of file G4RadioactiveDecay.cc.

References G4cout, G4endl, G4LogicalVolumeStore::GetInstance(), G4LogicalVolume::GetName(), GetVerboseLevel(), and sort().

Referenced by G4RadioactiveDecay().

314 {
315  G4LogicalVolumeStore* theLogicalVolumes;
316  G4LogicalVolume* volume;
317  theLogicalVolumes = G4LogicalVolumeStore::GetInstance();
318  ValidVolumes.clear();
319 #ifdef G4VERBOSE
320  if (GetVerboseLevel()>0)
321  G4cout << " RDM Applies to all Volumes" << G4endl;
322 #endif
323  for (size_t i = 0; i < theLogicalVolumes->size(); i++){
324  volume = (*theLogicalVolumes)[i];
325  ValidVolumes.push_back(volume->GetName());
326 #ifdef G4VERBOSE
327  if (GetVerboseLevel()>0)
328  G4cout << " RDM Applies to Volume " << volume->GetName() << G4endl;
329 #endif
330  }
331  std::sort(ValidVolumes.begin(), ValidVolumes.end());
332  // sort needed in order to allow binary_search
333  isAllVolumesMode=true;
334 }
G4String GetName() const
G4int GetVerboseLevel() const
subroutine sort(A, N)
Definition: dpm25nuc7.f:4670
G4GLOB_DLL std::ostream G4cout
static G4LogicalVolumeStore * GetInstance()
#define G4endl
Definition: G4ios.hh:61
void G4RadioactiveDecay::SelectAVolume ( const G4String  aVolume)

Definition at line 259 of file G4RadioactiveDecay.cc.

References G4cerr, G4cout, G4endl, G4LogicalVolumeStore::GetInstance(), G4LogicalVolume::GetName(), GetVerboseLevel(), and sort().

260 {
261  G4LogicalVolumeStore* theLogicalVolumes;
262  G4LogicalVolume* volume;
263  theLogicalVolumes = G4LogicalVolumeStore::GetInstance();
264  for (size_t i = 0; i < theLogicalVolumes->size(); i++) {
265  volume=(*theLogicalVolumes)[i];
266  if (volume->GetName() == aVolume) {
267  ValidVolumes.push_back(aVolume);
268  std::sort(ValidVolumes.begin(), ValidVolumes.end());
269  // sort need for performing binary_search
270 #ifdef G4VERBOSE
271  if (GetVerboseLevel()>0)
272  G4cout << " RDM Applies to : " << aVolume << G4endl;
273 #endif
274  } else if(i == theLogicalVolumes->size()) {
275  G4cerr << "SelectAVolume: "<< aVolume
276  << " is not a valid logical volume name" << G4endl;
277  }
278  }
279 }
G4String GetName() const
G4int GetVerboseLevel() const
subroutine sort(A, N)
Definition: dpm25nuc7.f:4670
G4GLOB_DLL std::ostream G4cout
static G4LogicalVolumeStore * GetInstance()
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr
void G4RadioactiveDecay::SetAnalogueMonteCarlo ( G4bool  r)
inline

Definition at line 184 of file G4RadioactiveDecay.hh.

Referenced by SetBRBias(), SetDecayBias(), SetSourceTimeProfile(), and SetSplitNuclei().

184  {
185  AnalogueMC = r;
186  if (!AnalogueMC) halflifethreshold = 1e-6*CLHEP::s;
187  }
void G4RadioactiveDecay::SetARM ( G4bool  arm)
inline

Definition at line 129 of file G4RadioactiveDecay.hh.

Referenced by PhysicsList::AddRadioactiveDecay().

129 {applyARM = arm;}
void G4RadioactiveDecay::SetBRBias ( G4bool  r)
inline

Definition at line 198 of file G4RadioactiveDecay.hh.

References SetAnalogueMonteCarlo().

198  {
199  BRBias = r;
201  }
void SetAnalogueMonteCarlo(G4bool r)
void G4RadioactiveDecay::SetDecayBias ( G4String  filename)

Definition at line 1383 of file G4RadioactiveDecay.cc.

References plottest35::bin, FatalException, G4cout, G4endl, G4Exception(), GetVerboseLevel(), and SetAnalogueMonteCarlo().

1384 {
1385 
1386  std::ifstream infile(filename, std::ios::in);
1387  if (!infile) G4Exception("G4RadioactiveDecay::SetDecayBias()", "HAD_RDM_003",
1388  FatalException, "Unable to open bias data file" );
1389 
1390  G4double bin, flux;
1391  G4int dWindows = 0;
1392  G4int i ;
1393 
1394  theRadioactivityTables.clear();
1395 
1396  NDecayBin = -1;
1397  while (infile >> bin >> flux ) {
1398  NDecayBin++;
1399  if (NDecayBin > 99) {
1400  G4Exception("G4RadioactiveDecay::SetDecayBias()", "HAD_RDM_004",
1401  FatalException, "Input bias file too big (>100 rows)" );
1402  } else {
1403  DBin[NDecayBin] = bin * s;
1404  DProfile[NDecayBin] = flux;
1405  if (flux > 0.) {
1406  decayWindows[NDecayBin] = dWindows;
1407  dWindows++;
1408  G4RadioactivityTable *rTable = new G4RadioactivityTable() ;
1409  theRadioactivityTables.push_back(rTable);
1410  }
1411  }
1412  }
1413  for ( i = 1; i<= NDecayBin; i++) DProfile[i] += DProfile[i-1];
1414  for ( i = 0; i<= NDecayBin; i++) DProfile[i] /= DProfile[NDecayBin];
1415  // converted to accumulated probabilities
1416 
1418  infile.close();
1419 
1420 #ifdef G4VERBOSE
1421  if (GetVerboseLevel()>1)
1422  {G4cout <<" Decay Bias Profile Nbin = " << NDecayBin <<G4endl;}
1423 #endif
1424 }
tuple bin
Definition: plottest35.py:22
const XML_Char * s
G4int GetVerboseLevel() const
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
double G4double
Definition: G4Types.hh:76
void SetAnalogueMonteCarlo(G4bool r)
void G4RadioactiveDecay::SetDecayCollimation ( const G4ThreeVector theDir,
G4double  halfAngle = 0.*CLHEP::deg 
)
inline

Definition at line 227 of file G4RadioactiveDecay.hh.

References SetDecayDirection(), and SetDecayHalfAngle().

228  {
229  SetDecayDirection(theDir);
230  SetDecayHalfAngle(halfAngle);
231  }
void SetDecayDirection(const G4ThreeVector &theDir)
void SetDecayHalfAngle(G4double halfAngle=0.*CLHEP::deg)
void G4RadioactiveDecay::SetDecayDirection ( const G4ThreeVector theDir)
inline

Definition at line 213 of file G4RadioactiveDecay.hh.

References CLHEP::Hep3Vector::unit().

Referenced by SetDecayCollimation().

213  {
214  forceDecayDirection = theDir.unit();
215  }
Hep3Vector unit() const
void G4RadioactiveDecay::SetDecayHalfAngle ( G4double  halfAngle = 0.*CLHEP::deg)
inline

Definition at line 221 of file G4RadioactiveDecay.hh.

References G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by SetDecayCollimation().

221  {
222  forceDecayHalfAngle = std::min(std::max(0.*CLHEP::deg,halfAngle),180.*CLHEP::deg);
223  }
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void G4RadioactiveDecay::SetDecayRate ( G4int  theZ,
G4int  theA,
G4double  theE,
G4int  theG,
std::vector< G4double theRates,
std::vector< G4double theTaos 
)

Definition at line 1058 of file G4RadioactiveDecay.cc.

References G4RadioactiveDecayRate::SetA(), G4RadioactiveDecayRate::SetDecayRateC(), G4RadioactiveDecayRate::SetE(), G4RadioactiveDecayRate::SetGeneration(), G4RadioactiveDecayRate::SetTaos(), and G4RadioactiveDecayRate::SetZ().

Referenced by AddDecayRateTable().

1061 {
1062  //fill the decay rate vector
1063  theDecayRate.SetZ(theZ);
1064  theDecayRate.SetA(theA);
1065  theDecayRate.SetE(theE);
1066  theDecayRate.SetGeneration(theG);
1067  theDecayRate.SetDecayRateC(theRates);
1068  theDecayRate.SetTaos(theTaos);
1069 }
void SetTaos(std::vector< G4double > value)
void SetDecayRateC(std::vector< G4double > value)
void G4RadioactiveDecay::SetFBeta ( G4bool  r)
inline

Definition at line 191 of file G4RadioactiveDecay.hh.

191 { FBeta = r; }
void G4RadioactiveDecay::SetHLThreshold ( G4double  hl)
inline

Definition at line 123 of file G4RadioactiveDecay.hh.

Referenced by PhysicsList::AddRadioactiveDecay().

123 {halflifethreshold = hl;}
void G4RadioactiveDecay::SetICM ( G4bool  icm)
inline

Definition at line 126 of file G4RadioactiveDecay.hh.

Referenced by PhysicsList::AddRadioactiveDecay().

126 {applyICM = icm;}
void G4RadioactiveDecay::SetNucleusLimits ( G4NucleusLimits  theNucleusLimits1)
inline

Definition at line 174 of file G4RadioactiveDecay.hh.

175  {theNucleusLimits = theNucleusLimits1 ;}
void G4RadioactiveDecay::SetSourceTimeProfile ( G4String  filename)

Definition at line 1344 of file G4RadioactiveDecay.cc.

References plottest35::bin, FatalException, G4cout, G4endl, G4Exception(), GetVerboseLevel(), and SetAnalogueMonteCarlo().

1345 {
1346  std::ifstream infile ( filename, std::ios::in );
1347  if (!infile) {
1349  ed << " Could not open file " << filename << G4endl;
1350  G4Exception("G4RadioactiveDecay::SetSourceTimeProfile()", "HAD_RDM_001",
1351  FatalException, ed);
1352  }
1353 
1354  G4double bin, flux;
1355  NSourceBin = -1;
1356  while (infile >> bin >> flux ) {
1357  NSourceBin++;
1358  if (NSourceBin > 99) {
1359  G4Exception("G4RadioactiveDecay::SetSourceTimeProfile()", "HAD_RDM_002",
1360  FatalException, "Input source time file too big (>100 rows)");
1361 
1362  } else {
1363  SBin[NSourceBin] = bin * s;
1364  SProfile[NSourceBin] = flux;
1365  }
1366  }
1368  infile.close();
1369 
1370 #ifdef G4VERBOSE
1371  if (GetVerboseLevel()>1)
1372  {G4cout <<" Source Timeprofile Nbin = " << NSourceBin <<G4endl;}
1373 #endif
1374 }
tuple bin
Definition: plottest35.py:22
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const XML_Char * s
G4int GetVerboseLevel() const
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
double G4double
Definition: G4Types.hh:76
void SetAnalogueMonteCarlo(G4bool r)
void G4RadioactiveDecay::SetSplitNuclei ( G4int  r)
inline

Definition at line 204 of file G4RadioactiveDecay.hh.

References SetAnalogueMonteCarlo().

204  {
205  NSplit = r;
207  }
void SetAnalogueMonteCarlo(G4bool r)
void G4RadioactiveDecay::SetVerboseLevel ( G4int  value)
inline

Definition at line 168 of file G4RadioactiveDecay.hh.

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

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