Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:41

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:     G4MollerBhabhaModel
0033 //
0034 // Author:        Vladimir Ivanchenko on base of Laszlo Urban code
0035 //
0036 // Creation date: 07.01.2002
0037 //
0038 // Modifications:
0039 //
0040 // 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
0041 // 24-01-03 Make models region aware (V.Ivanchenko)
0042 // 13-02-03 Add name (V.Ivanchenko)
0043 // 06-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
0044 // 14-01-07 promote SetParticle() from private to protected (mma)
0045 
0046 //
0047 // Class Description:
0048 //
0049 // Implementation of energy loss process and delta-electrons production
0050 // of electrons and positrons
0051 
0052 // -------------------------------------------------------------------
0053 //
0054 
0055 #ifndef G4MollerBhabhaModel_h
0056 #define G4MollerBhabhaModel_h 1
0057 
0058 #include "G4VEmModel.hh"
0059 
0060 class G4ParticleChangeForLoss;
0061 
0062 class G4MollerBhabhaModel : public G4VEmModel
0063 {
0064 
0065 public:
0066 
0067   explicit G4MollerBhabhaModel(const G4ParticleDefinition* p = nullptr, 
0068                    const G4String& nam = "MollerBhabha");
0069 
0070   ~G4MollerBhabhaModel() override;
0071 
0072   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0073 
0074   virtual G4double ComputeCrossSectionPerElectron(
0075                  const G4ParticleDefinition*,
0076                  G4double kineticEnergy,
0077                  G4double cutEnergy,
0078                  G4double maxEnergy);
0079                  
0080   G4double ComputeCrossSectionPerAtom(
0081                  const G4ParticleDefinition*,
0082                  G4double kineticEnergy,
0083                  G4double Z, G4double A,
0084                  G4double cutEnergy,
0085                  G4double maxEnergy) override;
0086                                  
0087   G4double CrossSectionPerVolume(const G4Material*,
0088                  const G4ParticleDefinition*,
0089                  G4double kineticEnergy,
0090                  G4double cutEnergy,
0091                  G4double maxEnergy) override;
0092                  
0093   G4double ComputeDEDXPerVolume(const G4Material*,
0094                 const G4ParticleDefinition*,
0095                 G4double kineticEnergy,
0096                 G4double cutEnergy) override;
0097 
0098   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0099              const G4MaterialCutsCouple*,
0100              const G4DynamicParticle*,
0101              G4double tmin,
0102              G4double maxEnergy) override;
0103 
0104   // hide assignment operator 
0105   G4MollerBhabhaModel & operator=(const  G4MollerBhabhaModel &right) = delete;
0106   G4MollerBhabhaModel(const  G4MollerBhabhaModel&) = delete;
0107 
0108 protected:
0109 
0110   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
0111                   G4double kinEnergy) final;
0112                   
0113   inline void SetParticle(const G4ParticleDefinition* p);
0114 
0115   const G4ParticleDefinition* particle;
0116   G4ParticleDefinition*       theElectron;
0117   G4ParticleChangeForLoss*    fParticleChange;
0118 
0119   G4bool   isElectron;
0120   G4double twoln10;
0121   G4double lowLimit;
0122   
0123 private:
0124 
0125   G4bool isInitialised;
0126 
0127 };
0128 
0129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0130 
0131 inline void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p)
0132 {
0133   particle = p;
0134   isElectron = (p == theElectron);
0135 }
0136 
0137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0138 
0139 #endif