Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MoleculeDefinition Class Reference

#include <G4MoleculeDefinition.hh>

+ Inheritance diagram for G4MoleculeDefinition:

Public Member Functions

 G4MoleculeDefinition (const G4String &name, G4double mass, G4double diffCoeff, G4int charge=0, G4int electronicLevels=0, G4double radius=-1, G4int atomsNumber=-1, G4double lifetime=-1, G4String aType="", G4FakeParticleID ID=G4FakeParticleID::Create())
 
virtual ~G4MoleculeDefinition ()
 
 G4MoleculeDefinition (const G4MoleculeDefinition &)=delete
 
G4MoleculeDefinitionoperator= (const G4MoleculeDefinition &)=delete
 
void SetLevelOccupation (G4int, G4int eNb=2)
 
void SetDiffusionCoefficient (G4double)
 
G4double GetDiffusionCoefficient () const
 
void SetAtomsNumber (G4int)
 
G4int GetAtomsNumber () const
 
void SetVanDerVaalsRadius (G4double)
 
G4double GetVanDerVaalsRadius () const
 
G4MolecularConfigurationNewConfiguration (const G4String &excitedStateLabel)
 
G4MolecularConfigurationNewConfigurationWithElectronOccupancy (const G4String &excitedStateLabel, const G4ElectronOccupancy &, double decayTime=0.)
 
G4MolecularConfigurationGetConfigurationWithLabel (const G4String &molecularConfLabel)
 
void AddDecayChannel (const G4MolecularConfiguration *molConf, const G4MolecularDissociationChannel *channel)
 
void AddDecayChannel (const G4String &molecularConfLabel, const G4MolecularDissociationChannel *channel)
 
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannels (const G4MolecularConfiguration *) const
 
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannels (const G4String &) const
 
const G4MolecularDissociationTableGetDecayTable () const
 
G4MolecularDissociationTableGetDecayTable ()
 
G4double GetDecayTime () const
 
const G4ElectronOccupancyGetGroundStateElectronOccupancy () const
 
G4int GetCharge () const
 
const G4StringGetName () const
 
G4double GetMass () const
 
const G4StringGetType () const
 
G4int GetNbElectrons () const
 
G4int GetNbMolecularShells () const
 
const G4StringGetFormatedName () const
 
void SetFormatedName (const G4String &name)
 
void Finalize ()
 
void Serialize (std::ostream &)
 
- Public Member Functions inherited from G4ParticleDefinition
 G4ParticleDefinition (const G4String &aName, G4double mass, G4double width, G4double charge, G4int iSpin, G4int iParity, G4int iConjugation, G4int iIsospin, G4int iIsospinZ, G4int gParity, const G4String &pType, G4int lepton, G4int baryon, G4int encoding, G4bool stable, G4double lifetime, G4DecayTable *decaytable, G4bool shortlived=false, const G4String &subType="", G4int anti_encoding=0, G4double magneticMoment=0.0)
 
virtual ~G4ParticleDefinition ()
 
 G4ParticleDefinition (const G4ParticleDefinition &)=delete
 
G4ParticleDefinitionoperator= (const G4ParticleDefinition &)=delete
 
G4bool operator== (const G4ParticleDefinition &right) const
 
G4bool operator!= (const G4ParticleDefinition &right) const
 
const G4StringGetParticleName () const
 
G4double GetPDGMass () const
 
G4double GetPDGWidth () const
 
G4double GetPDGCharge () const
 
G4double GetPDGSpin () const
 
G4int GetPDGiSpin () const
 
G4int GetPDGiParity () const
 
G4int GetPDGiConjugation () const
 
G4double GetPDGIsospin () const
 
G4double GetPDGIsospin3 () const
 
G4int GetPDGiIsospin () const
 
G4int GetPDGiIsospin3 () const
 
G4int GetPDGiGParity () const
 
G4double GetPDGMagneticMoment () const
 
void SetPDGMagneticMoment (G4double mageticMoment)
 
G4double CalculateAnomaly () const
 
const G4StringGetParticleType () const
 
