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

#include <G4MolecularConfiguration.hh>

Collaboration diagram for G4MolecularConfiguration:

Classes

class  G4MolecularConfigurationManager
 

Public Types

typedef std::function< double(const
G4Material *, double, const
G4MolecularConfiguration *)> 
G4DiffCoeffParam
 

Public Member Functions

void AddDiffCoeffParameterization (const G4DiffCoeffParam &)
 
const G4MoleculeDefinitionGetDefinition () const
 
const G4StringGetName () const
 
const G4StringGetFormatedName () const
 
G4int GetAtomsNumber () const
 
G4MolecularConfigurationExciteMolecule (G4int)
 
G4MolecularConfigurationIonizeMolecule (G4int)
 
G4MolecularConfigurationAddElectron (G4int orbit, G4int n=1)
 
G4MolecularConfigurationRemoveElectron (G4int, G4int number=1)
 
G4MolecularConfigurationMoveOneElectron (G4int, G4int)
 
G4double GetNbElectrons () const
 
void PrintState () const
 
const std::vector< const
G4MolecularDissociationChannel * > * 
GetDecayChannel () const
 
G4int GetFakeParticleID () const
 
G4int GetMoleculeID () const
 
void SetDiffusionCoefficient (G4double)
 
G4double GetDiffusionCoefficient () const
 
G4double GetDiffusionCoefficient (const G4Material *, double temperature) const
 
void SetDecayTime (G4double)
 
G4double GetDecayTime () const
 
void SetVanDerVaalsRadius (G4double)
 
G4double GetVanDerVaalsRadius () const
 
const G4ElectronOccupancyGetElectronOccupancy () const
 
G4int GetCharge () const
 
void SetMass (G4double)
 
G4double GetMass () const
 
void SetLabel (const G4String &)
 
const G4StringGetLabel () const
 
void Finalize ()
 
const G4StringGetUserID () const
 
void Serialize (std::ostream &)
 
void Unserialize (std::istream &)
 

Static Public Member Functions

static G4MolecularConfigurationGetOrCreateMolecularConfiguration (const G4MoleculeDefinition *)
 
static G4MolecularConfigurationGetOrCreateMolecularConfiguration (const G4MoleculeDefinition *, const G4ElectronOccupancy &eOcc)
 
static G4MolecularConfigurationGetOrCreateMolecularConfiguration (const G4MoleculeDefinition *, int charge)
 
static G4MolecularConfigurationCreateMolecularConfiguration (const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)
 
static G4MolecularConfigurationCreateMolecularConfiguration (const G4String &userIdentifier, const G4MoleculeDefinition *, const G4String &label, const G4ElectronOccupancy &eOcc, bool &wasAlreadyCreated)
 
static G4MolecularConfigurationCreateMolecularConfiguration (const G4String &userIdentifier, const G4MoleculeDefinition *, int charge, const G4String &label, bool &wasAlreadyCreated)
 
static G4MolecularConfigurationCreateMolecularConfiguration (const G4String &userIdentifier, const G4MoleculeDefinition *, const G4String &label, bool &wasAlreadyCreated)
 
static G4MolecularConfigurationGetMolecularConfiguration (const G4MoleculeDefinition *, const G4String &label)
 
static G4MolecularConfigurationGetMolecularConfiguration (int moleculeID)
 
static G4MolecularConfigurationGetMolecularConfiguration (const G4String &userID)
 
static int GetNumberOfSpecies ()
 
static std::map< G4String,
G4MolecularConfiguration * > & 
GetUserIDTable ()
 
static void DeleteManager ()
 
static double DiffCoeffWater (double temperature_K)
 
static void FinalizeAll ()
 
static void SetGlobalTemperature (G4double)
 
static G4double GetGlobalTemperature ()
 
static G4MolecularConfigurationLoad (std::istream &)
 

Protected Member Functions

 G4MolecularConfiguration (const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
 
 G4MolecularConfiguration (const G4MoleculeDefinition *, int charge)
 
 G4MolecularConfiguration (const G4MoleculeDefinition *, const G4String &label, int charge)
 
 G4MolecularConfiguration (std::istream &)
 
 G4MolecularConfiguration (const G4MolecularConfiguration &)
 
G4MolecularConfigurationoperator= (G4MolecularConfiguration &right)
 
 ~G4MolecularConfiguration ()
 
G4MolecularConfigurationChangeConfiguration (const G4ElectronOccupancy &newElectronOccupancy)
 
G4MolecularConfigurationChangeConfiguration (int charge)
 
void CheckElectronOccupancy (const char *line) const
 
void MakeExceptionIfFinalized ()
 
void SetUserID (const G4String &userID)
 
void CreateDefaultDiffCoeffParam ()
 

Static Protected Member Functions

static void ScaleAllDiffusionCoefficientsOnWater (double temperature_K)
 
static
G4MolecularConfigurationManager
GetManager ()
 
static double ReturnDefaultDiffCoeff (const G4Material *, double, const G4MolecularConfiguration *molConf)
 

Protected Attributes

const G4MoleculeDefinitionfMoleculeDefinition
 
const G4ElectronOccupancyfElectronOccupancy
 
G4StringfLabel
 
G4double fDynDiffusionCoefficient
 
G4double fDynVanDerVaalsRadius
 
G4double fDynDecayTime
 
G4double fDynMass
 
G4int fDynCharge
 
G4int fMoleculeID
 
G4String fFormatedName
 
G4String fName
 
G4String fUserIdentifier
 
G4bool fIsFinalized
 
G4DiffCoeffParam fDiffParam
 

Static Protected Attributes

static
G4MolecularConfigurationManager
fgManager = 0
 
static double fgTemperature = 298
 

Detailed Description

The pointer G4MolecularConfiguration will be shared by all the molecules having the same molecule definition and the same electron occupancy BE CAREFUlL !!! : If you change the mass for instance of a OH^-, this will affect all the OH^- molecule diffusing around

Definition at line 98 of file G4MolecularConfiguration.hh.

Member Typedef Documentation

Constructor & Destructor Documentation

G4MolecularConfiguration::G4MolecularConfiguration ( const G4MoleculeDefinition moleculeDef,
const G4ElectronOccupancy elecOcc,
const G4String label = "" 
)
protected

Definition at line 438 of file G4MolecularConfiguration.cc.

441 {
442  fMoleculeDefinition = moleculeDef;
443 
444  fMoleculeID = GetManager()->Insert(moleculeDef,
445  elecOcc,
446  this);
448  elecOcc);
449 
450  /*
451  fgManager->fTable[fMoleculeDefinition][elecOcc] = this;
452  std::map<G4ElectronOccupancy, G4MolecularConfiguration*, comparator>::iterator it ;
453  it = fgManager->fTable[moleculeDef].find(elecOcc);
454  fElectronOccupancy = &(it->first);
455  */
456 
459  + moleculeDef->GetCharge();
461 
465 
467  fName += "^";
469 
471  fFormatedName += "^";
472  fFormatedName += "{";
474  fFormatedName += "}";
475 
476  fLabel = 0; // let it here
477 
478  if(label != "")
479  {
480  SetLabel(label);
481  }
482 
484 
485  fIsFinalized = false;
486 }
G4int GetTotalOccupancy() const
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
const G4ElectronOccupancy * FindCommonElectronOccupancy(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)
G4int Insert(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc, G4MolecularConfiguration *molConf)
G4double GetDecayTime() const
static G4MolecularConfigurationManager * GetManager()
static double ReturnDefaultDiffCoeff(const G4Material *, double, const G4MolecularConfiguration *molConf)
G4double GetVanDerVaalsRadius() const
const G4String & GetFormatedName() const
const G4String & GetName() const
G4double GetDiffusionCoefficient() const
const G4ElectronOccupancy * fElectronOccupancy
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

G4MolecularConfiguration::G4MolecularConfiguration ( const G4MoleculeDefinition moleculeDef,
int  charge 
)
protected

Definition at line 491 of file G4MolecularConfiguration.cc.

493 {
494  fMoleculeDefinition = moleculeDef;
495 
496  fMoleculeID = GetManager()->Insert(moleculeDef,
497  charge,
498  this);
499  fElectronOccupancy = 0;
500 
501  fDynCharge = charge;
503 
507 
509  fName += "^";
511 
513  fFormatedName += "^";
514  fFormatedName += "{";
516  fFormatedName += "}";
517 
518  fLabel = 0;
519 
521 
522  fIsFinalized = false;
523 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
G4int Insert(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc, G4MolecularConfiguration *molConf)
G4double GetDecayTime() const
static G4MolecularConfigurationManager * GetManager()
static double ReturnDefaultDiffCoeff(const G4Material *, double, const G4MolecularConfiguration *molConf)
G4double GetVanDerVaalsRadius() const
const G4String & GetFormatedName() const
const G4String & GetName() const
G4double GetDiffusionCoefficient() const
const G4ElectronOccupancy * fElectronOccupancy
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

G4MolecularConfiguration::G4MolecularConfiguration ( const G4MoleculeDefinition moleculeDef,
const G4String label,
int  charge 
)
protected

Definition at line 80 of file G4MolecularConfiguration.cc.

83 {
84  fMoleculeDefinition = moleculeDef;
85 
86  fLabel = new G4String(label);
87 
88  fMoleculeID = GetManager()->Insert(moleculeDef,
89  label,
90  this);
92 
93  fDynCharge = charge;
94 
96 
100 
102  fName += "^";
104 
106  fFormatedName += "^";
107  fFormatedName += "{";
109  fFormatedName += "}";
110 
112  fIsFinalized = false;
113 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
G4int Insert(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc, G4MolecularConfiguration *molConf)
G4double GetDecayTime() const
static G4MolecularConfigurationManager * GetManager()
static double ReturnDefaultDiffCoeff(const G4Material *, double, const G4MolecularConfiguration *molConf)
G4double GetVanDerVaalsRadius() const
const G4String & GetFormatedName() const
const G4String & GetName() const
G4double GetDiffusionCoefficient() const
const G4ElectronOccupancy * fElectronOccupancy
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

G4MolecularConfiguration::G4MolecularConfiguration ( std::istream &  in)
protected

Definition at line 1444 of file G4MolecularConfiguration.cc.

1445 {
1446  fLabel = 0; // TODO: for now not serialized
1447  Unserialize(in);
1448  fMoleculeDefinition = 0;
1449  fElectronOccupancy = 0;
1450  if(fElectronOccupancy)
1451  {
1456 
1457  if(fLabel)
1458  {
1460  }
1461  }
1462  else if(fLabel)
1463  {
1465  }
1466  else if(fDynCharge)
1467  {
1469  }
1470 }
const G4ElectronOccupancy * FindCommonElectronOccupancy(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)
G4int Insert(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc, G4MolecularConfiguration *molConf)
void RecordNewlyLabeledConfiguration(G4MolecularConfiguration *molConf)
static G4MolecularConfigurationManager * GetManager()
const G4ElectronOccupancy * fElectronOccupancy
const G4MoleculeDefinition * fMoleculeDefinition
G4MolecularConfiguration::G4MolecularConfiguration ( const G4MolecularConfiguration )
protected
G4MolecularConfiguration::~G4MolecularConfiguration ( )
protected

Definition at line 527 of file G4MolecularConfiguration.cc.

528 {
530 
531 // if (G4AllocatorList::GetAllocatorListIfExist())
532 // {
533 // if (fElectronOccupancy)
534 // {
535 // delete fElectronOccupancy;
536 // fElectronOccupancy = 0;
537 // }
538 // }
539 }
static G4MolecularConfigurationManager * fgManager

Member Function Documentation

void G4MolecularConfiguration::AddDiffCoeffParameterization ( const G4DiffCoeffParam para)
inline

Definition at line 586 of file G4MolecularConfiguration.hh.

587 {
588  fDiffParam = para;
589 }
G4MolecularConfiguration * G4MolecularConfiguration::AddElectron ( G4int  orbit,
G4int  n = 1 
)

Add n electrons to a given orbit. Note : You can add as many electrons to a given orbit, the result may be unrealist.

Definition at line 636 of file G4MolecularConfiguration.cc.

638 {
639 // MakeExceptionIfFinalized();
640  CheckElectronOccupancy(__func__);
641  G4ElectronOccupancy newElectronOccupancy(*fElectronOccupancy);
642  newElectronOccupancy.AddElectron(orbit, number);
643  return ChangeConfiguration(newElectronOccupancy);
644 }
G4MolecularConfiguration * ChangeConfiguration(const G4ElectronOccupancy &newElectronOccupancy)
void CheckElectronOccupancy(const char *line) const
const G4ElectronOccupancy * fElectronOccupancy

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::ChangeConfiguration ( const G4ElectronOccupancy newElectronOccupancy)
protected

Definition at line 545 of file G4MolecularConfiguration.cc.

546 {
547  G4MolecularConfiguration* output =
549  newElectronOccupancy);
550 
551  if (!output)
552  {
554  newElectronOccupancy);
555  }
556  return output;
557 }
static G4MolecularConfigurationManager * GetManager()
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::ChangeConfiguration ( int  charge)
protected

Definition at line 562 of file G4MolecularConfiguration.cc.

563 {
564  G4MolecularConfiguration* output =
566 
567  if (!output)
568  {
569  output = new G4MolecularConfiguration(fMoleculeDefinition, charge);
570  }
571  return output;
572 }
static G4MolecularConfigurationManager * GetManager()
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

void G4MolecularConfiguration::CheckElectronOccupancy ( const char *  line) const
protected

Definition at line 824 of file G4MolecularConfiguration.cc.

825 {
826  if (fElectronOccupancy == 0)
827  {
828  G4String functionName(function);
829  G4ExceptionDescription description;
830  description
831  << "No G4ElectronOccupancy was defined for molecule definition : "
833  << ". The definition was probably defined using the charge state, "
834  "rather than electron state.";
835 
836  G4Exception(functionName, "", FatalErrorInArgument, description);
837  }
838 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4String & GetName() const
const G4ElectronOccupancy * fElectronOccupancy
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

void G4MolecularConfiguration::CreateDefaultDiffCoeffParam ( )
protected

Definition at line 1516 of file G4MolecularConfiguration.cc.

1517 {
1518  if(bool(fDiffParam) == false)
1519  {
1521  }
1522 }
static double ReturnDefaultDiffCoeff(const G4Material *, double, const G4MolecularConfiguration *molConf)

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::CreateMolecularConfiguration ( const G4String userIdentifier,
const G4MoleculeDefinition molDef,
bool &  wasAlreadyCreated 
)
static

Definition at line 1099 of file G4MolecularConfiguration.cc.

1102 {
1103  wasAlreadyCreated = false;
1104  G4MolecularConfiguration* preRegisteredMolConf =
1105  GetManager()->GetMolecularConfiguration(userIdentifier);
1106 
1107  if(preRegisteredMolConf)
1108  {
1109  if(preRegisteredMolConf->GetDefinition() == molDef)
1110  {
1111  wasAlreadyCreated = true;
1112  return preRegisteredMolConf;
1113  }
1114  }
1115 
1116  if(molDef->GetGroundStateElectronOccupancy())
1117  {
1118  const G4ElectronOccupancy& elecOcc = *molDef
1120  G4MolecularConfiguration* molConf =
1121  GetManager()->GetMolecularConfiguration(molDef, elecOcc);
1122 
1123  if(molConf)
1124  {
1125  if(molConf->fUserIdentifier == "")
1126  {
1127  molConf->fUserIdentifier = userIdentifier;
1128  }
1129  else if(molConf->fUserIdentifier != userIdentifier)
1130  {
1131  G4ExceptionDescription errMsg;
1132  errMsg << "A molecular configuration for the definition named "
1133  << molDef->GetName() << " has already been created "
1134  "and recorded with a different user ID "
1135  << molConf->fUserIdentifier;
1136  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1137  "DOUBLE_CREATION",
1139  errMsg);
1140  }
1141 // TODO exception
1142  G4ExceptionDescription errMsg;
1143  errMsg << "A molecular configuration for the definition named "
1144  << molDef->GetName() << " has already been created.";
1145  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1146  "DOUBLE_CREATION",
1147  JustWarning,
1148  errMsg);
1149  wasAlreadyCreated = true;
1150  return molConf;
1151  }
1152  else
1153  {
1154  // G4cout << "Create molConf for " << molDef->GetName() << G4endl;
1155  G4MolecularConfiguration* newConf = new G4MolecularConfiguration(molDef,
1156  elecOcc);
1157  newConf->fUserIdentifier = userIdentifier;
1158 
1159  GetManager()->AddUserID(userIdentifier, newConf);
1160 
1161 // G4MoleculeTable::Instance()->RecordMolecularConfiguration(userIdentifier,
1162 // newConf);
1163  return newConf;
1164  }
1165  }
1166  else
1167  {
1168  return CreateMolecularConfiguration(userIdentifier,
1169  molDef,
1170  molDef->GetName(),
1171  molDef->GetCharge(),
1172  wasAlreadyCreated);
1173  }
1174 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void AddUserID(const G4String &name, G4MolecularConfiguration *molecule)
static G4MolecularConfigurationManager * GetManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
const G4String & GetName() const
const G4MoleculeDefinition * GetDefinition() const
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)
const G4ElectronOccupancy * GetGroundStateElectronOccupancy() const
static G4MolecularConfiguration * CreateMolecularConfiguration(const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::CreateMolecularConfiguration ( const G4String userIdentifier,
const G4MoleculeDefinition molDef,
const G4String label,
const G4ElectronOccupancy eOcc,
bool &  wasAlreadyCreated 
)
static

Definition at line 1246 of file G4MolecularConfiguration.cc.

1251 {
1252  assert(label != "");
1253  wasAlreadyCreated = false;
1254 
1255  G4MolecularConfiguration* molConf =
1256  GetManager()->GetMolecularConfiguration(molDef, eOcc);
1257 
1258  if(molConf)
1259  {
1260  if(molConf->GetElectronOccupancy())
1261  {
1262  if(*molConf->GetElectronOccupancy() == eOcc)
1263  {
1264  if(molConf->fLabel && *molConf->fLabel == label)
1265  {
1266  wasAlreadyCreated = true;
1267  return molConf;
1268  }
1269  else if(molConf->fLabel == 0)
1270  {
1271  wasAlreadyCreated = true;
1272  molConf->SetLabel(label);
1273  return molConf;
1274  }
1275  else if(*molConf->fLabel == "")
1276  {
1277  wasAlreadyCreated = true;
1278  molConf->SetLabel(label);
1279  return molConf;
1280  }
1281  }
1282  }
1283 
1284 
1285  molConf->PrintState();
1286  G4ExceptionDescription errMsg ;
1287  errMsg << "A molecular configuration for the definition named "
1288  << molDef->GetName()
1289  << " has already been created "
1290  "with user ID "
1291  << molConf->fUserIdentifier
1292  << " and possible different electronic state";
1293  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1294  "DOUBLE_CREATION",
1296  errMsg);
1297  }
1298  else
1299  {
1300  G4MolecularConfiguration* newConf =
1301  new G4MolecularConfiguration(molDef,
1302  eOcc,
1303  label);
1304  newConf->fUserIdentifier = userIdentifier;
1305 
1306  GetManager()->AddUserID(userIdentifier, newConf);
1307 
1308 // G4MoleculeTable::Instance()->
1309 // RecordMolecularConfiguration(userIdentifier, newConf);
1310  return newConf;
1311  }
1312  return molConf;
1313 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void AddUserID(const G4String &name, G4MolecularConfiguration *molecule)
const G4ElectronOccupancy * GetElectronOccupancy() const
static G4MolecularConfigurationManager * GetManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
const G4String & GetName() const
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)

