![]() |
|
|||
File indexing completed on 2025-09-15 08:58:19
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 // G4BOptnChangeCrossSection 0027 // 0028 // Class Description: 0029 // 0030 // A G4VBiasingOperation to change a process cross-section. 0031 // 0032 // Author: Marc Verderi, November 2013 0033 // -------------------------------------------------------------------- 0034 #ifndef G4BOptnChangeCrossSection_hh 0035 #define G4BOptnChangeCrossSection_hh 1 0036 0037 #include "G4VBiasingOperation.hh" 0038 0039 class G4InteractionLawPhysical; 0040 0041 class G4BOptnChangeCrossSection : public G4VBiasingOperation 0042 { 0043 public: 0044 0045 // -- Constructor : 0046 G4BOptnChangeCrossSection(const G4String& name); 0047 // -- destructor: 0048 virtual ~G4BOptnChangeCrossSection(); 0049 0050 // -- Methods from G4VBiasingOperation interface: 0051 // ---------------------------------------------- 0052 // -- Used: 0053 virtual const G4VBiasingInteractionLaw* 0054 ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*, 0055 G4ForceCondition& proposeForceCondition ); 0056 0057 // -- Unused: 0058 virtual G4VParticleChange* 0059 ApplyFinalStateBiasing( const G4BiasingProcessInterface*, 0060 const G4Track*, const G4Step*, G4bool& ) { return nullptr; } 0061 virtual G4double DistanceToApplyOperation( const G4Track*, 0062 G4double, G4ForceCondition* ) { return DBL_MAX; } 0063 virtual G4VParticleChange* GenerateBiasingFinalState( const G4Track*, 0064 const G4Step* ) { return nullptr; } 0065 0066 // -- Additional methods, specific to this class: 0067 // ---------------------------------------------- 0068 // -- return concrete type of interaction law: 0069 G4InteractionLawPhysical* GetBiasedExponentialLaw() { return fBiasedExponentialLaw; } 0070 // -- set biased cross-section: 0071 void SetBiasedCrossSection(G4double xst, G4bool updateInteractionLength=false); 0072 G4double GetBiasedCrossSection() const; 0073 // -- Sample underneath distribution: 0074 void Sample(); 0075 // -- Update for a made step, without resampling: 0076 void UpdateForStep( G4double stepLength ); 0077 // -- set/get if interaction occured. 0078 // -- Interaction flag turned off in "Sample()" method. 0079 G4bool GetInteractionOccured() const { return fInteractionOccured; } 0080 void SetInteractionOccured() { fInteractionOccured = true; } 0081 0082 private: 0083 0084 G4InteractionLawPhysical* fBiasedExponentialLaw = nullptr; 0085 G4bool fInteractionOccured = false; 0086 }; 0087 0088 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |