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.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/im_r_matrix/src/G4XAnnihilationChannel.cc (Version 11.3.0) and /processes/hadronic/models/im_r_matrix/src/G4XAnnihilationChannel.cc (Version 9.3)


  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"              << 
 29 #include "G4XAnnihilationChannel.hh"               28 #include "G4XAnnihilationChannel.hh"
 30 #include "G4KineticTrack.hh"                       29 #include "G4KineticTrack.hh"
 31 #include "G4ParticleDefinition.hh"                 30 #include "G4ParticleDefinition.hh"
 32 #include "G4ResonanceWidth.hh"                     31 #include "G4ResonanceWidth.hh"
 33 #include "G4ResonancePartialWidth.hh"              32 #include "G4ResonancePartialWidth.hh"
 34 #include "G4PhysicsVector.hh"                      33 #include "G4PhysicsVector.hh"
 35 #include "G4PartialWidthTable.hh"                  34 #include "G4PartialWidthTable.hh"
 36                                                    35 
 37 G4XAnnihilationChannel::G4XAnnihilationChannel     36 G4XAnnihilationChannel::G4XAnnihilationChannel(): resonance(0)
 38 {                                              <<  37 { }
 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                                                    38 
 47 G4XAnnihilationChannel::G4XAnnihilationChannel     39 G4XAnnihilationChannel::G4XAnnihilationChannel(const G4ParticleDefinition* resDefinition,
 48                  const G4ResonanceWidth& resWi     40                  const G4ResonanceWidth& resWidths,
 49                  const G4ResonancePartialWidth     41                  const G4ResonancePartialWidth& resPartWidths,
 50                  const G4String& partWidthLabe     42                  const G4String& partWidthLabel) 
 51   : resonance(resDefinition)                       43   : resonance(resDefinition)
 52 {                                                  44 { 
 53   // Get the tabulated mass-dependent widths f     45   // Get the tabulated mass-dependent widths for the resonance
 54   G4String resName = resonance->GetParticleNam     46   G4String resName = resonance->GetParticleName();
 55   // cout << "HPW "<<resName<<endl;                47   // cout << "HPW "<<resName<<endl;
 56   G4String shortName = theNames.ShortName(resN     48   G4String shortName = theNames.ShortName(resName);
 57   // cout << "HPW "<<shortName<<endl;              49   // cout << "HPW "<<shortName<<endl;
 58   // cout << "HPW "<<partWidthLabel<<endl;         50   // cout << "HPW "<<partWidthLabel<<endl;
 59                                                    51 
 60   widthTable = resWidths.MassDependentWidth(sh     52   widthTable = resWidths.MassDependentWidth(shortName);
 61   partWidthTable = resPartWidths.MassDependent     53   partWidthTable = resPartWidths.MassDependentWidth(partWidthLabel);
 62                                                    54 
 63   // As a first approximation the model is ass     55   // As a first approximation the model is assumed to be valid over 
 64   // the entire energy range                       56   // the entire energy range
 65   lowLimit = 0.;                                   57   lowLimit = 0.;
 66   highLimit = DBL_MAX;                             58   highLimit = DBL_MAX;
 67 }                                                  59 }
 68                                                    60 
 69                                                    61 
 70 G4XAnnihilationChannel::~G4XAnnihilationChanne     62 G4XAnnihilationChannel::~G4XAnnihilationChannel()
 71 {                                                  63 {
 72   if (widthTable) delete widthTable;           <<  64   delete widthTable;
 73   widthTable = 0;                                  65   widthTable = 0;
 74   if (partWidthTable) delete partWidthTable;   <<  66   delete partWidthTable;
 75   partWidthTable = 0;                              67   partWidthTable = 0;
 76  }                                                 68  }
 77                                                    69 
 78                                                    70 
 79 G4bool G4XAnnihilationChannel::operator==(cons     71 G4bool G4XAnnihilationChannel::operator==(const G4XAnnihilationChannel &right) const
 80 {                                                  72 {
 81   return (this == (G4XAnnihilationChannel *) &     73   return (this == (G4XAnnihilationChannel *) &right);
 82 }                                                  74 }
 83                                                    75 
 84                                                    76 
 85 G4bool G4XAnnihilationChannel::operator!=(cons     77 G4bool G4XAnnihilationChannel::operator!=(const G4XAnnihilationChannel &right) const
 86 {                                                  78 {
 87   return (this != (G4XAnnihilationChannel *) &     79   return (this != (G4XAnnihilationChannel *) &right);
 88 }                                                  80 }
 89                                                    81 
 90                                                    82 
 91 G4double G4XAnnihilationChannel::CrossSection(     83 G4double G4XAnnihilationChannel::CrossSection(const G4KineticTrack& trk1, 
 92                 const G4KineticTrack& trk2) co     84                 const G4KineticTrack& trk2) const
 93 {                                                  85 {
 94   G4double sigma = 0.;                             86   G4double sigma = 0.;
 95   G4double eCM = (trk1.Get4Momentum() + trk2.G     87   G4double eCM = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
 96                                                    88 
 97   const G4ParticleDefinition* def1 = trk1.GetD <<  89   G4ParticleDefinition* def1 = trk1.GetDefinition();
 98   const G4ParticleDefinition* def2 = trk2.GetD <<  90   G4ParticleDefinition* def2 = trk2.GetDefinition();
 99                                                    91 
100   G4int J1 = def1->GetPDGiSpin();                  92   G4int J1 = def1->GetPDGiSpin();
101   G4int J2 = def2->GetPDGiSpin();                  93   G4int J2 = def2->GetPDGiSpin();
102   G4double m_1 = def1->GetPDGMass();           <<  94   G4double m1 = def1->GetPDGMass();
103   G4double m_2 = def2->GetPDGMass();           <<  95   G4double m2 = def2->GetPDGMass();
104                                                    96 
105   G4int JRes = resonance->GetPDGiSpin();           97   G4int JRes = resonance->GetPDGiSpin();
106   G4double mRes = resonance->GetPDGMass();         98   G4double mRes = resonance->GetPDGMass();
107                                                    99 
108   G4double branch = Branch(trk1,trk2);            100   G4double branch = Branch(trk1,trk2);
109   G4double width = VariableWidth(trk1,trk2);      101   G4double width = VariableWidth(trk1,trk2);
110   G4double cleb = NormalizedClebsch(trk1,trk2)    102   G4double cleb = NormalizedClebsch(trk1,trk2);
111                                                   103 
112   G4double S = eCM * eCM;                      << 104   G4double s = eCM * eCM;
113   if (S == 0.) throw G4HadronicException(__FIL << 105   if (s == 0.) throw G4HadronicException(__FILE__, __LINE__, "G4XAnnihilationChannel::CrossSection - eCM = 0");
114                                                   106 
115   G4double pCM = std::sqrt((S-(m_1+m_2)*(m_1+m << 107   G4double pCM = std::sqrt((s-(m1+m2)*(m1+m2))*(s-(m1-m2)*(m1-m2))/(4.*s));
116                                                   108 
117   sigma = ( (JRes + 1.) / ( (J1 + 1) * (J2 + 1    109   sigma = ( (JRes + 1.) / ( (J1 + 1) * (J2 + 1) ) 
118       * pi / (pCM * pCM) * branch * width * wi    110       * pi / (pCM * pCM) * branch * width * width / 
119       ( (eCM - mRes) * (eCM - mRes) + width *     111       ( (eCM - mRes) * (eCM - mRes) + width * width / 4.0) * cleb * hbarc_squared);
120                                                   112 
121 //   G4cout << "SS " << branch<<" "<<sigma<<"     113 //   G4cout << "SS " << branch<<" "<<sigma<<" "
122 //          << J1 <<" "                           114 //          << J1 <<" "
123 //   <<J2<<" "                                    115 //   <<J2<<" "
124 //   <<m1<<" "                                    116 //   <<m1<<" "
125 //   <<m2<<" "                                    117 //   <<m2<<" "
126 //   <<JRes<<" "                                  118 //   <<JRes<<" "
127 //   <<mRes<<" "                                  119 //   <<mRes<<" "
128 //   <<wRes<<" "                                  120 //   <<wRes<<" "
129 //   <<width<<" "                                 121 //   <<width<<" "
130 //   <<cleb<<" "                                  122 //   <<cleb<<" "
131 //   <<G4endl;                                    123 //   <<G4endl;
132   return sigma;                                   124   return sigma;
133 }                                                 125 }
134                                                   126 
135                                                   127 
136 G4String G4XAnnihilationChannel::Name() const     128 G4String G4XAnnihilationChannel::Name() const
137 {                                                 129 {
138   G4String name("XAnnihilationChannelCrossSect    130   G4String name("XAnnihilationChannelCrossSection");
139   return name;                                    131   return name;
140 }                                                 132 }
141                                                   133 
142                                                   134 
143                                                   135 
144 G4bool G4XAnnihilationChannel::IsValid(G4doubl    136 G4bool G4XAnnihilationChannel::IsValid(G4double e) const
145 {                                                 137 {
146   G4bool answer = InLimits(e,lowLimit,highLimi    138   G4bool answer = InLimits(e,lowLimit,highLimit);
147                                                   139 
148   return answer;                                  140   return answer;
149 }                                                 141 }
150                                                   142 
151                                                   143 
152 G4double G4XAnnihilationChannel::Branch(const     144 G4double G4XAnnihilationChannel::Branch(const G4KineticTrack& trk1, 
153                                         const     145                                         const G4KineticTrack& trk2) const
154 {                                                 146 {
155   G4double w=VariableWidth(trk1,trk2);            147   G4double w=VariableWidth(trk1,trk2);
156   if(w==0) return 0;                              148   if(w==0) return 0;
157   return VariablePartialWidth(trk1,trk2) / Var    149   return VariablePartialWidth(trk1,trk2) / VariableWidth(trk1,trk2);
158 }                                                 150 }
159                                                   151 
160 G4double G4XAnnihilationChannel::VariableWidth    152 G4double G4XAnnihilationChannel::VariableWidth(const G4KineticTrack& trk1, 
161                                                   153                                                const G4KineticTrack& trk2) const
162 {                                                 154 {
163   // actual production width of resonance, dep    155   // actual production width of resonance, depending on available energy.
164                                                   156 
165   G4double width = resonance->GetPDGWidth();      157   G4double width = resonance->GetPDGWidth();
166   G4bool dummy = false;                           158   G4bool dummy = false;
167   G4double sqrtS = (trk1.Get4Momentum() + trk2    159   G4double sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
168   if (widthTable != 0)                            160   if (widthTable != 0) 
169     {                                             161     {
170       width = widthTable->GetValue(sqrtS,dummy    162       width = widthTable->GetValue(sqrtS,dummy);
171     }                                             163     }
172   return width;                                   164   return width;
173 }                                                 165 }
174                                                   166 
175                                                   167 
176 G4double G4XAnnihilationChannel::VariableParti    168 G4double G4XAnnihilationChannel::VariablePartialWidth(const G4KineticTrack& trk1, 
177                                                   169                                                       const G4KineticTrack& trk2) const
178 {                                                 170 {
179   // Calculate mass dependent partial width of    171   // Calculate mass dependent partial width of resonance, 
180   // based on UrQMD tabulations                   172   // based on UrQMD tabulations
181                                                   173 
182   G4double width(0);                              174   G4double width(0);
183                                                   175 
184   if (partWidthTable != 0)                        176   if (partWidthTable != 0)
185   {                                               177   {
186     G4double sqrtS = 0;                           178     G4double sqrtS = 0;
187     G4bool dummy = false;                         179     G4bool dummy = false;
188     sqrtS = (trk1.Get4Momentum() + trk2.Get4Mo    180     sqrtS = (trk1.Get4Momentum() + trk2.Get4Momentum()).mag();
189     width = partWidthTable->GetValue(sqrtS,dum    181     width = partWidthTable->GetValue(sqrtS,dummy);
190   }                                               182   }
191   else                                            183   else
192   {                                               184   {
193     width = resonance->GetPDGWidth();             185     width = resonance->GetPDGWidth();
194   }                                               186   }
195   return width;                                   187   return width;
196 }                                                 188 }
197                                                   189 
198                                                   190 
199 G4double G4XAnnihilationChannel::NormalizedCle    191 G4double G4XAnnihilationChannel::NormalizedClebsch(const G4KineticTrack& trk1, 
200                                                   192                                                    const G4KineticTrack& trk2) const
201 {                                                 193 {
202   G4double cleb = 0.;                             194   G4double cleb = 0.;
203   const G4ParticleDefinition* def1 = trk1.GetD << 195   G4ParticleDefinition* def1 = trk1.GetDefinition();
204   const G4ParticleDefinition* def2 = trk2.GetD << 196   G4ParticleDefinition* def2 = trk2.GetDefinition();
205                                                   197 
206   G4int iso31 = def1->GetPDGiIsospin3();          198   G4int iso31 = def1->GetPDGiIsospin3();
207   G4int iso32 = def2->GetPDGiIsospin3();          199   G4int iso32 = def2->GetPDGiIsospin3();
208   G4int iso3 = iso31 + iso32;                     200   G4int iso3 = iso31 + iso32;
209   G4int iso1 = def1->GetPDGiIsospin();            201   G4int iso1 = def1->GetPDGiIsospin();
210   G4int iso2 = def2->GetPDGiIsospin();            202   G4int iso2 = def2->GetPDGiIsospin();
211                                                   203 
212   G4int isoRes = resonance->GetPDGiIsospin();     204   G4int isoRes = resonance->GetPDGiIsospin();
213                                                   205   
214   if (isoRes < iso3) return 0.;                   206   if (isoRes < iso3) return 0.;
215   if ((iso1*iso2) == 0) return 1.;                207   if ((iso1*iso2) == 0) return 1.;
216                                                   208 
217   cleb = clebsch.NormalizedClebschGordan(isoRe    209   cleb = clebsch.NormalizedClebschGordan(isoRes,iso3,iso1,iso2,iso31,iso32);
218                                                   210 
219   // Special case: particle-antiparticle, char    211   // Special case: particle-antiparticle, charge-conjugated states have the same weight
220   G4String type1 = def1->GetParticleType();       212   G4String type1 = def1->GetParticleType();
221   G4String type2 = def2->GetParticleType();       213   G4String type2 = def2->GetParticleType();
222   G4int anti = def1->GetPDGEncoding() * def2->    214   G4int anti = def1->GetPDGEncoding() * def2->GetPDGEncoding();
223   G4int strangeness = resonance->GetQuarkConte    215   G4int strangeness = resonance->GetQuarkContent(3) + resonance->GetAntiQuarkContent(3);
224   if ( ((type1 == "baryon" && type2 == "baryon    216   if ( ((type1 == "baryon" && type2 == "baryon") ||(type1 == "meson" && type2 == "meson")) &&
225        anti < 0 && strangeness == 0)              217        anti < 0 && strangeness == 0) 
226     {                                             218     {
227       if (def1->GetPDGEncoding() != -(def2->Ge    219       if (def1->GetPDGEncoding() != -(def2->GetPDGEncoding())) cleb = 0.5 * cleb;
228     }                                             220     }
229                                                   221        
230   return cleb;                                    222   return cleb;
231 }                                                 223 }
232                                                   224 
233                                                   225 
234                                                   226 
235                                                   227 
236                                                   228 
237                                                   229