Here is the call graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::CreateMolecularConfiguration ( const G4String userIdentifier,
const G4MoleculeDefinition molDef,
int  charge,
const G4String label,
bool &  wasAlreadyCreated 
)
static

Definition at line 1006 of file G4MolecularConfiguration.cc.

1011 {
1012  wasAlreadyCreated = false;
1013  G4MolecularConfiguration* molConf =
1014  GetManager()->GetMolecularConfiguration(molDef, charge);
1015 
1016  if (molConf)
1017  {
1018  if(molConf->fLabel == 0)
1019  {
1020  molConf->SetLabel(label);
1021  G4ExceptionDescription wMsg ;
1022  wMsg << "The molecular configuration for the definition named "
1023  << molDef->GetName()
1024  << " with charge " << charge << " has already been created "
1025  "but with NO label";
1026  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1027  "DOUBLE_CREATION",
1028  JustWarning,
1029  wMsg);
1030  }
1031  else if(*(molConf->fLabel) == "" )
1032  {
1033  molConf->SetLabel(label);
1034  }
1035  else if(*(molConf->fLabel) != label)
1036  {
1037  G4ExceptionDescription errMsg ;
1038  errMsg << "The molecular configuration for the definition named "
1039  << molDef->GetName()
1040  << " with charge " << charge << " has already been created "
1041  "but with a different label :"
1042  << molConf->GetLabel();
1043  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1044  "DOUBLE_CREATION",
1046  errMsg);
1047  // KILL APP
1048  }
1049 
1050  if(molConf->fUserIdentifier == "")
1051  {
1052  molConf->fUserIdentifier = userIdentifier;
1053 
1054  G4ExceptionDescription wMsg ;
1055  wMsg << "The molecular configuration for the definition named "
1056  << molDef->GetName()
1057  << " with label " << label << " has already been created.";
1058  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1059  "DOUBLE_CREATION",
1060  JustWarning,
1061  wMsg);
1062  }
1063  else if(molConf->fUserIdentifier != userIdentifier)
1064  {
1065  G4ExceptionDescription errMsg ;
1066  errMsg << "The molecular configuration for the definition named "
1067  << molDef->GetName()
1068  << " with label " << label << " has already been created "
1069  "BUT with a different user ID :"
1070  << molConf->fUserIdentifier;
1071  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1072  "DOUBLE_CREATION",
1074  errMsg);
1075  // KILL APP
1076  }
1077 
1078  wasAlreadyCreated = true;
1079  return molConf;
1080  }
1081  else
1082  {
1083  G4MolecularConfiguration* newConf =
1084  new G4MolecularConfiguration(molDef, label, charge);
1085  newConf->fUserIdentifier = userIdentifier;
1086 
1087  GetManager()->AddUserID(userIdentifier, newConf);
1088 
1089 // G4MoleculeTable::Instance()->RecordMolecularConfiguration(userIdentifier,
1090 // newConf);
1091  return newConf;
1092  }
1093 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void AddUserID(const G4String &name, G4MolecularConfiguration *molecule)
static G4MolecularConfigurationManager * GetManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
const G4String & GetName() const
const G4String & GetLabel() const
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)

Here is the call graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::CreateMolecularConfiguration ( const G4String userIdentifier,
const G4MoleculeDefinition molDef,
const G4String label,
bool &  wasAlreadyCreated 
)
static

Definition at line 1180 of file G4MolecularConfiguration.cc.

1184 {
1185  assert(label != "");
1186  wasAlreadyCreated = false;
1187 
1188  G4MolecularConfiguration* molConf =
1189  GetManager()->GetMolecularConfiguration(molDef, label);
1190  if(molConf)
1191  {
1192  if(molConf->fLabel
1193  && *molConf->fLabel == label)
1194  {
1195  wasAlreadyCreated = true;
1196  return molConf;
1197  }
1198  else if(molConf->fLabel == 0)
1199  {
1200  wasAlreadyCreated = true;
1201  molConf->SetLabel(label);
1202  return molConf;
1203  }
1204  else if(*molConf->fLabel == "")
1205  {
1206  wasAlreadyCreated = true;
1207  molConf->SetLabel(label);
1208  return molConf;
1209  }
1210 
1211  molConf->PrintState();
1212  G4ExceptionDescription errMsg ;
1213  errMsg << "A molecular configuration for the definition named "
1214  << molDef->GetName()
1215  << " has already been created "
1216  "with user ID "
1217  << molConf->fUserIdentifier << " and label "
1218  << molConf->GetLabel();
1219  G4Exception("G4MolecularConfiguration::CreateMolecularConfiguration",
1220  "DOUBLE_CREATION",
1222  errMsg);
1223  // KILL APP
1224  }
1225  else
1226  {
1227  G4MolecularConfiguration* newConf =
1228  new G4MolecularConfiguration(molDef,
1229  label,
1230  molDef->GetCharge());
1231  newConf->fUserIdentifier = userIdentifier;
1232 
1233  GetManager()->AddUserID(userIdentifier, newConf);
1234 
1235 // G4MoleculeTable::Instance()->
1236 // RecordMolecularConfiguration(userIdentifier, newConf);
1237  return newConf;
1238  }
1239  return molConf;
1240 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void AddUserID(const G4String &name, G4MolecularConfiguration *molecule)
static G4MolecularConfigurationManager * GetManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
const G4String & GetName() const
const G4String & GetLabel() const
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)

Here is the call graph for this function:

void G4MolecularConfiguration::DeleteManager ( )
static

Definition at line 427 of file G4MolecularConfiguration.cc.

428 {
430  if (fgManager) delete fgManager;
431  fgManager = 0;
432  lock.unlock();
433 }
static G4MolecularConfigurationManager * fgManager

Here is the call graph for this function:

Here is the caller graph for this function:

double G4MolecularConfiguration::DiffCoeffWater ( double  temperature_K)
static

Definition at line 1483 of file G4MolecularConfiguration.cc.

1484 {
1485  return pow(10, 4.311
1486  - 2.722e3/temperature_K
1487  + 8.565e5/(temperature_K *temperature_K)
1488  - 1.181e8/(temperature_K*temperature_K*temperature_K ))*1e-9*m2/s;
1489 }
const XML_Char * s
Definition: expat.h:262
static constexpr double m2
Definition: G4SIunits.hh:130

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::ExciteMolecule ( G4int  ExcitedLevel)

Method used in Geant4-DNA to excite water molecules

