![]() |
|
|||
File indexing completed on 2025-09-15 08:58:21
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 // G4ChannelingOptrChangeCrossSection 0029 // Based On GB01BOptrChangeCrossSection 0030 // Class Description: 0031 // A G4VBiasingOperator concrete implementation example to 0032 // illustrate how to bias physics processes cross-section for 0033 // one particle type. 0034 // The G4VBiasingOperation G4BOptnChangeCrossSection is 0035 // selected by this operator, and is sent to each process 0036 // calling the operator. 0037 // A simple constant bias to the cross-section is applied, 0038 // but more sophisticated changes can be applied. 0039 // 0040 //--------------------------------------------------------------- 0041 // 0042 0043 #ifndef G4ChannelingOptrChangeCrossSection_hh 0044 #define G4ChannelingOptrChangeCrossSection_hh 1 0045 0046 #include "G4VBiasingOperator.hh" 0047 class G4BOptnChangeCrossSection; 0048 class G4ParticleDefinition; 0049 #include <map> 0050 #include <unordered_map> 0051 0052 enum G4ChannelingDensityRatio{ 0053 fDensityRatioNotDefined = -1, 0054 fDensityRatioNone = 0, 0055 fDensityRatioNuDElD = 1, 0056 fDensityRatioNuD = 2, 0057 fDensityRatioElD = 3 0058 }; 0059 0060 class G4ChannelingOptrChangeCrossSection : public G4VBiasingOperator { 0061 public: 0062 // ------------------------------------------------------------ 0063 // -- Constructor: takes the name of the particle type to bias: 0064 // ------------------------------------------------------------ 0065 G4ChannelingOptrChangeCrossSection(const G4String& particleToBias, 0066 const G4String& name = "ChannelingChangeXS"); 0067 virtual ~G4ChannelingOptrChangeCrossSection(); 0068 virtual void StartRun(); 0069 0070 private: 0071 G4int fChannelingID; 0072 0073 private: 0074 virtual G4VBiasingOperation* 0075 ProposeOccurenceBiasingOperation(const G4Track* track, 0076 const G4BiasingProcessInterface* callingProcess); 0077 virtual G4VBiasingOperation* 0078 ProposeFinalStateBiasingOperation(const G4Track*, const G4BiasingProcessInterface*) 0079 {return 0;} 0080 virtual G4VBiasingOperation* 0081 ProposeNonPhysicsBiasingOperation(const G4Track*, const G4BiasingProcessInterface*) 0082 {return 0;} 0083 0084 private: 0085 using G4VBiasingOperator::OperationApplied; 0086 virtual void OperationApplied( const G4BiasingProcessInterface* callingProcess, 0087 G4BiasingAppliedCase biasingCase, 0088 G4VBiasingOperation* occurenceOperationApplied, 0089 G4double weightForOccurenceInteraction, 0090 G4VBiasingOperation* finalStateOperationApplied, 0091 const G4VParticleChange* particleChangeProduced ); 0092 0093 private: 0094 std::map< const G4BiasingProcessInterface*, 0095 G4BOptnChangeCrossSection* > fChangeCrossSectionOperations; 0096 G4bool fSetup; 0097 const G4ParticleDefinition* fParticleToBias; 0098 0099 private: 0100 std::unordered_map<std::string,G4ChannelingDensityRatio> fProcessToDensity; 0101 }; 0102 0103 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |