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 9.2.p2)


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