Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
@@ -23,22 +23,33 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointAlongStepWeightCorrection.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointAlongStepWeightCorrection.hh
// Class: G4AdjointAlongStepWeightCorrection
// Author: L. Desorgher
// Date: 10 May 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 10 May 2007 creation by L. Desorgher
// 10 May 2007 creation by L. Desorgher
// October 2009 implementation of the mode where the total adjoint and forward cross sections are equivalent. L. Desorgher
//
//-------------------------------------------------------------
// Documentation:
// Continuous processes acting on adjoint particles to correct continuously their weight during the adjoint reverse tracking.
// Thi process is needed whene the adjoint cross section are not scaled such that the total adjoint cross section match the total forward cross section.
// By default the mode where the total adjoint cross section is equal to the total forward cross section is used an therefore this along step weight
// correction factor is 1.
// However in some cases (some energy ranges) the total forward cross section or the total adjoint cross section can be null, in this case the along step
// weight correction is neede and is given by exp(-(Sigma_tot_adj-Sigma_tot_fwd).dx)
//
//
//
@@ -119,20 +130,10 @@ inline void G4AdjointAlongStepWeightCorrection::DefineMaterial(
currentCouple = couple;
currentMaterial = couple->GetMaterial();
currentMaterialIndex = couple->GetIndex();
//G4cout<<"Define Material"<<std::endl;
//if(!meanFreePath) ResetNumberOfInteractionLengthLeft();
}
}
///////////////////////////////////////////////////////
//
inline G4double G4AdjointAlongStepWeightCorrection::GetContinuousStepLimit(const G4Track& track,
G4double , G4double , G4double& )
{
G4double x = DBL_MAX;
DefineMaterial(track.GetMaterialCutsCouple());
preStepKinEnergy = track.GetKineticEnergy();
return x;
}
#endif
@@ -23,18 +23,27 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointBremsstrahlungModel.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointBremsstrahlungModel.hh
// Class: G4AdjointBremsstrahlungModel
// Author: L. Desorgher
// Date: 15 June 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 15 June 2007 creation by L. Desorgher. Adapted from G4eBremsstrahlungModel
// 15 June 2007 creation by L. Desorgher. Adapted from G4eBremsstrahlungModel
// 20-10-2009 Remove all the screening effect that are not considered in the direct models blow 10 GeV. L.Desorgher
// 4-11-2009 Implement the use of a simple biased differential cross section (C(Z)/Egamma) allowing a rapid computation of adjoint CS
// and rapid sampling of adjoint secondaries. By this way cross section matrices are not used anymore, avoiding a rather
// time consuming computation of adjoint brem cross section matrices for each material at initialisation. This mode is switch on/off
// by selecting SetUseMatrix(false)/ SetUseMatrix(true) in the constructor. L.Desorgher
//
//
//-------------------------------------------------------------
// Documentation:
@@ -48,6 +57,9 @@
#include "globals.hh"
#include "G4VEmAdjointModel.hh"
#include "G4eBremsstrahlungModel.hh"
//#include "G4PenelopeBremsstrahlungModel.hh"
#include "G4PhysicsTable.hh"
//#include "G4EmModelManager.hh"
class G4Timer;
class G4AdjointBremsstrahlungModel: public G4VEmAdjointModel
@@ -59,75 +71,60 @@ public:
virtual void SampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
void RapidSampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
virtual G4double DiffCrossSectionPerVolumePrimToSecond(
const G4Material* aMaterial,
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
G4double kinEnergyProd // kinetic energy of the secondary particle
);
G4double DiffCrossSectionPerVolumePrimToSecond1(
G4double DiffCrossSectionPerVolumePrimToSecondApproximated1(
const G4Material* aMaterial,
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
G4double kinEnergyProd // kinetic energy of the secondary particle
);
G4double DiffCrossSectionPerVolumePrimToSecond2(
G4double DiffCrossSectionPerVolumePrimToSecondApproximated2(
const G4Material* aMaterial,
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
G4double kinEnergyProd // kinetic energy of the secondary particle
);
G4double DiffCrossSectionPerVolumePrimToSecond3(
const G4Material* aMaterial,
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
G4double kinEnergyProd // kinetic energy of the secondary particle
);
void DefineDirectBremModel(G4eBremsstrahlungModel* aModel);
inline void SetdCSModel(G4String aString) {ModeldCS=aString;}
virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
G4double primEnergy,
G4bool IsScatProjToProjCase);
private:
void InitialiseParameters();
G4double SupressionFunction(const G4Material* material, G4double tkin,
G4double gammaEnergy);
// private void InitialiseFwdModels();
private:
G4eBremsstrahlungModel* theDirectBremModel;
G4eBremsstrahlungModel* theDirectStdBremModel;
//G4PenelopeBremsstrahlungModel* theDirectPenelopeBremModel;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double probsup;
G4double MigdalConstant;
G4double LPMconstant;
G4double highEnergyTh;
G4bool theLPMflag;
G4bool isElectron;
//Vector
std::vector<G4DataVector*> partialSumSigma;
std::vector<float> FZ;
std::vector<float> ah1;
std::vector<float> ah2;
std::vector<float> ah3;
std::vector<float> bh1;
std::vector<float> bh2;
std::vector<float> bh3;
std::vector<float> al0;
std::vector<float> al1;
std::vector<float> al2;
std::vector<float> bl0;
std::vector<float> bl1;
std::vector<float> bl2;
std::vector<float> SigmaPerAtom;
G4Timer* theTimer;
G4String ModeldCS;
G4double MigdalConstant;
G4double lastCZ;
/*
G4bool UsePenelopeModel;
G4EmModelManager* theEmModelManagerForFwdModels;
G4bool isPenelopeModelInitialised ;
*/
};
#endif
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointCSManager.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointCSManager.hh
// Class: G4AdjointCSManager
// Author: L. Desorgher
// Date: 1st April 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -35,11 +38,14 @@
// --------------
// ChangeHistory:
// 1st April 2007 creation by L. Desorgher
//
// September-October 2009. Implementation of the mode where the adjoint cross sections are scaled such that the total used adjoint cross sections is in
// most of the cases equal to the total forward cross section. L.Desorgher
//
//-------------------------------------------------------------
// Documentation:
// Is responsible for the management of all adjoint cross sections matrices, and for the computation of the total forward and adjoint cross sections.
// Total adjoint and forward cross sections are needed to correct continuously the weight of a particle after a tracking step.
// Total adjoint and forward cross sections are needed to correct the weight of a particle after a tracking step or after the occurence of a reverse reaction.
// It is also used to sample an adjoint secondary from a given adjoint cross section matrix.
//
#ifndef G4AdjointCSManager_h
@@ -81,47 +87,77 @@ class G4AdjointCSManager
void RegisterAdjointParticle(G4ParticleDefinition* aPartDef);
//Building of thr CS Matrices and Total Forward and Adjoint LambdaTables
//Building of the CS Matrices and Total Forward and Adjoint LambdaTables
//----------------------------------------------------------------------
void BuildCrossSectionMatrices();
void BuildTotalSigmaTables();
//Get TotalCrossSections form Total Lambda Tables
//Get TotalCrossSections form Total Lambda Tables, Needed for Weight correction and scaling of the
//-------------------------------------------------
G4double GetTotalAdjointCS(G4ParticleDefinition* aPartDef, G4double Ekin,
const G4MaterialCutsCouple* aCouple);
G4double GetTotalForwardCS(G4ParticleDefinition* aPartDef, G4double Ekin,
const G4MaterialCutsCouple* aCouple);
const G4MaterialCutsCouple* aCouple);
void GetEminForTotalCS(G4ParticleDefinition* aPartDef,
const G4MaterialCutsCouple* aCouple, G4double& emin_adj, G4double& emin_fwd);
void GetMaxFwdTotalCS(G4ParticleDefinition* aPartDef,
const G4MaterialCutsCouple* aCouple, G4double& e_sigma_max, G4double& sigma_max);
void GetMaxAdjTotalCS(G4ParticleDefinition* aPartDef,
const G4MaterialCutsCouple* aCouple, G4double& e_sigma_max, G4double& sigma_max);
//CrossSection Correction 1 or FwdCS/AdjCS following the G4boolean value of forward_CS_is_used and forward_CS_mode
//-------------------------------------------------
G4double GetCrossSectionCorrection(G4ParticleDefinition* aPartDef,G4double PreStepEkin,const G4MaterialCutsCouple* aCouple, G4bool& fwd_is_used, G4double& fwd_TotCS);
//Cross section mode
//------------------
inline void SetFwdCrossSectionMode(G4bool aBool){forward_CS_mode=aBool;}
//Weight correction
//------------------
G4double GetContinuousWeightCorrection(G4ParticleDefinition* aPartDef, G4double PreStepEkin,G4double AfterStepEkin,
const G4MaterialCutsCouple* aCouple, G4double step_length);
G4double GetPostStepWeightCorrection(G4ParticleDefinition* aPrimPartDef, G4ParticleDefinition* aSecondPartDef,
G4double EkinPrim,G4double EkinSecond,
const G4MaterialCutsCouple* aCouple);
G4double GetPostStepWeightCorrection();
double ComputeAdjointCS(G4Material* aMaterial,
//Method Called by the adjoint model to get there CS, if not precised otherwise
//-------------------------------
G4double ComputeAdjointCS(G4Material* aMaterial,
G4VEmAdjointModel* aModel,
G4double PrimEnergy,
G4double Tcut,
G4bool IsScatProjToProjCase,
std::vector<double>&
std::vector<G4double>&
AdjointCS_for_each_element);
//Method Called by the adjoint model to sample the secondary energy form the CS matrix
//--------------------------------------------------------------------------------
G4Element* SampleElementFromCSMatrices(G4Material* aMaterial,
G4VEmAdjointModel* aModel,
G4double PrimEnergy,
G4double Tcut,
G4bool IsScatProjToProjCase);
G4double ComputeTotalAdjointCS(const G4MaterialCutsCouple* aMatCutCouple,G4ParticleDefinition* aPart,G4double PrimEnergy);
//Total Adjoint CS is computed at initialisation phase
//-----------------------------------------------------
G4double ComputeTotalAdjointCS(const G4MaterialCutsCouple* aMatCutCouple,G4ParticleDefinition* aPart,G4double PrimEnergy);
G4ParticleDefinition* GetAdjointParticleEquivalent(G4ParticleDefinition* theFwdPartDef);
G4ParticleDefinition* GetForwardParticleEquivalent(G4ParticleDefinition* theAdjPartDef);
@@ -129,14 +165,8 @@ class G4AdjointCSManager
inline void SetTmin(G4double aVal){Tmin=aVal;}
inline void SetTmax(G4double aVal){Tmax=aVal;}
inline void SetNbins(G4int aInt){nbins=aInt;}
//inline
inline void ConsiderContinuousWeightCorrection(G4bool aBool){consider_continuous_weight_correction=aBool;}
inline void ConsiderPoststepWeightCorrection(G4bool aBool){consider_poststep_weight_correction=aBool;}
inline void SetIon(G4ParticleDefinition* adjIon,
G4ParticleDefinition* fwdIon) {theAdjIon=adjIon; theFwdIon =fwdIon;}
private:
@@ -162,13 +192,22 @@ class G4AdjointCSManager
G4double lastTcut;
std::vector< size_t> listOfIndexOfAdjointEMModelInAction;
std::vector< G4bool> listOfIsScatProjToProjCase;
std::vector< std::vector<double> > lastAdjointCSVsModelsAndElements;
std::vector< std::vector<G4double> > lastAdjointCSVsModelsAndElements;
G4bool CrossSectionMatrixesAreBuilt;
size_t currentParticleIndex;
G4ParticleDefinition* currentParticleDef;
//total adjoint and total forward cross section table in function of material and in function of adjoint particle type
//--------------------------------------------------------------------------------------------------------------------
std::vector<G4PhysicsTable*> theTotalForwardSigmaTableVector;
std::vector<G4PhysicsTable*> theTotalAdjointSigmaTableVector;
std::vector< std::vector<G4double> > EminForFwdSigmaTables;
std::vector< std::vector<G4double> > EminForAdjSigmaTables;
std::vector< std::vector<G4double> > EkinofFwdSigmaMax;
std::vector< std::vector<G4double> > EkinofAdjSigmaMax;
//list of forward G4VEMLossProcess and of G4VEMProcess for the different adjoint particle
//--------------------------------------------------------------
@@ -176,7 +215,7 @@ class G4AdjointCSManager
std::vector< std::vector<G4VEnergyLossProcess*>* > listOfForwardEnergyLossProcess;
//list of adjoint particles considered
//--------------------------------------------------------------
std::vector< G4ParticleDefinition*> theListOfAdjointParticlesInAction;
@@ -190,18 +229,42 @@ class G4AdjointCSManager
G4Material* currentMaterial;
size_t currentMatIndex;
int verbose;
G4int verbose;
//Two CS mode are possible :forward_CS_mode = false the Adjoint CS are used as it is implying a AlongStep Weight Correction.
// :forward_CS_mode = true the Adjoint CS are scaled to have the total adjoint CS eual to the fwd one implying a PostStep Weight Correction.
// For energy range where the total FwdCS or the total adjoint CS are null, the scaling is not possble and
// forward_CS_is_used is set to false
//--------------------------------------------
G4bool forward_CS_is_used;
G4bool forward_CS_mode;
//Adj and Fwd CS values for re-use
//------------------------
G4double PreadjCS,PostadjCS;
G4double PrefwdCS,PostfwdCS;
G4double LastEkinForCS;
G4double LastCSCorrectionFactor;
G4ParticleDefinition* lastPartDefForCS;
//Ion
//----------------
G4ParticleDefinition* theAdjIon; //at the moment Only one ion can be considered by simulation
G4ParticleDefinition* theFwdIon;
G4double massRatio;
//Weight correction
//------------------
G4bool consider_continuous_weight_correction;
G4bool consider_poststep_weight_correction;
private:
G4AdjointCSManager();
void DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
double ComputeAdjointCS(G4double aPrimEnergy, G4AdjointCSMatrix* anAdjointCSMatrix, G4double Tcut);
void DefineCurrentParticle(const G4ParticleDefinition* aPartDef);
G4double ComputeAdjointCS(G4double aPrimEnergy, G4AdjointCSMatrix* anAdjointCSMatrix, G4double Tcut);
};
#endif
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointCSMatrix.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointCSMatrix.hh
// Class: G4AdjointCSMatrix.hh
// Author: L. Desorgher
// Date: 1st April 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -64,19 +67,19 @@ public:
G4AdjointCSMatrix(G4bool aBool);
~G4AdjointCSMatrix();
////////////
// Methods
////////////
//////////////
// Methods //
//////////////
void Clear();
void AddData(G4double aPrimEnergy,G4double aCS, std::vector< G4double>* aLogSecondEnergyVector,
std::vector< G4double>* aLogProbVector,size_t n_pro_decade=0);
void AddData(G4double aPrimEnergy,G4double aCS, std::vector< double>* aLogSecondEnergyVector,
std::vector< double>* aLogProbVector,size_t n_pro_decade=0);
bool GetData(unsigned int i, G4double& aPrimEnergy,G4double& aCS,G4double& log0, std::vector< G4double>*& aLogSecondEnergyVector,
std::vector< G4double>*& aLogProbVector,
G4bool GetData(unsigned int i, G4double& aPrimEnergy,G4double& aCS,G4double& log0, std::vector< double>*& aLogSecondEnergyVector,
std::vector< double>*& aLogProbVector,
std::vector< size_t>*& aLogProbVectorIndex);
inline std::vector< G4double >* GetLogPrimEnergyVector(){return &theLogPrimEnergyVector;}
inline std::vector< G4double >* GetLogCrossSectionvector(){return &theLogCrossSectionVector;}
inline std::vector< double>* GetLogPrimEnergyVector(){return &theLogPrimEnergyVector;}
inline std::vector< double>* GetLogCrossSectionvector(){return &theLogCrossSectionVector;}
inline G4double GetDlog(){return dlog;}
inline G4bool IsScatProjToProjCase(){return is_scat_proj_to_proj_case;}
void Write(G4String file_name);
@@ -86,13 +89,13 @@ private:
// we did first try to use G4PhysicsOrderedVector but they are not general enough for our purpose
std::vector< G4double > theLogPrimEnergyVector;
std::vector< G4double > theLogCrossSectionVector; //Adjoint Cross sections in function of primary energy
std::vector< std::vector< G4double >* > theLogSecondEnergyMatrix;
std::vector< std::vector< G4double >* > theLogProbMatrix; //Each column represents the integrated probability of getting a secondary
std::vector< double> theLogPrimEnergyVector;
std::vector< double> theLogCrossSectionVector; //Adjoint Cross sections in function of primary energy
std::vector< std::vector< double>* > theLogSecondEnergyMatrix;
std::vector< std::vector< double>* > theLogProbMatrix; //Each column represents the integrated probability of getting a secondary
// in function of their energy
std::vector< std::vector< size_t >* > theLogProbMatrixIndex; //index of euqidistant LogProb
std::vector< G4double > log0Vector;
std::vector< std::vector< size_t >* > theLogProbMatrixIndex; //index of equidistant LogProb
std::vector< double> log0Vector;
unsigned int nb_of_PrimEnergy;
G4bool is_scat_proj_to_proj_case;
@@ -23,22 +23,26 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointComptonModel.hh,v 1.5 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointComptonModel.hh
// Class: G4AdjointComptonModel
// Author: L. Desorgher
// Date: 1 September 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 1 September 2007 creation by L. Desorgher
// 1 September 2007 creation by L. Desorgher
// 11 November 2009 Implement the use of approximated diffCS as an alternative of CSMatrix.
//
//-------------------------------------------------------------
// Documentation:
// Model for the adjoint compton scattering
// Model for the adjoint compton scattering.
//
#ifndef G4AdjointComptonModel_h
@@ -47,6 +51,7 @@
#include "globals.hh"
#include "G4VEmAdjointModel.hh"
#include "G4VEmProcess.hh"
class G4AdjointComptonModel: public G4VEmAdjointModel
{
@@ -59,6 +64,9 @@ public:
virtual void SampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
void RapidSampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
virtual G4double DiffCrossSectionPerAtomPrimToScatPrim(
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
@@ -70,15 +78,22 @@ public:
G4double kinEnergyProd, // kinetic energy of the secondary particle
G4double Z,
G4double A = 0.);
virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
G4double primEnergy,
G4bool IsScatProjToProjCase);
inline void SetDirectProcess(G4VEmProcess* aProcess){theDirectEMProcess = aProcess;};
private:
G4VEmProcess* theDirectEMProcess;
G4double G4direct_CS;
};
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointInterpolator.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointInterpolator.hh
// Module: G4AdjointInterpolator
// Author: L. Desorgher
// Date: 1st April 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -76,17 +79,17 @@ class G4AdjointInterpolator
G4double Interpolation(G4double& x,G4double& x1,G4double& x2,G4double& y1,G4double &y2,G4String InterPolMethod="Log");
size_t FindPosition(G4double& x,std::vector<double>& x_vec,size_t ind_min=0, size_t ind_max=0);
size_t FindPosition(G4double& x,std::vector<G4double>& x_vec,size_t ind_min=0, size_t ind_max=0);
size_t FindPositionForLogVector(G4double& x,std::vector<double>& x_vec);
size_t FindPositionForLogVector(G4double& x,std::vector<G4double>& x_vec);
G4double Interpolate(G4double& x,std::vector<double>& x_vec,std::vector<double>& y_vec,G4String InterPolMethod="Log"); //xvec should monotically increase
G4double Interpolate(G4double& x,std::vector<G4double>& x_vec,std::vector<G4double>& y_vec,G4String InterPolMethod="Log"); //xvec should monotically increase
G4double InterpolateWithIndexVector(G4double& x,std::vector<double>& x_vec,std::vector<double>& y_vec,
G4double InterpolateWithIndexVector(G4double& x,std::vector<G4double>& x_vec,std::vector<G4double>& y_vec,
std::vector<size_t>& index_vec, G4double x0,G4double dx); //xvec should monotically increase
G4double InterpolateForLogVector(G4double& x,std::vector<double>& x_vec,std::vector<double>& y_vec);
G4double InterpolateForLogVector(G4double& x,std::vector<G4double>& x_vec,std::vector<G4double>& y_vec);
private:
static G4AdjointInterpolator* theInstance;
@@ -0,0 +1,152 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointIonIonisationModel.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Class: G4IonIonisationModel
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 26th August 2009 creation by L. Desorgher
//
//-------------------------------------------------------------
// Documentation:
// Adjoint EM model for discrete reverse ion ionisation
//
#ifndef G4AdjointIonIonisationModel_h
#define G4AdjointIonIonisationModel_h 1
#include "globals.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "Randomize.hh"
#include "G4ParticleDefinition.hh"
#include "G4VEmModel.hh"
#include "G4Electron.hh"
#include "G4Gamma.hh"
#include "G4ProductionCutsTable.hh"
#include "G4VEmAdjointModel.hh"
class G4PhysicsTable;
class G4Region;
class G4VParticleChange;
class G4ParticleChange;
class G4Track;
class G4AdjointCSMatrix;
class G4AdjointIonIonisationModel: public G4VEmAdjointModel
{
public:
G4AdjointIonIonisationModel();
virtual ~G4AdjointIonIonisationModel();
virtual void SampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
virtual G4double DiffCrossSectionPerAtomPrimToSecond(
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
G4double kinEnergyProd, // kinetic energy of the secondary particle
G4double Z,
G4double A = 0.);
virtual void CorrectPostStepWeight(G4ParticleChange* fParticleChange,
G4double old_weight,
G4double adjointPrimKinEnergy,
G4double projectileKinEnergy,
G4bool IsScatProjToProjCase);
//Set/Get methods
//------------------
virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy,G4double Tcut=0);
virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy);
virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
inline void SetUseOnlyBragg(G4bool aBool){use_only_bragg =aBool;}
void SetIon(G4ParticleDefinition* adj_ion, G4ParticleDefinition* fwd_ion);
private: //Methods
void DefineProjectileProperty();
//projectile property
G4double mass;
G4double tlimit;
G4double spin;
G4double magMoment2;
G4double chargeSquare;
G4double massRatio;
G4double ratio, ratio2;
G4double one_plus_ratio_2;
G4double formfact;
G4double twoln10;
G4double bg2lim;
G4double taulim;
G4double corrFactor;
G4bool isIon;
G4double one_minus_ratio_2;
G4bool use_only_bragg;
G4VEmModel* theBraggIonDirectEMModel;
G4VEmModel* theBetheBlochDirectEMModel;
};
#endif
@@ -23,18 +23,31 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointPhotoElectricModel.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointPhotoElectricModel.hh
// Module: G4AdjointPhotoElectricModel
// Author: L. Desorgher
// Date: 10 October 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 1 September 2007 creation by L. Desorgher
// -1 September 2007 creation by L. Desorgher
//
// -January 2009. L. Desorgher
// Put a higher limit on the CS to avoid a high rate of Inverse Photo e- effect at low energy. The very high adjoint CS of the reverse
// photo electric reaction produce a high rate of reverse photo electric reaction in the inner side of a shielding for eaxmple, the correction of this occurence
// by weight correction in the StepDoIt method is not statistically sufficient at small energy. The problem is partially solved by setting an higher CS limit
// and compensating it by an extra weight correction factor. However when coupling it with other reverse processes the reverse photo-electric is still
// the source of very occasional high weight that decrease the efficiency of the computation. A way to solve this problemn is still needed but is difficult
// to find as it happens in rarea case but does give a weighrt that is outside the noemal distribution. (Very Tricky!)
//
// -October 2009 Correction of Element sampling. L. Desorgher
//
//-------------------------------------------------------------
// Documentation:
@@ -60,7 +73,6 @@ public:
virtual void SampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
G4double primEnergy,
G4bool IsScatProjToProjCase);
@@ -72,11 +84,22 @@ public:
inline void SetTheDirectPEEffectModel(G4PEEffectModel* aModel){theDirectPEEffectModel = aModel;
DefineDirectEMModel(aModel);}
virtual void CorrectPostStepWeight(G4ParticleChange* fParticleChange,
G4double old_weight,
G4double adjointPrimKinEnergy,
G4double projectileKinEnergy,
G4bool IsScatProjToProjCase);
private:
G4double xsec[40];
G4double totAdjointCS;
G4double totBiasedAdjointCS;
G4double factorCSBiasing;
G4double pre_step_AdjointCS;
G4double post_step_AdjointCS;
G4double shell_prob[40][40];
@@ -0,0 +1,173 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointProcessEquivalentToDirectProcess.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Class: G4AdjointProcessEquivalentToDirectProcess
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 25 Sept. 2009 Created by L.Desorgher. Inspired from G4WrapperProcess
//
//-------------------------------------------------------------
// Documentation:
// Adjoint process equivalent to direct process, used for some multiple scattering
//
//
#ifndef G4AdjointProcessEquivalentToDirectProcess_h
#define G4AdjointProcessEquivalentToDirectProcess_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VProcess.hh"
class G4AdjointProcessEquivalentToDirectProcess : public G4VProcess
{
// A virtual class for wrapper process objects.
public: // with description
// constructor requires the process name and type
G4AdjointProcessEquivalentToDirectProcess(const G4String& aName, G4VProcess* aProcess,G4ParticleDefinition* fwd_particle_def);
public:
// destructor
virtual ~G4AdjointProcessEquivalentToDirectProcess();
public: // with description
////////////////////////////
// DoIt /////////////////
///////////////////////////
virtual G4VParticleChange* PostStepDoIt(
const G4Track& track,
const G4Step& stepData
);
virtual G4VParticleChange* AlongStepDoIt(
const G4Track& track,
const G4Step& stepData
);
virtual G4VParticleChange* AtRestDoIt(
const G4Track& track,
const G4Step& stepData
);
//////////////////////////
// GPIL //////////////
/////////////////////////
virtual G4double AlongStepGetPhysicalInteractionLength(
const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& proposedSafety,
G4GPILSelection* selection);
virtual G4double AtRestGetPhysicalInteractionLength(
const G4Track& track,
G4ForceCondition* condition
);
virtual G4double PostStepGetPhysicalInteractionLength(
const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition
) ;
//////////////////////
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// Returns true if this process object is applicable to
// the particle type
// Process will not be registered to a particle if IsApplicable is false
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
// Messaged by the Particle definition (via the Process manager)
// whenever cross section tables have to be rebuilt (i.e. if new
// materials have been defined).
// It is overloaded by individual processes when they need physics
// tables.
// Processes which Build (for example in their
// constructors) physics tables independent of cuts
// should preferably use a
// private void BuildThePhysicsTable()
// function. Not another BuildPhysicsTable, please.
virtual void PreparePhysicsTable(const G4ParticleDefinition&);
// Messaged by the Particle definition (via the Process manager)
// whenever cross section tables have to be prepare for rebuilt
// (i.e. if new materials have been defined).
// It is overloaded by individual processes when they need physics
// tables.
// Processes which Build physics tables independent of cuts
// (for example in their constructors)
// should preferably use private
// void BuildThePhysicsTable() and void PreparePhysicsTable().
// Not another BuildPhysicsTable, please.
virtual G4bool StorePhysicsTable(const G4ParticleDefinition* ,
const G4String& directory,
G4bool ascii = false);
// Store PhysicsTable in a file.
// (return false in case of failure at I/O )
virtual G4bool RetrievePhysicsTable( const G4ParticleDefinition* ,
const G4String& directory,
G4bool ascii = false);
// Retrieve Physics from a file.
// (return true if the Physics Table can be build by using file)
// (return false if the process has no functionality or in case of failure)
// File name should be defined by each process
// and the file should be placed under the directory specifed by the argument.
////////////////////////////
virtual void StartTracking(G4Track*);
virtual void EndTracking();
// inform Start/End of tracking for each track to the physics process
public:
virtual void ResetNumberOfInteractionLengthLeft();
// reset (determine the value of)NumberOfInteractionLengthLeft
private:
G4ParticleDefinition* theFwdParticleDef;
G4VProcess* theDirectProcess;
};
#endif
@@ -0,0 +1,85 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointeIonisationModel.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointeIonisationModel
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// September 2009 creation by L. Desorgher. Separate the concrete ionisation stuff from G4VEMAdjointModel
//
//-------------------------------------------------------------
// Documentation:
// Adjoint EM model for discrete reverse e- ionisation
//
#ifndef G4AdjointeIonisationModel_h
#define G4AdjointeIonisationModel_h 1
#include "globals.hh"
#include "G4VEmAdjointModel.hh"
#include "G4PEEffectModel.hh"
class G4AdjointeIonisationModel: public G4VEmAdjointModel
{
public: //methods
//Constructor, destructor
G4AdjointeIonisationModel();
virtual ~G4AdjointeIonisationModel();
//Concrete implementation or virtual methods
virtual void SampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
virtual G4double DiffCrossSectionPerAtomPrimToSecond(
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
G4double kinEnergyProd, // kinetic energy of the secondary particle
G4double Z,
G4double A = 0.);
private:
G4double DiffCrossSectionMoller(G4double kinEnergyProj,G4double kinEnergyProd);
private: //attributes
G4bool WithRapidSampling;
};
#endif
@@ -0,0 +1,142 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointhIonisationModel.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointhIonisationModel
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 13th February 2009 creation by L. Desorgher
// 10 November 2009 Implementation of the rapid sampling.
//
//-------------------------------------------------------------
// Documentation:
// Adjoint EM model for discrete reverse hadron ionisation. Tested at the moment only for protons.
//
#ifndef G4AdjointhIonisationModel_h
#define G4AdjointhIonisationModel_h 1
#include "globals.hh"
#include "G4DynamicParticle.hh"
#include "G4ParticleDefinition.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "Randomize.hh"
#include "G4ParticleDefinition.hh"
#include "G4VEmModel.hh"
#include "G4Electron.hh"
#include "G4Gamma.hh"
#include "G4ProductionCutsTable.hh"
#include "G4VEmAdjointModel.hh"
class G4PhysicsTable;
class G4Region;
class G4VParticleChange;
class G4ParticleChange;
class G4Track;
class G4AdjointCSMatrix;
class G4AdjointhIonisationModel: public G4VEmAdjointModel
{
public:
G4AdjointhIonisationModel(G4ParticleDefinition* projectileDefinition);
virtual ~G4AdjointhIonisationModel();
virtual void SampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
void RapidSampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
virtual G4double DiffCrossSectionPerAtomPrimToSecond(
G4double kinEnergyProj, // kinetic energy of the primary particle before the interaction
G4double kinEnergyProd, // kinetic energy of the secondary particle
G4double Z,
G4double A = 0.);
virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
G4double primEnergy,
G4bool IsScatProjToProjCase);
//Set/Get methods
//------------------
virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy,G4double Tcut=0);
virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy);
virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
private: //Methods
void DefineProjectileProperty();
//projectile property
G4double mass;
G4double tlimit;
G4double spin;
G4double magMoment2;
G4double chargeSquare;
G4double ratio, ratio2;
G4double one_plus_ratio_2;
G4double formfact;
G4double twoln10;
G4double bg2lim;
G4double taulim;
G4double corrFactor;
G4bool isIon;
G4double one_minus_ratio_2;
G4VEmModel* theBraggDirectEMModel;
G4double term_Cross1, term_Cross2;
};
#endif
@@ -0,0 +1,129 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointhMultipleScattering.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Class: G4AdjointhMultipleScattering
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// GEANT4 Class header file
//
// File name: G4AdjointhMultipleScattering
//
// Author: Desorgher Laurent
//
// Creation date: 03.06.2009 cloned from G4hMultipleScattering by U.Laszlo with slight modification for adjoint_ion.
//
//
//------------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 03.06.2009 Creation by L. Desorgher. Cloned from G4hMultipleScattering by U.Laszlo with slight modifications.
// 09.11.2009 Remove AlongStepGetPhysicalInteractionLength, to call the one of the base class.
//-------------------------------------------------------------
// Documentation:
// The class simulates the multiple scattering for adjoint proton of charged particle. In this approximate implementation the reverse multiple scattering
// is the same than the foward one. This should be changed in the future to have the MultipleScaterring computed for the energy at the end of the step
// and not before the step.
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4AdjointhMultipleScattering_h
#define G4AdjointhMultipleScattering_h 1
#include "G4VMultipleScattering.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4VMscModel;
class G4AdjointhMultipleScattering : public G4VMultipleScattering
{
public: // with description
G4AdjointhMultipleScattering(const G4String& processName="msc");
virtual ~G4AdjointhMultipleScattering();
// returns true for charged particles, false otherwise
G4bool IsApplicable (const G4ParticleDefinition& p);
// PrG4int few lines of informations about the process: validity range,
void PrintInfo();
// geom. step length distribution should be sampled or not
void Setsamplez(G4bool value) { samplez = value;};
// to reduce the energy/step dependence
void Setdtrl(G4double value) { dtrl = value;};
// 'soften' step limitation above lambdalimit
void SetLambdalimit(G4double value) { lambdalimit = value;};
/* // The function overloads the corresponding function of the base
// class.It limits the step near to boundaries only
// and invokes the method GetMscContinuousStepLimit at every step.
G4double AlongStepGetPhysicalInteractionLength(
const G4Track&,
G4double previousStepSize,
G4double currentMinimalStep,
G4double& currentSafety,
G4GPILSelection* selection);
*/
protected:
// This function initialise models
void InitialiseProcess(const G4ParticleDefinition*);
private: // data members
G4VMscModel* mscUrban;
G4double lambdalimit;
G4double dtrl;
G4bool samplez;
G4bool isInitialized;
G4bool isIon;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,22 +23,28 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ContinuousGainOfEnergy.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4ContinuousGainOfEnergy.hh
// Class: G4ContinuousGainOfEnergy
// Author: L. Desorgher
// Date: 10 May 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 10 May 2007 creation by L. Desorgher
// -10 May 2007 creation by L. Desorgher
// -February-March 2009 Update for protons by L.Desorgher
// -July August 2009 Update for ion by L.Desorgher
//
//-------------------------------------------------------------
// Documentation:
// Continuous process acting on adjoint particles to compute the continuous gain of energy of charged particels whern they are tracked back!
// Continuous process acting on adjoint particles to compute the continuous gain of energy of charged particles when they are tracked back!
//
//
#ifndef G4ContinuousGainOfEnergy_h
#define G4ContinuousGainOfEnergy_h 1
@@ -51,6 +57,7 @@
#include "G4UnitsTable.hh"
#include "G4ParticleChange.hh"
#include "G4VEnergyLossProcess.hh"
#include "G4ProductionCutsTable.hh"
class G4Step;
@@ -105,7 +112,7 @@ public:
inline void SetDirectEnergyLossProcess(G4VEnergyLossProcess* aProcess){theDirectEnergyLossProcess=aProcess;};
inline void SetDirectParticle(G4ParticleDefinition* p){theDirectPartDef=p;};
void SetDirectParticle(G4ParticleDefinition* p);
protected:
@@ -115,6 +122,8 @@ protected:
private:
void DefineMaterial(const G4MaterialCutsCouple* couple);
void SetDynamicMassCharge(const G4Track& track, G4double energy);
// hide assignment operator
@@ -127,9 +136,12 @@ private:
const G4Material* currentMaterial;
const G4MaterialCutsCouple* currentCouple;
size_t currentMaterialIndex;
size_t currentCoupleIndex;
G4double currentTcut;
G4double currentCutInRange;
G4double preStepKinEnergy;
G4double linLossLimit;
G4bool lossFluctuationFlag;
@@ -141,6 +153,18 @@ private:
G4bool is_integral;
//adding for Ions
//----------------
G4bool IsIon;
G4double massRatio;
G4double chargeSqRatio;
G4VEmModel* currentModel;
G4double preStepChargeSqRatio;
G4double preStepScaledKinEnergy;
};
@@ -152,30 +176,16 @@ inline void G4ContinuousGainOfEnergy::DefineMaterial(
if(couple != currentCouple) {
currentCouple = couple;
currentMaterial = couple->GetMaterial();
currentMaterialIndex = couple->GetIndex();
currentTcut = couple->GetProductionCuts()->GetProductionCut(theDirectPartDef->GetParticleName());
//G4cout<<"Define Material"<<std::endl;
currentCoupleIndex = couple->GetIndex();
currentMaterialIndex = currentMaterial->GetIndex();
size_t idx=1;
const std::vector<G4double>* aVec = G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(idx);
currentTcut=(*aVec)[currentCoupleIndex];
currentCutInRange = couple->GetProductionCuts()->GetProductionCut(theDirectPartDef->GetParticleName());
//G4cout<<"Define Material"<<G4endl;
//if(!meanFreePath) ResetNumberOfInteractionLengthLeft();
}
}
///////////////////////////////////////////////////////
//
inline G4double G4ContinuousGainOfEnergy::GetContinuousStepLimit(const G4Track& track,
G4double , G4double , G4double& )
{
G4double x = DBL_MAX;
x=.1*mm;
//G4cout<<x<<std::endl;
DefineMaterial(track.GetMaterialCutsCouple());
preStepKinEnergy = track.GetKineticEnergy();
G4double maxE=1.2*preStepKinEnergy;
G4double r = theDirectEnergyLossProcess->GetRange(preStepKinEnergy, currentCouple);
G4double r1 = theDirectEnergyLossProcess->GetRange(maxE, currentCouple);
x=std::max(r1-r,.1);
return x;
}
#endif
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4InversePEEffect.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4AdjointPEEffect.hh
// Module: G4InversePEEffect.hh
// Author: L. Desorgher
// Date: 25 October 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -44,10 +47,10 @@
#ifndef G4InversePEEffect_h
#define G4InversePEEffect_h 1
#include "G4VAdjointInverseScattering.hh"
#include "G4VAdjointReverseReaction.hh"
#include "globals.hh"
class G4AdjointPhotoElectricModel;
class G4InversePEEffect: public G4VAdjointInverseScattering
class G4InversePEEffect: public G4VAdjointReverseReaction
{
public:
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4IonInverseIonisation.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4IonInverseIonisation
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 25 August 2009 creation by L. Desorgher
//
//-------------------------------------------------------------
// Documentation:
// Adjoint/reverse discrete ionisation for ions
//
#ifndef G4IonInverseIonisation_h
#define G4IonInverseIonisation_h 1
#include "G4VAdjointReverseReaction.hh"
#include "globals.hh"
#include "G4eIonisation.hh"
#include "G4AdjointIonIonisationModel.hh"
class G4IonInverseIonisation: public G4VAdjointReverseReaction
{
public:
G4IonInverseIonisation(G4bool whichScatCase, G4String process_name, G4AdjointIonIonisationModel* aEmAdjointModel);
~G4IonInverseIonisation();
private:
};
#endif
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VAdjointReverseReaction.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4VAdjointInverseScattering.hh
// Module: G4VAdjointReverseReaction
// Author: L. Desorgher
// Date: 1st April 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -38,11 +41,11 @@
//
//-------------------------------------------------------------
// Documentation:
// Abastract class for adjoint/reverse discrete scattering
// Abstract class for adjoint/reverse discrete scattering
//
#ifndef G4VAdjointInverseScattering_h
#define G4VAdjointInverseScattering_h 1
#ifndef G4VAdjointReverseReaction_h
#define G4VAdjointReverseReaction_h 1
#include "globals.hh"
#include "G4DynamicParticle.hh"
@@ -69,14 +72,14 @@ class G4Material;
class G4MaterialCutsCouple;
class G4VAdjointInverseScattering : public G4VDiscreteProcess
class G4VAdjointReverseReaction : public G4VDiscreteProcess
{
public:
G4VAdjointInverseScattering(G4String process_name,G4bool whichScatCase);
G4VAdjointReverseReaction(G4String process_name,G4bool whichScatCase);
virtual ~G4VAdjointInverseScattering();
virtual ~G4VAdjointReverseReaction();
public:
void PreparePhysicsTable(const G4ParticleDefinition&);
@@ -84,6 +87,7 @@ public:
void BuildPhysicsTable(const G4ParticleDefinition&);
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
inline void SetIntegralMode(G4bool aBool){IsIntegralModeUsed = aBool;}
protected :// with description
@@ -95,6 +99,8 @@ protected:
G4VEmAdjointModel* theAdjointEMModel;
G4ParticleChange* fParticleChange;
G4AdjointCSManager* theAdjointCSManager;
G4bool IsScatProjToProjCase;
private:
@@ -103,8 +109,15 @@ private:
size_t currentMaterialIndex;
G4double currentTcut;
G4double lastCS;
std::vector<double> CS_Vs_Element;
G4bool IsScatProjToProjCase;
std::vector<G4double> CS_Vs_Element;
G4bool IsFwdCSUsed;
//For integral mode
//------------------
G4bool IsIntegralModeUsed;
@@ -23,24 +23,29 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEmAdjointModel.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4VEMAdjointModel.hh
// Module: G4VEMAdjointModel
// Author: L. Desorgher
// Date: 1st April 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 1st April 2007 creation by L. Desorgher
// 10 September 2009 Move to a virtual class. L. Desorgher
// 1st April 2007 creation by L. Desorgher
//
//-------------------------------------------------------------
// Documentation:
// Base class for Adjoint model
// Base class for Adjoint EM model. It is based on the use of direct G4VEmModel.
//
#ifndef G4VEmAdjointModel_h
#define G4VEmAdjointModel_h 1
@@ -68,28 +73,28 @@ class G4AdjointCSMatrix;
class G4VEmAdjointModel
{
public:
public: // public methods
G4VEmAdjointModel(const G4String& nam);
virtual ~G4VEmAdjointModel();
//------------------------------------------------------------------------
// Virtual methods to be implemented for the concrete model
// Virtual methods to be implemented for the sample secondaries concrete model
//------------------------------------------------------------------------
//virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) = 0;
//virtual void Initialise()=0;
virtual void SampleSecondaries(const G4Track& aTrack,
G4bool IsScatProjToProjCase,
G4ParticleChange* fParticleChange);
G4ParticleChange* fParticleChange)=0;
//------------------------------------------------------------------------
// Methods for adjoint processes; may be overwritten if needed;
//------------------------------------------------------------------------
virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
G4double primEnergy,
G4bool IsScatProjToProjCase);
@@ -120,45 +125,8 @@ public:
G4double kinEnergyScatProj // kinetic energy of the primary particle after the interaction
);
G4double DiffCrossSectionFunction1(G4double kinEnergyProj);
G4double DiffCrossSectionMoller(G4double kinEnergyProj,G4double kinEnergyProd);
G4double DiffCrossSectionFunction2(G4double kinEnergyProj);
std::vector< std::vector< G4double >* > ComputeAdjointCrossSectionVectorPerAtomForSecond(
G4double kinEnergyProd,
G4double Z,
G4double A = 0.,
G4int nbin_pro_decade=10
);
std::vector< std::vector< G4double >* > ComputeAdjointCrossSectionVectorPerAtomForScatProj(
G4double kinEnergyProd,
G4double Z,
G4double A = 0.,
G4int nbin_pro_decade=10
);
std::vector< std::vector< G4double >* > ComputeAdjointCrossSectionVectorPerVolumeForSecond(
G4Material* aMaterial,
G4double kinEnergyProd,
G4int nbin_pro_decade=10
);
std::vector< std::vector< G4double >* > ComputeAdjointCrossSectionVectorPerVolumeForScatProj(
G4Material* aMaterial,
G4double kinEnergyProd,
G4int nbin_pro_decade=10
);
virtual G4double SampleAdjSecEnergyFromCSMatrix(size_t MatrixIndex,G4double prim_energy,G4bool IsScatProjToProjCase);
virtual G4double SampleAdjSecEnergyFromDiffCrossSectionPerAtom(G4double prim_energy,G4bool IsScatProjToProjCase);
void CorrectPostStepWeight(G4ParticleChange* fParticleChange, G4double old_weight, G4double adjointPrimKinEnergy, G4double projectileKinEnergy);
//Set/Get methods
//Energy limits of adjoint secondary
//------------------
virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
@@ -166,14 +134,39 @@ public:
virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy);
virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
virtual void SetCSBiasingFactor(G4double aVal) {CS_biasing_factor = aVal;}
//Other Methods
//---------------
void DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
std::vector< std::vector< double>* > ComputeAdjointCrossSectionVectorPerAtomForSecond(
G4double kinEnergyProd,
G4double Z,
G4double A = 0.,
G4int nbin_pro_decade=10
);
std::vector< std::vector< double>* > ComputeAdjointCrossSectionVectorPerAtomForScatProj(
G4double kinEnergyProd,
G4double Z,
G4double A = 0.,
G4int nbin_pro_decade=10
);
std::vector< std::vector< double>* > ComputeAdjointCrossSectionVectorPerVolumeForSecond(
G4Material* aMaterial,
G4double kinEnergyProd,
G4int nbin_pro_decade=10
);
std::vector< std::vector< double>* > ComputeAdjointCrossSectionVectorPerVolumeForScatProj(
G4Material* aMaterial,
G4double kinEnergyProd,
G4int nbin_pro_decade=10
);
public:
inline void SetCSMatrices(std::vector< G4AdjointCSMatrix* >* Vec1CSMatrix, std::vector< G4AdjointCSMatrix* >* Vec2CSMatrix){
pOnCSMatrixForProdToProjBackwardScattering = Vec1CSMatrix;
@@ -190,25 +183,13 @@ public:
inline G4double GetLowEnergyLimit(){return LowEnergyLimit;}
inline void SetHighEnergyLimit(G4double aVal){HighEnergyLimit=aVal;}
void SetHighEnergyLimit(G4double aVal);
inline void SetLowEnergyLimit(G4double aVal){LowEnergyLimit=aVal;}
void SetLowEnergyLimit(G4double aVal);
inline void SetCorrectWeightMode(G4bool aBool){CorrectWeightMode=aBool;};
inline void SetApplyBiasing(G4bool aBool){ApplyBiasing=aBool;};
inline void DefineDirectEMModel(G4VEmModel* aModel){theDirectEMModel = aModel;}
inline void SetAdjointEquivalentOfDirectPrimaryParticleDefinition(G4ParticleDefinition* aPart){
theAdjEquivOfDirectPrimPartDef=aPart;
if (theAdjEquivOfDirectPrimPartDef->GetParticleName() =="adj_e-")
theDirectPrimaryPartDef=G4Electron::Electron();
if (theAdjEquivOfDirectPrimPartDef->GetParticleName() =="adj_gamma")
theDirectPrimaryPartDef=G4Gamma::Gamma();
}
void SetAdjointEquivalentOfDirectPrimaryParticleDefinition(G4ParticleDefinition* aPart);
inline void SetAdjointEquivalentOfDirectSecondaryParticleDefinition(G4ParticleDefinition* aPart){
theAdjEquivOfDirectSecondPartDef =aPart;
@@ -216,7 +197,7 @@ public:
inline void SetSecondPartOfSameType(G4bool aBool){second_part_of_same_type =aBool;}
bool GetSecondPartOfSameType(){return second_part_of_same_type;}
inline G4bool GetSecondPartOfSameType(){return second_part_of_same_type;}
inline void SetUseMatrix(G4bool aBool) { UseMatrix = aBool;}
@@ -224,34 +205,56 @@ public:
inline void SetUseOnlyOneMatrixForAllElements(G4bool aBool){ UseOnlyOneMatrixForAllElements = aBool;}
inline void SetApplyCutInRange(G4bool aBool){ ApplyCutInRange = aBool;}
inline void SetIsIonisation(G4bool aBool){ IsIonisation = aBool;}
inline G4bool GetUseMatrix() {return UseMatrix;}
inline G4bool GetUseMatrixPerElement(){ return UseMatrixPerElement;}
inline G4bool GetUseOnlyOneMatrixForAllElements(){ return UseOnlyOneMatrixForAllElements;}
inline G4bool GetApplyCutInRange(){ return ApplyCutInRange;}
void DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
inline G4String GetName(){ return name;}
inline G4String GetName(){ return name;}
inline virtual void SetCSBiasingFactor(G4double aVal) {CS_biasing_factor = aVal;}
protected:
private: //Methods
//Some of them can be overriden by daughter classes
G4double DiffCrossSectionFunction1(G4double kinEnergyProj);
G4double DiffCrossSectionFunction2(G4double kinEnergyProj);
G4double DiffCrossSectionPerVolumeFunctionForIntegrationOverEkinProj(G4double EkinProd);
//General methods to sample secondary energy
//--------------------------------------
G4double SampleAdjSecEnergyFromCSMatrix(size_t MatrixIndex,G4double prim_energy,G4bool IsScatProjToProjCase);
G4double SampleAdjSecEnergyFromCSMatrix(G4double prim_energy,G4bool IsScatProjToProjCase);
void SelectCSMatrix(G4bool IsScatProjToProjCase);
virtual G4double SampleAdjSecEnergyFromDiffCrossSectionPerAtom(G4double prim_energy,G4bool IsScatProjToProjCase);
protected:
//Post Step weight correction
//----------------------------
virtual void CorrectPostStepWeight(G4ParticleChange* fParticleChange,
G4double old_weight,
G4double adjointPrimKinEnergy,
G4double projectileKinEnergy,
G4bool IsScatProjToProjCase);
protected: //attributes
G4VEmModel* theDirectEMModel;
G4VParticleChange* pParticleChange;
protected:
// hide assignment operator
G4VEmAdjointModel & operator=(const G4VEmAdjointModel &right);
G4VEmAdjointModel(const G4VEmAdjointModel&);
//Name
//-----
@@ -265,6 +268,7 @@ protected:
G4Material* SelectedMaterial;
G4double kinEnergyProdForIntegration;
G4double kinEnergyScatProjForIntegration;
G4double kinEnergyProjForIntegration;
//for the adjoint simulation we need for each element or material:
@@ -273,10 +277,15 @@ protected:
std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForProdToProjBackwardScattering;
std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForScatProjToProjBackwardScattering;
std::vector<double> CS_Vs_ElementForScatProjToProjCase;
std::vector<double> CS_Vs_ElementForProdToProjCase;
std::vector<G4double> CS_Vs_ElementForScatProjToProjCase;
std::vector<G4double> CS_Vs_ElementForProdToProjCase;
G4double lastCS;
G4double lastAdjointCSForScatProjToProjCase;
G4double lastAdjointCSForProdToProjCase;
//particle definition
//------------------
@@ -286,6 +295,11 @@ protected:
G4ParticleDefinition* theDirectPrimaryPartDef;
G4bool second_part_of_same_type;
//Prestep energy
//-------------
G4double preStepEnergy;
//Current couple material
//----------------------
G4Material* currentMaterial;
@@ -297,15 +311,7 @@ protected:
G4bool ApplyCutInRange;
//CorrectWeightMode
//------------------
bool CorrectWeightMode;
//Apply biasing
//------------
bool ApplyBiasing;
@@ -316,6 +322,7 @@ protected:
G4double HighEnergyLimit;
G4double LowEnergyLimit;
//Cross Section biasing factor
@@ -325,10 +332,17 @@ protected:
//Type of Model with Matrix or not
//--------------------------------
bool UseMatrix;
bool UseMatrixPerElement; //other possibility is per Material
bool UseOnlyOneMatrixForAllElements;
bool IsIonisation;
G4bool UseMatrix;
G4bool UseMatrixPerElement; //other possibility is per Material
G4bool UseOnlyOneMatrixForAllElements;
//Index of Cross section matrices to be used
//------------
size_t indexOfUsedCrossSectionMatrix;
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eInverseBremsstrahlung.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4eInverseBremstrahlung.hh
// Author: L. Desorgher
// Date: 25 October 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -45,11 +48,11 @@
#ifndef G4eInverseBremsstrahlung_h
#define G4eInverseBremsstrahlung_h 1
#include "G4VAdjointInverseScattering.hh"
#include "G4VAdjointReverseReaction.hh"
#include "globals.hh"
#include "G4eIonisation.hh"
class G4AdjointBremsstrahlungModel;
class G4eInverseBremsstrahlung: public G4VAdjointInverseScattering
class G4eInverseBremsstrahlung: public G4VAdjointReverseReaction
{
public:
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eInverseCompton.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4eInverseCompton.hh
// Author: L. Desorgher
// Date: 25 October 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -45,11 +48,11 @@
#ifndef G4eInverseCompton_h
#define G4eInverseCompton_h 1
#include "G4VAdjointInverseScattering.hh"
#include "G4VAdjointReverseReaction.hh"
#include "globals.hh"
#include "G4eIonisation.hh"
class G4AdjointComptonModel;
class G4eInverseCompton: public G4VAdjointInverseScattering
class G4eInverseCompton: public G4VAdjointReverseReaction
{
public:
@@ -23,11 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eInverseIonisation.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4eInverseIonisation.hh
// Author: L. Desorgher
// Date: 15 April 2007
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
@@ -38,17 +41,17 @@
//
//-------------------------------------------------------------
// Documentation:
// Adjoint/revrese discrete ionisation
// Adjoint/reverse discrete ionisation
//
#ifndef G4eInverseIonisation_h
#define G4eInverseIonisation_h 1
#include "G4VAdjointInverseScattering.hh"
#include "G4VAdjointReverseReaction.hh"
#include "globals.hh"
#include "G4eIonisation.hh"
#include "G4VEmAdjointModel.hh"
class G4eInverseIonisation: public G4VAdjointInverseScattering
class G4eInverseIonisation: public G4VAdjointReverseReaction
{
public:
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hInverseIonisation.hh,v 1.2 2009/11/20 10:31:20 ldesorgh Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
/////////////////////////////////////////////////////////////////////////////////
// Module: G4hInverseIonisation.hh
// Author: L. Desorgher
// Organisation: SpaceIT GmbH
// Contract: ESA contract 21435/08/NL/AT
// Customer: ESA/ESTEC
/////////////////////////////////////////////////////////////////////////////////
//
// CHANGE HISTORY
// --------------
// ChangeHistory:
// 15 February 2009 creation by L. Desorgher
//
//-------------------------------------------------------------
// Documentation:
// Adjoint/reverse discrete ionisation for proton
//
#ifndef G4hInverseIonisation_h
#define G4hInverseIonisation_h 1
#include "G4VAdjointReverseReaction.hh"
#include "globals.hh"
#include "G4eIonisation.hh"
#include "G4AdjointhIonisationModel.hh"
class G4hInverseIonisation: public G4VAdjointReverseReaction
{
public:
G4hInverseIonisation(G4bool whichScatCase, G4String process_name, G4AdjointhIonisationModel* aEmAdjointModel);
~G4hInverseIonisation();
private:
};
#endif