Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4DecayProducts.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4DecayProducts.hh 67971 2013-03-13 10:13:24Z gcosmo $
28 //
29 //
30 // ------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 // History: first implementation, based on object model of
34 // 12 Dec 1997 H.Kurashige
35 //
36 // Use std::vector 4 Apr. 2012 H.Kurashige
37 // ------------------------------------------------------------
38 
39 #ifndef G4DecayProducts_h
40 #define G4DecayProducts_h 1
41 
42 #include "G4ios.hh"
43 #include "globals.hh"
44 #include "G4DynamicParticle.hh"
45 #include <vector>
46 
48 {
49  public: // With Description
50 
51  // constructors
53  G4DecayProducts(const G4DynamicParticle &aParticle);
54 
55  public:
56  // copy constructor and assignment operator
57  // Deep copy: for G4DynamicParticle pointer
60 
61  //destructor
63 
64  // (un)equal operator
65  G4int operator==(const G4DecayProducts &right) const;
66  G4int operator!=(const G4DecayProducts &right) const;
67 
68  public: // With Description
69  // set-get methods for the parent particle
70  // theParentPaticle is used to get information of parent particle
71  // when decay products are filled
72  // new G4DynamicParticle object is created in set methods
73  const G4DynamicParticle* GetParentParticle() const {return theParentParticle;};
74  void SetParentParticle(const G4DynamicParticle &aParticle);
75 
76  // boost all products
77  void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection);
78  void Boost(G4double betax, G4double betay, G4double betaz);
79 
80  // push-pop methods for decay products pointer
83 
84  G4DynamicParticle* operator[](G4int anIndex) const;
85 
86  G4int entries() const {return numberOfProducts;};
87 
88  // check energy/momentum of products
89  G4bool IsChecked() const;
90 
91  //
92  void DumpInfo() const;
93 
94  typedef std::vector<G4DynamicParticle*> G4DecayProductVector;
95  protected:
96  enum {MaxNumberOfProducts = 64};
97 
98  private:
99  G4int numberOfProducts;
100  G4DynamicParticle* theParentParticle;
101  G4DecayProductVector* theProductVector;
102 
103 };
104 
105 // ------------------------
106 // Inlined operators
107 // ------------------------
108 
109 inline
111 {
112  return (this == (G4DecayProducts *) &right);
113 }
114 
115 inline
117 {
118  return (this != (G4DecayProducts *) &right);
119 }
120 
121 #endif
122 
G4int PushProducts(G4DynamicParticle *aParticle)
G4int operator==(const G4DecayProducts &right) const
G4DecayProducts & operator=(const G4DecayProducts &right)
const G4DynamicParticle * GetParentParticle() const
void Boost(G4double totalEnergy, const G4ThreeVector &momentumDirection)
int G4int
Definition: G4Types.hh:78
G4DynamicParticle * operator[](G4int anIndex) const
G4int operator!=(const G4DecayProducts &right) const
bool G4bool
Definition: G4Types.hh:79
void DumpInfo() const
std::vector< G4DynamicParticle * > G4DecayProductVector
void SetParentParticle(const G4DynamicParticle &aParticle)
G4DynamicParticle * PopProducts()
G4bool IsChecked() const
G4int entries() const
double G4double
Definition: G4Types.hh:76