|
||||
File indexing completed on 2025-01-18 09:57:59
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 // 0030 // G4BOptnCloning 0031 // 0032 // Class Description: 0033 // A G4VBiasingOperation to clone a track, allowing to set 0034 // weight arbitrary weights. 0035 // 0036 // 0037 //--------------------------------------------------------------- 0038 // Initial version Nov. 2013 M. Verderi 0039 0040 0041 #ifndef G4BOptnCloning_hh 0042 #define G4BOptnCloning_hh 1 0043 0044 #include "G4VBiasingOperation.hh" 0045 #include "G4ParticleChange.hh" 0046 0047 class G4BOptnCloning : public G4VBiasingOperation { 0048 public: 0049 // -- Constructor : 0050 G4BOptnCloning(G4String name); 0051 // -- destructor: 0052 virtual ~G4BOptnCloning(); 0053 0054 public: 0055 // -- Methods from G4VBiasingOperation interface: 0056 // ------------------------------------------- 0057 // -- Unsed: 0058 virtual const G4VBiasingInteractionLaw* ProvideOccurenceBiasingInteractionLaw( const G4BiasingProcessInterface*, G4ForceCondition& ) {return 0;} 0059 virtual G4VParticleChange* ApplyFinalStateBiasing( const G4BiasingProcessInterface*, 0060 const G4Track*, 0061 const G4Step*, 0062 G4bool& ) {return 0;} 0063 // -- Used: 0064 virtual G4double DistanceToApplyOperation( const G4Track*, 0065 G4double, 0066 G4ForceCondition* condition) 0067 { 0068 *condition = NotForced; return 0; // -- acts immediately 0069 } 0070 virtual G4VParticleChange* GenerateBiasingFinalState( const G4Track*, 0071 const G4Step* ); 0072 0073 public: 0074 // -- Additional methods, specific to this class: 0075 // ---------------------------------------------- 0076 void SetCloneWeights(G4double clone1Weight, G4double clone2Weight) {fClone1W = clone1Weight ; fClone2W = clone2Weight;} 0077 0078 G4Track* GetCloneTrack() const { return fCloneTrack; } 0079 0080 private: 0081 G4double fClone1W, 0082 fClone2W; 0083 G4ParticleChange fParticleChange; 0084 G4Track* fCloneTrack; 0085 }; 0086 0087 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |