|
||||
File indexing completed on 2025-01-18 09:58:00
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 #ifndef G4CASCADE_RECOIL_MAKER_HH 0027 #define G4CASCADE_RECOIL_MAKER_HH 0028 // 0029 // Collects generated cascade data (using Collider::collide() interface) 0030 // and computes the nuclear recoil kinematics needed to balance the event. 0031 // 0032 // 20100909 M. Kelsey -- Inspired by G4CascadeCheckBalance 0033 // 20100909 M. Kelsey -- Move G4IntraNucleiCascader::goodCase() here, add 0034 // tolerance for "almost zero" excitation energy, add function 0035 // to manually override excitation energy 0036 // 20100910 M. Kelsey -- Drop getRecoilFragment() in favor of user calling 0037 // makeRecoilFragment() with returned non-const pointer. Drop 0038 // handling of excitons. 0039 // 20100914 M. Kelsey -- Migrate to integer A and Z 0040 // 20100921 M. Kelsey -- Return G4InuclNuclei using "makeRecoilNuclei()". 0041 // Repurpose "makeRecoilFragment()" to return G4Fragment. 0042 // 20100924 M. Kelsey -- Add raw excitation energy (mass difference) function 0043 // 20110214 M. Kelsey -- Replace "model" with G4InuclParticle::Model enum 0044 // 20110722 M. Kelsey -- For IntraNucleiCascader, take G4CollOut as argument 0045 // 20130620 Address Coverity complaint about missing copy actions 0046 0047 #include <cmath> 0048 #include <vector> 0049 #include <CLHEP/Units/SystemOfUnits.h> 0050 0051 #include "G4VCascadeCollider.hh" 0052 #include "globals.hh" 0053 #include "G4CollisionOutput.hh" 0054 #include "G4InuclNuclei.hh" 0055 #include "G4Fragment.hh" 0056 #include "G4LorentzVector.hh" 0057 0058 class G4CascadParticle; 0059 class G4CascadeCheckBalance; 0060 class G4InuclElementaryParticle; 0061 class G4InuclParticle; 0062 0063 0064 class G4CascadeRecoilMaker : public G4VCascadeCollider { 0065 public: 0066 explicit G4CascadeRecoilMaker(G4double tolerance=0.001*CLHEP::MeV); 0067 virtual ~G4CascadeRecoilMaker(); 0068 0069 // Standard Collider interface (non-const output "buffer") 0070 void collide(G4InuclParticle* bullet, G4InuclParticle* target, 0071 G4CollisionOutput& output); 0072 0073 // This is for use with G4IntraNucleiCascader 0074 void collide(G4InuclParticle* bullet, G4InuclParticle* target, 0075 G4CollisionOutput& output, 0076 const std::vector<G4CascadParticle>& cparticles); 0077 0078 // Modifiable parameters 0079 void setTolerance(G4double tolerance) { excTolerance = tolerance; } 0080 0081 void setRecoilExcitation(G4double Eexc) { excitationEnergy = Eexc; } 0082 0083 // Build nucleus from current parameters, if physically reasonable 0084 G4InuclNuclei* makeRecoilNuclei(G4InuclParticle::Model model=G4InuclParticle::DefaultModel); 0085 G4Fragment* makeRecoilFragment(); // For use with PreCompound 0086 0087 // Attach exciton configuration for use by "nucleus makers" 0088 void addExcitonConfiguration(const G4ExitonConfiguration exciton) { 0089 theExcitons = exciton; 0090 } 0091 0092 // Access nuclear configuration parameters 0093 G4int getRecoilA() const { return recoilA; } 0094 G4int getRecoilZ() const { return recoilZ; } 0095 G4double getRecoilExcitation() const { return excitationEnergy; } 0096 const G4LorentzVector& getRecoilMomentum() const { return recoilMomentum; } 0097 0098 // Data quality checks 0099 G4bool goodFragment() const; // Verify A, Z both meaningful 0100 G4bool goodRecoil() const; // And sensible four-vector 0101 G4bool wholeEvent() const; // Zero recoil 0102 G4bool unphysicalRecoil() const { return !wholeEvent() && !goodRecoil(); } 0103 0104 G4bool goodNucleus() const; // Ensure that fragment is energetically okay 0105 0106 protected: 0107 void fillRecoil(); // Set recoil parameters from CheckBalance 0108 G4double deltaM() const; // Mass difference from current parameters 0109 0110 private: 0111 G4CascadeCheckBalance* balance; // Used to do kinematics calculations 0112 0113 G4double excTolerance; // Minimum excitation energy, rounds to zero 0114 0115 G4double inputEkin; // Available initial kinetic energy 0116 0117 G4int recoilA; // Nuclear parameters of recoil 0118 G4int recoilZ; 0119 G4LorentzVector recoilMomentum; 0120 G4double excitationEnergy; 0121 0122 G4ExitonConfiguration theExcitons; // Used by G4InuclNuclei and G4Fragment 0123 0124 G4InuclNuclei theRecoilNuclei; // Reusable buffers for recoil 0125 G4Fragment theRecoilFragment; 0126 0127 private: 0128 // Copying of modules is forbidden 0129 G4CascadeRecoilMaker(const G4CascadeRecoilMaker&); 0130 G4CascadeRecoilMaker& operator=(const G4CascadeRecoilMaker&); 0131 }; 0132 0133 #endif /* G4CASCADE_RECOIL_MAKER_HH */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |