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