159#ifndef G4AdjointSimManager_h
160#define G4AdjointSimManager_h 1
171class G4AdjointRunAction;
174class G4AdjointEventAction;
199 return adjoint_sim_mode;
209 return ID_of_last_particle_that_reach_the_ext_source;
265 use_user_StackingAction = aBool;
269 use_user_TrackingAction = aBool;
296 void SetRestOfAdjointActions();
297 void SetAdjointPrimaryRunAndStackingActions();
298 void SetAdjointActions();
299 void ResetRestOfUserActions();
300 void ResetUserPrimaryRunAndStackingActions();
301 void ResetUserActions();
302 void DefineUserActions();
320 bool user_action_already_defined;
327 bool use_user_StackingAction;
328 bool use_user_TrackingAction;
341 G4bool adjoint_tracking_mode;
346 std::vector<G4ThreeVector> last_pos_vec;
347 std::vector<G4ThreeVector> last_direction_vec;
348 std::vector<G4double> last_ekin_vec;
349 std::vector<G4double> last_ekin_nuc_vec;
350 std::vector<G4double> last_cos_th_vec;
351 std::vector<G4double> last_weight_vec;
352 std::vector<G4int> last_fwd_part_PDGEncoding_vec;
353 std::vector<G4int> last_fwd_part_index_vec;
354 std::vector<G4int> ID_of_last_particle_that_reach_the_ext_source_vec;
362 G4int last_fwd_part_PDGEncoding;
363 G4int last_fwd_part_index;
365 G4int ID_of_last_particle_that_reach_the_ext_source;
367 G4int nb_evt_of_last_run;
368 G4int normalisation_mode;
372 G4double area_of_the_adjoint_source;
void SetAdjointStackingAction(G4UserStackingAction *anAction)
void ClearEndOfAdjointTrackInfoVectors()
G4double GetEkinNucAtEndOfLastAdjointTrack(size_t i=0)
G4bool DefineAdjointSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
G4double GetCosthAtEndOfLastAdjointTrack(size_t i=0)
const G4String & GetPrimaryIonName()
G4bool DefineExtSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
G4ThreeVector GetDirectionAtEndOfLastAdjointTrack(size_t i=0)
G4bool GetDidAdjParticleReachTheExtSource()
std::vector< G4ParticleDefinition * > * GetListOfPrimaryFwdParticles()
void RunAdjointSimulation(G4int nb_evt)
G4double GetEkinAtEndOfLastAdjointTrack(size_t i=0)
G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(size_t i=0)
G4bool GetAdjointTrackingMode()
const G4String & GetFwdParticleNameAtEndOfLastAdjointTrack()
G4bool DefineSphericalExtSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
void SetNbAdjointPrimaryGammasPerEvent(G4int)
G4double GetWeightAtEndOfLastAdjointTrack(size_t i=0)
void SetAdjointTrackingMode(G4bool aBool)
G4int GetIDOfLastAdjParticleReachingExtSource()
void ConsiderParticleAsPrimary(const G4String &particle_name)
void SwitchToAdjointSimulationMode()
G4ThreeVector GetPositionAtEndOfLastAdjointTrack(size_t i=0)
G4double GetAdjointSourceArea()
void SetAdjointRunAction(G4UserRunAction *anAction)
void SetExtSourceEmax(G4double Emax)
void RegisterAtEndOfAdjointTrack()
virtual void BeginOfRunAction(const G4Run *aRun)
void SetAdjointSourceEmax(G4double Emax)
void RegisterAdjointPrimaryWeight(G4double aWeight)
void SetAdjointSourceEmin(G4double Emin)
virtual void EndOfRunAction(const G4Run *aRun)
G4bool GetAdjointSimMode()
void ResetDidOneAdjPartReachExtSourceDuringEvent()
void SetAdjointEventAction(G4UserEventAction *anAction)
void UseUserStackingActionInFwdTrackingPhase(G4bool aBool)
G4int GetNbEvtOfLastRun()
void NeglectParticleAsPrimary(const G4String &particle_name)
G4bool DefineSphericalAdjointSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
G4int GetNormalisationMode()
void UseUserTrackingActionInFwdTrackingPhase(G4bool aBool)
void SetNbAdjointPrimaryElectronsPerEvent(G4int)
static G4AdjointSimManager * GetInstance()
void SetNbOfPrimaryFwdGammasPerEvent(G4int)
size_t GetNbOfAdointTracksReachingTheExternalSurface()
void BackToFwdSimulationMode()
G4ParticleDefinition * GetLastGeneratedFwdPrimaryParticle()
void SetAdjointSteppingAction(G4UserSteppingAction *anAction)
void SetNormalisationMode(G4int n)
G4int GetFwdParticleIndexAtEndOfLastAdjointTrack(size_t i=0)
G4bool DefineSphericalExtSource(G4double radius, G4ThreeVector pos)
G4double GetNumberNucleonsInIon()
size_t GetNbOfPrimaryFwdParticles()
G4bool DefineSphericalAdjointSource(G4double radius, G4ThreeVector pos)
void SetPrimaryIon(G4ParticleDefinition *adjointIon, G4ParticleDefinition *fwdIon)