40#ifndef G4AdjointCSManager_h
41#define G4AdjointCSManager_h 1
94 G4bool is_scat_proj_to_proj,
132 std::vector<G4double>& AdjointCS_for_each_element);
169 std::vector<G4AdjointCSMatrix*> BuildCrossSectionsModelAndElement(
172 std::vector<G4AdjointCSMatrix*> BuildCrossSectionsModelAndMaterial(
175 static constexpr G4double fTmin = 0.1 * CLHEP::keV;
176 static constexpr G4double fTmax = 100. * CLHEP::TeV;
179 static constexpr G4int fNbins = 320;
191 std::vector<std::vector<G4AdjointCSMatrix*>>
192 fAdjointCSMatricesForScatProjToProj;
194 std::vector<std::vector<G4AdjointCSMatrix*>> fAdjointCSMatricesForProdToProj;
196 std::vector<G4VEmAdjointModel*> fAdjointModels;
198 std::vector<std::size_t> fIndexOfAdjointEMModelInAction;
199 std::vector<G4bool> fIsScatProjToProj;
200 std::vector<std::vector<G4double>> fLastAdjointCSVsModelsAndElements;
204 std::vector<G4PhysicsTable*> fTotalFwdSigmaTable;
205 std::vector<G4PhysicsTable*> fTotalAdjSigmaTable;
208 std::vector<G4PhysicsTable*> fSigmaTableForAdjointModelScatProjToProj;
209 std::vector<G4PhysicsTable*> fSigmaTableForAdjointModelProdToProj;
211 std::vector<std::vector<G4double>> fEminForFwdSigmaTables;
212 std::vector<std::vector<G4double>> fEminForAdjSigmaTables;
213 std::vector<std::vector<G4double>> fEkinofFwdSigmaMax;
214 std::vector<std::vector<G4double>> fEkinofAdjSigmaMax;
218 std::vector<std::vector<G4VEmProcess*>*> fForwardProcesses;
219 std::vector<std::vector<G4VEnergyLossProcess*>*> fForwardLossProcesses;
222 std::vector<G4ParticleDefinition*> fAdjointParticlesInAction;
225 G4double fLastCSCorrectionFactor = 1.;
227 std::size_t fCurrentParticleIndex = 0;
228 std::size_t fCurrentMatIndex = 0;
230 G4bool fCSMatricesBuilt =
false;
231 G4bool fSigmaTableBuilt =
false;
232 G4bool fForwardCSUsed =
true;
233 G4bool fForwardCSMode =
true;
void BuildTotalSigmaTables()
void RegisterAdjointParticle(G4ParticleDefinition *aPartDef)
G4ParticleDefinition * GetForwardParticleEquivalent(G4ParticleDefinition *theAdjPartDef)
void GetMaxAdjTotalCS(G4ParticleDefinition *aPartDef, const G4MaterialCutsCouple *aCouple, G4double &e_sigma_max, G4double &sigma_max)
G4double GetCrossSectionCorrection(G4ParticleDefinition *aPartDef, G4double PreStepEkin, const G4MaterialCutsCouple *aCouple, G4bool &fwd_is_used)
G4double GetTotalForwardCS(G4ParticleDefinition *aPartDef, G4double Ekin, const G4MaterialCutsCouple *aCouple)
void SetIon(G4ParticleDefinition *adjIon, G4ParticleDefinition *fwdIon)
G4double ComputeTotalAdjointCS(const G4MaterialCutsCouple *aMatCutCouple, G4ParticleDefinition *aPart, G4double PrimEnergy)
G4double ComputeAdjointCS(G4Material *aMaterial, G4VEmAdjointModel *aModel, G4double PrimEnergy, G4double Tcut, G4bool isScatProjToProj, std::vector< G4double > &AdjointCS_for_each_element)
G4ParticleDefinition * GetAdjointParticleEquivalent(G4ParticleDefinition *theFwdPartDef)
G4Element * SampleElementFromCSMatrices(G4Material *aMaterial, G4VEmAdjointModel *aModel, G4double PrimEnergy, G4double Tcut, G4bool isScatProjToProj)
G4double GetContinuousWeightCorrection(G4ParticleDefinition *aPartDef, G4double PreStepEkin, G4double AfterStepEkin, const G4MaterialCutsCouple *aCouple, G4double step_length)
G4double GetPostStepWeightCorrection()
void GetEminForTotalCS(G4ParticleDefinition *aPartDef, const G4MaterialCutsCouple *aCouple, G4double &emin_adj, G4double &emin_fwd)
static G4AdjointCSManager * GetAdjointCSManager()
G4double GetTotalAdjointCS(G4ParticleDefinition *aPartDef, G4double Ekin, const G4MaterialCutsCouple *aCouple)
G4double GetAdjointSigma(G4double Ekin_nuc, std::size_t index_model, G4bool is_scat_proj_to_proj, const G4MaterialCutsCouple *aCouple)
void RegisterEmProcess(G4VEmProcess *aProcess, G4ParticleDefinition *aPartDef)
std::size_t RegisterEmAdjointModel(G4VEmAdjointModel *)
void BuildCrossSectionMatrices()
void RegisterEnergyLossProcess(G4VEnergyLossProcess *aProcess, G4ParticleDefinition *aPartDef)
void GetMaxFwdTotalCS(G4ParticleDefinition *aPartDef, const G4MaterialCutsCouple *aCouple, G4double &e_sigma_max, G4double &sigma_max)
void SetFwdCrossSectionMode(G4bool aBool)