Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
@@ -53,6 +53,7 @@ enum G4ClassificationOfNewTrack
//----------------------------------------------------------------
// following ENUM are available only for the sub-event parallelism
//----------------------------------------------------------------
fSubEvent_0=100,
fSubEvent_1=101, fSubEvent_2=102, fSubEvent_3=103, fSubEvent_4=104,
fSubEvent_5=105, fSubEvent_6=106, fSubEvent_7=107, fSubEvent_8=108,
fSubEvent_9=109, fSubEvent_A=110, fSubEvent_B=111, fSubEvent_C=112,
+7 -7
View File
@@ -98,7 +98,7 @@ class G4Event
randomNumberStatusForProcessing = new G4String(st);
validRandomNumberStatusForProcessing = true;
}
inline void KeepTheEvent(G4bool vl=true)
inline void KeepTheEvent(G4bool vl=true) const
{ keepTheEvent = vl; }
inline G4bool KeepTheEventFlag() const
{ return keepTheEvent; }
@@ -142,7 +142,7 @@ class G4Event
{ return numberOfPrimaryVertex; }
// Returns number of primary verteces the G4Event object has.
inline G4PrimaryVertex* GetPrimaryVertex(G4int i=0) const
inline G4PrimaryVertex* GetPrimaryVertex(G4int i=0) const
{
if( i == 0 )
{ return thePrimaryVertex; }
@@ -234,7 +234,7 @@ class G4Event
G4bool validRandomNumberStatusForProcessing = false;
// Flag to keep the event until the end of run
G4bool keepTheEvent = false;
mutable G4bool keepTheEvent = false;
mutable G4int grips = 0;
//========================= for sub-event parallelism
@@ -242,10 +242,10 @@ class G4Event
public:
G4SubEvent* PopSubEvent(G4int);
// This method is to be invoked from G4RunManager.
// This method is to be invoked from G4SubEvtRunManager.
// SpawnSubEvent() is internally invoked.
G4int TerminateSubEvent(G4SubEvent*);
// This method is to be invoked from G4RunManager once a sub-event is
// This method is to be invoked from G4SubEvtRunManager once a sub-event is
// fully processed by a worker thread.
G4int StoreSubEvent(G4int,G4SubEvent*);
@@ -289,9 +289,9 @@ class G4Event
motherEvent = me;
subEventType = ty;
}
G4Event* GetMotherEvent() const
inline G4Event* GetMotherEvent() const
{ return motherEvent; }
G4int GetSubEventType() const
inline G4int GetSubEventType() const
{ return subEventType; }
private:
+6 -4
View File
@@ -68,10 +68,6 @@ class G4EventManager
void ProcessOneEvent(G4Event* anEvent);
// This method is the main entry to this class for simulating an event.
void ProcessOneEventForSERM(G4Event* anEvent);
// This method must be invoked by G4SubEventRunManager for processing
// an event in the master thread, with Mutex lock
void ProcessOneEvent(G4TrackVector* trackVector, G4Event* anEvent= nullptr);
// This is an alternative entry for HEP experiments which create G4Track
// objects by themselves directly without using G4VPrimaryGenerator or a
@@ -160,6 +156,7 @@ class G4EventManager
subEventPara = true;
subEventParaWorker = worker;
}
G4SubEvent* PopSubEvent(G4int ty);
// If this method is invoked by the G4RunManager while an event is still
// in process. Null is returned if the sub-event does not have enough tracks.
@@ -171,6 +168,11 @@ class G4EventManager
// deleted after this method. All necessary information in "evt" must
// be copied into the corresponding master G4Event object.
G4int StoreSubEvent(G4Event*, G4int&, G4SubEvent*);
// This method is exclusively used by G4SubEventTrackStack class to
// store a new G4SubEevnt into the current G4Event, with Mutex lock
// shared with above two methods.
private:
void DoProcessing(G4Event* anEvent,
@@ -98,8 +98,8 @@ class G4GeneralParticleSourceMessenger: public G4UImessenger
~G4GeneralParticleSourceMessenger() override;
// Destructor: deletes commands
void IonCommand(G4String newValues);
void IonLvlCommand(G4String newValues);
void IonCommand(const G4String& newValues);
void IonLvlCommand(const G4String& newValues);
private:
+10 -4
View File
@@ -58,14 +58,18 @@ class G4PrimaryTransformer
inline void SetVerboseLevel(G4int vl)
{ verboseLevel = vl; }
void SetUnknnownParticleDefined(G4bool vl);
// By invoking this method, the user can alter the treatment of unknown
// particles. The ideal place to invoke this method is in the
// BeginOfRunAction().
void SetUnknownParticleDefined(G4bool vl);
void SetChargedUnknownParticleDefined(G4bool vl);
// By invoking these methods, the user can alter the treatment of,
// respectively, 'unknown' and 'chargedunknown' particles.
// The ideal place to invoke these methods is in the BeginOfRunAction().
inline G4bool GetUnknownParticleDefined() const
{ return unknownParticleDefined; }
inline G4bool GetChargedUnknownParticleDefined() const
{ return chargedUnknownParticleDefined; }
protected:
void GenerateTracks(G4PrimaryVertex* primaryVertex);
@@ -96,11 +100,13 @@ class G4PrimaryTransformer
G4ParticleTable* particleTable = nullptr;
G4ParticleDefinition* unknown = nullptr;
G4ParticleDefinition* chargedunknown = nullptr;
G4ParticleDefinition* opticalphoton = nullptr;
G4int verboseLevel = 0;
G4int trackID = 0;
G4int nWarn = 0;
G4bool unknownParticleDefined = false;
G4bool chargedUnknownParticleDefined = false;
G4bool opticalphotonDefined = false;
static G4double kETolerance;