Import Geant4 11.1.2 source tree
This commit is contained in:
@@ -6,6 +6,10 @@ be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2023-06-07 Makoto Asai (event-V11-00-08)
|
||||
- Adding SetParticleWeight() method to G4ParticleGun.
|
||||
- Fix incorrect information of maximum number of tracks.
|
||||
|
||||
## 2022-11-17 Gabriele Cosmo (event-V11-00-07)
|
||||
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
|
||||
|
||||
|
||||
@@ -116,6 +116,8 @@ class G4ParticleGun : public G4VPrimaryGenerator
|
||||
{ return particle_polarization; }
|
||||
inline G4int GetNumberOfParticles() const
|
||||
{ return NumberOfParticlesToBeGenerated; }
|
||||
inline G4double GetParticleWeight() const
|
||||
{ return particle_weight; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -128,6 +130,7 @@ class G4ParticleGun : public G4VPrimaryGenerator
|
||||
G4double particle_momentum = 0.0;
|
||||
G4double particle_charge = 0.0;
|
||||
G4ThreeVector particle_polarization;
|
||||
G4double particle_weight = 1.0;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -56,7 +56,10 @@ class G4TrackStack : public std::vector<G4StackedTrack>
|
||||
G4bool operator!=(const G4TrackStack&) const = delete;
|
||||
|
||||
inline void PushToStack(const G4StackedTrack& aStackedTrack)
|
||||
{ push_back(aStackedTrack); }
|
||||
{
|
||||
push_back(aStackedTrack);
|
||||
if(size()>maxEntry) maxEntry = size();
|
||||
}
|
||||
inline G4StackedTrack PopFromStack()
|
||||
{ G4StackedTrack st = back(); pop_back(); return st; }
|
||||
void TransferTo(G4TrackStack* aStack);
|
||||
@@ -65,7 +68,7 @@ class G4TrackStack : public std::vector<G4StackedTrack>
|
||||
void clearAndDestroy();
|
||||
|
||||
inline std::size_t GetNTrack() const { return size(); }
|
||||
inline std::size_t GetMaxNTrack() const { return max_size(); }
|
||||
inline std::size_t GetMaxNTrack() const { return maxEntry; }
|
||||
inline G4int GetSafetyValue1() const { return safetyValue1; }
|
||||
inline G4int GetSafetyValue2() const { return safetyValue2; }
|
||||
inline G4int GetNStick() const { return nstick; }
|
||||
@@ -78,6 +81,7 @@ class G4TrackStack : public std::vector<G4StackedTrack>
|
||||
G4int safetyValue1{0};
|
||||
G4int safetyValue2{0};
|
||||
G4int nstick{0};
|
||||
std::size_t maxEntry{0};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -232,6 +232,7 @@ void G4ParticleGun::GeneratePrimaryVertex(G4Event* evt)
|
||||
particle->SetPolarization(particle_polarization.x(),
|
||||
particle_polarization.y(),
|
||||
particle_polarization.z());
|
||||
particle->SetWeight( particle_weight );
|
||||
vertex->SetPrimary( particle );
|
||||
}
|
||||
evt->AddPrimaryVertex( vertex );
|
||||
|
||||
Reference in New Issue
Block a user