const G4StringGetParticleSubType () const
 
G4int GetLeptonNumber () const
 
G4int GetBaryonNumber () const
 
G4int GetPDGEncoding () const
 
G4int GetAntiPDGEncoding () const
 
void SetAntiPDGEncoding (G4int aEncoding)
 
G4int GetQuarkContent (G4int flavor) const
 
G4int GetAntiQuarkContent (G4int flavor) const
 
G4bool IsShortLived () const
 
G4bool GetPDGStable () const
 
void SetPDGStable (const G4bool aFlag)
 
G4double GetPDGLifeTime () const
 
void SetPDGLifeTime (G4double aLifeTime)
 
G4double GetIonLifeTime () const
 
G4DecayTableGetDecayTable () const
 
void SetDecayTable (G4DecayTable *aDecayTable)
 
G4ProcessManagerGetProcessManager () const
 
void SetProcessManager (G4ProcessManager *aProcessManager)
 
G4ParticleTableGetParticleTable () const
 
G4int GetAtomicNumber () const
 
G4int GetAtomicMass () const
 
void DumpTable () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
void SetApplyCutsFlag (G4bool)
 
G4bool GetApplyCutsFlag () const
 
G4bool IsGeneralIon () const
 
G4bool IsMuonicAtom () const
 
G4ProcessManagerGetMasterProcessManager () const
 
void SetMasterProcessManager (G4ProcessManager *aNewPM)
 
G4int GetInstanceID () const
 
void SetParticleDefinitionID (G4int id=-1)
 
G4int GetParticleDefinitionID () const
 

Static Public Member Functions

static G4MoleculeDefinitionLoad (std::istream &)
 
- Static Public Member Functions inherited from G4ParticleDefinition
static const G4PDefManagerGetSubInstanceManager ()
 
static void Clean ()
 

Protected Member Functions

 G4MoleculeDefinition ()
 
- Protected Member Functions inherited from G4ParticleDefinition
 G4ParticleDefinition ()
 
G4int FillQuarkContents ()
 
void SetParticleSubType (const G4String &subtype)
 
void SetAtomicNumber (G4int)
 
void SetAtomicMass (G4int)
 

Additional Inherited Members

- Protected Types inherited from G4ParticleDefinition
enum  { NumberOfQuarkFlavor = 6 }
 
- Protected Attributes inherited from G4ParticleDefinition
G4int theQuarkContent [NumberOfQuarkFlavor]
 
G4int theAntiQuarkContent [NumberOfQuarkFlavor]
 
G4bool isGeneralIon = false
 
G4bool isMuonicAtom = false
 

Detailed Description

Definition at line 76 of file G4MoleculeDefinition.hh.

Constructor & Destructor Documentation

◆ G4MoleculeDefinition() [1/3]

G4MoleculeDefinition::G4MoleculeDefinition ( const G4String name,
G4double  mass,
G4double  diffCoeff,
G4int  charge = 0,
G4int  electronicLevels = 0,
G4double  radius = -1,
G4int  atomsNumber = -1,
G4double  lifetime = -1,
G4String  aType = "",
G4FakeParticleID  ID = G4FakeParticleID::Create() 
)

Definition at line 45 of file G4MoleculeDefinition.cc.

54 :
55 G4ParticleDefinition(name, mass, 0., charge, 0, 0, 0, 0, 0, 0, "Molecule",
56 0, 0, ID, false, lifetime, NULL, false, aType, 0, 0.0),
57 fDiffusionCoefficient(diffCoeff),
58 fAtomsNb(atomsNumber),
59 fVanDerVaalsRadius(radius)
60
61{
62 fCharge = charge;
63 if(electronicLevels)
64 {
65 fElectronOccupancy = new G4ElectronOccupancy(electronicLevels);
66 }
67 else
68 {
69 fElectronOccupancy = 0;
70 }
71 fDecayTable = NULL;
73}
void Insert(G4MoleculeDefinition *)
static G4MoleculeTable * Instance()

◆ ~G4MoleculeDefinition()

G4MoleculeDefinition::~G4MoleculeDefinition ( )
virtual

Definition at line 130 of file G4MoleculeDefinition.cc.

131{
132 if (fElectronOccupancy)
133 {
134 delete fElectronOccupancy;
135 fElectronOccupancy = 0;
136 }
137 if (fDecayTable)
138 {
139 delete fDecayTable;
140 fDecayTable = 0;
141 }
142}

◆ G4MoleculeDefinition() [2/3]

G4MoleculeDefinition::G4MoleculeDefinition ( const G4MoleculeDefinition )
delete

◆ G4MoleculeDefinition() [3/3]

Member Function Documentation

◆ AddDecayChannel() [1/2]

void G4MoleculeDefinition::AddDecayChannel ( const G4MolecularConfiguration molConf,
const G4MolecularDissociationChannel channel 
)

Definition at line 223 of file G4MoleculeDefinition.cc.

225{
226 if (!fDecayTable)
227 {
228 fDecayTable = new G4MolecularDissociationTable();
229 }
230 fDecayTable->AddChannel(molConf, channel);
231}
void AddChannel(const G4MolecularConfiguration *molConf, const G4MolecularDissociationChannel *channel)

Referenced by G4EmDNAChemistry::ConstructDissociationChannels(), G4EmDNAChemistry_option1::ConstructDissociationChannels(), G4EmDNAChemistry_option3::ConstructDissociationChannels(), and G4EmDNAChemistry_option2::ConstructDissociationChannels().

◆ AddDecayChannel() [2/2]

void G4MoleculeDefinition::AddDecayChannel ( const G4String molecularConfLabel,
const G4MolecularDissociationChannel channel 
)

Definition at line 208 of file G4MoleculeDefinition.cc.

210{
211 if(!fDecayTable)
212 {
213 fDecayTable = new G4MolecularDissociationTable();
214 }
215
217 molecularConfLabel),
218 channel);
219}
static G4MolecularConfiguration * GetMolecularConfiguration(const G4MoleculeDefinition *, const G4String &label)

◆ Finalize()

void G4MoleculeDefinition::Finalize ( )

Definition at line 284 of file G4MoleculeDefinition.cc.

285{
287}
void Finalize(G4MoleculeDefinition *)

◆ GetAtomsNumber()

G4int G4MoleculeDefinition::GetAtomsNumber ( ) const
inline

Definition at line 225 of file G4MoleculeDefinition.hh.

226{
227 return fAtomsNb;
228}

Referenced by G4MolecularConfiguration::GetAtomsNumber().

◆ GetCharge()

G4int G4MoleculeDefinition::GetCharge ( ) const
inline

◆ GetConfigurationWithLabel()

G4MolecularConfiguration * G4MoleculeDefinition::GetConfigurationWithLabel ( const G4String molecularConfLabel)

Definition at line 160 of file G4MoleculeDefinition.cc.

161{
163 molecularConfLabel);
164}

◆ GetDecayChannels() [1/2]

const vector< const G4MolecularDissociationChannel * > * G4MoleculeDefinition::GetDecayChannels ( const G4MolecularConfiguration conf) const

Definition at line 259 of file G4MoleculeDefinition.cc.

261{
262 if(fDecayTable)
263 {
264 const vector<const G4MolecularDissociationChannel*>* output =
265 fDecayTable->GetDecayChannels(conf);
266 return output;
267 }
268// else
269// {
270// G4ExceptionDescription errMsg;
271// errMsg << ": no Excited States and Decays for"
272// << GetName()
273// << " are defined.";
274// G4Exception("G4MoleculeDefinition::GetDecayChannels",
275// "",
276// FatalErrorInArgument,
277// errMsg);
278// }
279 return 0;
280}
const std::vector< const G4MolecularDissociationChannel * > * GetDecayChannels(const G4MolecularConfiguration *) const

Referenced by G4MolecularConfiguration::GetDissociationChannels().

◆ GetDecayChannels() [2/2]

const vector< const G4MolecularDissociationChannel * > * G4MoleculeDefinition::GetDecayChannels ( const G4String ExState) const

Definition at line 236 of file G4MoleculeDefinition.cc.

237{
238 if (fDecayTable)
239 {
240 const vector<const G4MolecularDissociationChannel*>* output =
241 fDecayTable->GetDecayChannels(ExState);
242 return output;
243 }
244 else
245 {
247 errMsg << ": no Excited States and Decays for"
248 << GetName()
249 << " are defined.";
250 G4Exception("G4MoleculeDefinition::GetDecayChannels", "",
251 FatalErrorInArgument, errMsg);
252 }
253 return 0;
254}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
const G4String & GetName() const

◆ GetDecayTable() [1/2]

G4MolecularDissociationTable * G4MoleculeDefinition::GetDecayTable ( )
inline

Definition at line 287 of file G4MoleculeDefinition.hh.

288{
289 return fDecayTable;
290}

◆ GetDecayTable() [2/2]

const G4MolecularDissociationTable * G4MoleculeDefinition::GetDecayTable ( ) const
inline

Definition at line 282 of file G4MoleculeDefinition.hh.

283{
284 return fDecayTable;
285}

◆ GetDecayTime()

G4double G4MoleculeDefinition::GetDecayTime ( ) const
inline

Definition at line 215 of file G4MoleculeDefinition.hh.

216{
217 return GetPDGLifeTime();
218}
G4double GetPDGLifeTime() const

Referenced by G4MolecularConfiguration::G4MolecularConfiguration().

◆ GetDiffusionCoefficient()

G4double G4MoleculeDefinition::GetDiffusionCoefficient ( ) const
inline

Definition at line 205 of file G4MoleculeDefinition.hh.

206{
207 return fDiffusionCoefficient;
208}

Referenced by G4MolecularConfiguration::G4MolecularConfiguration().

◆ GetFormatedName()

const G4String & G4MoleculeDefinition::GetFormatedName ( ) const
inline

Definition at line 162 of file G4MoleculeDefinition.hh.

163 {
164 return fFormatedName;
165 }

Referenced by G4MolecularConfiguration::G4MolecularConfiguration().

◆ GetGroundStateElectronOccupancy()

◆ GetMass()

G4double G4MoleculeDefinition::GetMass ( ) const
inline

Definition at line 251 of file G4MoleculeDefinition.hh.

252{
253 return GetPDGMass();
254}

Referenced by G4MolecularConfiguration::G4MolecularConfiguration().

◆ GetName()

◆ GetNbElectrons()

G4int G4MoleculeDefinition::GetNbElectrons ( ) const
inline

Definition at line 261 of file G4MoleculeDefinition.hh.

262{
263 if (fElectronOccupancy)
264 {
265 return fElectronOccupancy->GetTotalOccupancy();
266 }
267
268 return 0;
269 // return fNbOfElectrons;
270}
G4int GetTotalOccupancy() const

Referenced by G4MolecularConfiguration::G4MolecularConfiguration().

◆ GetNbMolecularShells()

G4int G4MoleculeDefinition::GetNbMolecularShells ( ) const
inline

Definition at line 272 of file G4MoleculeDefinition.hh.

273{
274 if (fElectronOccupancy)
275 {
276 return fElectronOccupancy->GetSizeOfOrbit();
277 }
278
279 return 0;
280}

◆ GetType()

const G4String & G4MoleculeDefinition::GetType ( ) const
inline

Definition at line 256 of file G4MoleculeDefinition.hh.

257{
258 return GetParticleSubType();
259}
const G4String & GetParticleSubType() const

◆ GetVanDerVaalsRadius()

G4double G4MoleculeDefinition::GetVanDerVaalsRadius ( ) const
inline

Definition at line 235 of file G4MoleculeDefinition.hh.

236{
237 return fVanDerVaalsRadius;
238}

Referenced by G4MolecularConfiguration::G4MolecularConfiguration().

◆ Load()

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

Definition at line 75 of file G4MoleculeDefinition.cc.

