Ignore:
Timestamp:
Nov 25, 2009, 5:13:58 PM (15 years ago)
Author:
garnier
Message:

update CVS release candidate geant4.9.3.01

Location:
trunk/source/processes/electromagnetic/adjoint/include
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/adjoint/include/G4AdjointAlongStepWeightCorrection.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4AdjointAlongStepWeightCorrection.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointAlongStepWeightCorrection.hh
     30//      Class:          G4AdjointAlongStepWeightCorrection
    2831//      Author:         L. Desorgher
    29 //      Date:           10 May 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3538// --------------
    3639//      ChangeHistory:
    37 //              10 May 2007 creation by L. Desorgher           
     40//              10 May 2007 creation by L. Desorgher 
     41//              October 2009 implementation of the mode where the total adjoint and forward cross sections are equivalent. L. Desorgher         
    3842//
    3943//-------------------------------------------------------------
    4044//      Documentation:
    4145//              Continuous processes acting on adjoint particles to correct continuously their weight during the adjoint reverse tracking.
     46//              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.
     47//              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
     48//              correction factor is 1.
     49//              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
     50//              weight correction is neede and is given by exp(-(Sigma_tot_adj-Sigma_tot_fwd).dx)
     51//             
     52//
    4253//
    4354
     
    120131    currentMaterial = couple->GetMaterial();
    121132    currentMaterialIndex = couple->GetIndex();
    122     //G4cout<<"Define Material"<<std::endl;
    123     //if(!meanFreePath) ResetNumberOfInteractionLengthLeft();
     133 
    124134  }
    125135}
    126136
    127137
    128 ///////////////////////////////////////////////////////
    129 //
    130 inline G4double G4AdjointAlongStepWeightCorrection::GetContinuousStepLimit(const G4Track& track,
    131                 G4double , G4double , G4double& )
    132 {
    133   G4double x = DBL_MAX;
    134   DefineMaterial(track.GetMaterialCutsCouple());
    135   preStepKinEnergy = track.GetKineticEnergy();
    136   return x;
    137 }
     138
    138139#endif
  • trunk/source/processes/electromagnetic/adjoint/include/G4AdjointBremsstrahlungModel.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4AdjointBremsstrahlungModel.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointBremsstrahlungModel.hh
     30//      Class:          G4AdjointBremsstrahlungModel
    2831//      Author:         L. Desorgher
    29 //      Date:           15 June 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3538// --------------
    3639//      ChangeHistory:
    37 //              15 June 2007 creation by L. Desorgher. Adapted from G4eBremsstrahlungModel             
     40//              15 June 2007 creation by L. Desorgher. Adapted from G4eBremsstrahlungModel 
     41//              20-10-2009 Remove all the screening effect that are not considered in the direct models blow 10 GeV. L.Desorgher
     42//              4-11-2009  Implement the use of a simple biased differential cross section (C(Z)/Egamma) allowing a rapid computation of adjoint CS
     43//                         and rapid sampling of adjoint secondaries. By this way cross section matrices are not used anymore, avoiding a rather
     44//                         time consuming computation of adjoint brem cross section matrices for each material at initialisation. This mode is switch on/off
     45//                         by selecting SetUseMatrix(false)/ SetUseMatrix(true) in the constructor. L.Desorgher
     46//                                     
    3847//
    3948//-------------------------------------------------------------
     
    4958#include "G4VEmAdjointModel.hh"
    5059#include "G4eBremsstrahlungModel.hh"
     60//#include "G4PenelopeBremsstrahlungModel.hh"
     61#include "G4PhysicsTable.hh"
     62//#include "G4EmModelManager.hh"
    5163class G4Timer;
    5264class G4AdjointBremsstrahlungModel: public G4VEmAdjointModel
     
    6072                                G4bool IsScatProjToProjCase,
    6173                                G4ParticleChange* fParticleChange);
    62  
     74  void RapidSampleSecondaries(const G4Track& aTrack,
     75                                G4bool IsScatProjToProjCase,
     76                                G4ParticleChange* fParticleChange);
    6377  virtual G4double DiffCrossSectionPerVolumePrimToSecond(
    6478                                      const G4Material* aMaterial,
     
    6680                                      G4double kinEnergyProd // kinetic energy of the secondary particle
    6781                                      );
    68   G4double DiffCrossSectionPerVolumePrimToSecond1(
     82  G4double DiffCrossSectionPerVolumePrimToSecondApproximated1(
    6983                                      const G4Material* aMaterial,
    7084                                      G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction
    7185                                      G4double kinEnergyProd // kinetic energy of the secondary particle
    7286                                      );
    73   G4double DiffCrossSectionPerVolumePrimToSecond2(
     87  G4double DiffCrossSectionPerVolumePrimToSecondApproximated2(
    7488                                      const G4Material* aMaterial,
    7589                                      G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction
    7690                                      G4double kinEnergyProd // kinetic energy of the secondary particle
    7791                                      );
    78   G4double DiffCrossSectionPerVolumePrimToSecond3(
    79                                       const G4Material* aMaterial,
    80                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction
    81                                       G4double kinEnergyProd // kinetic energy of the secondary particle
    82                                       );                                     
    83   void DefineDirectBremModel(G4eBremsstrahlungModel* aModel);
    84   inline void SetdCSModel(G4String aString) {ModeldCS=aString;}
    85                                      
     92  virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
     93                                             G4double primEnergy,
     94                                             G4bool IsScatProjToProjCase);
    8695 
    87 private:
    88  
    89   void InitialiseParameters();
    90   G4double SupressionFunction(const G4Material* material, G4double tkin,
    91                                     G4double gammaEnergy);
    92                                    
     96 
     97 // private void InitialiseFwdModels();
     98
    9399
    94100private: 
    95   G4eBremsstrahlungModel* theDirectBremModel;
     101   G4eBremsstrahlungModel* theDirectStdBremModel;
     102  //G4PenelopeBremsstrahlungModel* theDirectPenelopeBremModel;
     103
    96104
    97105  G4double highKinEnergy;
    98106  G4double lowKinEnergy;
    99   G4double probsup;
    100   G4double MigdalConstant;
    101   G4double LPMconstant;
    102   G4double highEnergyTh;
    103   G4bool   theLPMflag;
    104   G4bool   isElectron;
     107 
    105108 
    106   //Vector
     109  std::vector<G4DataVector*> partialSumSigma;
    107110 
    108   std::vector<float> FZ;
    109   std::vector<float> ah1;
    110   std::vector<float> ah2;
    111   std::vector<float> ah3;
    112  
    113   std::vector<float> bh1;
    114   std::vector<float> bh2;
    115   std::vector<float> bh3;
    116  
    117   std::vector<float> al0;
    118   std::vector<float> al1;
    119   std::vector<float> al2;
    120  
    121   std::vector<float> bl0;
    122   std::vector<float> bl1;
    123   std::vector<float> bl2;
     111 
    124112 
    125113  std::vector<float> SigmaPerAtom;
    126114  G4Timer* theTimer;
    127115 
    128   G4String ModeldCS;
     116  G4double MigdalConstant;
     117  G4double lastCZ;
     118 
     119
     120 /*
     121  G4bool UsePenelopeModel;
     122  G4EmModelManager* theEmModelManagerForFwdModels;
     123  G4bool isPenelopeModelInitialised ;
     124 */
    129125 
    130126 
    131127};
    132128
     129
    133130#endif
  • trunk/source/processes/electromagnetic/adjoint/include/G4AdjointCSManager.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4AdjointCSManager.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointCSManager.hh
     30//      Class:          G4AdjointCSManager
    2831//      Author:         L. Desorgher
    29 //      Date:           1st April 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3639//      ChangeHistory:
    3740//              1st April 2007 creation by L. Desorgher                 
     41//             
     42//              September-October 2009. Implementation of the mode where the adjoint cross sections are scaled such that the total used adjoint cross sections is in
     43//              most of the cases equal to the total forward cross section. L.Desorgher
    3844//
    3945//-------------------------------------------------------------
    4046//      Documentation:
    4147//              Is responsible for the management of all adjoint cross sections matrices, and for the computation of the total forward and adjoint cross sections.
    42 //              Total adjoint and forward cross sections are needed to correct continuously the weight of a particle after a tracking step.
     48//              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.
    4349//              It is also used to sample an adjoint secondary from a given adjoint cross section matrix.
    4450//
     
    8288        void RegisterAdjointParticle(G4ParticleDefinition* aPartDef);
    8389       
    84         //Building of thr CS Matrices and Total Forward and Adjoint LambdaTables
     90        //Building of the CS Matrices and Total Forward and Adjoint LambdaTables
    8591        //----------------------------------------------------------------------
    8692       
     
    8995       
    9096       
    91         //Get TotalCrossSections form Total Lambda Tables
     97        //Get TotalCrossSections form Total Lambda Tables, Needed for Weight correction and scaling of the
    9298        //-------------------------------------------------
    9399        G4double GetTotalAdjointCS(G4ParticleDefinition* aPartDef, G4double Ekin,
    94100                                     const G4MaterialCutsCouple* aCouple);
    95101        G4double GetTotalForwardCS(G4ParticleDefinition* aPartDef, G4double Ekin,
    96                                      const G4MaterialCutsCouple* aCouple);                           
    97        
     102                                     const G4MaterialCutsCouple* aCouple);
     103       
     104       
     105        void GetEminForTotalCS(G4ParticleDefinition* aPartDef,
     106                                     const G4MaterialCutsCouple* aCouple, G4double& emin_adj, G4double& emin_fwd);
     107        void GetMaxFwdTotalCS(G4ParticleDefinition* aPartDef,
     108                                     const G4MaterialCutsCouple* aCouple, G4double& e_sigma_max, G4double& sigma_max);
     109        void GetMaxAdjTotalCS(G4ParticleDefinition* aPartDef,
     110                                     const G4MaterialCutsCouple* aCouple, G4double& e_sigma_max, G4double& sigma_max);
     111                                     
     112                                                                                     
     113       
     114        //CrossSection Correction  1 or FwdCS/AdjCS following the G4boolean value of forward_CS_is_used and forward_CS_mode
     115        //-------------------------------------------------
     116        G4double GetCrossSectionCorrection(G4ParticleDefinition* aPartDef,G4double PreStepEkin,const G4MaterialCutsCouple* aCouple, G4bool& fwd_is_used, G4double& fwd_TotCS);
     117       
     118       
     119        //Cross section mode
     120        //------------------
     121        inline void SetFwdCrossSectionMode(G4bool aBool){forward_CS_mode=aBool;}
    98122       
    99123       
     
    103127        G4double GetContinuousWeightCorrection(G4ParticleDefinition* aPartDef, G4double PreStepEkin,G4double AfterStepEkin,
    104128                                     const G4MaterialCutsCouple* aCouple, G4double step_length);
    105         G4double GetPostStepWeightCorrection(G4ParticleDefinition* aPrimPartDef, G4ParticleDefinition* aSecondPartDef,
    106                                             G4double EkinPrim,G4double EkinSecond,
    107                                      const G4MaterialCutsCouple* aCouple);
     129        G4double GetPostStepWeightCorrection();
    108130                                     
    109131       
    110         double ComputeAdjointCS(G4Material* aMaterial,
     132       
     133       
     134        //Method Called by the adjoint model to get there CS, if not precised otherwise
     135        //-------------------------------
     136       
     137        G4double ComputeAdjointCS(G4Material* aMaterial,
    111138                                            G4VEmAdjointModel* aModel,
    112139                                            G4double PrimEnergy,
    113140                                            G4double Tcut,
    114141                                            G4bool IsScatProjToProjCase,
    115                                             std::vector<double>&
     142                                            std::vector<G4double>&
    116143                                                 AdjointCS_for_each_element);
    117144                                         
    118        
     145        //Method Called by the adjoint model to sample the secondary energy form the CS matrix
     146        //--------------------------------------------------------------------------------
    119147        G4Element*  SampleElementFromCSMatrices(G4Material* aMaterial,
    120148                                                       G4VEmAdjointModel* aModel,
     
    122150                                                        G4double Tcut,
    123151                                                       G4bool IsScatProjToProjCase);
    124         G4double ComputeTotalAdjointCS(const G4MaterialCutsCouple* aMatCutCouple,G4ParticleDefinition* aPart,G4double PrimEnergy);                                                     
     152                                                       
     153                                                       
     154        //Total Adjoint CS  is computed at initialisation phase
     155        //-----------------------------------------------------                                       
     156        G4double ComputeTotalAdjointCS(const G4MaterialCutsCouple* aMatCutCouple,G4ParticleDefinition* aPart,G4double PrimEnergy);
     157       
     158       
     159       
     160                                                               
    125161        G4ParticleDefinition* GetAdjointParticleEquivalent(G4ParticleDefinition* theFwdPartDef);
    126162        G4ParticleDefinition* GetForwardParticleEquivalent(G4ParticleDefinition* theAdjPartDef);
     
    130166        inline void SetTmax(G4double aVal){Tmax=aVal;}
    131167        inline void SetNbins(G4int aInt){nbins=aInt;}
    132        
    133        
    134        
    135         //inline
    136         inline void ConsiderContinuousWeightCorrection(G4bool aBool){consider_continuous_weight_correction=aBool;}
    137         inline void ConsiderPoststepWeightCorrection(G4bool aBool){consider_poststep_weight_correction=aBool;}
    138        
    139        
     168        inline void SetIon(G4ParticleDefinition* adjIon,
     169                           G4ParticleDefinition* fwdIon) {theAdjIon=adjIon; theFwdIon =fwdIon;}
    140170       
    141171       
     
    163193        std::vector< size_t> listOfIndexOfAdjointEMModelInAction;
    164194        std::vector< G4bool> listOfIsScatProjToProjCase;
    165         std::vector< std::vector<double> > lastAdjointCSVsModelsAndElements;
     195        std::vector< std::vector<G4double> > lastAdjointCSVsModelsAndElements;
    166196        G4bool CrossSectionMatrixesAreBuilt;
     197        size_t  currentParticleIndex;
     198        G4ParticleDefinition* currentParticleDef;
    167199       
    168200        //total adjoint and total forward cross section table in function of material and in function of adjoint particle type
     
    170202        std::vector<G4PhysicsTable*>        theTotalForwardSigmaTableVector;
    171203        std::vector<G4PhysicsTable*>        theTotalAdjointSigmaTableVector;
     204        std::vector< std::vector<G4double> >    EminForFwdSigmaTables; 
     205        std::vector< std::vector<G4double> >    EminForAdjSigmaTables; 
     206        std::vector< std::vector<G4double> >    EkinofFwdSigmaMax;     
     207        std::vector< std::vector<G4double> >    EkinofAdjSigmaMax;
     208       
     209       
     210       
    172211         
    173212        //list of forward G4VEMLossProcess and of G4VEMProcess for the different adjoint particle
     
    177216       
    178217        //list of adjoint particles considered
    179        
     218        //--------------------------------------------------------------
    180219        std::vector< G4ParticleDefinition*> theListOfAdjointParticlesInAction;
    181220       
     
    191230        size_t  currentMatIndex;
    192231       
    193         int verbose;
    194        
    195        
    196         //Weight correction
    197         //------------------
    198         G4bool consider_continuous_weight_correction;
    199         G4bool consider_poststep_weight_correction;
     232        G4int verbose;
     233       
     234       
     235       
     236       
     237        //Two CS mode are possible :forward_CS_mode = false the Adjoint CS are used as it is implying a AlongStep Weight Correction.
     238        //                         :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.
     239        //                                           For energy range  where the total FwdCS or the total adjoint CS are null, the scaling is not possble and
     240        //                                           forward_CS_is_used is set to false         
     241        //--------------------------------------------
     242        G4bool forward_CS_is_used;
     243        G4bool forward_CS_mode;
     244       
     245        //Adj and Fwd CS values for re-use
     246        //------------------------
     247       
     248        G4double PreadjCS,PostadjCS;
     249        G4double PrefwdCS,PostfwdCS;
     250        G4double LastEkinForCS;
     251        G4double LastCSCorrectionFactor;
     252        G4ParticleDefinition* lastPartDefForCS;
     253       
     254        //Ion
     255        //----------------
     256        G4ParticleDefinition* theAdjIon; //at the moment Only one ion can be considered by simulation
     257        G4ParticleDefinition* theFwdIon;
     258        G4double massRatio;
     259       
     260       
     261       
    200262
    201263  private:
    202264        G4AdjointCSManager(); 
    203265        void DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
    204         double ComputeAdjointCS(G4double aPrimEnergy, G4AdjointCSMatrix* anAdjointCSMatrix, G4double Tcut);
     266        void DefineCurrentParticle(const G4ParticleDefinition* aPartDef);
     267        G4double ComputeAdjointCS(G4double aPrimEnergy, G4AdjointCSMatrix* anAdjointCSMatrix, G4double Tcut);
    205268
    206269};
  • trunk/source/processes/electromagnetic/adjoint/include/G4AdjointCSMatrix.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4AdjointCSMatrix.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointCSMatrix.hh
     30//      Class:          G4AdjointCSMatrix.hh
    2831//      Author:         L. Desorgher
    29 //      Date:           1st April 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    6568        ~G4AdjointCSMatrix();
    6669
    67         ////////////
    68         // Methods
    69         ////////////
     70        //////////////
     71        // Methods  //
     72        //////////////
    7073        void Clear();
    71         void AddData(G4double aPrimEnergy,G4double aCS, std::vector< G4double>* aLogSecondEnergyVector,
    72                                                         std::vector< G4double>* aLogProbVector,size_t n_pro_decade=0); 
     74        void AddData(G4double aPrimEnergy,G4double aCS, std::vector< double>* aLogSecondEnergyVector,
     75                                                        std::vector< double>* aLogProbVector,size_t n_pro_decade=0);   
    7376       
    74         bool GetData(unsigned int i, G4double& aPrimEnergy,G4double& aCS,G4double& log0, std::vector< G4double>*& aLogSecondEnergyVector,
    75                                                                       std::vector< G4double>*& aLogProbVector,
     77        G4bool GetData(unsigned int i, G4double& aPrimEnergy,G4double& aCS,G4double& log0, std::vector< double>*& aLogSecondEnergyVector,
     78                                                                      std::vector< double>*& aLogProbVector,
    7679                                                                      std::vector< size_t>*& aLogProbVectorIndex);
    7780       
    78         inline std::vector< G4double >* GetLogPrimEnergyVector(){return &theLogPrimEnergyVector;}
    79         inline std::vector< G4double >* GetLogCrossSectionvector(){return &theLogCrossSectionVector;}
     81        inline std::vector< double>* GetLogPrimEnergyVector(){return &theLogPrimEnergyVector;}
     82        inline std::vector< double>* GetLogCrossSectionvector(){return &theLogCrossSectionVector;}
    8083        inline G4double GetDlog(){return dlog;}         
    8184        inline G4bool IsScatProjToProjCase(){return is_scat_proj_to_proj_case;}
     
    8790        // we did first try to use G4PhysicsOrderedVector but they are not general enough for our purpose
    8891       
    89         std::vector< G4double > theLogPrimEnergyVector;
    90         std::vector< G4double > theLogCrossSectionVector; //Adjoint Cross sections in function of primary energy
    91         std::vector< std::vector< G4double >* > theLogSecondEnergyMatrix;
    92         std::vector< std::vector< G4double >* > theLogProbMatrix; //Each column represents the integrated probability of getting a secondary
     92        std::vector< double> theLogPrimEnergyVector;
     93        std::vector< double> theLogCrossSectionVector; //Adjoint Cross sections in function of primary energy
     94        std::vector< std::vector< double>* > theLogSecondEnergyMatrix;
     95        std::vector< std::vector< double>* > theLogProbMatrix; //Each column represents the integrated probability of getting a secondary
    9396                                                                      // in function of their energy
    94         std::vector< std::vector< size_t >* > theLogProbMatrixIndex; //index of euqidistant LogProb
    95         std::vector< G4double > log0Vector;
     97        std::vector< std::vector< size_t >* > theLogProbMatrixIndex; //index of equidistant LogProb
     98        std::vector< double> log0Vector;
    9699       
    97100        unsigned int nb_of_PrimEnergy;
  • trunk/source/processes/electromagnetic/adjoint/include/G4AdjointComptonModel.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4AdjointComptonModel.hh,v 1.5 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointComptonModel.hh
     30//      Class:          G4AdjointComptonModel
    2831//      Author:         L. Desorgher
    29 //      Date:           1 September 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3538// --------------
    3639//      ChangeHistory:
    37 //              1 September 2007 creation by L. Desorgher               
     40//              1 September 2007 creation by L. Desorgher
     41//              11 November 2009 Implement the use of approximated diffCS as an alternative of CSMatrix.               
    3842//
    3943//-------------------------------------------------------------
    4044//      Documentation:
    41 //              Model for the adjoint compton scattering
     45//              Model for the adjoint compton scattering.
    4246//
    4347
     
    4852#include "globals.hh"
    4953#include "G4VEmAdjointModel.hh"
     54#include "G4VEmProcess.hh"
    5055class G4AdjointComptonModel: public G4VEmAdjointModel
    5156
     
    5863 
    5964  virtual void SampleSecondaries(const G4Track& aTrack,
     65                                G4bool IsScatProjToProjCase,
     66                                G4ParticleChange* fParticleChange);
     67  void RapidSampleSecondaries(const G4Track& aTrack,
    6068                                G4bool IsScatProjToProjCase,
    6169                                G4ParticleChange* fParticleChange);
     
    7179                                      G4double Z,
    7280                                      G4double A = 0.);
     81 
    7382  virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
    7483  virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
    75 
     84 
     85 
     86  virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
     87                                             G4double primEnergy,
     88                                             G4bool IsScatProjToProjCase);
    7689
    7790 
    7891 
    79                              
     92  inline void SetDirectProcess(G4VEmProcess* aProcess){theDirectEMProcess = aProcess;};                       
    8093 
    8194private:
     95  G4VEmProcess* theDirectEMProcess;
     96  G4double G4direct_CS;
    8297 
    8398   
  • trunk/source/processes/electromagnetic/adjoint/include/G4AdjointInterpolator.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4AdjointInterpolator.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointInterpolator.hh
     30//      Module:         G4AdjointInterpolator
    2831//      Author:         L. Desorgher
    29 //      Date:           1st April 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    7780       
    7881       
    79         size_t FindPosition(G4double& x,std::vector<double>& x_vec,size_t ind_min=0, size_t ind_max=0);
     82        size_t FindPosition(G4double& x,std::vector<G4double>& x_vec,size_t ind_min=0, size_t ind_max=0);
    8083       
    81         size_t FindPositionForLogVector(G4double& x,std::vector<double>& x_vec);
     84        size_t FindPositionForLogVector(G4double& x,std::vector<G4double>& x_vec);
    8285       
    83         G4double Interpolate(G4double& x,std::vector<double>& x_vec,std::vector<double>& y_vec,G4String InterPolMethod="Log"); //xvec should monotically increase                       
     86        G4double Interpolate(G4double& x,std::vector<G4double>& x_vec,std::vector<G4double>& y_vec,G4String InterPolMethod="Log"); //xvec should monotically increase                   
    8487       
    85         G4double InterpolateWithIndexVector(G4double& x,std::vector<double>& x_vec,std::vector<double>& y_vec,
     88        G4double InterpolateWithIndexVector(G4double& x,std::vector<G4double>& x_vec,std::vector<G4double>& y_vec,
    8689                                            std::vector<size_t>& index_vec, G4double x0,G4double dx); //xvec should monotically increase                       
    8790       
    8891       
    89         G4double InterpolateForLogVector(G4double& x,std::vector<double>& x_vec,std::vector<double>& y_vec);
     92        G4double InterpolateForLogVector(G4double& x,std::vector<G4double>& x_vec,std::vector<G4double>& y_vec);
    9093   
    9194   private:
  • trunk/source/processes/electromagnetic/adjoint/include/G4AdjointPhotoElectricModel.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4AdjointPhotoElectricModel.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointPhotoElectricModel.hh
     30//      Module:         G4AdjointPhotoElectricModel
    2831//      Author:         L. Desorgher
    29 //      Date:           10 October 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3538// --------------
    3639//      ChangeHistory:
    37 //              1 September 2007 creation by L. Desorgher               
     40//              -1 September 2007 creation by L. Desorgher 
     41//             
     42//              -January 2009. L. Desorgher     
     43//               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
     44//               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
     45//               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
     46//               and compensating it by an extra weight correction factor. However when  coupling it with other reverse  processes the reverse photo-electric is still
     47//               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
     48//               to find as it happens in rarea case but does give a weighrt that is outside the noemal distribution. (Very Tricky!) 
     49//             
     50//              -October 2009   Correction of Element sampling. L. Desorgher           
    3851//
    3952//-------------------------------------------------------------
     
    6174                                G4bool IsScatProjToProjCase,
    6275                                G4ParticleChange* fParticleChange);
    63  
    6476  virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
    6577                                G4double primEnergy,
     
    7385                                                       DefineDirectEMModel(aModel);}                                 
    7486 
     87  virtual void CorrectPostStepWeight(G4ParticleChange* fParticleChange,
     88                                     G4double old_weight,
     89                                     G4double adjointPrimKinEnergy,
     90                                     G4double projectileKinEnergy,
     91                                     G4bool IsScatProjToProjCase);
    7592 
    7693 
     
    7895  G4double  xsec[40];
    7996  G4double  totAdjointCS;
     97  G4double  totBiasedAdjointCS;
     98  G4double  factorCSBiasing;
     99  G4double  pre_step_AdjointCS;
     100  G4double  post_step_AdjointCS;
     101 
     102 
    80103  G4double  shell_prob[40][40];
    81104 
  • trunk/source/processes/electromagnetic/adjoint/include/G4ContinuousGainOfEnergy.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4ContinuousGainOfEnergy.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4ContinuousGainOfEnergy.hh
     30//      Class:          G4ContinuousGainOfEnergy
    2831//      Author:         L. Desorgher
    29 //      Date:           10 May 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3538// --------------
    3639//      ChangeHistory:
    37 //              10 May 2007 creation by L. Desorgher           
     40//              -10 May 2007 creation by L. Desorgher 
     41//              -February-March 2009 Update for protons by L.Desorgher
     42//              -July August 2009  Update for ion by L.Desorgher
    3843//
    3944//-------------------------------------------------------------
    4045//      Documentation:
    41 //              Continuous process acting on adjoint particles to compute the continuous gain of energy of charged particels whern they are tracked back!
     46//              Continuous process acting on adjoint particles to compute the continuous gain of energy of charged particles when they are tracked back!
     47//             
    4248//
    4349#ifndef G4ContinuousGainOfEnergy_h
     
    5258#include "G4ParticleChange.hh"
    5359#include "G4VEnergyLossProcess.hh"
     60#include "G4ProductionCutsTable.hh"
    5461
    5562
     
    106113  inline void SetDirectEnergyLossProcess(G4VEnergyLossProcess* aProcess){theDirectEnergyLossProcess=aProcess;}; 
    107114 
    108   inline void SetDirectParticle(G4ParticleDefinition* p){theDirectPartDef=p;};
     115  void SetDirectParticle(G4ParticleDefinition* p);
    109116
    110117protected:
     
    116123
    117124  void DefineMaterial(const G4MaterialCutsCouple* couple);
     125  void SetDynamicMassCharge(const G4Track& track, G4double energy);
     126 
    118127 
    119128  // hide  assignment operator
     
    128137  const G4MaterialCutsCouple* currentCouple;
    129138  size_t   currentMaterialIndex;
     139  size_t   currentCoupleIndex;
    130140  G4double currentTcut;
     141  G4double currentCutInRange;
    131142  G4double preStepKinEnergy;
     143 
    132144 
    133145 
     
    142154  G4bool is_integral;
    143155 
     156  //adding for Ions
     157  //----------------
     158  G4bool IsIon;
     159  G4double massRatio;
     160  G4double chargeSqRatio;
     161  G4VEmModel* currentModel;
     162  G4double preStepChargeSqRatio;
     163  G4double preStepScaledKinEnergy;
     164
     165 
     166 
     167 
    144168 
    145169};
     
    153177    currentCouple   = couple;
    154178    currentMaterial = couple->GetMaterial();
    155     currentMaterialIndex = couple->GetIndex();
    156     currentTcut = couple->GetProductionCuts()->GetProductionCut(theDirectPartDef->GetParticleName());
    157     //G4cout<<"Define Material"<<std::endl;
     179    currentCoupleIndex = couple->GetIndex();
     180    currentMaterialIndex = currentMaterial->GetIndex();
     181   
     182    size_t idx=1;
     183    const std::vector<G4double>* aVec = G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(idx);
     184    currentTcut=(*aVec)[currentCoupleIndex];
     185    currentCutInRange = couple->GetProductionCuts()->GetProductionCut(theDirectPartDef->GetParticleName());
     186    //G4cout<<"Define Material"<<G4endl;
    158187    //if(!meanFreePath) ResetNumberOfInteractionLengthLeft();
    159188  }
    160189}
    161 ///////////////////////////////////////////////////////
    162 //
    163 inline G4double G4ContinuousGainOfEnergy::GetContinuousStepLimit(const G4Track& track,
    164                 G4double , G4double , G4double& )
    165 {
    166   G4double x = DBL_MAX;
    167   x=.1*mm;
    168  
    169   //G4cout<<x<<std::endl;
    170   DefineMaterial(track.GetMaterialCutsCouple());
    171   preStepKinEnergy = track.GetKineticEnergy();
    172   G4double maxE=1.2*preStepKinEnergy;
    173   G4double r = theDirectEnergyLossProcess->GetRange(preStepKinEnergy, currentCouple);
    174   G4double r1 = theDirectEnergyLossProcess->GetRange(maxE, currentCouple);
    175   x=std::max(r1-r,.1);
    176  
    177   return x;
    178  
    179  
    180 }
     190
    181191#endif
  • trunk/source/processes/electromagnetic/adjoint/include/G4InversePEEffect.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4InversePEEffect.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4AdjointPEEffect.hh
     30//      Module:         G4InversePEEffect.hh
    2831//      Author:         L. Desorgher
    29 //      Date:           25 October 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    4548#define G4InversePEEffect_h 1
    4649
    47 #include "G4VAdjointInverseScattering.hh"
     50#include "G4VAdjointReverseReaction.hh"
    4851#include "globals.hh"
    4952class G4AdjointPhotoElectricModel;
    50 class G4InversePEEffect: public G4VAdjointInverseScattering
     53class G4InversePEEffect: public G4VAdjointReverseReaction
    5154
    5255{
  • trunk/source/processes/electromagnetic/adjoint/include/G4VEmAdjointModel.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4VEmAdjointModel.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    27 //      Module:         G4VEMAdjointModel.hh
     30//      Module:         G4VEMAdjointModel
    2831//      Author:         L. Desorgher
    29 //      Date:           1st April 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3538// --------------
    3639//      ChangeHistory:
    37 //              1st April 2007 creation by L. Desorgher                 
     40//              10 September 2009 Move to a virtual class. L. Desorgher
     41//              1st April 2007 creation by L. Desorgher                 
    3842//
    3943//-------------------------------------------------------------
    4044//      Documentation:
    41 //              Base class for Adjoint model
    42 //
     45//              Base class for Adjoint EM model. It is based on the use of direct G4VEmModel.
     46//
     47
    4348
    4449#ifndef G4VEmAdjointModel_h
     
    6974{
    7075
    71 public:
     76public: // public methods
    7277
    7378  G4VEmAdjointModel(const G4String& nam);
     
    7681
    7782  //------------------------------------------------------------------------
    78   // Virtual methods to be implemented for the concrete model
     83  // Virtual methods to be implemented for the sample secondaries concrete model
    7984  //------------------------------------------------------------------------
    80 
    81   //virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) = 0;
    82 
    83 
     85 
     86  //virtual void Initialise()=0;
     87 
    8488  virtual void SampleSecondaries(const G4Track& aTrack,
    8589                                G4bool IsScatProjToProjCase,
    86                                 G4ParticleChange* fParticleChange);
    87  
     90                                G4ParticleChange* fParticleChange)=0;
    8891 
    8992
     
    9194  // Methods for adjoint processes; may be overwritten if needed; 
    9295  //------------------------------------------------------------------------
     96 
     97
    9398  virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
    9499                                             G4double primEnergy,
     
    121126                                      );
    122127 
    123                                      
    124  
    125  
    126   G4double DiffCrossSectionFunction1(G4double kinEnergyProj);
    127   G4double DiffCrossSectionMoller(G4double kinEnergyProj,G4double kinEnergyProd);
    128  
    129   G4double DiffCrossSectionFunction2(G4double kinEnergyProj);
    130  
    131   std::vector< std::vector< G4double >* >  ComputeAdjointCrossSectionVectorPerAtomForSecond(     
     128 
     129  //Energy limits of adjoint secondary
     130  //------------------
     131 
     132  virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
     133  virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy,G4double Tcut=0);
     134  virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy);
     135  virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
     136 
     137 
     138 
     139  //Other Methods
     140  //---------------
     141 
     142  void  DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
     143 
     144 
     145  std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerAtomForSecond(     
    132146                                G4double kinEnergyProd,
    133147                                G4double Z,
     
    135149                                G4int nbin_pro_decade=10
    136150                                );
    137   std::vector< std::vector< G4double >* >  ComputeAdjointCrossSectionVectorPerAtomForScatProj(     
     151  std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerAtomForScatProj(     
    138152                                G4double kinEnergyProd,
    139153                                G4double Z,
     
    142156                                );
    143157 
    144   std::vector< std::vector< G4double >* >  ComputeAdjointCrossSectionVectorPerVolumeForSecond(     
     158  std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerVolumeForSecond(     
    145159                                G4Material* aMaterial,
    146160                                G4double kinEnergyProd,
    147161                                G4int nbin_pro_decade=10
    148162                                );
    149   std::vector< std::vector< G4double >* >  ComputeAdjointCrossSectionVectorPerVolumeForScatProj(     
     163  std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerVolumeForScatProj(     
    150164                                G4Material* aMaterial,
    151165                                G4double kinEnergyProd,
    152166                                G4int nbin_pro_decade=10
    153167                                );
    154                                
    155  
    156                                                        
    157   virtual G4double SampleAdjSecEnergyFromCSMatrix(size_t MatrixIndex,G4double prim_energy,G4bool IsScatProjToProjCase);     
    158   virtual G4double SampleAdjSecEnergyFromDiffCrossSectionPerAtom(G4double prim_energy,G4bool IsScatProjToProjCase);     
    159   void CorrectPostStepWeight(G4ParticleChange* fParticleChange, G4double old_weight, G4double adjointPrimKinEnergy, G4double projectileKinEnergy);     
    160  
    161   //Set/Get methods
    162   //------------------
    163  
    164   virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
    165   virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy,G4double Tcut=0);
    166   virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy);
    167   virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
    168  
    169   virtual void SetCSBiasingFactor(G4double aVal) {CS_biasing_factor = aVal;}
    170  
    171  
    172  
    173  
    174  
    175  
    176 public: 
     168 
     169
    177170 
    178171  inline void SetCSMatrices(std::vector< G4AdjointCSMatrix* >* Vec1CSMatrix, std::vector< G4AdjointCSMatrix* >* Vec2CSMatrix){
     
    191184  inline G4double GetLowEnergyLimit(){return LowEnergyLimit;}
    192185 
    193   inline void SetHighEnergyLimit(G4double aVal){HighEnergyLimit=aVal;}
    194  
    195   inline void SetLowEnergyLimit(G4double aVal){LowEnergyLimit=aVal;}
    196  
    197   inline void SetCorrectWeightMode(G4bool aBool){CorrectWeightMode=aBool;};
    198  
    199   inline void SetApplyBiasing(G4bool aBool){ApplyBiasing=aBool;};
    200  
    201                              
     186  void SetHighEnergyLimit(G4double aVal);
     187 
     188  void SetLowEnergyLimit(G4double aVal);
     189 
    202190  inline void DefineDirectEMModel(G4VEmModel* aModel){theDirectEMModel = aModel;}
    203191 
    204   inline void SetAdjointEquivalentOfDirectPrimaryParticleDefinition(G4ParticleDefinition* aPart){
    205         theAdjEquivOfDirectPrimPartDef=aPart;
    206         if (theAdjEquivOfDirectPrimPartDef->GetParticleName() =="adj_e-")
    207                                         theDirectPrimaryPartDef=G4Electron::Electron();
    208         if (theAdjEquivOfDirectPrimPartDef->GetParticleName() =="adj_gamma")
    209                                         theDirectPrimaryPartDef=G4Gamma::Gamma();
    210  
    211   }
     192  void SetAdjointEquivalentOfDirectPrimaryParticleDefinition(G4ParticleDefinition* aPart);
    212193 
    213194  inline void SetAdjointEquivalentOfDirectSecondaryParticleDefinition(G4ParticleDefinition* aPart){
     
    217198  inline void SetSecondPartOfSameType(G4bool aBool){second_part_of_same_type =aBool;}
    218199 
    219   bool GetSecondPartOfSameType(){return second_part_of_same_type;}
     200  inline G4bool GetSecondPartOfSameType(){return second_part_of_same_type;}
    220201 
    221202  inline void SetUseMatrix(G4bool aBool) { UseMatrix = aBool;}
     
    225206 
    226207  inline void SetApplyCutInRange(G4bool aBool){ ApplyCutInRange = aBool;}
    227   inline void SetIsIonisation(G4bool aBool){ IsIonisation = aBool;}
    228  
    229208  inline G4bool GetUseMatrix() {return UseMatrix;}
    230209  inline G4bool GetUseMatrixPerElement(){ return UseMatrixPerElement;}
    231210  inline G4bool GetUseOnlyOneMatrixForAllElements(){ return UseOnlyOneMatrixForAllElements;}
    232211  inline G4bool GetApplyCutInRange(){ return ApplyCutInRange;}
    233   void  DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
    234  
    235   inline G4String GetName(){ return name;}
    236 
    237 private: //Methods
    238  
    239  
    240  
    241                                    
    242 protected:
     212 
     213  inline G4String GetName(){ return name;}
     214  inline virtual void SetCSBiasingFactor(G4double aVal) {CS_biasing_factor = aVal;}
     215                                     
     216protected:
     217
     218  //Some of them can be overriden by daughter classes
     219 
     220 
     221  G4double DiffCrossSectionFunction1(G4double kinEnergyProj);
     222  G4double DiffCrossSectionFunction2(G4double kinEnergyProj);
     223  G4double DiffCrossSectionPerVolumeFunctionForIntegrationOverEkinProj(G4double EkinProd);
     224 
     225 
     226                               
     227  //General methods to sample secondary energy
     228  //--------------------------------------
     229  G4double SampleAdjSecEnergyFromCSMatrix(size_t MatrixIndex,G4double prim_energy,G4bool IsScatProjToProjCase);
     230  G4double SampleAdjSecEnergyFromCSMatrix(G4double prim_energy,G4bool IsScatProjToProjCase);
     231  void     SelectCSMatrix(G4bool IsScatProjToProjCase);                       
     232 
     233  virtual G4double SampleAdjSecEnergyFromDiffCrossSectionPerAtom(G4double prim_energy,G4bool IsScatProjToProjCase);
     234 
     235 
     236 
     237  //Post  Step weight correction
     238  //----------------------------
     239  virtual void CorrectPostStepWeight(G4ParticleChange* fParticleChange,
     240                                     G4double old_weight,
     241                                     G4double adjointPrimKinEnergy,
     242                                     G4double projectileKinEnergy,
     243                                     G4bool IsScatProjToProjCase);     
     244 
     245 
     246 
     247 
     248 
     249 
     250protected: //attributes
    243251 
    244252  G4VEmModel* theDirectEMModel;
     
    246254 
    247255
    248 protected:
    249 
    250   //  hide assignment operator
    251   G4VEmAdjointModel & operator=(const  G4VEmAdjointModel &right);
    252   G4VEmAdjointModel(const  G4VEmAdjointModel&);
    253  
    254  
     256
     257 
    255258  //Name
    256259  //-----
     
    266269  G4double kinEnergyProdForIntegration;
    267270  G4double kinEnergyScatProjForIntegration;
     271  G4double kinEnergyProjForIntegration;
    268272 
    269273 
     
    274278  std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForProdToProjBackwardScattering;
    275279  std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForScatProjToProjBackwardScattering;
    276   std::vector<double> CS_Vs_ElementForScatProjToProjCase;
    277   std::vector<double> CS_Vs_ElementForProdToProjCase;
     280  std::vector<G4double> CS_Vs_ElementForScatProjToProjCase;
     281  std::vector<G4double> CS_Vs_ElementForProdToProjCase;
    278282 
    279283  G4double lastCS;
     284  G4double lastAdjointCSForScatProjToProjCase;
     285  G4double lastAdjointCSForProdToProjCase;
     286 
     287 
     288 
    280289 
    281290  //particle definition
     
    286295  G4ParticleDefinition* theDirectPrimaryPartDef;
    287296  G4bool second_part_of_same_type;
     297 
     298 
     299  //Prestep energy
     300  //-------------
     301  G4double preStepEnergy;
    288302 
    289303  //Current couple material
     
    298312 
    299313 
    300   //CorrectWeightMode
    301   //------------------
    302  
    303   bool CorrectWeightMode;
    304  
    305   //Apply biasing
    306   //------------
    307  
    308   bool ApplyBiasing;
     314 
    309315 
    310316 
     
    317323  G4double HighEnergyLimit;
    318324  G4double LowEnergyLimit;
     325
    319326 
    320327 
     
    326333  //Type of Model with Matrix or not
    327334  //--------------------------------
    328    bool UseMatrix;
    329    bool UseMatrixPerElement; //other possibility is per Material
    330    bool UseOnlyOneMatrixForAllElements;
    331    bool IsIonisation;
     335   G4bool UseMatrix;
     336   G4bool UseMatrixPerElement; //other possibility is per Material
     337   G4bool UseOnlyOneMatrixForAllElements;
     338 
     339 
     340   //Index of Cross section matrices to be used
     341   //------------
     342   size_t indexOfUsedCrossSectionMatrix;
     343   
     344   
     345   
    332346   
    333347   
  • trunk/source/processes/electromagnetic/adjoint/include/G4eInverseBremsstrahlung.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4eInverseBremsstrahlung.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    2730//      Module:         G4eInverseBremstrahlung.hh
    2831//      Author:         L. Desorgher
    29 //      Date:           25 October 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    4649#define G4eInverseBremsstrahlung_h 1
    4750
    48 #include "G4VAdjointInverseScattering.hh"
     51#include "G4VAdjointReverseReaction.hh"
    4952#include "globals.hh"
    5053#include "G4eIonisation.hh"
    5154class G4AdjointBremsstrahlungModel;
    52 class G4eInverseBremsstrahlung: public G4VAdjointInverseScattering
     55class G4eInverseBremsstrahlung: public G4VAdjointReverseReaction
    5356
    5457{
  • trunk/source/processes/electromagnetic/adjoint/include/G4eInverseCompton.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4eInverseCompton.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    2730//      Module:         G4eInverseCompton.hh
    2831//      Author:         L. Desorgher
    29 //      Date:           25 October 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    4649#define G4eInverseCompton_h 1
    4750
    48 #include "G4VAdjointInverseScattering.hh"
     51#include "G4VAdjointReverseReaction.hh"
    4952#include "globals.hh"
    5053#include "G4eIonisation.hh"
    5154class G4AdjointComptonModel;
    52 class G4eInverseCompton: public G4VAdjointInverseScattering
     55class G4eInverseCompton: public G4VAdjointReverseReaction
    5356
    5457{
  • trunk/source/processes/electromagnetic/adjoint/include/G4eInverseIonisation.hh

    r966 r1196  
    2424// ********************************************************************
    2525//
     26// $Id: G4eInverseIonisation.hh,v 1.4 2009/11/20 10:31:20 ldesorgh Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
     28//
    2629/////////////////////////////////////////////////////////////////////////////////
    2730//      Module:         G4eInverseIonisation.hh
    2831//      Author:         L. Desorgher
    29 //      Date:           15 April 2007
    3032//      Organisation:   SpaceIT GmbH
     33//      Contract:       ESA contract 21435/08/NL/AT
    3134//      Customer:       ESA/ESTEC
    3235/////////////////////////////////////////////////////////////////////////////////
     
    3942//-------------------------------------------------------------
    4043//      Documentation:
    41 //              Adjoint/revrese discrete ionisation
     44//              Adjoint/reverse discrete ionisation
    4245//
    4346
     
    4548#define G4eInverseIonisation_h 1
    4649
    47 #include "G4VAdjointInverseScattering.hh"
     50#include "G4VAdjointReverseReaction.hh"
    4851#include "globals.hh"
    4952#include "G4eIonisation.hh"
    5053#include "G4VEmAdjointModel.hh"
    51 class G4eInverseIonisation: public G4VAdjointInverseScattering
     54class G4eInverseIonisation: public G4VAdjointReverseReaction
    5255
    5356{
Note: See TracChangeset for help on using the changeset viewer.