Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AdjointSimManager Class Reference

#include <G4AdjointSimManager.hh>

+ Inheritance diagram for G4AdjointSimManager:

Public Member Functions

void BeginOfRunAction (const G4Run *aRun) override
 
void EndOfRunAction (const G4Run *aRun) override
 
void RunAdjointSimulation (G4int nb_evt)
 
G4int GetNbEvtOfLastRun ()
 
void SetAdjointTrackingMode (G4bool aBool)
 
G4bool GetAdjointTrackingMode ()
 
G4bool GetAdjointSimMode ()
 
G4bool GetDidAdjParticleReachTheExtSource ()
 
void RegisterAtEndOfAdjointTrack ()
 
void RegisterAdjointPrimaryWeight (G4double aWeight)
 
void ResetDidOneAdjPartReachExtSourceDuringEvent ()
 
G4int GetIDOfLastAdjParticleReachingExtSource ()
 
G4ThreeVector GetPositionAtEndOfLastAdjointTrack (std::size_t i=0)
 
G4ThreeVector GetDirectionAtEndOfLastAdjointTrack (std::size_t i=0)
 
G4double GetEkinAtEndOfLastAdjointTrack (std::size_t i=0)
 
G4double GetEkinNucAtEndOfLastAdjointTrack (std::size_t i=0)
 
G4double GetWeightAtEndOfLastAdjointTrack (std::size_t i=0)
 
G4double GetCosthAtEndOfLastAdjointTrack (std::size_t i=0)
 
const G4StringGetFwdParticleNameAtEndOfLastAdjointTrack ()
 
G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack (std::size_t i=0)
 
G4int GetFwdParticleIndexAtEndOfLastAdjointTrack (std::size_t i=0)
 
std::size_t GetNbOfAdointTracksReachingTheExternalSurface ()
 
void ClearEndOfAdjointTrackInfoVectors ()
 
G4ParticleDefinitionGetLastGeneratedFwdPrimaryParticle ()
 
std::vector< G4ParticleDefinition * > * GetListOfPrimaryFwdParticles ()
 
std::size_t GetNbOfPrimaryFwdParticles ()
 
G4bool DefineSphericalExtSource (G4double radius, G4ThreeVector pos)
 
G4bool DefineSphericalExtSourceWithCentreAtTheCentreOfAVolume (G4double radius, const G4String &volume_name)
 
G4bool DefineExtSourceOnTheExtSurfaceOfAVolume (const G4String &volume_name)
 
void SetExtSourceEmax (G4double Emax)
 
G4bool DefineSphericalAdjointSource (G4double radius, G4ThreeVector pos)
 
G4bool DefineSphericalAdjointSourceWithCentreAtTheCentreOfAVolume (G4double radius, const G4String &volume_name)
 
G4bool DefineAdjointSourceOnTheExtSurfaceOfAVolume (const G4String &volume_name)
 
void SetAdjointSourceEmin (G4double Emin)
 
void SetAdjointSourceEmax (G4double Emax)
 
G4double GetAdjointSourceArea ()
 
void ConsiderParticleAsPrimary (const G4String &particle_name)
 
void NeglectParticleAsPrimary (const G4String &particle_name)
 
void SetPrimaryIon (G4ParticleDefinition *adjointIon, G4ParticleDefinition *fwdIon)
 
const G4StringGetPrimaryIonName ()
 
void SetNormalisationMode (G4int n)
 
G4int GetNormalisationMode ()
 
G4double GetNumberNucleonsInIon ()
 
void SetAdjointEventAction (G4UserEventAction *anAction)
 
void SetAdjointSteppingAction (G4UserSteppingAction *anAction)
 
void SetAdjointStackingAction (G4UserStackingAction *anAction)
 
void SetAdjointRunAction (G4UserRunAction *anAction)
 
void UseUserStackingActionInFwdTrackingPhase (G4bool aBool)
 
void UseUserTrackingActionInFwdTrackingPhase (G4bool aBool)
 
void SetNbOfPrimaryFwdGammasPerEvent (G4int)
 
void SetNbAdjointPrimaryGammasPerEvent (G4int)
 
void SetNbAdjointPrimaryElectronsPerEvent (G4int)
 
