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