Definition at line 588 of file G4MolecularConfiguration.cc.

589 {
590 // MakeExceptionIfFinalized();
591  CheckElectronOccupancy(__func__);
592  G4ElectronOccupancy newElectronOccupancy(*fElectronOccupancy);
593 
594  newElectronOccupancy.RemoveElectron(ExcitedLevel, 1);
595  newElectronOccupancy.AddElectron(5, 1);
596 
597  return ChangeConfiguration(newElectronOccupancy);
598 }
G4MolecularConfiguration * ChangeConfiguration(const G4ElectronOccupancy &newElectronOccupancy)
void CheckElectronOccupancy(const char *line) const
const G4ElectronOccupancy * fElectronOccupancy

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MolecularConfiguration::Finalize ( )
inline

Definition at line 574 of file G4MolecularConfiguration.hh.

Here is the call graph for this function:

void G4MolecularConfiguration::FinalizeAll ( )
static

Definition at line 1562 of file G4MolecularConfiguration.cc.

1563 {
1564  const std::vector<G4MolecularConfiguration*>& species =
1566 
1567  for(size_t i = 0; i < species.size() ; ++i)
1568  {
1569  species[i]->Finalize();
1570  }
1571 
1572 }
static G4MolecularConfigurationManager * GetManager()
const std::vector< G4MolecularConfiguration * > & GetAllSpecies()

Here is the caller graph for this function:

G4int G4MolecularConfiguration::GetAtomsNumber ( ) const

Returns the nomber of atoms compouning the molecule

Definition at line 737 of file G4MolecularConfiguration.cc.

738 {
740 }
const G4MoleculeDefinition * fMoleculeDefinition

Here is the caller graph for this function:

G4int G4MolecularConfiguration::GetCharge ( ) const
inline

Returns the charge of molecule.

Definition at line 531 of file G4MolecularConfiguration.hh.

532 {
533  return fDynCharge;
534 }

Here is the caller graph for this function:

const vector< const G4MolecularDissociationChannel * > * G4MolecularConfiguration::GetDecayChannel ( ) const

Definition at line 790 of file G4MolecularConfiguration.cc.

791 {
792  // if (fElectronOccupancy == 0) return 0;
794 }
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannels(const G4MolecularConfiguration *) const
const G4MoleculeDefinition * fMoleculeDefinition

Here is the caller graph for this function:

G4double G4MolecularConfiguration::GetDecayTime ( ) const
inline

Returns the decay time of the molecule.

Definition at line 515 of file G4MolecularConfiguration.hh.

516 {
517  return fDynDecayTime;
518 }

Here is the caller graph for this function:

const G4MoleculeDefinition * G4MolecularConfiguration::GetDefinition ( ) const
inline

Definition at line 488 of file G4MolecularConfiguration.hh.

489 {
490  return fMoleculeDefinition;
491 }
const G4MoleculeDefinition * fMoleculeDefinition

Here is the caller graph for this function:

G4double G4MolecularConfiguration::GetDiffusionCoefficient ( ) const
inline

Returns the diffusion coefficient D.

Definition at line 504 of file G4MolecularConfiguration.hh.

505 {
507 }

Here is the caller graph for this function:

G4double G4MolecularConfiguration::GetDiffusionCoefficient ( const G4Material material,
double  temperature 
) const
inline

Definition at line 592 of file G4MolecularConfiguration.hh.

594 {
595  return fDiffParam(material, temperature, this);
596 }
const G4ElectronOccupancy * G4MolecularConfiguration::GetElectronOccupancy ( ) const
inline

Returns the object ElectronOccupancy describing the electronic configuration of the molecule.

Definition at line 493 of file G4MolecularConfiguration.hh.

494 {
495  return fElectronOccupancy;
496 }
const G4ElectronOccupancy * fElectronOccupancy

Here is the caller graph for this function:

G4int G4MolecularConfiguration::GetFakeParticleID ( ) const

Definition at line 798 of file G4MolecularConfiguration.cc.

799 {
801  else G4Exception("G4MolecularConfiguration::GetMoleculeID",
802  "",
804  "You should first enter a molecule defintion");
805 
806  return INT_MAX;
807 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define INT_MAX
Definition: templates.hh:111
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

Here is the caller graph for this function:

const G4String & G4MolecularConfiguration::GetFormatedName ( ) const

Returns the formated name of the molecule

Definition at line 722 of file G4MolecularConfiguration.cc.

723 {
724 // if (fFormatedName.isNull())
725 // {
726 // fFormatedName = fMoleculeDefinition->GetFormatedName();
727 // fFormatedName += "^";
728 // fFormatedName += "{";
729 // fFormatedName += G4UIcommand::ConvertToString(fDynCharge);
730 // fFormatedName += "}";
731 // }
732  return fFormatedName;
733 }

Here is the caller graph for this function:

G4double G4MolecularConfiguration::GetGlobalTemperature ( )
static

Definition at line 1534 of file G4MolecularConfiguration.cc.

1535 {
1536  return fgTemperature;
1537 }

Here is the caller graph for this function:

const G4String & G4MolecularConfiguration::GetLabel ( ) const
inline

Definition at line 566 of file G4MolecularConfiguration.hh.

567 {
568  if(fLabel == 0)
569  fLabel = new G4String();
570 
571  return (*fLabel);
572 }

Here is the caller graph for this function:

G4MolecularConfiguration::G4MolecularConfigurationManager * G4MolecularConfiguration::GetManager ( )
staticprotected

Definition at line 131 of file G4MolecularConfiguration.cc.

132 {
133  if (!fgManager)
134  {
136  if (!fgManager) // double check for MT
137  {
140  }
141  lock.unlock();
142  }
143 
144  return fgManager;
145 }
static G4MolecularConfigurationManager * fgManager

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4MolecularConfiguration::GetMass ( ) const
inline

Returns the total mass of the molecule.

Definition at line 542 of file G4MolecularConfiguration.hh.

543 {
544  return fDynMass;
545 }

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::GetMolecularConfiguration ( const G4MoleculeDefinition molDef,
const G4String label 
)
static

Definition at line 989 of file G4MolecularConfiguration.cc.

991 {
992  return GetManager()->GetMolecularConfiguration(molDef, label);
993 }
static G4MolecularConfigurationManager * GetManager()
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::GetMolecularConfiguration ( int  moleculeID)
static

Definition at line 998 of file G4MolecularConfiguration.cc.

999 {
1000  return GetManager()->GetMolecularConfiguration(moleculeID);
1001 }
static G4MolecularConfigurationManager * GetManager()
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)

Here is the call graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::GetMolecularConfiguration ( const G4String userID)
static

Definition at line 1555 of file G4MolecularConfiguration.cc.

1556 {
1557  return GetManager()->GetMolecularConfiguration(userID);
1558 }
static G4MolecularConfigurationManager * GetManager()
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)

Here is the call graph for this function:

G4int G4MolecularConfiguration::GetMoleculeID ( ) const
inline

Definition at line 547 of file G4MolecularConfiguration.hh.

548 {
549  return fMoleculeID;
550 }

Here is the caller graph for this function:

const G4String & G4MolecularConfiguration::GetName ( void  ) const

Returns the name of the molecule

Definition at line 707 of file G4MolecularConfiguration.cc.

708 {
709 // if (fName.isNull())
710 // {
711 // fName = fMoleculeDefinition->GetName();
712 // fName += "^";
713 // // fName+= "{";
714 // fName += G4UIcommand::ConvertToString(fDynCharge);
715 // // fName+= "}";
716 // }
717  return fName;
718 }

Here is the caller graph for this function:

G4double G4MolecularConfiguration::GetNbElectrons ( ) const

Returns the number of electron.

Definition at line 744 of file G4MolecularConfiguration.cc.

745 {
746  CheckElectronOccupancy(__func__);
748 }
G4int GetTotalOccupancy() const
void CheckElectronOccupancy(const char *line) const
const G4ElectronOccupancy * fElectronOccupancy

Here is the caller graph for this function:

int G4MolecularConfiguration::GetNumberOfSpecies ( )
static

Definition at line 67 of file G4MolecularConfiguration.cc.

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::GetOrCreateMolecularConfiguration ( const G4MoleculeDefinition molDef)
static

Definition at line 339 of file G4MolecularConfiguration.cc.

340 {
341  if (molDef->GetGroundStateElectronOccupancy())
342  {
343  const G4ElectronOccupancy& elecOcc =
345  G4MolecularConfiguration* molConf =
346  GetManager()->GetMolecularConfiguration(molDef, elecOcc);
347 
348  if (molConf)
349  {
350  return molConf;
351  }
352  else
353  {
354  G4MolecularConfiguration* newConf =
355  new G4MolecularConfiguration(molDef,
356  elecOcc);
357  newConf->SetUserID(molDef->GetName());
358  return newConf;
359  }
360  }
361  else
362  {
363  G4MolecularConfiguration* molConf =
364  GetManager()->GetMolecularConfiguration(molDef, molDef->GetCharge());
365  if(molConf)
366  {
367  return molConf;
368  }
369  else
370  {
371  G4MolecularConfiguration* newConf =
372  new G4MolecularConfiguration(molDef, molDef->GetCharge());
373  newConf->SetUserID(molDef->GetName());
374  return newConf;
375  }
376  }
377 }
void SetUserID(const G4String &userID)
static G4MolecularConfigurationManager * GetManager()
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
const G4String & GetName() const
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)
const G4ElectronOccupancy * GetGroundStateElectronOccupancy() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::GetOrCreateMolecularConfiguration ( const G4MoleculeDefinition molDef,
const G4ElectronOccupancy eOcc 
)
static

Definition at line 383 of file G4MolecularConfiguration.cc.

385 {
386  return GetManager()->GetOrCreateMolecularConfiguration(molDef, elecOcc);
387 
388 // G4MolecularConfiguration* molConf =
389 // GetManager()->GetMolecularConfiguration(molDef, elecOcc);
390 //
391 // if (molConf)
392 // {
393 // return molConf;
394 // }
395 // else
396 // {
397 // G4MolecularConfiguration* newConf =
398 // new G4MolecularConfiguration(molDef, elecOcc);
399 // return newConf;
400 // }
401 }
G4MolecularConfiguration * GetOrCreateMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)
static G4MolecularConfigurationManager * GetManager()

Here is the call graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::GetOrCreateMolecularConfiguration ( const G4MoleculeDefinition molDef,
int  charge 
)
static

Definition at line 407 of file G4MolecularConfiguration.cc.

409 {
410  G4MolecularConfiguration* molConf =
411  GetManager()->GetMolecularConfiguration(molDef, charge);
412 
413  if(molConf)
414  {
415  return molConf;
416  }
417  else
418  {
419  G4MolecularConfiguration* newConf =
420  new G4MolecularConfiguration(molDef, charge);
421  return newConf;
422  }
423 }
static G4MolecularConfigurationManager * GetManager()
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *molDef, const G4ElectronOccupancy &eOcc)

Here is the call graph for this function:

const G4String & G4MolecularConfiguration::GetUserID ( ) const
inline

Definition at line 580 of file G4MolecularConfiguration.hh.

581 {
582  return fUserIdentifier;
583 }
static std::map<G4String, G4MolecularConfiguration*>& G4MolecularConfiguration::GetUserIDTable ( )
inlinestatic

Definition at line 169 of file G4MolecularConfiguration.hh.

170  {
171  return GetManager()->GetUserIDTable();
172  }
std::map< G4String, G4MolecularConfiguration * > & GetUserIDTable()
static G4MolecularConfigurationManager * GetManager()

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4MolecularConfiguration::GetVanDerVaalsRadius ( ) const
inline

Definition at line 526 of file G4MolecularConfiguration.hh.

527 {
528  return fDynVanDerVaalsRadius;
529 }

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::IonizeMolecule ( G4int  IonizedLevel)

Method used in Geant4-DNA to ionize water molecules

Definition at line 605 of file G4MolecularConfiguration.cc.

606 {
607 // MakeExceptionIfFinalized();
608  CheckElectronOccupancy(__func__);
609  G4ElectronOccupancy newElectronOccupancy(*fElectronOccupancy);
610 
611  if (newElectronOccupancy.GetOccupancy(IonizedLevel) != 0)
612  {
613  newElectronOccupancy.RemoveElectron(IonizedLevel, 1);
614  }
615  else
616  {
617  G4String errMsg = "There is no electron on the orbit "
618  + G4UIcommand::ConvertToString(IonizedLevel)
619  + " you want to free. The molecule's name you want to ionized is "
620  + GetName();
621  G4Exception("G4MolecularConfiguration::IonizeMolecule",
622  "",
624  errMsg);
625  PrintState();
626  }
627 
628  // DEBUG
629  // PrintState();
630 
631  return ChangeConfiguration(newElectronOccupancy);
632 }
const G4String & GetName() const
G4MolecularConfiguration * ChangeConfiguration(const G4ElectronOccupancy &newElectronOccupancy)
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
void CheckElectronOccupancy(const char *line) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4ElectronOccupancy * fElectronOccupancy

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::Load ( std::istream &  in)
static

