Geant4 Cross Reference |
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 // GEANT 4 class implementation file 28 // 29 // History: first implementation, based on object model of 30 // 10 oct 1998 H.Kurashige 31 // --------------------------------------------------------------- 32 #ifndef G4ExcitedNucleonConstructor_h 33 #define G4ExcitedNucleonConstructor_h 1 34 35 #include "G4ExcitedBaryonConstructor.hh" 36 #include "globals.hh" 37 38 class G4ExcitedNucleonConstructor : public G4ExcitedBaryonConstructor 39 { 40 // This class is a utility class for construction 41 // short lived particles 42 public: 43 enum 44 { 45 NStates = 15 46 }; 47 48 enum 49 { 50 NumberOfDecayModes = 9 51 }; 52 53 public: 54 G4ExcitedNucleonConstructor(); 55 ~G4ExcitedNucleonConstructor() override = default; 56 57 protected: 58 G4int GetEncoding(G4int iIsoSpin3, G4int idxState) override; 59 60 G4bool Exist(G4int) override { return true; } 61 62 G4int GetQuarkContents(G4int, G4int) override; 63 G4String GetName(G4int iIso3, G4int iState) override; 64 G4String GetMultipletName(G4int iState) override; 65 G4double GetMass(G4int state, G4int iso) override; 66 G4double GetWidth(G4int state, G4int iso) override; 67 G4int GetiSpin(G4int iState) override; 68 G4int GetiParity(G4int iState) override; 69 G4int GetEncodingOffset(G4int iState) override; 70 71 G4DecayTable* CreateDecayTable(const G4String& name, G4int iIso3, G4int iState, 72 G4bool fAnti = false) override; 73 74 private: 75 G4DecayTable* AddNGammaMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3, 76 G4bool fAnti); 77 G4DecayTable* AddNPiMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3, 78 G4bool fAnti); 79 G4DecayTable* AddNEtaMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3, 80 G4bool fAnti); 81 G4DecayTable* AddNOmegaMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3, 82 G4bool fAnti); 83 G4DecayTable* AddNRhoMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3, 84 G4bool fAnti); 85 G4DecayTable* AddN2PiMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3, 86 G4bool fAnti); 87 G4DecayTable* AddDeltaPiMode(G4DecayTable* table, const G4String& name, G4double br, 88 G4int iIso3, G4bool fAnti); 89 G4DecayTable* AddNStarPiMode(G4DecayTable* table, const G4String& name, G4double br, 90 G4int iIso3, G4bool fAnti); 91 G4DecayTable* AddLambdaKMode(G4DecayTable* table, const G4String& name, G4double br, 92 G4int iIso3, G4bool fAnti); 93 94 private: 95 enum 96 { 97 NucleonIsoSpin = 1 98 }; 99 100 static const char* name[NStates]; 101 static const G4double mass[NStates]; 102 static const G4double width[NStates]; 103 static const G4int iSpin[NStates]; 104 static const G4int iParity[NStates]; 105 static const G4int encodingOffset[NStates]; 106 107 enum 108 { 109 NGamma = 0, 110 NPi = 1, 111 NEta = 2, 112 NOmega = 3, 113 NRho = 4, 114 N2Pi = 5, 115 DeltaPi = 6, 116 NStarPi = 7, 117 LambdaK = 8 118 }; 119 120 static const G4double bRatio[NStates][NumberOfDecayModes]; 121 }; 122 123 inline G4double G4ExcitedNucleonConstructor::GetMass(G4int iState, G4int) 124 { 125 return mass[iState]; 126 } 127 128 inline G4double G4ExcitedNucleonConstructor::GetWidth(G4int iState, G4int) 129 { 130 return width[iState]; 131 } 132 133 inline G4int G4ExcitedNucleonConstructor::GetiSpin(G4int iState) 134 { 135 return iSpin[iState]; 136 } 137 138 inline G4int G4ExcitedNucleonConstructor::GetiParity(G4int iState) 139 { 140 return iParity[iState]; 141 } 142 143 inline G4int G4ExcitedNucleonConstructor::GetEncodingOffset(G4int iState) 144 { 145 return encodingOffset[iState]; 146 } 147 148 inline G4int G4ExcitedNucleonConstructor::GetQuarkContents(G4int iQ, G4int iIso3) 149 { 150 // Quark contents 151 // iIso3 = -1 : udd 152 // iIso3 = +1 : uud 153 G4int quark = 0; 154 if (iQ == 0) { 155 // u-quark 156 quark = 2; 157 } 158 else if (iQ == 2) { 159 // d-quark 160 quark = 1; 161 } 162 else { 163 if (iIso3 == -1) { 164 // d-quark 165 quark = 1; 166 } 167 else { 168 // u-quark 169 quark = 2; 170 } 171 } 172 return quark; 173 } 174 175 inline G4String G4ExcitedNucleonConstructor::GetMultipletName(G4int iState) 176 { 177 return name[iState]; 178 } 179 180 inline G4String G4ExcitedNucleonConstructor::GetName(G4int iIso3, G4int iState) 181 { 182 G4String particle = name[iState]; 183 if (iIso3 == -1) { 184 particle += "0"; 185 } 186 else { 187 particle += "+"; 188 } 189 return particle; 190 } 191 #endif 192