00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // 00028 #ifndef G4Nucleon_h 00029 #define G4Nucleon_h 1 00030 00031 // ------------------------------------------------------------ 00032 // GEANT 4 class header file 00033 // 00034 // ---------------- G4Nucleon ---------------- 00035 // by Gunter Folger, May 1998. 00036 // class for a nucleon (inside a 3D Nucleus) 00037 // ------------------------------------------------------------ 00038 00039 #include "G4ThreeVector.hh" 00040 #include "G4LorentzVector.hh" 00041 #include "globals.hh" 00042 #include "G4ParticleDefinition.hh" 00043 #include "G4Proton.hh" 00044 #include "G4Neutron.hh" 00045 00046 #include "G4AntiProton.hh" // Uzhi Feb. 2011 00047 #include "G4AntiNeutron.hh" // Uzhi Feb. 2011 00048 00049 #include "G4VKineticNucleon.hh" 00050 00051 //#include "G4VSplitableHadron.hh" 00052 class G4VSplitableHadron; 00053 00054 class G4Nucleon : public G4VKineticNucleon 00055 { 00056 00057 public: 00058 G4Nucleon(); 00059 ~G4Nucleon(); 00060 00061 inline int operator==(const G4Nucleon &right) const; 00062 inline int operator!=(const G4Nucleon &right) const; 00063 G4Nucleon& operator=(const G4Nucleon& right); 00064 00065 public: 00066 00067 inline void SetPosition(G4ThreeVector & aPosition) {thePosition = aPosition;} 00068 virtual inline const G4ThreeVector & GetPosition() const {return thePosition;} 00069 00070 inline void SetMomentum(G4LorentzVector & aMomentum) {theMomentum = aMomentum;} 00071 inline const G4LorentzVector& GetMomentum() const {return theMomentum;} 00072 virtual inline const G4LorentzVector & Get4Momentum() const {return theMomentum;} 00073 00074 inline void SetBindingEnergy(G4double anEnergy) {theBindingE = anEnergy;} 00075 inline G4double GetBindingEnergy() const {return theBindingE;} 00076 00077 inline void SetParticleType(G4Proton * aProton) {theParticleType = aProton;} 00078 inline void SetParticleType(G4Neutron *aNeutron){theParticleType = aNeutron;} 00079 00080 inline void SetParticleType(G4AntiProton * aAntiProton) {theParticleType =aAntiProton;} //VU 00081 inline void SetParticleType(G4AntiNeutron *aAntiNeutron){theParticleType =aAntiNeutron;}//VU 00082 00083 00084 inline G4ParticleDefinition * GetParticleType() const {return theParticleType;} 00085 virtual G4ParticleDefinition* GetDefinition() const {return theParticleType;} 00086 00087 inline void Boost(const G4ThreeVector & beta){ theMomentum.boost(beta); } 00088 void Boost(const G4LorentzVector & aMomentum); 00089 00090 inline void Hit(G4VSplitableHadron *aHit) { theSplitableHadron=aHit;} 00091 // inline void Hit(G4int ) { isHit=true;} 00092 inline void Hit(G4int ) 00093 { 00094 theSplitableHadron=reinterpret_cast<G4VSplitableHadron *>(1111); 00095 } 00096 inline G4VSplitableHadron * GetSplitableHadron() const { return theSplitableHadron;} 00097 inline G4bool AreYouHit() const { return theSplitableHadron!=0;} 00098 00099 private: 00100 00101 G4ThreeVector thePosition; 00102 G4LorentzVector theMomentum; 00103 G4double theBindingE; 00104 G4ParticleDefinition * theParticleType; 00105 G4VSplitableHadron * theSplitableHadron; 00106 00107 00108 }; 00109 00110 std::ostream & operator << (std::ostream &, const G4Nucleon&); 00111 00112 inline int G4Nucleon::operator==(const G4Nucleon &right) const 00113 { 00114 return this==&right; 00115 } 00116 inline int G4Nucleon::operator!=(const G4Nucleon &right) const 00117 { 00118 return this!=&right; 00119 } 00120 00121 inline G4Nucleon& G4Nucleon::operator=(const G4Nucleon& right) 00122 { 00123 if (this != &right) 00124 { 00125 thePosition=right.GetPosition(); 00126 theMomentum=right.Get4Momentum(); 00127 theBindingE=right.GetBindingEnergy(); 00128 theParticleType=right.GetDefinition(); 00129 theSplitableHadron=right.GetSplitableHadron(); 00130 } 00131 return *this; 00132 } 00133 00134 #endif 00135 00136