Definition at line 1437 of file G4MolecularConfiguration.cc.

1438 {
1439  return new G4MolecularConfiguration(in);
1440 }
G4MolecularConfiguration(const G4MoleculeDefinition *, const G4ElectronOccupancy &, const G4String &label="")
void G4MolecularConfiguration::MakeExceptionIfFinalized ( )
protected

Definition at line 115 of file G4MolecularConfiguration.cc.

116 {
117  if(fIsFinalized)
118  {
119  G4ExceptionDescription errMsg;
120  errMsg << "This molecular configuration " << GetName()
121  << " is already finalized. Therefore its "
122  " properties cannot be changed.";
123  G4Exception("G4MolecularConfiguration::MakeExceptionIfFinalized",
124  "CONF_FINALIZED",FatalException,errMsg);
125  }
126 }
const G4String & GetName() const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::MoveOneElectron ( G4int  orbitToFree,
G4int  orbitToFill 
)

Move one electron from an orbit to another.

Definition at line 678 of file G4MolecularConfiguration.cc.

680 {
681 // MakeExceptionIfFinalized();
682  CheckElectronOccupancy(__func__);
683  G4ElectronOccupancy newElectronOccupancy(*fElectronOccupancy);
684 
685  if (newElectronOccupancy.GetOccupancy(orbitToFree) >= 1)
686  {
687  newElectronOccupancy.RemoveElectron(orbitToFree, 1);
688  newElectronOccupancy.AddElectron(orbitToFill, 1);
689  }
690  else
691  {
692  G4String errMsg = "There is no electron on the orbit "
693  + G4UIcommand::ConvertToString(orbitToFree)
694  + " you want to free. The molecule's name is " + GetName();
695  G4Exception("G4MolecularConfiguration::MoveOneElectron",
696  "",
698  errMsg);
699  PrintState();
700  }
701 
702  return ChangeConfiguration(newElectronOccupancy);
703 }
const G4String & GetName() const
G4MolecularConfiguration * ChangeConfiguration(const G4ElectronOccupancy &newElectronOccupancy)
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
void CheckElectronOccupancy(const char *line) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4ElectronOccupancy * fElectronOccupancy

Here is the call graph for this function:

Here is the caller graph for this function:

G4MolecularConfiguration & G4MolecularConfiguration::operator= ( G4MolecularConfiguration right)
protected

Definition at line 577 of file G4MolecularConfiguration.cc.

578 {
579 // if (&right == this) return *this;
580  return *this;
581 }
void G4MolecularConfiguration::PrintState ( ) const

Display the electronic state of the molecule.

Definition at line 752 of file G4MolecularConfiguration.cc.

753 {
754  G4cout << "-------------- Start Printing State " << GetName()
755  << " ---------------" << G4endl;
756 
757  if (fElectronOccupancy)
758  {
759  G4cout << "--------------Print electronic state of " << GetName()
760  << "---------------" << G4endl;
763  {
764  G4cout<<"At ground state"<<G4endl;
765  }
766  }
767  else
768  {
769  G4cout << "--- No electron occupancy set up ---" << G4endl;
770  }
771 
772  G4cout << "Charge :"
773  << fDynCharge
774  << G4endl;
775 
776  if(fLabel)
777  {
778  G4cout << "Label :"
779  << GetLabel()
780  << G4endl;
781  }
782  G4cout << "-------------- End Of State " << GetName()
783  << " -----------------------" << G4endl;
784 }
const G4String & GetName() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetLabel() const
#define G4endl
Definition: G4ios.hh:61
const G4ElectronOccupancy * GetGroundStateElectronOccupancy() const
const G4ElectronOccupancy * fElectronOccupancy
const G4MoleculeDefinition * fMoleculeDefinition

Here is the caller graph for this function:

G4MolecularConfiguration * G4MolecularConfiguration::RemoveElectron ( G4int  orbit,
G4int  number = 1 
)

Remove n electrons to a given orbit.

Definition at line 649 of file G4MolecularConfiguration.cc.

651 {
652 // MakeExceptionIfFinalized();
653  CheckElectronOccupancy(__func__);
654  G4ElectronOccupancy newElectronOccupancy(*fElectronOccupancy);
655 
656  if (newElectronOccupancy.GetOccupancy(orbit) != 0)
657  {
658  newElectronOccupancy.RemoveElectron(orbit, number);
659  }
660  else
661  {
662  G4String errMsg = "There is already no electron into the orbit "
664  + " you want to free. The molecule's name is " + GetName();
665  G4Exception("G4MolecularConfiguration::RemoveElectron",
666  "",
667  JustWarning,
668  errMsg);
669  PrintState();
670  }
671 
672  return ChangeConfiguration(newElectronOccupancy);
673 }
const G4String & GetName() const
G4MolecularConfiguration * ChangeConfiguration(const G4ElectronOccupancy &newElectronOccupancy)
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
void CheckElectronOccupancy(const char *line) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4ElectronOccupancy * fElectronOccupancy

Here is the call graph for this function:

Here is the caller graph for this function:

double G4MolecularConfiguration::ReturnDefaultDiffCoeff ( const G4Material ,
double  ,
const G4MolecularConfiguration molConf 
)
staticprotected

Definition at line 72 of file G4MolecularConfiguration.cc.

76 {
77  return molConf->fDynDiffusionCoefficient;
78 }

Here is the caller graph for this function:

void G4MolecularConfiguration::ScaleAllDiffusionCoefficientsOnWater ( double  temperature_K)
staticprotected

Definition at line 1495 of file G4MolecularConfiguration.cc.

1496 {
1497  double D_water_0 = DiffCoeffWater(fgTemperature);
1498  double D_water_f = DiffCoeffWater(temperature_K);
1499 
1500  G4cout << "Scaling factor = " << D_water_f/D_water_0 << G4endl;
1501 
1504 
1505  while(it())
1506  {
1507  G4MolecularConfiguration* conf = it.value();
1508  double D_0 = conf->GetDiffusionCoefficient() ;
1509  double D_f = D_water_f * D_0 /D_water_0;
1510  conf->SetDiffusionCoefficient(D_f);
1511  };
1512 }
G4GLOB_DLL std::ostream G4cout
static double DiffCoeffWater(double temperature_K)
static G4MoleculeTable * Instance()
G4ConfigurationIterator GetConfigurationIterator()
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void G4MolecularConfiguration::Serialize ( std::ostream &  out)

Definition at line 1387 of file G4MolecularConfiguration.cc.