void SwitchToAdjointSimulationMode ()
 
void BackToFwdSimulationMode ()
 
- Public Member Functions inherited from G4UserRunAction
 G4UserRunAction ()
 
virtual ~G4UserRunAction ()=default
 
virtual G4RunGenerateRun ()
 
virtual void SetMaster (G4bool val=true)
 
G4bool IsMaster () const
 

Static Public Member Functions

static G4AdjointSimManagerGetInstance ()
 

Additional Inherited Members

- Protected Attributes inherited from G4UserRunAction
G4bool isMaster = true
 

Detailed Description

Definition at line 162 of file G4AdjointSimManager.hh.

Member Function Documentation

◆ BackToFwdSimulationMode()

void G4AdjointSimManager::BackToFwdSimulationMode ( )

Definition at line 158 of file G4AdjointSimManager.cc.

159{
160 // Restore the user defined actions
161 //--------------------------------
162 ResetUserActions();
163 adjoint_sim_mode = false;
164}

Referenced by RunAdjointSimulation().

◆ BeginOfRunAction()

void G4AdjointSimManager::BeginOfRunAction ( const G4Run * aRun)
overridevirtual

Reimplemented from G4UserRunAction.

Definition at line 626 of file G4AdjointSimManager.cc.

627{
628 fUserRunAction->BeginOfRunAction(aRun);
629}
virtual void BeginOfRunAction(const G4Run *)

◆ ClearEndOfAdjointTrackInfoVectors()

void G4AdjointSimManager::ClearEndOfAdjointTrackInfoVectors ( )

Definition at line 393 of file G4AdjointSimManager.cc.

394{
395 theAdjointTrackingAction->ClearEndOfAdjointTrackInfoVectors();
396}

Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().

◆ ConsiderParticleAsPrimary()

void G4AdjointSimManager::ConsiderParticleAsPrimary ( const G4String & particle_name)

Definition at line 540 of file G4AdjointSimManager.cc.

541{
542 theAdjointPrimaryGeneratorAction->ConsiderParticleAsPrimary(particle_name);
543}
void ConsiderParticleAsPrimary(const G4String &particle_name)

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ DefineAdjointSourceOnTheExtSurfaceOfAVolume()

G4bool G4AdjointSimManager::DefineAdjointSourceOnTheExtSurfaceOfAVolume ( const G4String & volume_name)

Definition at line 512 of file G4AdjointSimManager.cc.

513{
514 G4double area;
516 "AdjointSource", volume_name, area);
517 area_of_the_adjoint_source = area;
518 if (aBool) {
519 theAdjointPrimaryGeneratorAction->SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(volume_name);
520 }
521 return aBool;
522}
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
G4bool AddanExtSurfaceOfAvolume(const G4String &SurfaceName, const G4String &volume_name, G4double &area)
static G4AdjointCrossSurfChecker * GetInstance()
void SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume(const G4String &volume_name)

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ DefineExtSourceOnTheExtSurfaceOfAVolume()

G4bool G4AdjointSimManager::DefineExtSourceOnTheExtSurfaceOfAVolume ( const G4String & volume_name)

Definition at line 469 of file G4AdjointSimManager.cc.

470{
471 G4double area;
473 volume_name, area);
474}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ DefineSphericalAdjointSource()

G4bool G4AdjointSimManager::DefineSphericalAdjointSource ( G4double radius,
G4ThreeVector pos )

Definition at line 485 of file G4AdjointSimManager.cc.

486{
487 G4double area;
489 radius, pos, area);
490 theAdjointPrimaryGeneratorAction->SetSphericalAdjointPrimarySource(radius, pos);
491 area_of_the_adjoint_source = area;
492 return aBool;
493}
G4bool AddaSphericalSurface(const G4String &SurfaceName, G4double radius, G4ThreeVector pos, G4double &area)
void SetSphericalAdjointPrimarySource(G4double radius, G4ThreeVector pos)

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ DefineSphericalAdjointSourceWithCentreAtTheCentreOfAVolume()

G4bool G4AdjointSimManager::DefineSphericalAdjointSourceWithCentreAtTheCentreOfAVolume ( G4double radius,
const G4String & volume_name )

Definition at line 497 of file G4AdjointSimManager.cc.

