|
|
|||
Warning, file /geant4/examples/extended/biasing/GB01/include/GB01BOptrChangeCrossSection.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 /// \file GB01/include/GB01BOptrChangeCrossSection.hh 0027 /// \brief Definition of the GB01BOptrChangeCrossSection class 0028 // 0029 //--------------------------------------------------------------- 0030 // 0031 // GB01BOptrChangeCrossSection 0032 // 0033 // Class Description: 0034 // A G4VBiasingOperator concrete implementation example to 0035 // illustrate how to bias physics processes cross-section for 0036 // one particle type. 0037 // The G4VBiasingOperation G4BOptnChangeCrossSection is 0038 // selected by this operator, and is sent to each process 0039 // calling the operator. 0040 // A simple constant bias to the cross-section is applied, 0041 // but more sophisticated changes can be applied. 0042 // 0043 //--------------------------------------------------------------- 0044 // 0045 0046 #ifndef GB01BOptrChangeCrossSection_hh 0047 #define GB01BOptrChangeCrossSection_hh 1 0048 0049 #include "G4VBiasingOperator.hh" 0050 class G4BOptnChangeCrossSection; 0051 class G4ParticleDefinition; 0052 #include <map> 0053 0054 class GB01BOptrChangeCrossSection : public G4VBiasingOperator 0055 { 0056 public: 0057 // ------------------------------------------------------------ 0058 // -- Constructor: takes the name of the particle type to bias: 0059 // ------------------------------------------------------------ 0060 GB01BOptrChangeCrossSection(G4String particleToBias, G4String name = "ChangeXS"); 0061 ~GB01BOptrChangeCrossSection() override; 0062 0063 // -- method called at beginning of run: 0064 void StartRun() override; 0065 0066 private: 0067 // ----------------------------- 0068 // -- Mandatory from base class: 0069 // ----------------------------- 0070 // -- This method returns the biasing operation that will bias the physics process occurence. 0071 G4VBiasingOperation* 0072 ProposeOccurenceBiasingOperation(const G4Track* track, 0073 const G4BiasingProcessInterface* callingProcess) override; 0074 // -- Methods not used: 0075 G4VBiasingOperation* 0076 ProposeFinalStateBiasingOperation(const G4Track*, const G4BiasingProcessInterface*) override 0077 { 0078 return nullptr; 0079 } 0080 G4VBiasingOperation* 0081 ProposeNonPhysicsBiasingOperation(const G4Track*, const G4BiasingProcessInterface*) override 0082 { 0083 return nullptr; 0084 } 0085 0086 private: 0087 // -- ("using" is avoid compiler complaining against (false) method shadowing.) 0088 using G4VBiasingOperator::OperationApplied; 0089 0090 // -- Optionnal base class method implementation. 0091 // -- This method is called to inform the operator that a proposed operation has been applied. 0092 // -- In the present case, it means that a physical interaction occured (interaction at 0093 // -- PostStepDoIt level): 0094 void OperationApplied(const G4BiasingProcessInterface* callingProcess, 0095 G4BiasingAppliedCase biasingCase, 0096 G4VBiasingOperation* occurenceOperationApplied, 0097 G4double weightForOccurenceInteraction, 0098 G4VBiasingOperation* finalStateOperationApplied, 0099 const G4VParticleChange* particleChangeProduced) override; 0100 0101 private: 0102 // -- List of associations between processes and biasing operations: 0103 std::map<const G4BiasingProcessInterface*, G4BOptnChangeCrossSection*> 0104 fChangeCrossSectionOperations; 0105 G4bool fSetup; 0106 const G4ParticleDefinition* fParticleToBias; 0107 }; 0108 0109 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|