76{
78 G4double mass;
79 G4double diffCoeff;
80 G4int charge;
81 G4int electronicLevels;
82 G4double radius;
83 G4int atomsNumber;
84 G4double lifetime;
85 G4String aType;
86
87 READ(in,name);
88 READ(in,mass);
89 READ(in,diffCoeff);
90 READ(in,charge);
91 READ(in,electronicLevels);
92 READ(in,radius);
93 READ(in,atomsNumber);
94 READ(in,lifetime);
95 READ(in,aType);
96
97 return new G4MoleculeDefinition(name,
98 mass,
99 diffCoeff,
100 charge,
101 electronicLevels,
102 radius,
103 atomsNumber,
104 lifetime,
105 aType);
106}
void READ(std::istream &in, T &toBeSaved)
Definition: G4Serialize.hh:49
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const char * name(G4int ptype)

◆ NewConfiguration()

G4MolecularConfiguration * G4MoleculeDefinition::NewConfiguration ( const G4String excitedStateLabel)

Definition at line 147 of file G4MoleculeDefinition.cc.

148{
149 bool alreadyExist(false);
151 molConfLabel,
152 this,
153 molConfLabel,
154 alreadyExist);
155}
static G4MolecularConfiguration * CreateMolecularConfiguration(const G4String &userIdentifier, const G4MoleculeDefinition *, bool &wasAlreadyCreated)

◆ NewConfigurationWithElectronOccupancy()

G4MolecularConfiguration * G4MoleculeDefinition::NewConfigurationWithElectronOccupancy ( const G4String excitedStateLabel,
const G4ElectronOccupancy elecConf,
double  decayTime = 0. 
)

◆ operator=()

G4MoleculeDefinition & G4MoleculeDefinition::operator= ( const G4MoleculeDefinition )
delete

◆ Serialize()

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

Definition at line 108 of file G4MoleculeDefinition.cc.

109{
114 WRITE(out,fDiffusionCoefficient);
115 WRITE(out,fCharge);
116 if(fElectronOccupancy)
117 {
118 WRITE(out,fElectronOccupancy->GetSizeOfOrbit());
119 }
120 else
121 {
122 WRITE(out,(int) 0);
123 }
124 WRITE(out,fVanDerVaalsRadius);
125 WRITE(out,fAtomsNb);
126}
void WRITE(std::ostream &out, const T &toBeSaved)
Definition: G4Serialize.hh:41
const G4String & GetParticleType() const

◆ SetAtomsNumber()

void G4MoleculeDefinition::SetAtomsNumber ( G4int  val)
inline

Definition at line 220 of file G4MoleculeDefinition.hh.

221{
222 fAtomsNb = val;
223}

◆ SetDiffusionCoefficient()

void G4MoleculeDefinition::SetDiffusionCoefficient ( G4double  value)
inline

Definition at line 200 of file G4MoleculeDefinition.hh.

201{
202 fDiffusionCoefficient = value;
203}

◆ SetFormatedName()

void G4MoleculeDefinition::SetFormatedName ( const G4String name)
inline

Definition at line 168 of file G4MoleculeDefinition.hh.

169 {
170 fFormatedName = name;
171 }

◆ SetLevelOccupation()

void G4MoleculeDefinition::SetLevelOccupation ( G4int  shell,
G4int  eNb = 2 
)

Definition at line 190 of file G4MoleculeDefinition.cc.

191{
192 if(fElectronOccupancy)
193 {
194 G4int levelOccupancy = fElectronOccupancy->GetOccupancy(shell);
195
196 if(levelOccupancy)
197 {
198
199 fElectronOccupancy->RemoveElectron(shell, levelOccupancy);
200 }
201
202 fElectronOccupancy->AddElectron(shell, eNb);
203 }
204}
G4int AddElectron(G4int orbit, G4int number=1)
G4int RemoveElectron(G4int orbit, G4int number=1)
G4int GetOccupancy(G4int orbit) const

◆ SetVanDerVaalsRadius()

void G4MoleculeDefinition::SetVanDerVaalsRadius ( G4double  val)
inline

Definition at line 230 of file G4MoleculeDefinition.hh.

231{
232 fVanDerVaalsRadius = val;
233}

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