499{
500 G4double area;
501 G4ThreeVector center;
502 G4bool aBool =
504 "AdjointSource", radius, volume_name, center, area);
505 theAdjointPrimaryGeneratorAction->SetSphericalAdjointPrimarySource(radius, center);
506 area_of_the_adjoint_source = area;
507 return aBool;
508}
G4bool AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume(const G4String &SurfaceName, G4double radius, const G4String &volume_name, G4ThreeVector &center, G4double &area)

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ DefineSphericalExtSource()

G4bool G4AdjointSimManager::DefineSphericalExtSource ( G4double radius,
G4ThreeVector pos )

Definition at line 448 of file G4AdjointSimManager.cc.

449{
450 G4double area;
451 return G4AdjointCrossSurfChecker::GetInstance()->AddaSphericalSurface("ExternalSource", radius,
452 pos, area);
453}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ DefineSphericalExtSourceWithCentreAtTheCentreOfAVolume()

G4bool G4AdjointSimManager::DefineSphericalExtSourceWithCentreAtTheCentreOfAVolume ( G4double radius,
const G4String & volume_name )

Definition at line 457 of file G4AdjointSimManager.cc.

459{
460 G4double area;
461 G4ThreeVector center;
463 ->AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume("ExternalSource", radius, volume_name,
464 center, area);
465}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ EndOfRunAction()

void G4AdjointSimManager::EndOfRunAction ( const G4Run * aRun)
overridevirtual

Reimplemented from G4UserRunAction.

Definition at line 633 of file G4AdjointSimManager.cc.

634{
635 if (!adjoint_sim_mode) {
636 if (fUserRunAction != nullptr) fUserRunAction->EndOfRunAction(aRun);
637 }
638 else if (theAdjointRunAction != nullptr)
639 theAdjointRunAction->EndOfRunAction(aRun);
640}
virtual void EndOfRunAction(const G4Run *)

◆ GetAdjointSimMode()

G4bool G4AdjointSimManager::GetAdjointSimMode ( )
inline

Definition at line 177 of file G4AdjointSimManager.hh.

178 {
179 return adjoint_sim_mode;
180 } // true if an adjoint simulation is running

◆ GetAdjointSourceArea()

G4double G4AdjointSimManager::GetAdjointSourceArea ( )
inline

Definition at line 222 of file G4AdjointSimManager.hh.

222{ return area_of_the_adjoint_source; }

Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().

◆ GetAdjointTrackingMode()

G4bool G4AdjointSimManager::GetAdjointTrackingMode ( )

Definition at line 272 of file G4AdjointSimManager.cc.

273{
274 return theAdjointTrackingAction->GetIsAdjointTrackingMode();
275}

◆ GetCosthAtEndOfLastAdjointTrack()

G4double G4AdjointSimManager::GetCosthAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 358 of file G4AdjointSimManager.cc.

359{
360 return theAdjointTrackingAction->GetCosthAtEndOfLastAdjointTrack(i);
361}
G4double GetCosthAtEndOfLastAdjointTrack(std::size_t i=0)

◆ GetDidAdjParticleReachTheExtSource()

G4bool G4AdjointSimManager::GetDidAdjParticleReachTheExtSource ( )

Definition at line 302 of file G4AdjointSimManager.cc.

303{
305}
std::size_t GetNbOfAdointTracksReachingTheExternalSurface()

Referenced by SetAdjointTrackingMode().

◆ GetDirectionAtEndOfLastAdjointTrack()

G4ThreeVector G4AdjointSimManager::GetDirectionAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 330 of file G4AdjointSimManager.cc.

331{
332 return theAdjointTrackingAction->GetDirectionAtEndOfLastAdjointTrack(i);
333}
G4ThreeVector GetDirectionAtEndOfLastAdjointTrack(std::size_t i=0)

◆ GetEkinAtEndOfLastAdjointTrack()

G4double G4AdjointSimManager::GetEkinAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 337 of file G4AdjointSimManager.cc.

338{
339 return theAdjointTrackingAction->GetEkinAtEndOfLastAdjointTrack(i);
340}
G4double GetEkinAtEndOfLastAdjointTrack(std::size_t i=0)

◆ GetEkinNucAtEndOfLastAdjointTrack()

