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