|
||||
File indexing completed on 2025-01-18 09:58:05
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 // G4DecayProducts 0027 // 0028 // Class description: 0029 // 0030 // Container for decay products of dynamic particles 0031 0032 // Author: H.Kurashige, 12 July 1996 0033 // -------------------------------------------------------------------- 0034 #ifndef G4DecayProducts_hh 0035 #define G4DecayProducts_hh 1 0036 0037 #include "G4DynamicParticle.hh" 0038 #include "G4ios.hh" 0039 #include "globals.hh" 0040 0041 #include <vector> 0042 0043 class G4DecayProducts 0044 { 0045 public: 0046 // Constructors 0047 G4DecayProducts(); 0048 G4DecayProducts(const G4DynamicParticle& aParticle); 0049 0050 // Copy constructor and assignment operator 0051 // Deep copy: for G4DynamicParticle pointer 0052 G4DecayProducts(const G4DecayProducts& right); 0053 G4DecayProducts& operator=(const G4DecayProducts& right); 0054 0055 // Destructor 0056 ~G4DecayProducts(); 0057 0058 // Equality operators 0059 inline G4bool operator==(const G4DecayProducts& right) const; 0060 inline G4bool operator!=(const G4DecayProducts& right) const; 0061 0062 // Set-get methods for the parent particle; theParentPaticle is used 0063 // to get information of parent particle when decay products are filled. 0064 // New G4DynamicParticle object is created in set methods 0065 inline const G4DynamicParticle* GetParentParticle() const; 0066 void SetParentParticle(const G4DynamicParticle& aParticle); 0067 0068 // Boost all products 0069 void Boost(G4double totalEnergy, const G4ThreeVector& momentumDirection); 0070 void Boost(G4double betax, G4double betay, G4double betaz); 0071 0072 // Push/pop methods for decay products pointer 0073 G4DynamicParticle* PopProducts(); 0074 G4int PushProducts(G4DynamicParticle* aParticle); 0075 0076 G4DynamicParticle* operator[](G4int anIndex) const; 0077 0078 inline G4int entries() const { return numberOfProducts; } 0079 0080 // Check energy/momentum of products 0081 G4bool IsChecked() const; 0082 0083 void DumpInfo() const; 0084 0085 using G4DecayProductVector = std::vector<G4DynamicParticle*>; 0086 0087 private: 0088 G4int numberOfProducts = 0; 0089 G4DynamicParticle* theParentParticle = nullptr; 0090 G4DecayProductVector* theProductVector = nullptr; 0091 }; 0092 0093 // ------------------------ 0094 // Inline methods 0095 // ------------------------ 0096 0097 inline G4bool G4DecayProducts::operator==(const G4DecayProducts& right) const 0098 { 0099 return (this == (G4DecayProducts*)&right); 0100 } 0101 0102 inline G4bool G4DecayProducts::operator!=(const G4DecayProducts& right) const 0103 { 0104 return (this != (G4DecayProducts*)&right); 0105 } 0106 0107 inline const G4DynamicParticle* G4DecayProducts::GetParentParticle() const 0108 { 0109 return theParentParticle; 0110 } 0111 0112 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |