Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-02 08:28:30

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:     G4DynamicParticleMSC
0033 //
0034 // Author:        Vladimir Ivanchenko
0035 //
0036 // Creation date: 23.08.2024
0037 //
0038 // Modifications:
0039 //
0040 //
0041 // Class Description:
0042 //
0043 // This class manages the multiple scattering process for heavy charged
0044 // particles without any use of G4ParticleDefinition.
0045 //
0046 // -------------------------------------------------------------------
0047 //
0048 
0049 #ifndef G4DynamicParticleMSC_h
0050 #define G4DynamicParticleMSC_h 1
0051 
0052 #include "G4VContinuousDiscreteProcess.hh"
0053 #include "G4ParticleChangeForMSC.hh"
0054 
0055 class G4Material;
0056 class G4LossTableManager;
0057 
0058 class G4DynamicParticleMSC : public G4VContinuousDiscreteProcess
0059 {
0060 public:
0061 
0062   G4DynamicParticleMSC();
0063 
0064   ~G4DynamicParticleMSC() override;
0065 
0066   // Step limit from AlongStep 
0067   G4double AlongStepGetPhysicalInteractionLength(
0068                                   const G4Track&,
0069                                   G4double  previousStepSize,
0070                                   G4double  currentMinimumStep,
0071                                   G4double& currentSafety,
0072                                   G4GPILSelection* selection) override;
0073 
0074   // Step limit from cross section
0075   G4double PostStepGetPhysicalInteractionLength(
0076                                   const G4Track& track,
0077                                   G4double previousStepSize,
0078                                   G4ForceCondition* condition) override;
0079 
0080   // AlongStep computations
0081   G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&) override;
0082 
0083   // This method is not used for tracking, it returns mean free path value
0084   G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition* condition) override;
0085 
0086   // This method is not used for tracking, it returns step limit
0087   G4double GetContinuousStepLimit(const G4Track& track, G4double previousStepSize,
0088                                   G4double currentMinimalStep, G4double& currentSafety) override;
0089 
0090   // print description in html
0091   void ProcessDescription(std::ostream&) const override;
0092 
0093   // hide assignment operator
0094   G4DynamicParticleMSC & operator=(const G4DynamicParticleMSC &right) = delete;
0095   G4DynamicParticleMSC(const G4DynamicParticleMSC&) = delete;
0096 
0097 private:
0098 
0099   // all parameters are dynamic
0100   void PreStepInitialisation(const G4Track&);
0101 
0102   G4LossTableManager* lManager;
0103   const G4Material* fMaterial{nullptr};
0104 
0105   G4double fMass{0.0};
0106   G4double fCharge{0.0};
0107   G4double fEkinPreStep{0.0};
0108   G4double fBeta{0.0};
0109   G4double fZeff{0.0};
0110 
0111   G4ThreeVector fNewDir{G4ThreeVector(0.0, 0.0, 0.0)};
0112   G4ParticleChangeForMSC fParticleChange;
0113 };
0114 
0115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0116 
0117 #endif