G4double G4AdjointSimManager::GetEkinNucAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 344 of file G4AdjointSimManager.cc.

345{
346 return theAdjointTrackingAction->GetEkinNucAtEndOfLastAdjointTrack(i);
347}
G4double GetEkinNucAtEndOfLastAdjointTrack(std::size_t i=0)

◆ GetFwdParticleIndexAtEndOfLastAdjointTrack()

G4int G4AdjointSimManager::GetFwdParticleIndexAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 379 of file G4AdjointSimManager.cc.

380{
381 return theAdjointTrackingAction->GetLastFwdParticleIndex(i);
382}
G4int GetLastFwdParticleIndex(std::size_t i=0)

◆ GetFwdParticleNameAtEndOfLastAdjointTrack()

const G4String & G4AdjointSimManager::GetFwdParticleNameAtEndOfLastAdjointTrack ( )

Definition at line 365 of file G4AdjointSimManager.cc.

366{
367 return theAdjointTrackingAction->GetFwdParticleNameAtEndOfLastAdjointTrack();
368}
const G4String & GetFwdParticleNameAtEndOfLastAdjointTrack()

◆ GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack()

G4int G4AdjointSimManager::GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 372 of file G4AdjointSimManager.cc.

373{
374 return theAdjointTrackingAction->GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(i);
375}
G4int GetFwdParticlePDGEncodingAtEndOfLastAdjointTrack(std::size_t i=0)

◆ GetIDOfLastAdjParticleReachingExtSource()

G4int G4AdjointSimManager::GetIDOfLastAdjParticleReachingExtSource ( )
inline

Definition at line 187 of file G4AdjointSimManager.hh.

188 {
189 return ID_of_last_particle_that_reach_the_ext_source;
190 }

◆ GetInstance()

G4AdjointSimManager * G4AdjointSimManager::GetInstance ( )
static

Definition at line 88 of file G4AdjointSimManager.cc.

89{
90 if (instance == nullptr) instance = new G4AdjointSimManager;
91 return instance;
92}

Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().

◆ GetLastGeneratedFwdPrimaryParticle()

G4ParticleDefinition * G4AdjointSimManager::GetLastGeneratedFwdPrimaryParticle ( )

Definition at line 644 of file G4AdjointSimManager.cc.

645{
646 return theAdjointPrimaryGeneratorAction->GetLastGeneratedFwdPrimaryParticle();
647}
G4ParticleDefinition * GetLastGeneratedFwdPrimaryParticle()

◆ GetListOfPrimaryFwdParticles()

std::vector< G4ParticleDefinition * > * G4AdjointSimManager::GetListOfPrimaryFwdParticles ( )

Definition at line 309 of file G4AdjointSimManager.cc.

310{
311 return theAdjointPrimaryGeneratorAction->GetListOfPrimaryFwdParticles();
312}
std::vector< G4ParticleDefinition * > * GetListOfPrimaryFwdParticles()

◆ GetNbEvtOfLastRun()

G4int G4AdjointSimManager::GetNbEvtOfLastRun ( )
inline

Definition at line 171 of file G4AdjointSimManager.hh.

171{ return nb_evt_of_last_run; }

◆ GetNbOfAdointTracksReachingTheExternalSurface()

std::size_t G4AdjointSimManager::GetNbOfAdointTracksReachingTheExternalSurface ( )

Definition at line 386 of file G4AdjointSimManager.cc.

387{
388 return theAdjointTrackingAction->GetNbOfAdointTracksReachingTheExternalSurface();
389}
std::size_t GetNbOfAdointTracksReachingTheExternalSurface()

Referenced by GetDidAdjParticleReachTheExtSource().

◆ GetNbOfPrimaryFwdParticles()

std::size_t G4AdjointSimManager::GetNbOfPrimaryFwdParticles ( )

Definition at line 316 of file G4AdjointSimManager.cc.

317{
318 return theAdjointPrimaryGeneratorAction->GetListOfPrimaryFwdParticles()->size();
319}

◆ GetNormalisationMode()

G4int G4AdjointSimManager::GetNormalisationMode ( )
inline

Definition at line 229 of file G4AdjointSimManager.hh.

229{ return normalisation_mode; }

◆ GetNumberNucleonsInIon()

