Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/adjoint/include/G4VEmAdjointModel.hh

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/adjoint/include/G4VEmAdjointModel.hh (Version 11.3.0) and /processes/electromagnetic/adjoint/include/G4VEmAdjointModel.hh (Version 10.7.p4)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 ////////////////////////////////////////////// << 
 27 //  Class:  G4VEMAdjointModel                  << 
 28 //  Author:         L. Desorgher               << 
 29 //  Organisation:   SpaceIT GmbH               << 
 30 //                                                 26 //
 31 //  Base class for Adjoint EM model. It is bas <<  27 /////////////////////////////////////////////////////////////////////////////////
 32 //  G4VEmModel.                                <<  28 //      Module:   G4VEMAdjointModel
 33 ////////////////////////////////////////////// <<  29 //  Author:         L. Desorgher
                                                   >>  30 //  Organisation:   SpaceIT GmbH
                                                   >>  31 //  Contract: ESA contract 21435/08/NL/AT
                                                   >>  32 //  Customer:       ESA/ESTEC
                                                   >>  33 /////////////////////////////////////////////////////////////////////////////////
                                                   >>  34 //
                                                   >>  35 // CHANGE HISTORY
                                                   >>  36 // --------------
                                                   >>  37 //      ChangeHistory: 
                                                   >>  38 //    10 September 2009 Move to a virtual class. L. Desorgher
                                                   >>  39 //    1st April 2007 creation by L. Desorgher     
                                                   >>  40 //
                                                   >>  41 //-------------------------------------------------------------
                                                   >>  42 //  Documentation:
                                                   >>  43 //    Base class for Adjoint EM model. It is based on the use of direct G4VEmModel.
                                                   >>  44 //
                                                   >>  45 
 34                                                    46 
 35 #ifndef G4VEmAdjointModel_h                        47 #ifndef G4VEmAdjointModel_h
 36 #define G4VEmAdjointModel_h 1                      48 #define G4VEmAdjointModel_h 1
 37                                                    49 
 38 #include "globals.hh"                              50 #include "globals.hh"
                                                   >>  51 #include "G4DynamicParticle.hh"
                                                   >>  52 #include "G4ParticleDefinition.hh"
                                                   >>  53 #include "G4MaterialCutsCouple.hh"
                                                   >>  54 #include "G4Material.hh"
                                                   >>  55 #include "G4Element.hh"
                                                   >>  56 #include "G4ElementVector.hh"
                                                   >>  57 #include "Randomize.hh"
 39 #include "G4ParticleDefinition.hh"                 58 #include "G4ParticleDefinition.hh"
 40 #include "G4VEmModel.hh"                           59 #include "G4VEmModel.hh"
                                                   >>  60 #include "G4Electron.hh"
                                                   >>  61 #include "G4Gamma.hh"
                                                   >>  62 #include "G4ProductionCutsTable.hh"
 41                                                    63 
 42 class G4AdjointCSMatrix;                       <<  64 class G4PhysicsTable;
 43 class G4AdjointCSManager;                      << 
 44 class G4Material;                              << 
 45 class G4MaterialCutsCouple;                    << 
 46 class G4ParticleChange;                        << 
 47 class G4Region;                                    65 class G4Region;
                                                   >>  66 class G4VParticleChange;
                                                   >>  67 class G4ParticleChange;
 48 class G4Track;                                     68 class G4Track;
                                                   >>  69 class G4AdjointCSMatrix;
 49                                                    70 
 50 class G4VEmAdjointModel                            71 class G4VEmAdjointModel
 51 {                                                  72 {
 52  public:                                       <<  73 
 53   explicit G4VEmAdjointModel(const G4String& n <<  74 public: // public methods
                                                   >>  75 
                                                   >>  76   G4VEmAdjointModel(const G4String& nam);
 54                                                    77 
 55   virtual ~G4VEmAdjointModel();                    78   virtual ~G4VEmAdjointModel();
 56                                                    79 
 57   //------------------------------------------     80   //------------------------------------------------------------------------
 58   // Virtual methods to be implemented for the     81   // Virtual methods to be implemented for the sample secondaries concrete model
 59   //------------------------------------------     82   //------------------------------------------------------------------------
 60                                                <<  83   
 61   virtual void SampleSecondaries(const G4Track <<  84   //virtual void Initialise()=0;
 62                                  G4ParticleCha <<  85   
                                                   >>  86   virtual void SampleSecondaries(const G4Track& aTrack,
                                                   >>  87                                 G4bool IsScatProjToProjCase,
                                                   >>  88         G4ParticleChange* fParticleChange)=0;
                                                   >>  89  
 63                                                    90 
 64   //------------------------------------------     91   //------------------------------------------------------------------------
 65   // Methods for adjoint processes             <<  92   // Methods for adjoint processes; may be overwritten if needed;  
 66   //------------------------------------------     93   //------------------------------------------------------------------------
                                                   >>  94   
 67                                                    95 
 68   virtual G4double AdjointCrossSection(const G     96   virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
 69                                        G4doubl <<  97                      G4double primEnergy,
 70                                        G4bool  <<  98                      G4bool IsScatProjToProjCase);
 71                                                <<  99   
 72   // The implementation of the DiffCrossSectio << 100   virtual G4double GetAdjointCrossSection(const G4MaterialCutsCouple* aCouple,
 73   // energy loss process. For the photoelectri << 101                      G4double primEnergy,
 74   // the method should be redefined            << 102                      G4bool IsScatProjToProjCase);
                                                   >> 103           
 75   virtual G4double DiffCrossSectionPerAtomPrim    104   virtual G4double DiffCrossSectionPerAtomPrimToSecond(
 76     G4double kinEnergyProj,  // kin energy of  << 105                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 77     G4double kinEnergyProd,  // kinetic energy << 106                                       G4double kinEnergyProd, // kinetic energy of the secondary particle 
 78     G4double Z, G4double A = 0.);              << 107               G4double Z, 
 79                                                << 108                                       G4double A = 0.);
 80   virtual G4double DiffCrossSectionPerAtomPrim << 109               
 81     G4double kinEnergyProj,      // kin energy << 110   virtual G4double DiffCrossSectionPerAtomPrimToScatPrim( 
 82     G4double kinEnergyScatProj,  // kin energy << 111                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 83     G4double Z, G4double A = 0.);              << 112                                       G4double kinEnergyScatProj, // kinetic energy of the primary particle after the interaction 
 84                                                << 113               G4double Z, 
                                                   >> 114                                       G4double A = 0.);
                                                   >> 115   
                                                   >> 116  
                                                   >> 117   
 85   virtual G4double DiffCrossSectionPerVolumePr    118   virtual G4double DiffCrossSectionPerVolumePrimToSecond(
 86     const G4Material* aMaterial,               << 119                 const G4Material* aMaterial,
 87     G4double kinEnergyProj,  // kin energy of  << 120                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 88     G4double kinEnergyProd   // kinetic energy << 121                                       G4double kinEnergyProd // kinetic energy of the secondary particle 
 89   );                                           << 122               );
 90                                                << 123               
 91   virtual G4double DiffCrossSectionPerVolumePr    124   virtual G4double DiffCrossSectionPerVolumePrimToScatPrim(
 92     const G4Material* aMaterial,               << 125                 const G4Material* aMaterial, 
 93     G4double kinEnergyProj,     // kin energy  << 126                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 94     G4double kinEnergyScatProj  // kinetic ene << 127                                       G4double kinEnergyScatProj // kinetic energy of the primary particle after the interaction 
 95   );                                           << 128               );
 96                                                << 129   
 97   // Energy limits of adjoint secondary        << 130   
                                                   >> 131   //Energy limits of adjoint secondary
 98   //------------------                            132   //------------------
 99                                                << 133   
100   virtual G4double GetSecondAdjEnergyMaxForSca << 134   virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
101     G4double primAdjEnergy);                   << 135   virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy,G4double Tcut=0);
102                                                << 136   virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy);
103   virtual G4double GetSecondAdjEnergyMinForSca << 137   virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
104     G4double primAdjEnergy, G4double tcut = 0. << 138   
105                                                << 139   
106   virtual G4double GetSecondAdjEnergyMaxForPro << 140   
107                                                << 141   //Other Methods
108   virtual G4double GetSecondAdjEnergyMinForPro << 
109                                                << 
110   // Other Methods                             << 
111   //---------------                               142   //---------------
112                                                << 143   
113   void DefineCurrentMaterial(const G4MaterialC << 144   void  DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
114                                                << 145   
115   std::vector<std::vector<double>*>            << 146   
116   ComputeAdjointCrossSectionVectorPerAtomForSe << 147   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerAtomForSecond(      
117                                                << 148         G4double kinEnergyProd,
118                                                << 149         G4double Z, 
119                                                << 150                                 G4double A = 0.,
120   std::vector<std::vector<double>*>            << 151         G4int nbin_pro_decade=10
121   ComputeAdjointCrossSectionVectorPerAtomForSc << 152         );
122     G4double kinEnergyProd, G4double Z, G4doub << 153   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerAtomForScatProj(      
123     G4int nbin_pro_decade = 10);               << 154         G4double kinEnergyProd,
124                                                << 155         G4double Z, 
125   std::vector<std::vector<double>*>            << 156                                 G4double A = 0.,
126   ComputeAdjointCrossSectionVectorPerVolumeFor << 157         G4int nbin_pro_decade=10
127     G4Material* aMaterial, G4double kinEnergyP << 158         );
128                                                << 159   
129   std::vector<std::vector<double>*>            << 160   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerVolumeForSecond(      
130   ComputeAdjointCrossSectionVectorPerVolumeFor << 161         G4Material* aMaterial,
131     G4Material* aMaterial, G4double kinEnergyP << 162         G4double kinEnergyProd,
132                                                << 163         G4int nbin_pro_decade=10
133   inline void SetCSMatrices(std::vector<G4Adjo << 164         );
134                             std::vector<G4Adjo << 165   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerVolumeForScatProj(      
135   {                                            << 166         G4Material* aMaterial,
136     fCSMatrixProdToProjBackScat = Vec1CSMatrix << 167         G4double kinEnergyProd,
137     fCSMatrixProjToProjBackScat = Vec2CSMatrix << 168         G4int nbin_pro_decade=10
                                                   >> 169         );
                                                   >> 170   
                                                   >> 171 
                                                   >> 172   
                                                   >> 173   inline void SetCSMatrices(std::vector< G4AdjointCSMatrix* >* Vec1CSMatrix, std::vector< G4AdjointCSMatrix* >* Vec2CSMatrix){
                                                   >> 174            pOnCSMatrixForProdToProjBackwardScattering = Vec1CSMatrix;
                                                   >> 175          pOnCSMatrixForScatProjToProjBackwardScattering = Vec2CSMatrix;
                                                   >> 176          
                                                   >> 177     
138   };                                              178   };
139                                                << 179   
140   inline G4ParticleDefinition*                 << 180   inline G4ParticleDefinition* GetAdjointEquivalentOfDirectPrimaryParticleDefinition(){return theAdjEquivOfDirectPrimPartDef;}
141   GetAdjointEquivalentOfDirectPrimaryParticleD << 181   
142   {                                            << 182   inline G4ParticleDefinition* GetAdjointEquivalentOfDirectSecondaryParticleDefinition(){return theAdjEquivOfDirectSecondPartDef;}  
143     return fAdjEquivDirectPrimPart;            << 183   
144   }                                            << 184   inline G4double GetHighEnergyLimit(){return HighEnergyLimit;}
145                                                << 185   
146   inline G4ParticleDefinition*                 << 186   inline G4double GetLowEnergyLimit(){return LowEnergyLimit;}
147   GetAdjointEquivalentOfDirectSecondaryParticl << 187   
148   {                                            << 
149     return fAdjEquivDirectSecondPart;          << 
150   }                                            << 
151                                                << 
152   inline G4double GetHighEnergyLimit() const { << 
153                                                << 
154   inline G4double GetLowEnergyLimit() const {  << 
155                                                << 
156   void SetHighEnergyLimit(G4double aVal);         188   void SetHighEnergyLimit(G4double aVal);
157                                                << 189   
158   void SetLowEnergyLimit(G4double aVal);          190   void SetLowEnergyLimit(G4double aVal);
159                                                << 191   
160   inline void DefineDirectEMModel(G4VEmModel*  << 192   inline void DefineDirectEMModel(G4VEmModel* aModel){theDirectEMModel = aModel;}
161                                                << 193   
162   void SetAdjointEquivalentOfDirectPrimaryPart << 194   void SetAdjointEquivalentOfDirectPrimaryParticleDefinition(G4ParticleDefinition* aPart);
163     G4ParticleDefinition* aPart);              << 195   
164                                                << 196   inline void SetAdjointEquivalentOfDirectSecondaryParticleDefinition(G4ParticleDefinition* aPart){
165   inline void SetAdjointEquivalentOfDirectSeco << 197     theAdjEquivOfDirectSecondPartDef =aPart;
166     G4ParticleDefinition* aPart)               << 
167   {                                            << 
168     fAdjEquivDirectSecondPart = aPart;         << 
169   }                                            << 
170                                                << 
171   inline void SetSecondPartOfSameType(G4bool a << 
172   {                                            << 
173     fSecondPartSameType = aBool;               << 
174   }                                            << 
175                                                << 
176   inline G4bool GetSecondPartOfSameType() cons << 
177                                                << 
178   inline void SetUseMatrix(G4bool aBool) { fUs << 
179                                                << 
180   inline void SetUseMatrixPerElement(G4bool aB << 
181   {                                            << 
182     fUseMatrixPerElement = aBool;              << 
183   }                                            << 
184                                                << 
185   inline void SetUseOnlyOneMatrixForAllElement << 
186   {                                            << 
187     fOneMatrixForAllElements = aBool;          << 
188   }                                               198   }
189                                                << 199   
190   inline void SetApplyCutInRange(G4bool aBool) << 200   inline void SetSecondPartOfSameType(G4bool aBool){second_part_of_same_type =aBool;}
191                                                << 201   
192   inline G4bool GetUseMatrix() const { return  << 202   inline G4bool GetSecondPartOfSameType(){return second_part_of_same_type;}
193                                                << 203   
194   inline G4bool GetUseMatrixPerElement() const << 204   inline void SetUseMatrix(G4bool aBool) { UseMatrix = aBool;}
195                                                << 205   
196   inline G4bool GetUseOnlyOneMatrixForAllEleme << 206   inline void SetUseMatrixPerElement(G4bool aBool){ UseMatrixPerElement = aBool;}
197   {                                            << 207   inline void SetUseOnlyOneMatrixForAllElements(G4bool aBool){ UseOnlyOneMatrixForAllElements = aBool;}
198     return fOneMatrixForAllElements;           << 208   
199   }                                            << 209   inline void SetApplyCutInRange(G4bool aBool){ ApplyCutInRange = aBool;} 
200                                                << 210   inline G4bool GetUseMatrix() {return UseMatrix;}
201   inline G4bool GetApplyCutInRange() const { r << 211   inline G4bool GetUseMatrixPerElement(){ return UseMatrixPerElement;} 
202                                                << 212   inline G4bool GetUseOnlyOneMatrixForAllElements(){ return UseOnlyOneMatrixForAllElements;} 
203   inline const G4String& GetName() const { ret << 213   inline G4bool GetApplyCutInRange(){ return ApplyCutInRange;} 
204                                                << 214   
205   inline virtual void SetCSBiasingFactor(G4dou << 215   inline G4String GetName(){ return name;}
206   {                                            << 216   inline virtual void SetCSBiasingFactor(G4double aVal) {CS_biasing_factor = aVal;} 
207     fCsBiasingFactor = aVal;                   << 217 
208   }                                            << 218   inline void SetCorrectWeightForPostStepInModel(G4bool aBool) {correct_weight_for_post_step_in_model = aBool;}
209                                                << 219   inline void SetAdditionalWeightCorrectionFactorForPostStepOutsideModel(G4double factor) {additional_weight_correction_factor_for_post_step_outside_model = factor;}
210   inline void SetCorrectWeightForPostStepInMod << 220 
211   {                                            << 221 protected: 
212     fInModelWeightCorr = aBool;                << 222 
213   }                                            << 223   //Some of them can be overriden by daughter classes
214                                                << 224   
215   inline void SetAdditionalWeightCorrectionFac << 225   
216     G4double factor)                           << 
217   {                                            << 
218     fOutsideWeightFactor = factor;             << 
219   }                                            << 
220                                                << 
221   G4VEmAdjointModel(G4VEmAdjointModel&) = dele << 
222   G4VEmAdjointModel& operator=(const G4VEmAdjo << 
223                                                << 
224  protected:                                    << 
225   G4double DiffCrossSectionFunction1(G4double     226   G4double DiffCrossSectionFunction1(G4double kinEnergyProj);
226                                                << 
227   G4double DiffCrossSectionFunction2(G4double     227   G4double DiffCrossSectionFunction2(G4double kinEnergyProj);
                                                   >> 228   G4double DiffCrossSectionPerVolumeFunctionForIntegrationOverEkinProj(G4double EkinProd);
                                                   >> 229   
                                                   >> 230   
                                                   >> 231         
                                                   >> 232   //General methods to sample secondary energy 
                                                   >> 233   //--------------------------------------
                                                   >> 234   G4double SampleAdjSecEnergyFromCSMatrix(size_t MatrixIndex,G4double prim_energy,G4bool IsScatProjToProjCase);
                                                   >> 235   G4double SampleAdjSecEnergyFromCSMatrix(G4double prim_energy,G4bool IsScatProjToProjCase);
                                                   >> 236   void     SelectCSMatrix(G4bool IsScatProjToProjCase);           
                                                   >> 237  
                                                   >> 238   virtual G4double SampleAdjSecEnergyFromDiffCrossSectionPerAtom(G4double prim_energy,G4bool IsScatProjToProjCase);
                                                   >> 239   
                                                   >> 240   
                                                   >> 241   
                                                   >> 242   //Post  Step weight correction
                                                   >> 243   //----------------------------
                                                   >> 244   virtual void CorrectPostStepWeight(G4ParticleChange* fParticleChange, 
                                                   >> 245                G4double old_weight, 
                                                   >> 246              G4double adjointPrimKinEnergy, 
                                                   >> 247              G4double projectileKinEnergy,
                                                   >> 248              G4bool IsScatProjToProjCase);      
                                                   >> 249   
                                                   >> 250  
                                                   >> 251   
                                                   >> 252  
                                                   >> 253  
                                                   >> 254   
                                                   >> 255 protected: //attributes
                                                   >> 256   
                                                   >> 257   G4VEmModel* theDirectEMModel;
                                                   >> 258   G4VParticleChange*  pParticleChange;
                                                   >> 259   
                                                   >> 260 
                                                   >> 261 
                                                   >> 262  
                                                   >> 263   //Name
                                                   >> 264   //-----
                                                   >> 265   
                                                   >> 266   const G4String  name;
                                                   >> 267   
                                                   >> 268   //Needed for CS integration at the initialisation phase
                                                   >> 269   //-----------------------------------------------------
                                                   >> 270   
                                                   >> 271   G4int ASelectedNucleus;
                                                   >> 272   G4int ZSelectedNucleus;
                                                   >> 273   G4Material* SelectedMaterial;
                                                   >> 274   G4double kinEnergyProdForIntegration;
                                                   >> 275   G4double kinEnergyScatProjForIntegration;
                                                   >> 276   G4double kinEnergyProjForIntegration;
                                                   >> 277 
                                                   >> 278   //for the adjoint simulation  we need for each element or material:
                                                   >> 279   //an adjoint CS Matrix 
                                                   >> 280   //-----------------------------
                                                   >> 281   
                                                   >> 282   std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForProdToProjBackwardScattering;
                                                   >> 283   std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForScatProjToProjBackwardScattering;
                                                   >> 284   std::vector<G4double> CS_Vs_ElementForScatProjToProjCase;
                                                   >> 285   std::vector<G4double> CS_Vs_ElementForProdToProjCase;
                                                   >> 286   
                                                   >> 287   G4double lastCS;
                                                   >> 288   G4double lastAdjointCSForScatProjToProjCase;
                                                   >> 289   G4double lastAdjointCSForProdToProjCase;
                                                   >> 290   
                                                   >> 291   //particle definition
                                                   >> 292   //------------------
                                                   >> 293   
                                                   >> 294   G4ParticleDefinition* theAdjEquivOfDirectPrimPartDef;
                                                   >> 295   G4ParticleDefinition* theAdjEquivOfDirectSecondPartDef;
                                                   >> 296   G4ParticleDefinition* theDirectPrimaryPartDef;
                                                   >> 297   G4bool second_part_of_same_type;
                                                   >> 298   
                                                   >> 299   //Prestep energy
                                                   >> 300   //-------------
                                                   >> 301   G4double preStepEnergy;
                                                   >> 302   
                                                   >> 303   //Current couple material
                                                   >> 304   //----------------------
                                                   >> 305   G4Material*  currentMaterial;
                                                   >> 306   G4MaterialCutsCouple* currentCouple;
                                                   >> 307   size_t   currentMaterialIndex; 
                                                   >> 308   size_t   currentCoupleIndex; 
                                                   >> 309   G4double currentTcutForDirectPrim;
                                                   >> 310   G4double currentTcutForDirectSecond;
                                                   >> 311   G4bool ApplyCutInRange;
                                                   >> 312   
                                                   >> 313   //For ions
                                                   >> 314   //---------
                                                   >> 315   G4double mass_ratio_product;
                                                   >> 316   G4double mass_ratio_projectile;
                                                   >> 317 
                                                   >> 318   //Energy limits
                                                   >> 319   //-------------
                                                   >> 320   
                                                   >> 321   G4double HighEnergyLimit;
                                                   >> 322   G4double LowEnergyLimit; 
                                                   >> 323 
                                                   >> 324   //Cross Section biasing factor
                                                   >> 325   //---------------------------
                                                   >> 326   G4double CS_biasing_factor;
                                                   >> 327   
                                                   >> 328   //Type of Model with Matrix or not
                                                   >> 329   //--------------------------------
                                                   >> 330    G4bool UseMatrix;
                                                   >> 331    G4bool UseMatrixPerElement; //other possibility is per Material
                                                   >> 332    G4bool UseOnlyOneMatrixForAllElements;
                                                   >> 333   
                                                   >> 334    //Index of Cross section matrices to be used
                                                   >> 335    //------------
                                                   >> 336    size_t indexOfUsedCrossSectionMatrix;
                                                   >> 337    
                                                   >> 338    size_t model_index;
                                                   >> 339    
                                                   >> 340    //This is needed for the forced interaction where part of the weight correction
                                                   >> 341    // is given outside the model while the secondary are created in the model
                                                   >> 342    //The weight should be fixed before adding the secondary
                                                   >> 343    G4bool correct_weight_for_post_step_in_model;
                                                   >> 344    G4double additional_weight_correction_factor_for_post_step_outside_model;
228                                                   345 
229   // General methods to sample secondary energ << 
230   G4double SampleAdjSecEnergyFromCSMatrix(std: << 
231                                           G4do << 
232                                           G4bo << 
233                                                << 
234   G4double SampleAdjSecEnergyFromCSMatrix(G4do << 
235                                           G4bo << 
236                                                << 
237   void SelectCSMatrix(G4bool isScatProjToProj) << 
238                                                << 
239   virtual G4double SampleAdjSecEnergyFromDiffC << 
240     G4double prim_energy, G4bool isScatProjToP << 
241                                                << 
242   // Post  Step weight correction              << 
243   virtual void CorrectPostStepWeight(G4Particl << 
244                                      G4double  << 
245                                      G4double  << 
246                                      G4double  << 
247                                      G4bool is << 
248                                                << 
249   G4AdjointCSManager* fCSManager;              << 
250   G4VEmModel* fDirectModel = nullptr;          << 
251                                                << 
252   const G4String fName;                        << 
253                                                << 
254   G4Material* fSelectedMaterial        = nullp << 
255   G4Material* fCurrentMaterial         = nullp << 
256   G4MaterialCutsCouple* fCurrentCouple = nullp << 
257                                                << 
258   // particle definition                       << 
259   G4ParticleDefinition* fAdjEquivDirectPrimPar << 
260   G4ParticleDefinition* fAdjEquivDirectSecondP << 
261   G4ParticleDefinition* fDirectPrimaryPart     << 
262                                                << 
263   // adjoint CS matrix for each element or mat << 
264   std::vector<G4AdjointCSMatrix*>* fCSMatrixPr << 
265   std::vector<G4AdjointCSMatrix*>* fCSMatrixPr << 
266                                                << 
267   std::vector<G4double> fElementCSScatProjToPr << 
268   std::vector<G4double> fElementCSProdToProj;  << 
269                                                << 
270   G4double fKinEnergyProdForIntegration     =  << 
271   G4double fKinEnergyScatProjForIntegration =  << 
272                                                << 
273   G4double fLastCS                         = 0 << 
274   G4double fLastAdjointCSForScatProjToProj = 0 << 
275   G4double fLastAdjointCSForProdToProj     = 0 << 
276                                                << 
277   G4double fPreStepEnergy = 0.;                << 
278                                                << 
279   G4double fTcutPrim   = 0.;                   << 
280   G4double fTcutSecond = 0.;                   << 
281                                                << 
282   // Energy limits                             << 
283   G4double fHighEnergyLimit = 0.;              << 
284   G4double fLowEnergyLimit  = 0.;              << 
285                                                << 
286   // Cross Section biasing factor              << 
287   G4double fCsBiasingFactor = 1.;              << 
288                                                << 
289   // [1] This is needed for the forced interac << 
290   // correction is given outside the model whi << 
291   // the model. The weight should be fixed bef << 
292   G4double fOutsideWeightFactor = 1.;          << 
293                                                << 
294   // Needed for CS integration at the initiali << 
295   G4int fASelectedNucleus = 0;                 << 
296   G4int fZSelectedNucleus = 0;                 << 
297                                                << 
298   std::size_t fCSMatrixUsed = 0;  // Index of  << 
299                                                << 
300   G4bool fSecondPartSameType = false;          << 
301   G4bool fInModelWeightCorr =                  << 
302     false;  // correct_weight_for_post_step_in << 
303                                                << 
304   G4bool fApplyCutInRange = true;              << 
305                                                << 
306   // Type of Model with Matrix or not          << 
307   G4bool fUseMatrix               = false;     << 
308   G4bool fUseMatrixPerElement     = false;  // << 
309   G4bool fOneMatrixForAllElements = false;     << 
310 };                                                346 };
311                                                   347 
                                                   >> 348 
312 #endif                                            349 #endif
                                                   >> 350 
313                                                   351