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[ 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/highenergy/include/G4eeToHadrons.hh (Version 11.3.0) and /processes/electromagnetic/highenergy/include/G4eeToHadrons.hh (Version 7.0.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
                                                   >>  23 // $Id: G4eeToHadrons.hh,v 1.1 2004/11/19 18:44:04 vnivanch Exp $
                                                   >>  24 // GEANT4 tag $Name: geant4-07-00-patch-01 $
 26 //                                                 25 //
 27 // -------------------------------------------     26 // -------------------------------------------------------------------
 28 //                                                 27 //
 29 // GEANT4 Class header file                        28 // GEANT4 Class header file
 30 //                                                 29 //
 31 //                                                 30 //
 32 // File name:     G4eeToHadrons                    31 // File name:     G4eeToHadrons
 33 //                                                 32 //
 34 // Author:        Vladimir Ivanchenko          <<  33 // Author:        Vladimir Ivanchenko 
 35 //                                                 34 //
 36 // Creation date: 12.08.2004                       35 // Creation date: 12.08.2004
 37 //                                                 36 //
 38 // Modifications:                                  37 // Modifications:
 39 // 08-11-04 Migration to new interface of Stor     38 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
 40 // 08-04-05 Major optimisation of internal int << 
 41 //                                                 39 //
 42 //                                                 40 //
 43 // Class Description:                              41 // Class Description:
 44 //                                                 42 //
 45 // This class manages the process of e+ annihi     43 // This class manages the process of e+ annihilation into hadrons
 46 //                                                 44 //
 47                                                    45 
 48 // -------------------------------------------     46 // -------------------------------------------------------------------
 49 //                                                 47 //
 50                                                    48 
 51 #ifndef G4eeToHadrons_h                            49 #ifndef G4eeToHadrons_h
 52 #define G4eeToHadrons_h 1                          50 #define G4eeToHadrons_h 1
 53                                                    51 
 54 #include "G4VEmProcess.hh"                         52 #include "G4VEmProcess.hh"
 55 #include "G4Positron.hh"                           53 #include "G4Positron.hh"
 56 #include "G4eeToHadronsMultiModel.hh"          <<  54 #include "G4eeToHadronsModel.hh"
                                                   >>  55 #include <vector>
                                                   >>  56 
                                                   >>  57 class G4eeCrossSections;
 57                                                    58 
 58 class G4eeToHadrons : public G4VEmProcess          59 class G4eeToHadrons : public G4VEmProcess
 59 {                                                  60 {
 60                                                    61 
 61 public:                                            62 public:
 62                                                    63 
 63   explicit G4eeToHadrons(const G4String& name  <<  64   G4eeToHadrons(const G4String& name = "ee2hadr");
 64                                                    65 
 65   ~G4eeToHadrons() override;                   <<  66   virtual ~G4eeToHadrons();
 66                                                    67 
 67   G4bool IsApplicable(const G4ParticleDefiniti <<  68   virtual G4bool IsApplicable(const G4ParticleDefinition& p);
 68                                                    69 
 69   // Set the factor to artificially increase t <<  70   virtual std::vector<G4DynamicParticle*>* SecondariesPostStep(
 70   void SetCrossSecFactor(G4double fac);        <<  71                                    G4VEmModel*,
                                                   >>  72                              const G4MaterialCutsCouple*,
                                                   >>  73                              const G4DynamicParticle*);
 71                                                    74 
 72   // print description in html                 <<  75   G4double CrossSection(G4double kineticEnergy, const G4MaterialCutsCouple* couple);
 73   void ProcessDescription(std::ostream&) const <<  76   // It returns the cross section of the process for energy/ material
 74                                                    77 
 75   // hide assignment operator                  <<  78   virtual G4double RecalculateLambda(G4double kinEnergy,
 76   G4eeToHadrons & operator=(const G4eeToHadron <<  79                                const G4MaterialCutsCouple* couple);
 77   G4eeToHadrons(const G4eeToHadrons&) = delete <<  80 
                                                   >>  81   virtual void PrintInfoDefinition();
                                                   >>  82   // Print out of the class parameters
                                                   >>  83 
                                                   >>  84   virtual G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*);
                                                   >>  85 
                                                   >>  86   void SetCrossSecFactor(G4double fac);
                                                   >>  87   // Set the factor to artificially increase the crossSection (default 1)
 78                                                    88 
 79 protected:                                         89 protected:
 80                                                    90 
 81   // Print out of the class parameters         <<  91   virtual void InitialiseProcess(const G4ParticleDefinition*);
 82   void StreamProcessInfo(std::ostream& outFile <<  92 
                                                   >>  93   G4double GetMeanFreePath(const G4Track&,G4double,G4ForceCondition*);
                                                   >>  94 
                                                   >>  95   virtual void ResetNumberOfInteractionLengthLeft();
 83                                                    96 
 84   void InitialiseProcess(const G4ParticleDefin <<  97   virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dp);
 85                                                    98 
 86 private:                                           99 private:
 87                                                   100 
 88   G4eeToHadronsMultiModel*  multimodel = nullp << 101   G4double ComputeMeanFreePath(G4double kineticEnergy,
 89   G4double                  csFactor = 1.0;    << 102                          const G4MaterialCutsCouple* couple);
 90   G4bool                    isInitialised = fa << 103 
                                                   >> 104   std::vector<G4DynamicParticle*>* GenerateSecondaries(const G4DynamicParticle*);
                                                   >> 105 
                                                   >> 106 
                                                   >> 107   // hide assignment operator
                                                   >> 108   G4eeToHadrons & operator=(const G4eeToHadrons &right);
                                                   >> 109   G4eeToHadrons(const G4eeToHadrons&);
                                                   >> 110 
                                                   >> 111   G4eeCrossSections*               cross;
                                                   >> 112 
                                                   >> 113   std::vector<G4eeToHadronsModel*> models;
                                                   >> 114   std::vector<G4double>            ekinMin;
                                                   >> 115   std::vector<G4double>            ekinPeak;
                                                   >> 116   std::vector<G4double>            ekinMax;
                                                   >> 117   std::vector<G4double>            cumSum;
                                                   >> 118 
                                                   >> 119   G4double                         thKineticEnergy;
                                                   >> 120   G4double                         maxKineticEnergy;
                                                   >> 121   G4double                         mfpKineticEnergy;
                                                   >> 122   G4double                         preStepMFP;
                                                   >> 123   G4double                         preStepCS;
                                                   >> 124   G4double                         lambdaFactor;
                                                   >> 125   G4double                         csFactor;
                                                   >> 126 
                                                   >> 127   const G4MaterialCutsCouple*      currentCouple;
                                                   >> 128   
                                                   >> 129   G4int                            nModels;
                                                   >> 130 
                                                   >> 131   G4bool                           isInitialised;
                                                   >> 132   G4bool                           abovePeak;
                                                   >> 133 
 91 };                                                134 };
                                                   >> 135 
                                                   >> 136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 138 
                                                   >> 139 inline G4bool G4eeToHadrons::IsApplicable(const G4ParticleDefinition& p)
                                                   >> 140 {
                                                   >> 141   return (&p == G4Positron::Positron());
                                                   >> 142 }
                                                   >> 143 
                                                   >> 144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 145 
                                                   >> 146 inline G4double G4eeToHadrons::MaxSecondaryEnergy(const G4DynamicParticle* dp)
                                                   >> 147 {
                                                   >> 148   return dp->GetKineticEnergy();
                                                   >> 149 }
                                                   >> 150 
                                                   >> 151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 152 
                                                   >> 153 inline std::vector<G4DynamicParticle*>* G4eeToHadrons::SecondariesPostStep(
                                                   >> 154                                                   G4VEmModel*,
                                                   >> 155                                             const G4MaterialCutsCouple*,
                                                   >> 156                                             const G4DynamicParticle* dp)
                                                   >> 157 {
                                                   >> 158   std::vector<G4DynamicParticle*>* newp = 0;
                                                   >> 159   G4double kinEnergy = dp->GetKineticEnergy();
                                                   >> 160   if (kinEnergy > thKineticEnergy) newp = GenerateSecondaries(dp);
                                                   >> 161   return newp;
                                                   >> 162 }
                                                   >> 163 
                                                   >> 164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 165 
                                                   >> 166 inline G4double G4eeToHadrons::GetMeanFreePath(const G4Track& track,
                                                   >> 167                                                      G4double,
                                                   >> 168                                                      G4ForceCondition* condition)
                                                   >> 169 {
                                                   >> 170   *condition = NotForced;
                                                   >> 171   G4double kinEnergy = track.GetKineticEnergy();
                                                   >> 172   G4double x = DBL_MAX;
                                                   >> 173   if (kinEnergy > thKineticEnergy) 
                                                   >> 174     x = ComputeMeanFreePath(kinEnergy, track.GetMaterialCutsCouple());
                                                   >> 175   return x;
                                                   >> 176 }
                                                   >> 177 
                                                   >> 178 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 179 
                                                   >> 180 inline G4double G4eeToHadrons::CrossSection(G4double kineticEnergy,
                                                   >> 181                                       const G4MaterialCutsCouple* couple)
                                                   >> 182 {
                                                   >> 183   G4double cross = 0.0;
                                                   >> 184   if (kineticEnergy > thKineticEnergy) {
                                                   >> 185     for(G4int i=0; i<nModels; i++) {
                                                   >> 186       if(kineticEnergy >= ekinMin[i] && kineticEnergy <= ekinMax[i]) 
                                                   >> 187         cross += csFactor*(models[i])->CrossSection(couple,0,kineticEnergy,0.0,0.0);
                                                   >> 188       cumSum[i] = cross;
                                                   >> 189     } 
                                                   >> 190   }
                                                   >> 191   return cross;
                                                   >> 192 }
                                                   >> 193 
                                                   >> 194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 195 
                                                   >> 196 inline G4double G4eeToHadrons::RecalculateLambda(G4double kinEnergy, 
                                                   >> 197                                            const G4MaterialCutsCouple* couple)
                                                   >> 198 {
                                                   >> 199   return CrossSection(kinEnergy, couple);
                                                   >> 200 }
                                                   >> 201 
                                                   >> 202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 203 
                                                   >> 204 inline void G4eeToHadrons::ResetNumberOfInteractionLengthLeft()
                                                   >> 205 {
                                                   >> 206   currentCouple = 0;
                                                   >> 207   abovePeak     = false;
                                                   >> 208   preStepCS     = 0.0;
                                                   >> 209   G4VProcess::ResetNumberOfInteractionLengthLeft();
                                                   >> 210 }
 92                                                   211 
 93 //....oooOO0OOooo........oooOO0OOooo........oo    212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 94                                                   213 
 95 #endif                                            214 #endif
 96                                                   215