121 G4cout <<
"****************************************************************"
123 G4cout <<
"*** Geant4 Reverse/Adjoint Monte Carlo mode ***"
125 G4cout <<
"*** Author: L.Desorgher ***"
127 G4cout <<
"*** Company: SpaceIT GmbH, Bern, Switzerland ***"
129 G4cout <<
"*** Sponsored by: ESA/ESTEC contract contract 21435/08/NL/AT ***"
131 G4cout <<
"****************************************************************"
226 theRunManager->G4RunManager::SetUserAction(
this);
369std::vector<G4ParticleDefinition*>*
489 std::vector<G4ParticleDefinition*>* aList =
530 "ExternalSource", radius,
pos, area);
543 "ExternalSource", radius, volume_name, center, area);
553 "ExternalSource", volume_name, area);
570 "AdjointSource", radius,
pos, area);
587 "AdjointSource", radius, volume_name, center, area);
602 "AdjointSource", volume_name, area);
static const G4double pos
static const G4double Emax
static const G4double Emin
G4GLOB_DLL std::ostream G4cout
G4bool AddaSphericalSurface(const G4String &SurfaceName, G4double radius, G4ThreeVector pos, G4double &area)
G4bool AddanExtSurfaceOfAvolume(const G4String &SurfaceName, const G4String &volume_name, G4double &area)
static G4AdjointCrossSurfChecker * GetInstance()
G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(const G4String &SurfaceName, G4double radius, const G4String &volume_name, G4ThreeVector ¢er, G4double &area)
void UpdateListOfPrimaryParticles()
void SetNbAdjointPrimaryElectronsPerEvent(G4int nb)
std::vector< G4ParticleDefinition * > * GetListOfPrimaryFwdParticles()
void ConsiderParticleAsPrimary(const G4String &particle_name)
void SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(const G4String &volume_name)
void SetNbAdjointPrimaryGammasPerEvent(G4int nb)
const G4String & GetPrimaryIonName()
void SetSphericalAdjointPrimarySource(G4double radius, G4ThreeVector pos)
G4ParticleDefinition * GetLastGeneratedFwdPrimaryParticle()
void SetNbPrimaryFwdGammasPerEvent(G4int nb)
size_t GetNbOfAdjointPrimaryTypes()
void SetEmin(G4double val)
void NeglectParticleAsPrimary(const G4String &particle_name)
void SetPrimaryIon(G4ParticleDefinition *adjointIon, G4ParticleDefinition *fwdIon)
void SetEmax(G4double val)
void SetAdjointStackingAction(G4UserStackingAction *anAction)
void ClearEndOfAdjointTrackInfoVectors()
G4UserRunAction * theAdjointRunAction
G4bool DefineAdjointSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
G4AdjointSteppingAction * theAdjointSteppingAction
const G4String & GetPrimaryIonName()
G4bool DefineExtSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
G4double GetEkinAtEndOfLastAdjointTrack(std::size_t i=0)
G4int ID_of_last_particle_that_reach_the_ext_source
void ResetUserPrimaryRunAndStackingActions()
static G4ThreadLocal G4AdjointSimManager * instance
G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(std::size_t i=0)
G4bool GetDidAdjParticleReachTheExtSource()
G4double area_of_the_adjoint_source
void SetRestOfAdjointActions()
G4ThreeVector last_direction
std::vector< G4ParticleDefinition * > * GetListOfPrimaryFwdParticles()
void ResetRestOfUserActions()
void RunAdjointSimulation(G4int nb_evt)
G4double GetCosthAtEndOfLastAdjointTrack(std::size_t i=0)
std::vector< G4int > ID_of_last_particle_that_reach_the_ext_source_vec
G4int last_fwd_part_PDGEncoding
std::vector< G4ThreeVector > last_pos_vec
G4UserTrackingAction * fUserTrackingAction
G4bool GetAdjointTrackingMode()
const G4String & GetFwdParticleNameAtEndOfLastAdjointTrack()
G4bool DefineSphericalExtSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
G4UserSteppingAction * fUserSteppingAction
void SetNbAdjointPrimaryGammasPerEvent(G4int)
void SetAdjointTrackingMode(G4bool aBool)
G4int last_fwd_part_index
std::vector< G4int > last_fwd_part_index_vec
G4bool use_user_TrackingAction
G4AdjointStackingAction * theAdjointStackingAction
void ConsiderParticleAsPrimary(const G4String &particle_name)
G4UserEventAction * fUserEventAction
void SwitchToAdjointSimulationMode()
std::size_t GetNbOfPrimaryFwdParticles()
void SetAdjointRunAction(G4UserRunAction *anAction)
void SetExtSourceEmax(G4double Emax)
void RegisterAtEndOfAdjointTrack()
virtual void BeginOfRunAction(const G4Run *aRun)
void SetAdjointSourceEmax(G4double Emax)
std::vector< G4int > last_fwd_part_PDGEncoding_vec
void RegisterAdjointPrimaryWeight(G4double aWeight)
void SetAdjointSourceEmin(G4double Emin)
virtual void EndOfRunAction(const G4Run *aRun)
G4double GetWeightAtEndOfLastAdjointTrack(std::size_t i=0)
void SetAdjointPrimaryRunAndStackingActions()
G4UserRunAction * fUserRunAction
void ResetDidOneAdjPartReachExtSourceDuringEvent()
void SetAdjointEventAction(G4UserEventAction *anAction)
std::vector< G4double > last_cos_th_vec
G4UserEventAction * theAdjointEventAction
void NeglectParticleAsPrimary(const G4String &particle_name)
G4bool DefineSphericalAdjointSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
G4bool user_action_already_defined
G4AdjointSimMessenger * theMessenger
G4AdjointTrackingAction * theAdjointTrackingAction
G4double theAdjointPrimaryWeight
void SetNbAdjointPrimaryElectronsPerEvent(G4int)
G4AdjointPrimaryGeneratorAction * theAdjointPrimaryGeneratorAction
static G4AdjointSimManager * GetInstance()
G4int GetFwdParticleIndexAtEndOfLastAdjointTrack(std::size_t i=0)
G4VUserPrimaryGeneratorAction * fUserPrimaryGeneratorAction
G4double GetEkinNucAtEndOfLastAdjointTrack(std::size_t i=0)
std::vector< G4double > last_weight_vec
void SetNbOfPrimaryFwdGammasPerEvent(G4int)
G4ThreeVector GetDirectionAtEndOfLastAdjointTrack(std::size_t i=0)
G4UserStackingAction * fUserStackingAction
std::vector< G4double > last_ekin_nuc_vec
void BackToFwdSimulationMode()
G4ParticleDefinition * GetLastGeneratedFwdPrimaryParticle()
void SetAdjointSteppingAction(G4UserSteppingAction *anAction)
G4bool use_user_StackingAction
G4bool DefineSphericalExtSource(G4double radius, G4ThreeVector pos)
G4ThreeVector GetPositionAtEndOfLastAdjointTrack(std::size_t i=0)
std::size_t GetNbOfAdointTracksReachingTheExternalSurface()
G4bool adjoint_tracking_mode
std::vector< G4double > last_ekin_vec
G4bool DefineSphericalAdjointSource(G4double radius, G4ThreeVector pos)
void SetPrimaryIon(G4ParticleDefinition *adjointIon, G4ParticleDefinition *fwdIon)
std::vector< G4ThreeVector > last_direction_vec
G4String last_fwd_part_name
void SetKillTracks(G4bool aBool)
void SetAdjointMode(G4bool aBool)
void SetUserFwdStackingAction(G4UserStackingAction *anAction)
void SetUserAdjointStackingAction(G4UserStackingAction *anAction)
G4ParticleDefinition * GetLastPartDef()
void SetUserForwardSteppingAction(G4UserSteppingAction *anAction)
void SetExtSourceEMax(G4double Emax)
void SetUserAdjointSteppingAction(G4UserSteppingAction *anAction)
void ResetDidOneAdjPartReachExtSourceDuringEvent()
G4ThreeVector GetLastMomentum()
void SetPrimWeight(G4double weight)
G4ThreeVector GetLastPosition()
G4double GetEkinAtEndOfLastAdjointTrack(std::size_t i=0)
void SetListOfPrimaryFwdParticles(std::vector< G4ParticleDefinition * > *aListOfParticles)
G4double GetEkinNucAtEndOfLastAdjointTrack(std::size_t i=0)
G4ThreeVector GetPositionAtEndOfLastAdjointTrack(std::size_t i=0)
G4bool GetIsAdjointTrackingMode()
const G4String & GetFwdParticleNameAtEndOfLastAdjointTrack()
G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(std::size_t i=0)
G4double GetWeightAtEndOfLastAdjointTrack(std::size_t i=0)
void ClearEndOfAdjointTrackInfoVectors()
std::size_t GetNbOfAdointTracksReachingTheExternalSurface()
G4ThreeVector GetDirectionAtEndOfLastAdjointTrack(std::size_t i=0)
G4int GetLastFwdParticleIndex(std::size_t i=0)
G4double GetCosthAtEndOfLastAdjointTrack(std::size_t i=0)
void SetUserForwardTrackingAction(G4UserTrackingAction *anAction)
const G4String & GetParticleType() const
G4int GetPDGEncoding() const
G4int GetBaryonNumber() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
const G4UserTrackingAction * GetUserTrackingAction() const
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
const G4UserEventAction * GetUserEventAction() const
static G4RunManager * GetRunManager()
virtual void BeamOn(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
const G4UserStackingAction * GetUserStackingAction() const
const G4UserSteppingAction * GetUserSteppingAction() const
const G4UserRunAction * GetUserRunAction() const
virtual void EndOfRunAction(const G4Run *aRun)
virtual void BeginOfRunAction(const G4Run *aRun)