Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4BetheBlochModel.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // -------------------------------------------------------------------
0028 //
0029 // GEANT4 Class header file
0030 //
0031 //
0032 // File name:     G4BetheBlochModel
0033 //
0034 // Author:        Vladimir Ivanchenko on base of Laszlo Urban code
0035 //
0036 // Creation date: 03.01.2002
0037 //
0038 // Modifications:
0039 //
0040 // Modified by Michel Maire and Vladimir Ivanchenko
0041 //
0042 // Class Description:
0043 //
0044 // Implementation of Bethe-Bloch model of energy loss and
0045 // delta-electron production by heavy charged particles
0046 
0047 // -------------------------------------------------------------------
0048 //
0049 
0050 #ifndef G4BetheBlochModel_h
0051 #define G4BetheBlochModel_h 1
0052 
0053 #include "G4VEmModel.hh"
0054 
0055 class G4EmCorrections;
0056 class G4ParticleChangeForLoss;
0057 class G4ICRU90StoppingData;
0058 class G4NistManager;
0059 
0060 class G4BetheBlochModel : public G4VEmModel
0061 {
0062 
0063 public:
0064 
0065   explicit G4BetheBlochModel(const G4ParticleDefinition* p = nullptr,
0066                  const G4String& nam = "BetheBloch");
0067 
0068   ~G4BetheBlochModel() override;
0069 
0070   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0071 
0072   G4double MinEnergyCut(const G4ParticleDefinition*,
0073             const G4MaterialCutsCouple* couple) override;
0074 
0075   virtual G4double ComputeCrossSectionPerElectron(
0076                  const G4ParticleDefinition*,
0077                  G4double kineticEnergy,
0078                  G4double cutEnergy,
0079                  G4double maxEnergy);
0080                  
0081   G4double ComputeCrossSectionPerAtom(
0082                  const G4ParticleDefinition*,
0083                  G4double kineticEnergy,
0084                  G4double Z, G4double A,
0085                  G4double cutEnergy,
0086                  G4double maxEnergy) override;
0087                                  
0088   G4double CrossSectionPerVolume(const G4Material*,
0089                  const G4ParticleDefinition*,
0090                  G4double kineticEnergy,
0091                  G4double cutEnergy,
0092                  G4double maxEnergy) override;
0093                  
0094   G4double ComputeDEDXPerVolume(const G4Material*,
0095                 const G4ParticleDefinition*,
0096                 G4double kineticEnergy,
0097                 G4double cutEnergy) override;
0098 
0099   G4double GetChargeSquareRatio(const G4ParticleDefinition* p,
0100                 const G4Material* mat,
0101                 G4double kineticEnergy) override;
0102 
0103   G4double GetParticleCharge(const G4ParticleDefinition* p,
0104                  const G4Material* mat,
0105                  G4double kineticEnergy) override;
0106 
0107   void CorrectionsAlongStep(const G4MaterialCutsCouple* couple,
0108                 const G4DynamicParticle* dp,
0109                 const G4double& length,
0110                 G4double& eloss) override;
0111 
0112   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0113              const G4MaterialCutsCouple*,
0114              const G4DynamicParticle*,
0115              G4double tmin,
0116              G4double maxEnergy) override;
0117 
0118   // hide assignment operator
0119   G4BetheBlochModel & operator=(const G4BetheBlochModel &right) = delete;
0120   G4BetheBlochModel(const G4BetheBlochModel&) = delete;
0121 
0122 protected:
0123 
0124   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
0125                   G4double kinEnergy) override;
0126 
0127   inline G4double GetChargeSquareRatio() const;
0128 
0129   inline void SetChargeSquareRatio(G4double val);
0130 
0131 private:
0132 
0133   void SetupParameters(const G4ParticleDefinition* p);
0134 
0135   const G4ParticleDefinition* particle = nullptr;
0136   const G4ParticleDefinition* theElectron;
0137   G4EmCorrections*            corr;
0138   G4ParticleChangeForLoss*    fParticleChange = nullptr;
0139   G4NistManager*              nist;
0140   G4ICRU90StoppingData*       fICRU90 = nullptr;
0141   const G4Material*           currentMaterial = nullptr;
0142   const G4Material*           baseMaterial = nullptr;
0143 
0144   G4double mass = 0.0;
0145   G4double tlimit = DBL_MAX;
0146   G4double spin = 0.0;
0147   G4double magMoment2 = 0.0;
0148   G4double chargeSquare = 1.0;
0149   G4double ratio = 1.0;
0150   G4double formfact = 0.0;
0151   G4double twoln10;
0152   G4double fAlphaTlimit;
0153   G4double fProtonTlimit;
0154 
0155   G4int    iICRU90 = -1;
0156   G4bool   isIon = false;
0157   G4bool   isAlpha = false;
0158 };
0159 
0160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0161 
0162 inline G4double G4BetheBlochModel::GetChargeSquareRatio() const
0163 {
0164   return chargeSquare;
0165 }
0166 
0167 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0168 
0169 inline void G4BetheBlochModel::SetChargeSquareRatio(G4double val)
0170 {
0171   chargeSquare = val;
0172 }
0173 
0174 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0175 
0176 #endif