G4double G4AdjointSimManager::GetNumberNucleonsInIon ( )
inline

Definition at line 230 of file G4AdjointSimManager.hh.

230{ return nb_nuc; }

◆ GetPositionAtEndOfLastAdjointTrack()

G4ThreeVector G4AdjointSimManager::GetPositionAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 323 of file G4AdjointSimManager.cc.

324{
325 return theAdjointTrackingAction->GetPositionAtEndOfLastAdjointTrack(i);
326}
G4ThreeVector GetPositionAtEndOfLastAdjointTrack(std::size_t i=0)

◆ GetPrimaryIonName()

const G4String & G4AdjointSimManager::GetPrimaryIonName ( )

Definition at line 562 of file G4AdjointSimManager.cc.

563{
564 return theAdjointPrimaryGeneratorAction->GetPrimaryIonName();
565}

◆ GetWeightAtEndOfLastAdjointTrack()

G4double G4AdjointSimManager::GetWeightAtEndOfLastAdjointTrack ( std::size_t i = 0)

Definition at line 351 of file G4AdjointSimManager.cc.

352{
353 return theAdjointTrackingAction->GetWeightAtEndOfLastAdjointTrack(i);
354}
G4double GetWeightAtEndOfLastAdjointTrack(std::size_t i=0)

◆ NeglectParticleAsPrimary()

void G4AdjointSimManager::NeglectParticleAsPrimary ( const G4String & particle_name)

Definition at line 547 of file G4AdjointSimManager.cc.

548{
549 theAdjointPrimaryGeneratorAction->NeglectParticleAsPrimary(particle_name);
550}
void NeglectParticleAsPrimary(const G4String &particle_name)

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ RegisterAdjointPrimaryWeight()

void G4AdjointSimManager::RegisterAdjointPrimaryWeight ( G4double aWeight)

Definition at line 569 of file G4AdjointSimManager.cc.

570{
571 theAdjointPrimaryWeight = aWeight;
572 theAdjointSteppingAction->SetPrimWeight(aWeight);
573}
void SetPrimWeight(G4double weight)

◆ RegisterAtEndOfAdjointTrack()

void G4AdjointSimManager::RegisterAtEndOfAdjointTrack ( )

Definition at line 400 of file G4AdjointSimManager.cc.

401{
402 last_pos = theAdjointSteppingAction->GetLastPosition();
403 last_direction = theAdjointSteppingAction->GetLastMomentum();
404 last_direction /= last_direction.mag();
405 last_cos_th = last_direction.z();
406 G4ParticleDefinition* aPartDef = theAdjointSteppingAction->GetLastPartDef();
407
408 last_fwd_part_name = aPartDef->GetParticleName();
409
410 last_fwd_part_name.erase(0, 4);
411
412 last_fwd_part_PDGEncoding =
414
415 std::vector<G4ParticleDefinition*>* aList =
416 theAdjointPrimaryGeneratorAction->GetListOfPrimaryFwdParticles();
417 last_fwd_part_index = -1;
418 G4int i = 0;
419 while (i < (G4int)aList->size() && last_fwd_part_index < 0) {
420 if ((*aList)[i]->GetParticleName() == last_fwd_part_name) last_fwd_part_index = i;
421 ++i;
422 }
423
424 last_ekin = theAdjointSteppingAction->GetLastEkin();
425 last_ekin_nuc = last_ekin;
426 if (aPartDef->GetParticleType() == "adjoint_nucleus") {
427 nb_nuc = static_cast<G4double>(aPartDef->GetBaryonNumber());
428 last_ekin_nuc /= nb_nuc;
429 }
430
431 last_weight = theAdjointSteppingAction->GetLastWeight();
432
433 last_pos_vec.push_back(last_pos);
434 last_direction_vec.push_back(last_direction);
435 last_ekin_vec.push_back(last_ekin);
436 last_ekin_nuc_vec.push_back(last_ekin_nuc);
437 last_cos_th_vec.push_back(last_cos_th);
438 last_weight_vec.push_back(last_weight);
439 last_fwd_part_PDGEncoding_vec.push_back(last_fwd_part_PDGEncoding);
440 last_fwd_part_index_vec.push_back(last_fwd_part_index);
441 ID_of_last_particle_that_reach_the_ext_source++;
442 ID_of_last_particle_that_reach_the_ext_source_vec.push_back(
443 ID_of_last_particle_that_reach_the_ext_source);
444}
int G4int
Definition G4Types.hh:85
double z() const
double mag() const
G4ParticleDefinition * GetLastPartDef()
const G4String & GetParticleType() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()