1388 {
1389  G4String moleculeName = fMoleculeDefinition->GetName();
1390  WRITE(out, moleculeName);
1391 
1392 // if(fLabel)
1393 // out << fLabel;
1394 // else
1395 // out << "";
1398  WRITE(out,fDynDecayTime);
1399  WRITE(out,fDynMass);
1400  WRITE(out,fDynCharge);
1401  WRITE(out,fMoleculeID);
1402  WRITE(out,fFormatedName);
1403  WRITE(out,fName);
1404  WRITE(out,fIsFinalized);
1405 }
void WRITE(std::ostream &out, const T &toBeSaved)
Definition: G4Serialize.hh:41
const G4String & GetName() const
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

void G4MolecularConfiguration::SetDecayTime ( G4double  dynDecayTime)
inline

Set the decay time of the molecule.

Definition at line 509 of file G4MolecularConfiguration.hh.

510 {
512  fDynDecayTime = dynDecayTime;
513 }

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MolecularConfiguration::SetDiffusionCoefficient ( G4double  dynDiffusionCoefficient)
inline

Sets the diffusion coefficient D of the molecule used in diffusion processes to calculate the mean square jump distance between two changes of direction. In three dimension : <x^2> = 6 D t where t is the mean jump time between two changes of direction.

Note : Diffusion Coefficient in one medium only For the time being, we will consider only one diffusion coefficient for the all simulation => diffusion in one medium only If the user needs to use the diffusion in different materials, she/he should contact the developpers/mainteners of this package

Definition at line 498 of file G4MolecularConfiguration.hh.

499 {
501  fDynDiffusionCoefficient = dynDiffusionCoefficient;
502 }

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MolecularConfiguration::SetGlobalTemperature ( G4double  temperature)
static

Definition at line 1526 of file G4MolecularConfiguration.cc.

1527 {
1529  fgTemperature = temperature;
1530 }
static void ScaleAllDiffusionCoefficientsOnWater(double temperature_K)

Here is the caller graph for this function:

void G4MolecularConfiguration::SetLabel ( const G4String label)
inline

Definition at line 552 of file G4MolecularConfiguration.hh.

553 {
554  assert(fLabel == 0 || *fLabel == "");
555  if(fLabel == 0)
556  {
557  fLabel = new G4String(label);
558  }
559  else
560  {
561  *fLabel = label;
562  }
564 }
static G4MolecularConfigurationManager * fgManager
void RecordNewlyLabeledConfiguration(G4MolecularConfiguration *molConf)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MolecularConfiguration::SetMass ( G4double  aMass)
inline

Set the total mass of the molecule.

Definition at line 536 of file G4MolecularConfiguration.hh.

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MolecularConfiguration::SetUserID ( const G4String userID)
protected

Definition at line 1474 of file G4MolecularConfiguration.cc.

1475 {
1476  fUserIdentifier = userID;
1477  GetManager()->AddUserID(userID, this);
1478 // G4MoleculeTable::Instance()->RecordMolecularConfiguration(userID, this);
1479 }
void AddUserID(const G4String &name, G4MolecularConfiguration *molecule)
static G4MolecularConfigurationManager * GetManager()

Here is the caller graph for this function:

void G4MolecularConfiguration::SetVanDerVaalsRadius ( G4double  dynVanDerVaalsRadius)
inline

The Van Der Valls Radius of the molecule

Definition at line 520 of file G4MolecularConfiguration.hh.

521 {
523  fDynVanDerVaalsRadius = dynVanDerVaalsRadius;
524 }

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MolecularConfiguration::Unserialize ( std::istream &  in)

Definition at line 1409 of file G4MolecularConfiguration.cc.

1410 {
1411  G4String moleculeName;
1412  READ(in, moleculeName);
1415 
1416 // G4String label;
1417 //
1418 // in.read((char*)(&label), sizeof(label));
1419 //
1420 // if(label)
1421 // fLabel = new G4String(label);
1422 // else
1423 // fLabel = 0;
1426  READ(in,fDynDecayTime);
1427  READ(in,fDynMass);
1428  READ(in,fDynCharge);
1429  READ(in,fMoleculeID);
1430  READ(in,fFormatedName);
1431  READ(in,fName);
1432  READ(in,fIsFinalized);
1433 }
G4MoleculeDefinition * GetMoleculeDefinition(const G4String &, bool mustExist=true)
static G4MoleculeTable * Instance()
void READ(std::istream &in, T &toBeSaved)
Definition: G4Serialize.hh:49
const G4MoleculeDefinition * fMoleculeDefinition

Here is the call graph for this function:

Member Data Documentation

G4DiffCoeffParam G4MolecularConfiguration::fDiffParam
protected

Definition at line 479 of file G4MolecularConfiguration.hh.

G4int G4MolecularConfiguration::fDynCharge
protected

Definition at line 472 of file G4MolecularConfiguration.hh.

G4double G4MolecularConfiguration::fDynDecayTime
protected

Definition at line 470 of file G4MolecularConfiguration.hh.

G4double G4MolecularConfiguration::fDynDiffusionCoefficient
protected

Definition at line 468 of file G4MolecularConfiguration.hh.

G4double G4MolecularConfiguration::fDynMass
protected

Definition at line 471 of file G4MolecularConfiguration.hh.

G4double G4MolecularConfiguration::fDynVanDerVaalsRadius
protected

Definition at line 469 of file G4MolecularConfiguration.hh.

const G4ElectronOccupancy* G4MolecularConfiguration::fElectronOccupancy
protected

Definition at line 464 of file G4MolecularConfiguration.hh.

G4String G4MolecularConfiguration::fFormatedName
protected

Definition at line 474 of file G4MolecularConfiguration.hh.

MolecularConfigurationManager * G4MolecularConfiguration::fgManager = 0
staticprotected

Definition at line 460 of file G4MolecularConfiguration.hh.

G4double G4MolecularConfiguration::fgTemperature = 298
staticprotected

Definition at line 480 of file G4MolecularConfiguration.hh.

G4bool G4MolecularConfiguration::fIsFinalized
protected

Definition at line 477 of file G4MolecularConfiguration.hh.

G4String* G4MolecularConfiguration::fLabel
mutableprotected

Definition at line 466 of file G4MolecularConfiguration.hh.

const G4MoleculeDefinition* G4MolecularConfiguration::fMoleculeDefinition
protected

Definition at line 463 of file G4MolecularConfiguration.hh.

G4int G4MolecularConfiguration::fMoleculeID
protected

Definition at line 473 of file G4MolecularConfiguration.hh.

G4String G4MolecularConfiguration::fName
protected

Definition at line 475 of file G4MolecularConfiguration.hh.

G4String G4MolecularConfiguration::fUserIdentifier
protected

Definition at line 476 of file G4MolecularConfiguration.hh.


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