127 #ifndef G4AdjointSimManager_h
128 #define G4AdjointSimManager_h 1
139 class G4AdjointRunAction;
142 class G4AdjointEventAction;
255 void SetRestOfAdjointActions();
256 void SetAdjointPrimaryRunAndStackingActions();
257 void SetAdjointActions();
258 void ResetRestOfUserActions();
259 void ResetUserPrimaryRunAndStackingActions();
260 void ResetUserActions();
261 void DefineUserActions();
280 bool user_action_already_defined;
287 bool use_user_StackingAction;
288 bool use_user_TrackingAction;
301 G4bool adjoint_tracking_mode;
306 std::vector<G4ThreeVector> last_pos_vec;
307 std::vector<G4ThreeVector> last_direction_vec;
308 std::vector<G4double> last_ekin_vec;
309 std::vector<G4double> last_ekin_nuc_vec;
310 std::vector<G4double> last_cos_th_vec;
311 std::vector<G4double> last_weight_vec;
312 std::vector<G4int> last_fwd_part_PDGEncoding_vec;
313 std::vector<G4int> last_fwd_part_index_vec;
314 std::vector<G4int> ID_of_last_particle_that_reach_the_ext_source_vec;
324 G4int last_fwd_part_PDGEncoding;
325 G4int last_fwd_part_index;
327 G4int ID_of_last_particle_that_reach_the_ext_source;
329 G4int nb_evt_of_last_run;
330 G4int normalisation_mode;
334 G4double area_of_the_adjoint_source;
static G4AdjointSimManager * GetInstance()
size_t GetNbOfPrimaryFwdParticles()
G4double GetCosthAtEndOfLastAdjointTrack(size_t i=0)
void UseUserTrackingActionInFwdTrackingPhase(G4bool aBool)
void ClearEndOfAdjointTrackInfoVectors()
G4int GetFwdParticleIndexAtEndOfLastAdjointTrack(size_t i=0)
std::vector< G4ParticleDefinition * > * GetListOfPrimaryFwdParticles()
G4bool GetDidAdjParticleReachTheExtSource()
G4int GetIDOfLastAdjParticleReachingExtSource()
void SetAdjointSourceEmax(G4double Emax)
void SetAdjointStackingAction(G4UserStackingAction *anAction)
void SwitchToAdjointSimulationMode()
G4bool GetAdjointSimMode()
G4ThreeVector GetDirectionAtEndOfLastAdjointTrack(size_t i=0)
G4bool DefineSphericalAdjointSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
G4bool DefineSphericalAdjointSource(G4double radius, G4ThreeVector pos)
G4int GetNormalisationMode()
virtual void EndOfRunAction(const G4Run *aRun)
void SetAdjointSourceEmin(G4double Emin)
G4int GetNbEvtOfLastRun()
void SetAdjointTrackingMode(G4bool aBool)
virtual void BeginOfRunAction(const G4Run *aRun)
G4bool DefineAdjointSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
void SetNbOfPrimaryFwdGammasPerEvent(G4int)
G4double GetEkinNucAtEndOfLastAdjointTrack(size_t i=0)
void RunAdjointSimulation(G4int nb_evt)
G4double GetWeightAtEndOfLastAdjointTrack(size_t i=0)
G4bool DefineSphericalExtSourceWithCentreAtTheCentreOfAVolume(G4double radius, const G4String &volume_name)
const G4String & GetFwdParticleNameAtEndOfLastAdjointTrack()
void SetPrimaryIon(G4ParticleDefinition *adjointIon, G4ParticleDefinition *fwdIon)
const G4String & GetPrimaryIonName()
G4bool DefineSphericalExtSource(G4double radius, G4ThreeVector pos)
void BackToFwdSimulationMode()
void SetAdjointRunAction(G4UserRunAction *anAction)
G4bool GetAdjointTrackingMode()
void SetAdjointEventAction(G4UserEventAction *anAction)
G4ThreeVector GetPositionAtEndOfLastAdjointTrack(size_t i=0)
void ConsiderParticleAsPrimary(const G4String &particle_name)
G4double GetNumberNucleonsInIon()
void SetNormalisationMode(G4int n)
static const G4double Emin
G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(size_t i=0)
void RegisterAdjointPrimaryWeight(G4double aWeight)
G4bool DefineExtSourceOnTheExtSurfaceOfAVolume(const G4String &volume_name)
G4double GetAdjointSourceArea()
static const G4double Emax
void SetNbAdjointPrimaryElectronsPerEvent(G4int)
void SetNbAdjointPrimaryGammasPerEvent(G4int)
G4ParticleDefinition * GetLastGeneratedFwdPrimaryParticle()
void UseUserStackingActionInFwdTrackingPhase(G4bool aBool)
void SetExtSourceEmax(G4double Emax)
void RegisterAtEndOfAdjointTrack()
void SetAdjointSteppingAction(G4UserSteppingAction *anAction)
G4double GetEkinAtEndOfLastAdjointTrack(size_t i=0)
static const G4double pos
size_t GetNbOfAdointTracksReachingTheExternalSurface()
void NeglectParticleAsPrimary(const G4String &particle_name)
void ResetDidOneAdjPartReachExtSourceDuringEvent()