Referenced by SetAdjointTrackingMode().

◆ ResetDidOneAdjPartReachExtSourceDuringEvent()

void G4AdjointSimManager::ResetDidOneAdjPartReachExtSourceDuringEvent ( )

Definition at line 651 of file G4AdjointSimManager.cc.

652{
653 theAdjointSteppingAction->ResetDidOneAdjPartReachExtSourceDuringEvent();
654}

Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().

◆ RunAdjointSimulation()

void G4AdjointSimManager::RunAdjointSimulation ( G4int nb_evt)

Definition at line 96 of file G4AdjointSimManager.cc.

97{
98 if (G4RunManager::GetRunManager()->GetRunManagerType() != G4RunManager::sequentialRM)
99 return; // only for sequential mode
100 if (welcome_message) {
101 G4cout << "****************************************************************" << std::endl;
102 G4cout << "*** Geant4 Reverse/Adjoint Monte Carlo mode ***" << std::endl;
103 G4cout << "*** Author: L.Desorgher ***" << std::endl;
104 G4cout << "*** Company: SpaceIT GmbH, Bern, Switzerland ***" << std::endl;
105 G4cout << "*** Sponsored by: ESA/ESTEC contract contract 21435/08/NL/AT ***" << std::endl;
106 G4cout << "****************************************************************" << std::endl;
107 welcome_message = false;
108 }
109
110 // Switch to adjoint simulation mode
111 //---------------------------------------------------------
113
114 // Make the run
115 //------------
116 nb_evt_of_last_run = nb_evt;
118 G4int(nb_evt * theAdjointPrimaryGeneratorAction->GetNbOfAdjointPrimaryTypes()));
119
120 // Back to Fwd Simulation Mode
121 //--------------------------------
123}
G4GLOB_DLL std::ostream G4cout
static G4RunManager * GetRunManager()
virtual void BeamOn(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ SetAdjointEventAction()

void G4AdjointSimManager::SetAdjointEventAction ( G4UserEventAction * anAction)

Definition at line 577 of file G4AdjointSimManager.cc.

578{
579 theAdjointEventAction = anAction;
580}

◆ SetAdjointRunAction()

void G4AdjointSimManager::SetAdjointRunAction ( G4UserRunAction * anAction)

Definition at line 598 of file G4AdjointSimManager.cc.

599{
600 theAdjointRunAction = anAction;
601}

◆ SetAdjointSourceEmax()

void G4AdjointSimManager::SetAdjointSourceEmax ( G4double Emax)

Definition at line 533 of file G4AdjointSimManager.cc.

534{
535 theAdjointPrimaryGeneratorAction->SetEmax(Emax);
536}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ SetAdjointSourceEmin()

void G4AdjointSimManager::SetAdjointSourceEmin ( G4double Emin)

Definition at line 526 of file G4AdjointSimManager.cc.

527{
528 theAdjointPrimaryGeneratorAction->SetEmin(Emin);
529}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ SetAdjointStackingAction()

void G4AdjointSimManager::SetAdjointStackingAction ( G4UserStackingAction * anAction)

Definition at line 591 of file G4AdjointSimManager.cc.

592{
593 theAdjointStackingAction->SetUserAdjointStackingAction(anAction);
594}
void SetUserAdjointStackingAction(G4UserStackingAction *anAction)

◆ SetAdjointSteppingAction()

void G4AdjointSimManager::SetAdjointSteppingAction ( G4UserSteppingAction * anAction)

Definition at line 584 of file G4AdjointSimManager.cc.

585{
586 theAdjointSteppingAction->SetUserAdjointSteppingAction(anAction);
587}
void SetUserAdjointSteppingAction(G4UserSteppingAction *anAction)

◆ SetAdjointTrackingMode()

void G4AdjointSimManager::SetAdjointTrackingMode ( G4bool aBool)

Definition at line 279 of file G4AdjointSimManager.cc.

280{
281 adjoint_tracking_mode = aBool;
282
283 if (adjoint_tracking_mode) {
284 SetRestOfAdjointActions();
285 theAdjointStackingAction->SetAdjointMode(true);
286 theAdjointStackingAction->SetKillTracks(false);
287 }
288 else {
289 ResetRestOfUserActions();
290 theAdjointStackingAction->SetAdjointMode(false);
292 theAdjointStackingAction->SetKillTracks(false);
294 }
295 else
296 theAdjointStackingAction->SetKillTracks(true);
297 }
298}
G4bool GetDidAdjParticleReachTheExtSource()

Referenced by G4AdjointPrimaryGeneratorAction::GeneratePrimaries().

◆ SetExtSourceEmax()

void G4AdjointSimManager::SetExtSourceEmax ( G4double Emax)

Definition at line 478 of file G4AdjointSimManager.cc.

479{
480 theAdjointSteppingAction->SetExtSourceEMax(Emax);
481}
void SetExtSourceEMax(G4double Emax)

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ SetNbAdjointPrimaryElectronsPerEvent()

void G4AdjointSimManager::SetNbAdjointPrimaryElectronsPerEvent ( G4int nb)

Definition at line 619 of file G4AdjointSimManager.cc.

620{
621 theAdjointPrimaryGeneratorAction->SetNbAdjointPrimaryElectronsPerEvent(nb);
622}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ SetNbAdjointPrimaryGammasPerEvent()

void G4AdjointSimManager::SetNbAdjointPrimaryGammasPerEvent ( G4int nb)

Definition at line 612 of file G4AdjointSimManager.cc.

613{
614 theAdjointPrimaryGeneratorAction->SetNbAdjointPrimaryGammasPerEvent(nb);
615}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ SetNbOfPrimaryFwdGammasPerEvent()

void G4AdjointSimManager::SetNbOfPrimaryFwdGammasPerEvent ( G4int nb)

Definition at line 605 of file G4AdjointSimManager.cc.

606{
607 theAdjointPrimaryGeneratorAction->SetNbPrimaryFwdGammasPerEvent(nb);
608}

Referenced by G4AdjointSimMessenger::SetNewValue().

◆ SetNormalisationMode()

void G4AdjointSimManager::SetNormalisationMode ( G4int n)
inline

Definition at line 228 of file G4AdjointSimManager.hh.

228{ normalisation_mode = n; }

◆ SetPrimaryIon()

void G4AdjointSimManager::SetPrimaryIon ( G4ParticleDefinition * adjointIon,
G4ParticleDefinition * fwdIon )

Definition at line 554 of file G4AdjointSimManager.cc.

556{
557 theAdjointPrimaryGeneratorAction->SetPrimaryIon(adjointIon, fwdIon);
558}
void SetPrimaryIon(G4ParticleDefinition *adjointIon, G4ParticleDefinition *fwdIon)

◆ SwitchToAdjointSimulationMode()

void G4AdjointSimManager::SwitchToAdjointSimulationMode ( )

Definition at line 143 of file G4AdjointSimManager.cc.

144{
145 // Replace the user defined actions by the adjoint actions
146 //---------------------------------------------------------
147 SetAdjointActions();
148
149 // Update the list of primaries
150 //-----------------------------
151 theAdjointPrimaryGeneratorAction->UpdateListOfPrimaryParticles();
152 adjoint_sim_mode = true;
153 ID_of_last_particle_that_reach_the_ext_source = 0;
154}

Referenced by RunAdjointSimulation().

◆ UseUserStackingActionInFwdTrackingPhase()

void G4AdjointSimManager::UseUserStackingActionInFwdTrackingPhase ( G4bool aBool)
inline

Definition at line 241 of file G4AdjointSimManager.hh.

242 {
243 use_user_StackingAction = aBool;
244 }

◆ UseUserTrackingActionInFwdTrackingPhase()

void G4AdjointSimManager::UseUserTrackingActionInFwdTrackingPhase ( G4bool aBool)
inline

Definition at line 245 of file G4AdjointSimManager.hh.

246 {
247 use_user_TrackingAction = aBool;
248 }

The documentation for this class was generated from the following files: