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.2)


  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 ////////////////////////////////////////////// <<  26 // $Id: G4VEmAdjointModel.hh 66892 2013-01-17 10:57:59Z gunter $
 27 //  Class:  G4VEMAdjointModel                  <<  27 //
 28 //  Author:         L. Desorgher               <<  28 /////////////////////////////////////////////////////////////////////////////////
 29 //  Organisation:   SpaceIT GmbH               <<  29 //      Module:   G4VEMAdjointModel
                                                   >>  30 //  Author:         L. Desorgher
                                                   >>  31 //  Organisation:   SpaceIT GmbH
                                                   >>  32 //  Contract: ESA contract 21435/08/NL/AT
                                                   >>  33 //  Customer:       ESA/ESTEC
                                                   >>  34 /////////////////////////////////////////////////////////////////////////////////
                                                   >>  35 //
                                                   >>  36 // CHANGE HISTORY
                                                   >>  37 // --------------
                                                   >>  38 //      ChangeHistory: 
                                                   >>  39 //    10 September 2009 Move to a virtual class. L. Desorgher
                                                   >>  40 //    1st April 2007 creation by L. Desorgher     
                                                   >>  41 //
                                                   >>  42 //-------------------------------------------------------------
                                                   >>  43 //  Documentation:
                                                   >>  44 //    Base class for Adjoint EM model. It is based on the use of direct G4VEmModel.
 30 //                                                 45 //
 31 //  Base class for Adjoint EM model. It is bas <<  46 
 32 //  G4VEmModel.                                << 
 33 ////////////////////////////////////////////// << 
 34                                                    47 
 35 #ifndef G4VEmAdjointModel_h                        48 #ifndef G4VEmAdjointModel_h
 36 #define G4VEmAdjointModel_h 1                      49 #define G4VEmAdjointModel_h 1
 37                                                    50 
 38 #include "globals.hh"                              51 #include "globals.hh"
                                                   >>  52 #include "G4DynamicParticle.hh"
                                                   >>  53 #include "G4ParticleDefinition.hh"
                                                   >>  54 #include "G4MaterialCutsCouple.hh"
                                                   >>  55 #include "G4Material.hh"
                                                   >>  56 #include "G4Element.hh"
                                                   >>  57 #include "G4ElementVector.hh"
                                                   >>  58 #include "Randomize.hh"
 39 #include "G4ParticleDefinition.hh"                 59 #include "G4ParticleDefinition.hh"
 40 #include "G4VEmModel.hh"                           60 #include "G4VEmModel.hh"
                                                   >>  61 #include "G4Electron.hh"
                                                   >>  62 #include "G4Gamma.hh"
                                                   >>  63 #include "G4ProductionCutsTable.hh"
 41                                                    64 
 42 class G4AdjointCSMatrix;                       <<  65 class G4PhysicsTable;
 43 class G4AdjointCSManager;                      << 
 44 class G4Material;                              << 
 45 class G4MaterialCutsCouple;                    << 
 46 class G4ParticleChange;                        << 
 47 class G4Region;                                    66 class G4Region;
                                                   >>  67 class G4VParticleChange;
                                                   >>  68 class G4ParticleChange;
 48 class G4Track;                                     69 class G4Track;
                                                   >>  70 class G4AdjointCSMatrix;
 49                                                    71 
 50 class G4VEmAdjointModel                            72 class G4VEmAdjointModel
 51 {                                                  73 {
 52  public:                                       <<  74 
 53   explicit G4VEmAdjointModel(const G4String& n <<  75 public: // public methods
                                                   >>  76 
                                                   >>  77   G4VEmAdjointModel(const G4String& nam);
 54                                                    78 
 55   virtual ~G4VEmAdjointModel();                    79   virtual ~G4VEmAdjointModel();
 56                                                    80 
 57   //------------------------------------------     81   //------------------------------------------------------------------------
 58   // Virtual methods to be implemented for the     82   // Virtual methods to be implemented for the sample secondaries concrete model
 59   //------------------------------------------     83   //------------------------------------------------------------------------
 60                                                <<  84   
 61   virtual void SampleSecondaries(const G4Track <<  85   //virtual void Initialise()=0;
 62                                  G4ParticleCha <<  86   
                                                   >>  87   virtual void SampleSecondaries(const G4Track& aTrack,
                                                   >>  88                                 G4bool IsScatProjToProjCase,
                                                   >>  89         G4ParticleChange* fParticleChange)=0;
                                                   >>  90  
 63                                                    91 
 64   //------------------------------------------     92   //------------------------------------------------------------------------
 65   // Methods for adjoint processes             <<  93   // Methods for adjoint processes; may be overwritten if needed;  
 66   //------------------------------------------     94   //------------------------------------------------------------------------
                                                   >>  95   
 67                                                    96 
 68   virtual G4double AdjointCrossSection(const G     97   virtual G4double AdjointCrossSection(const G4MaterialCutsCouple* aCouple,
 69                                        G4doubl <<  98                      G4double primEnergy,
 70                                        G4bool  <<  99                      G4bool IsScatProjToProjCase);
 71                                                << 100   
 72   // The implementation of the DiffCrossSectio << 101   virtual G4double GetAdjointCrossSection(const G4MaterialCutsCouple* aCouple,
 73   // energy loss process. For the photoelectri << 102                      G4double primEnergy,
 74   // the method should be redefined            << 103                      G4bool IsScatProjToProjCase);
                                                   >> 104           
 75   virtual G4double DiffCrossSectionPerAtomPrim    105   virtual G4double DiffCrossSectionPerAtomPrimToSecond(
 76     G4double kinEnergyProj,  // kin energy of  << 106                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 77     G4double kinEnergyProd,  // kinetic energy << 107                                       G4double kinEnergyProd, // kinetic energy of the secondary particle 
 78     G4double Z, G4double A = 0.);              << 108               G4double Z, 
 79                                                << 109                                       G4double A = 0.);
 80   virtual G4double DiffCrossSectionPerAtomPrim << 110               
 81     G4double kinEnergyProj,      // kin energy << 111   virtual G4double DiffCrossSectionPerAtomPrimToScatPrim( 
 82     G4double kinEnergyScatProj,  // kin energy << 112                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 83     G4double Z, G4double A = 0.);              << 113                                       G4double kinEnergyScatProj, // kinetic energy of the primary particle after the interaction 
 84                                                << 114               G4double Z, 
                                                   >> 115                                       G4double A = 0.);
                                                   >> 116   
                                                   >> 117  
                                                   >> 118   
 85   virtual G4double DiffCrossSectionPerVolumePr    119   virtual G4double DiffCrossSectionPerVolumePrimToSecond(
 86     const G4Material* aMaterial,               << 120                 const G4Material* aMaterial,
 87     G4double kinEnergyProj,  // kin energy of  << 121                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 88     G4double kinEnergyProd   // kinetic energy << 122                                       G4double kinEnergyProd // kinetic energy of the secondary particle 
 89   );                                           << 123               );
 90                                                << 124               
 91   virtual G4double DiffCrossSectionPerVolumePr    125   virtual G4double DiffCrossSectionPerVolumePrimToScatPrim(
 92     const G4Material* aMaterial,               << 126                 const G4Material* aMaterial, 
 93     G4double kinEnergyProj,     // kin energy  << 127                                       G4double kinEnergyProj,  // kinetic energy of the primary particle before the interaction 
 94     G4double kinEnergyScatProj  // kinetic ene << 128                                       G4double kinEnergyScatProj // kinetic energy of the primary particle after the interaction 
 95   );                                           << 129               );
 96                                                << 130   
 97   // Energy limits of adjoint secondary        << 131   
                                                   >> 132   //Energy limits of adjoint secondary
 98   //------------------                            133   //------------------
 99                                                << 134   
100   virtual G4double GetSecondAdjEnergyMaxForSca << 135   virtual G4double GetSecondAdjEnergyMaxForScatProjToProjCase(G4double PrimAdjEnergy);
101     G4double primAdjEnergy);                   << 136   virtual G4double GetSecondAdjEnergyMinForScatProjToProjCase(G4double PrimAdjEnergy,G4double Tcut=0);
102                                                << 137   virtual G4double GetSecondAdjEnergyMaxForProdToProjCase(G4double PrimAdjEnergy);
103   virtual G4double GetSecondAdjEnergyMinForSca << 138   virtual G4double GetSecondAdjEnergyMinForProdToProjCase(G4double PrimAdjEnergy);
104     G4double primAdjEnergy, G4double tcut = 0. << 139   
105                                                << 140   
106   virtual G4double GetSecondAdjEnergyMaxForPro << 141   
107                                                << 142   //Other Methods
108   virtual G4double GetSecondAdjEnergyMinForPro << 
109                                                << 
110   // Other Methods                             << 
111   //---------------                               143   //---------------
112                                                << 144   
113   void DefineCurrentMaterial(const G4MaterialC << 145   void  DefineCurrentMaterial(const G4MaterialCutsCouple* couple);
114                                                << 146   
115   std::vector<std::vector<double>*>            << 147   
116   ComputeAdjointCrossSectionVectorPerAtomForSe << 148   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerAtomForSecond(      
117                                                << 149         G4double kinEnergyProd,
118                                                << 150         G4double Z, 
119                                                << 151                                 G4double A = 0.,
120   std::vector<std::vector<double>*>            << 152         G4int nbin_pro_decade=10
121   ComputeAdjointCrossSectionVectorPerAtomForSc << 153         );
122     G4double kinEnergyProd, G4double Z, G4doub << 154   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerAtomForScatProj(      
123     G4int nbin_pro_decade = 10);               << 155         G4double kinEnergyProd,
124                                                << 156         G4double Z, 
125   std::vector<std::vector<double>*>            << 157                                 G4double A = 0.,
126   ComputeAdjointCrossSectionVectorPerVolumeFor << 158         G4int nbin_pro_decade=10
127     G4Material* aMaterial, G4double kinEnergyP << 159         );
128                                                << 160   
129   std::vector<std::vector<double>*>            << 161   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerVolumeForSecond(      
130   ComputeAdjointCrossSectionVectorPerVolumeFor << 162         G4Material* aMaterial,
131     G4Material* aMaterial, G4double kinEnergyP << 163         G4double kinEnergyProd,
132                                                << 164         G4int nbin_pro_decade=10
133   inline void SetCSMatrices(std::vector<G4Adjo << 165         );
134                             std::vector<G4Adjo << 166   std::vector< std::vector< double>* >  ComputeAdjointCrossSectionVectorPerVolumeForScatProj(      
135   {                                            << 167         G4Material* aMaterial,
136     fCSMatrixProdToProjBackScat = Vec1CSMatrix << 168         G4double kinEnergyProd,
137     fCSMatrixProjToProjBackScat = Vec2CSMatrix << 169         G4int nbin_pro_decade=10
                                                   >> 170         );
                                                   >> 171   
                                                   >> 172 
                                                   >> 173   
                                                   >> 174   inline void SetCSMatrices(std::vector< G4AdjointCSMatrix* >* Vec1CSMatrix, std::vector< G4AdjointCSMatrix* >* Vec2CSMatrix){
                                                   >> 175            pOnCSMatrixForProdToProjBackwardScattering = Vec1CSMatrix;
                                                   >> 176          pOnCSMatrixForScatProjToProjBackwardScattering = Vec2CSMatrix;
                                                   >> 177          
                                                   >> 178     
138   };                                              179   };
139                                                << 180   
140   inline G4ParticleDefinition*                 << 181   inline G4ParticleDefinition* GetAdjointEquivalentOfDirectPrimaryParticleDefinition(){return theAdjEquivOfDirectPrimPartDef;}
141   GetAdjointEquivalentOfDirectPrimaryParticleD << 182   
142   {                                            << 183   inline G4ParticleDefinition* GetAdjointEquivalentOfDirectSecondaryParticleDefinition(){return theAdjEquivOfDirectSecondPartDef;}  
143     return fAdjEquivDirectPrimPart;            << 184   
144   }                                            << 185   inline G4double GetHighEnergyLimit(){return HighEnergyLimit;}
145                                                << 186   
146   inline G4ParticleDefinition*                 << 187   inline G4double GetLowEnergyLimit(){return LowEnergyLimit;}
147   GetAdjointEquivalentOfDirectSecondaryParticl << 188   
148   {                                            << 
149     return fAdjEquivDirectSecondPart;          << 
150   }                                            << 
151                                                << 
152   inline G4double GetHighEnergyLimit() const { << 
153                                                << 
154   inline G4double GetLowEnergyLimit() const {  << 
155                                                << 
156   void SetHighEnergyLimit(G4double aVal);         189   void SetHighEnergyLimit(G4double aVal);
157                                                << 190   
158   void SetLowEnergyLimit(G4double aVal);          191   void SetLowEnergyLimit(G4double aVal);
159                                                << 192   
160   inline void DefineDirectEMModel(G4VEmModel*  << 193   inline void DefineDirectEMModel(G4VEmModel* aModel){theDirectEMModel = aModel;}
161                                                << 194   
162   void SetAdjointEquivalentOfDirectPrimaryPart << 195   void SetAdjointEquivalentOfDirectPrimaryParticleDefinition(G4ParticleDefinition* aPart);
163     G4ParticleDefinition* aPart);              << 196   
164                                                << 197   inline void SetAdjointEquivalentOfDirectSecondaryParticleDefinition(G4ParticleDefinition* aPart){
165   inline void SetAdjointEquivalentOfDirectSeco << 198     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   }                                               199   }
189                                                << 200   
190   inline void SetApplyCutInRange(G4bool aBool) << 201   inline void SetSecondPartOfSameType(G4bool aBool){second_part_of_same_type =aBool;}
191                                                << 202   
192   inline G4bool GetUseMatrix() const { return  << 203   inline G4bool GetSecondPartOfSameType(){return second_part_of_same_type;}
193                                                << 204   
194   inline G4bool GetUseMatrixPerElement() const << 205   inline void SetUseMatrix(G4bool aBool) { UseMatrix = aBool;}
195                                                << 206   
196   inline G4bool GetUseOnlyOneMatrixForAllEleme << 207   inline void SetUseMatrixPerElement(G4bool aBool){ UseMatrixPerElement = aBool;}
197   {                                            << 208   inline void SetUseOnlyOneMatrixForAllElements(G4bool aBool){ UseOnlyOneMatrixForAllElements = aBool;}
198     return fOneMatrixForAllElements;           << 209   
199   }                                            << 210   inline void SetApplyCutInRange(G4bool aBool){ ApplyCutInRange = aBool;} 
200                                                << 211   inline G4bool GetUseMatrix() {return UseMatrix;}
201   inline G4bool GetApplyCutInRange() const { r << 212   inline G4bool GetUseMatrixPerElement(){ return UseMatrixPerElement;} 
202                                                << 213   inline G4bool GetUseOnlyOneMatrixForAllElements(){ return UseOnlyOneMatrixForAllElements;} 
203   inline const G4String& GetName() const { ret << 214   inline G4bool GetApplyCutInRange(){ return ApplyCutInRange;} 
204                                                << 215   
205   inline virtual void SetCSBiasingFactor(G4dou << 216   inline G4String GetName(){ return name;}
206   {                                            << 217   inline virtual void SetCSBiasingFactor(G4double aVal) {CS_biasing_factor = aVal;} 
207     fCsBiasingFactor = aVal;                   << 218                 
208   }                                            << 219 protected: 
209                                                << 220 
210   inline void SetCorrectWeightForPostStepInMod << 221   //Some of them can be overriden by daughter classes
211   {                                            << 222   
212     fInModelWeightCorr = aBool;                << 223   
213   }                                            << 
214                                                << 
215   inline void SetAdditionalWeightCorrectionFac << 
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     224   G4double DiffCrossSectionFunction1(G4double kinEnergyProj);
226                                                << 
227   G4double DiffCrossSectionFunction2(G4double     225   G4double DiffCrossSectionFunction2(G4double kinEnergyProj);
                                                   >> 226   G4double DiffCrossSectionPerVolumeFunctionForIntegrationOverEkinProj(G4double EkinProd);
                                                   >> 227   
                                                   >> 228   
                                                   >> 229         
                                                   >> 230   //General methods to sample secondary energy 
                                                   >> 231   //--------------------------------------
                                                   >> 232   G4double SampleAdjSecEnergyFromCSMatrix(size_t MatrixIndex,G4double prim_energy,G4bool IsScatProjToProjCase);
                                                   >> 233   G4double SampleAdjSecEnergyFromCSMatrix(G4double prim_energy,G4bool IsScatProjToProjCase);
                                                   >> 234   void     SelectCSMatrix(G4bool IsScatProjToProjCase);           
                                                   >> 235  
                                                   >> 236   virtual G4double SampleAdjSecEnergyFromDiffCrossSectionPerAtom(G4double prim_energy,G4bool IsScatProjToProjCase);
                                                   >> 237   
                                                   >> 238   
                                                   >> 239   
                                                   >> 240   //Post  Step weight correction
                                                   >> 241   //----------------------------
                                                   >> 242   virtual void CorrectPostStepWeight(G4ParticleChange* fParticleChange, 
                                                   >> 243                G4double old_weight, 
                                                   >> 244              G4double adjointPrimKinEnergy, 
                                                   >> 245              G4double projectileKinEnergy,
                                                   >> 246              G4bool IsScatProjToProjCase);      
                                                   >> 247   
                                                   >> 248  
                                                   >> 249   
                                                   >> 250  
                                                   >> 251  
                                                   >> 252   
                                                   >> 253 protected: //attributes
                                                   >> 254   
                                                   >> 255   G4VEmModel* theDirectEMModel;
                                                   >> 256   G4VParticleChange*  pParticleChange;
                                                   >> 257   
                                                   >> 258 
                                                   >> 259 
                                                   >> 260  
                                                   >> 261   //Name
                                                   >> 262   //-----
                                                   >> 263   
                                                   >> 264   const G4String  name;
                                                   >> 265   
                                                   >> 266   //Needed for CS integration at the initialisation phase
                                                   >> 267   //-----------------------------------------------------
                                                   >> 268   
                                                   >> 269   G4int ASelectedNucleus;
                                                   >> 270   G4int ZSelectedNucleus;
                                                   >> 271   G4Material* SelectedMaterial;
                                                   >> 272   G4double kinEnergyProdForIntegration;
                                                   >> 273   G4double kinEnergyScatProjForIntegration;
                                                   >> 274   G4double kinEnergyProjForIntegration;
                                                   >> 275   
                                                   >> 276   
                                                   >> 277   //for the adjoint simulation  we need for each element or material:
                                                   >> 278   //an adjoint CS Matrix 
                                                   >> 279   //-----------------------------
                                                   >> 280   
                                                   >> 281   std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForProdToProjBackwardScattering;
                                                   >> 282   std::vector< G4AdjointCSMatrix* >* pOnCSMatrixForScatProjToProjBackwardScattering;
                                                   >> 283   std::vector<G4double> CS_Vs_ElementForScatProjToProjCase;
                                                   >> 284   std::vector<G4double> CS_Vs_ElementForProdToProjCase;
                                                   >> 285   
                                                   >> 286   G4double lastCS;
                                                   >> 287   G4double lastAdjointCSForScatProjToProjCase;
                                                   >> 288   G4double lastAdjointCSForProdToProjCase;
                                                   >> 289   
                                                   >> 290   
                                                   >> 291   
                                                   >> 292   
                                                   >> 293   //particle definition
                                                   >> 294   //------------------
                                                   >> 295   
                                                   >> 296   G4ParticleDefinition* theAdjEquivOfDirectPrimPartDef;
                                                   >> 297   G4ParticleDefinition* theAdjEquivOfDirectSecondPartDef;
                                                   >> 298   G4ParticleDefinition* theDirectPrimaryPartDef;
                                                   >> 299   G4bool second_part_of_same_type;
                                                   >> 300   
                                                   >> 301   
                                                   >> 302   //Prestep energy
                                                   >> 303   //-------------
                                                   >> 304   G4double preStepEnergy;
                                                   >> 305   
                                                   >> 306   //Current couple material
                                                   >> 307   //----------------------
                                                   >> 308   G4Material*  currentMaterial;
                                                   >> 309   G4MaterialCutsCouple* currentCouple;
                                                   >> 310   size_t   currentMaterialIndex; 
                                                   >> 311   size_t   currentCoupleIndex; 
                                                   >> 312   G4double currentTcutForDirectPrim;
                                                   >> 313   G4double currentTcutForDirectSecond;
                                                   >> 314   G4bool ApplyCutInRange;
                                                   >> 315   
                                                   >> 316  
                                                   >> 317  
                                                   >> 318   
                                                   >> 319   //For ions
                                                   >> 320   //---------
                                                   >> 321   G4double mass_ratio_product;
                                                   >> 322   G4double mass_ratio_projectile;
                                                   >> 323   
                                                   >> 324   
                                                   >> 325   //Energy limits
                                                   >> 326   //-------------
                                                   >> 327   
                                                   >> 328   G4double HighEnergyLimit;
                                                   >> 329   G4double LowEnergyLimit; 
                                                   >> 330 
                                                   >> 331   
                                                   >> 332   
                                                   >> 333   //Cross Section biasing factor
                                                   >> 334   //---------------------------
                                                   >> 335   G4double CS_biasing_factor;
                                                   >> 336   
                                                   >> 337   
                                                   >> 338   //Type of Model with Matrix or not
                                                   >> 339   //--------------------------------
                                                   >> 340    G4bool UseMatrix;
                                                   >> 341    G4bool UseMatrixPerElement; //other possibility is per Material
                                                   >> 342    G4bool UseOnlyOneMatrixForAllElements;
                                                   >> 343   
                                                   >> 344   
                                                   >> 345    //Index of Cross section matrices to be used
                                                   >> 346    //------------
                                                   >> 347    size_t indexOfUsedCrossSectionMatrix;
                                                   >> 348    
                                                   >> 349    size_t model_index;
                                                   >> 350    
                                                   >> 351    
                                                   >> 352    
                                                   >> 353    
                                                   >> 354    
                                                   >> 355    
228                                                   356 
229   // General methods to sample secondary energ << 357   
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 };                                                358 };
311                                                   359 
                                                   >> 360 
312 #endif                                            361 #endif
                                                   >> 362 
313                                                   363