Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 #include "globals.hh" 26 #include "globals.hh" 27 #include "G4ios.hh" 27 #include "G4ios.hh" 28 #include "G4PhysicalConstants.hh" 28 #include "G4PhysicalConstants.hh" 29 #include "G4XAnnihilationChannel.hh" 29 #include "G4XAnnihilationChannel.hh" 30 #include "G4KineticTrack.hh" 30 #include "G4KineticTrack.hh" 31 #include "G4ParticleDefinition.hh" 31 #include "G4ParticleDefinition.hh" 32 #include "G4ResonanceWidth.hh" 32 #include "G4ResonanceWidth.hh" 33 #include "G4ResonancePartialWidth.hh" 33 #include "G4ResonancePartialWidth.hh" 34 #include "G4PhysicsVector.hh" 34 #include "G4PhysicsVector.hh" 35 #include "G4PartialWidthTable.hh" 35 #include "G4PartialWidthTable.hh" 36 36 37 G4XAnnihilationChannel::G4XAnnihilationChannel 37 G4XAnnihilationChannel::G4XAnnihilationChannel(): resonance(0) 38 { 38 { 39 // As a first approximation the model is ass 39 // As a first approximation the model is assumed to be valid over 40 // the entire energy range 40 // the entire energy range 41 lowLimit = 0.; 41 lowLimit = 0.; 42 highLimit = DBL_MAX; 42 highLimit = DBL_MAX; 43 widthTable = 0; 43 widthTable = 0; 44 partWidthTable = 0; 44 partWidthTable = 0; 45 } 45 } 46 46 47 G4XAnnihilationChannel::G4XAnnihilationChannel 47 G4XAnnihilationChannel::G4XAnnihilationChannel(const G4ParticleDefinition* resDefinition, 48 const G4ResonanceWidth& resWi 48 const G4ResonanceWidth& resWidths, 49 const G4ResonancePartialWidth 49 const G4ResonancePartialWidth& resPartWidths, 50 const G4String& partWidthLabe 50 const G4String& partWidthLabel) 51 : resonance(resDefinition) 51 : resonance(resDefinition) 52 { 52 { 53 // Get the tabulated mass-dependent widths f 53 // Get the tabulated mass-dependent widths for the resonance 54 G4String resName = resonance->GetParticleNam 54 G4String resName = resonance->GetParticleName(); 55 // cout << "HPW "<<resName<<endl; 55 // cout << "HPW "<<resName<<endl; 56 G4String shortName = theNames.ShortName(resN 56 G4String shortName = theNames.ShortName(resName); 57 // cout << "HPW "<<shortName<<endl; 57 // cout << "HPW "<<shortName<<endl; 58 // cout << "HPW "<<partWidthLabel<<endl; 58 // cout << "HPW "<<partWidthLabel<<endl; 59 59 60 widthTable = resWidths.MassDependentWidth(sh 60 widthTable = resWidths.MassDependentWidth(shortName); 61 partWidthTable = resPartWidths.MassDependent 61 partWidthTable = resPartWidths.MassDependentWidth(partWidthLabel); 62 62 63 // As a first approximation the model is ass 63 // As a first approximation the model is assumed to be valid over 64 // the entire energy range 64 // the entire energy range 65 lowLimit = 0.; 65 lowLimit = 0.; 66 highLimit = DBL_MAX; 66 highLimit = DBL_MAX; 67 } 67 } 68 68 69 69 70 G4XAnnihilationChannel::~G4XAnnihilationChanne 70 G4XAnnihilationChannel::~G4XAnnihilationChannel() 71 { 71 { 72 if (widthTable) delete widthTable; 72 if (widthTable) delete widthTable; 73 widthTable = 0; 73 widthTable = 0; 74 if (partWidthTable) delete partWidthTable; 74 if (partWidthTable) delete partWidthTable; 75 partWidthTable = 0; 75 partWidthTable = 0; 76 } 76 } 77 77 78 78 79 G4bool G4XAnnihilationChannel::operator==(cons 79 G4bool G4XAnnihilationChannel::operator==(const G4XAnnihilationChannel &right) const 80 { 80 { 81 return (this == (G4XAnnihilationChannel *) & 81 return (this == (G4XAnnihilationChannel *) &right); 82 } 82 } 83 83 84 84 85 G4bool G4XAnnihilationChannel::operator!=(cons 85 G4bool G4XAnnihilationChannel::operator!=(const G4XAnnihilationChannel &right) const 86 { 86 { 87 return (this != (G4XAnnihilationChannel *) & 87 return (this != (G4XAnnihilationChannel *) &right); 88 } 88 } 89 89 90 90 91 G4double G4XAnnihilationChannel::CrossSection( 91 G4double G4XAnnihilationChannel::CrossSection(const G4KineticTrack& trk1, 92 const G4KineticTrack& trk2) co 92 const G4KineticTrack& trk2) const 93 { 93 { 94 G4double sigma = 0.; 94 G4double sigma = 0.; 95 G4double eCM = (trk1.Get4Momentum() + trk2.G 95 G4double eCM = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag(); 96 96 97 const G4ParticleDefinition* def1 = trk1.GetD << 97 G4ParticleDefinition* def1 = trk1.GetDefinition(); 98 const G4ParticleDefinition* def2 = trk2.GetD << 98 G4ParticleDefinition* def2 = trk2.GetDefinition(); 99 99 100 G4int J1 = def1->GetPDGiSpin(); 100 G4int J1 = def1->GetPDGiSpin(); 101 G4int J2 = def2->GetPDGiSpin(); 101 G4int J2 = def2->GetPDGiSpin(); 102 G4double m_1 = def1->GetPDGMass(); 102 G4double m_1 = def1->GetPDGMass(); 103 G4double m_2 = def2->GetPDGMass(); 103 G4double m_2 = def2->GetPDGMass(); 104 104 105 G4int JRes = resonance->GetPDGiSpin(); 105 G4int JRes = resonance->GetPDGiSpin(); 106 G4double mRes = resonance->GetPDGMass(); 106 G4double mRes = resonance->GetPDGMass(); 107 107 108 G4double branch = Branch(trk1,trk2); 108 G4double branch = Branch(trk1,trk2); 109 G4double width = VariableWidth(trk1,trk2); 109 G4double width = VariableWidth(trk1,trk2); 110 G4double cleb = NormalizedClebsch(trk1,trk2) 110 G4double cleb = NormalizedClebsch(trk1,trk2); 111 111 112 G4double S = eCM * eCM; 112 G4double S = eCM * eCM; 113 if (S == 0.) throw G4HadronicException(__FIL 113 if (S == 0.) throw G4HadronicException(__FILE__, __LINE__, "G4XAnnihilationChannel::CrossSection - eCM = 0"); 114 114 115 G4double pCM = std::sqrt((S-(m_1+m_2)*(m_1+m 115 G4double pCM = std::sqrt((S-(m_1+m_2)*(m_1+m_2))*(S-(m_1-m_2)*(m_1-m_2))/(4.*S)); 116 116 117 sigma = ( (JRes + 1.) / ( (J1 + 1) * (J2 + 1 117 sigma = ( (JRes + 1.) / ( (J1 + 1) * (J2 + 1) ) 118 * pi / (pCM * pCM) * branch * width * wi 118 * pi / (pCM * pCM) * branch * width * width / 119 ( (eCM - mRes) * (eCM - mRes) + width * 119 ( (eCM - mRes) * (eCM - mRes) + width * width / 4.0) * cleb * hbarc_squared); 120 120 121 // G4cout << "SS " << branch<<" "<<sigma<<" 121 // G4cout << "SS " << branch<<" "<<sigma<<" " 122 // << J1 <<" " 122 // << J1 <<" " 123 // <<J2<<" " 123 // <<J2<<" " 124 // <<m1<<" " 124 // <<m1<<" " 125 // <<m2<<" " 125 // <<m2<<" " 126 // <<JRes<<" " 126 // <<JRes<<" " 127 // <<mRes<<" " 127 // <<mRes<<" " 128 // <<wRes<<" " 128 // <<wRes<<" " 129 // <<width<<" " 129 // <<width<<" " 130 // <<cleb<<" " 130 // <<cleb<<" " 131 // <<G4endl; 131 // <<G4endl; 132 return sigma; 132 return sigma; 133 } 133 } 134 134 135 135 136 G4String G4XAnnihilationChannel::Name() const 136 G4String G4XAnnihilationChannel::Name() const 137 { 137 { 138 G4String name("XAnnihilationChannelCrossSect 138 G4String name("XAnnihilationChannelCrossSection"); 139 return name; 139 return name; 140 } 140 } 141 141 142 142 143 143 144 G4bool G4XAnnihilationChannel::IsValid(G4doubl 144 G4bool G4XAnnihilationChannel::IsValid(G4double e) const 145 { 145 { 146 G4bool answer = InLimits(e,lowLimit,highLimi 146 G4bool answer = InLimits(e,lowLimit,highLimit); 147 147 148 return answer; 148 return answer; 149 } 149 } 150 150 151 151 152 G4double G4XAnnihilationChannel::Branch(const 152 G4double G4XAnnihilationChannel::Branch(const G4KineticTrack& trk1, 153 const 153 const G4KineticTrack& trk2) const 154 { 154 { 155 G4double w=VariableWidth(trk1,trk2); 155 G4double w=VariableWidth(trk1,trk2); 156 if(w==0) return 0; 156 if(w==0) return 0; 157 return VariablePartialWidth(trk1,trk2) / Var 157 return VariablePartialWidth(trk1,trk2) / VariableWidth(trk1,trk2); 158 } 158 } 159 159 160 G4double G4XAnnihilationChannel::VariableWidth 160 G4double G4XAnnihilationChannel::VariableWidth(const G4KineticTrack& trk1, 161 161 const G4KineticTrack& trk2) const 162 { 162 { 163 // actual production width of resonance, dep 163 // actual production width of resonance, depending on available energy. 164 164 165 G4double width = resonance->GetPDGWidth(); 165 G4double width = resonance->GetPDGWidth(); 166 G4bool dummy = false; 166 G4bool dummy = false; 167 G4double sqrtS = (trk1.Get4Momentum() + trk2 167 G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag(); 168 if (widthTable != 0) 168 if (widthTable != 0) 169 { 169 { 170 width = widthTable->GetValue(sqrtS,dummy 170 width = widthTable->GetValue(sqrtS,dummy); 171 } 171 } 172 return width; 172 return width; 173 } 173 } 174 174 175 175 176 G4double G4XAnnihilationChannel::VariableParti 176 G4double G4XAnnihilationChannel::VariablePartialWidth(const G4KineticTrack& trk1, 177 177 const G4KineticTrack& trk2) const 178 { 178 { 179 // Calculate mass dependent partial width of 179 // Calculate mass dependent partial width of resonance, 180 // based on UrQMD tabulations 180 // based on UrQMD tabulations 181 181 182 G4double width(0); 182 G4double width(0); 183 183 184 if (partWidthTable != 0) 184 if (partWidthTable != 0) 185 { 185 { 186 G4double sqrtS = 0; 186 G4double sqrtS = 0; 187 G4bool dummy = false; 187 G4bool dummy = false; 188 sqrtS = (trk1.Get4Momentum() + trk2.Get4Mo 188 sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag(); 189 width = partWidthTable->GetValue(sqrtS,dum 189 width = partWidthTable->GetValue(sqrtS,dummy); 190 } 190 } 191 else 191 else 192 { 192 { 193 width = resonance->GetPDGWidth(); 193 width = resonance->GetPDGWidth(); 194 } 194 } 195 return width; 195 return width; 196 } 196 } 197 197 198 198 199 G4double G4XAnnihilationChannel::NormalizedCle 199 G4double G4XAnnihilationChannel::NormalizedClebsch(const G4KineticTrack& trk1, 200 200 const G4KineticTrack& trk2) const 201 { 201 { 202 G4double cleb = 0.; 202 G4double cleb = 0.; 203 const G4ParticleDefinition* def1 = trk1.GetD << 203 G4ParticleDefinition* def1 = trk1.GetDefinition(); 204 const G4ParticleDefinition* def2 = trk2.GetD << 204 G4ParticleDefinition* def2 = trk2.GetDefinition(); 205 205 206 G4int iso31 = def1->GetPDGiIsospin3(); 206 G4int iso31 = def1->GetPDGiIsospin3(); 207 G4int iso32 = def2->GetPDGiIsospin3(); 207 G4int iso32 = def2->GetPDGiIsospin3(); 208 G4int iso3 = iso31 + iso32; 208 G4int iso3 = iso31 + iso32; 209 G4int iso1 = def1->GetPDGiIsospin(); 209 G4int iso1 = def1->GetPDGiIsospin(); 210 G4int iso2 = def2->GetPDGiIsospin(); 210 G4int iso2 = def2->GetPDGiIsospin(); 211 211 212 G4int isoRes = resonance->GetPDGiIsospin(); 212 G4int isoRes = resonance->GetPDGiIsospin(); 213 213 214 if (isoRes < iso3) return 0.; 214 if (isoRes < iso3) return 0.; 215 if ((iso1*iso2) == 0) return 1.; 215 if ((iso1*iso2) == 0) return 1.; 216 216 217 cleb = clebsch.NormalizedClebschGordan(isoRe 217 cleb = clebsch.NormalizedClebschGordan(isoRes,iso3,iso1,iso2,iso31,iso32); 218 218 219 // Special case: particle-antiparticle, char 219 // Special case: particle-antiparticle, charge-conjugated states have the same weight 220 G4String type1 = def1->GetParticleType(); 220 G4String type1 = def1->GetParticleType(); 221 G4String type2 = def2->GetParticleType(); 221 G4String type2 = def2->GetParticleType(); 222 G4int anti = def1->GetPDGEncoding() * def2-> 222 G4int anti = def1->GetPDGEncoding() * def2->GetPDGEncoding(); 223 G4int strangeness = resonance->GetQuarkConte 223 G4int strangeness = resonance->GetQuarkContent(3) + resonance->GetAntiQuarkContent(3); 224 if ( ((type1 == "baryon" && type2 == "baryon 224 if ( ((type1 == "baryon" && type2 == "baryon") ||(type1 == "meson" && type2 == "meson")) && 225 anti < 0 && strangeness == 0) 225 anti < 0 && strangeness == 0) 226 { 226 { 227 if (def1->GetPDGEncoding() != -(def2->Ge 227 if (def1->GetPDGEncoding() != -(def2->GetPDGEncoding())) cleb = 0.5 * cleb; 228 } 228 } 229 229 230 return cleb; 230 return cleb; 231 } 231 } 232 232 233 233 234 234 235 235 236 236 237 237