Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/particles/shortlived/src/G4ExcitedDeltaConstructor.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.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 /particles/shortlived/src/G4ExcitedDeltaConstructor.cc (Version 11.3.0) and /particles/shortlived/src/G4ExcitedDeltaConstructor.cc (Version 9.6.p4)


  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 //
                                                   >>  27 // $Id$
                                                   >>  28 //
                                                   >>  29 // 
 26 // -------------------------------------------     30 // --------------------------------------------------------------
 27 //  GEANT 4 class implementation file          <<  31 //  GEANT 4 class implementation file 
 28 //                                                 32 //
 29 //      History: first implementation, based o     33 //      History: first implementation, based on object model of
 30 //      10 oct 1998  H.Kurashige                   34 //      10 oct 1998  H.Kurashige
 31 //                                             << 
 32 //      Update mass and width following PDG 20 << 
 33 //        4 nov 2023 S.Okada                   << 
 34 // -------------------------------------------     35 // ---------------------------------------------------------------
 35                                                    36 
                                                   >>  37 
 36 #include "G4ExcitedDeltaConstructor.hh"            38 #include "G4ExcitedDeltaConstructor.hh"
 37                                                    39 
 38 #include "G4DecayTable.hh"                     << 
 39 #include "G4PhaseSpaceDecayChannel.hh"         << 
 40 #include "G4SystemOfUnits.hh"                      40 #include "G4SystemOfUnits.hh"
                                                   >>  41 #include "G4ParticleDefinition.hh"
                                                   >>  42 #include "G4ParticleTable.hh"
                                                   >>  43 #include "G4ShortLivedTable.hh"
                                                   >>  44 #include "G4PhaseSpaceDecayChannel.hh"
 41 #include "G4VDecayChannel.hh"                      45 #include "G4VDecayChannel.hh"
                                                   >>  46 #include "G4DecayTable.hh"
 42                                                    47 
 43 G4ExcitedDeltaConstructor::G4ExcitedDeltaConst <<  48 
 44   : G4ExcitedBaryonConstructor(NStates, DeltaI <<  49 G4ExcitedDeltaConstructor::G4ExcitedDeltaConstructor():
 45 {}                                             <<  50     G4ExcitedBaryonConstructor(NStates, DeltaIsoSpin)
                                                   >>  51 {
                                                   >>  52 
                                                   >>  53 }
                                                   >>  54 
                                                   >>  55 G4ExcitedDeltaConstructor::~G4ExcitedDeltaConstructor()
                                                   >>  56 {
                                                   >>  57 }
 46                                                    58 
 47 G4int G4ExcitedDeltaConstructor::GetEncoding(G     59 G4int G4ExcitedDeltaConstructor::GetEncoding(G4int iIsoSpin3, G4int idxState)
 48 {                                                  60 {
 49   G4int encoding;                                  61   G4int encoding;
 50   // Delta has exceptinal encoding                 62   // Delta has exceptinal encoding
 51   if ((idxState == 1) || (idxState == 3) || (i <<  63   if ((idxState==1)||(idxState==3)||(idxState==4)||(idxState==5)||(idxState==7))  {
 52     encoding = GetEncodingOffset(idxState);        64     encoding = GetEncodingOffset(idxState);
 53     if ((iIsoSpin3 == 3) || (iIsoSpin3 == -3)) <<  65     if ((iIsoSpin3==3)||(iIsoSpin3==-3)) {
 54       // normal encoding                       <<  66       // normal encoding 
 55       encoding += 1000 * GetQuarkContents(0, i <<  67       encoding += 1000*GetQuarkContents(0, iIsoSpin3);
 56       encoding += 100 * GetQuarkContents(1, iI <<  68       encoding +=  100*GetQuarkContents(1, iIsoSpin3);
 57       encoding += 10 * GetQuarkContents(2, iIs <<  69       encoding +=   10*GetQuarkContents(2, iIsoSpin3);
 58     }                                          <<  70     } else if (iIsoSpin3== +1){
 59     else if (iIsoSpin3 == +1) {                <<  71       // 1st <--> 2nd quark 
 60       // 1st <--> 2nd quark                    <<  72       encoding += 1000*GetQuarkContents(0, iIsoSpin3);
 61       encoding += 1000 * GetQuarkContents(0, i <<  73       encoding +=   10*GetQuarkContents(1, iIsoSpin3);
 62       encoding += 10 * GetQuarkContents(1, iIs <<  74       encoding +=  100*GetQuarkContents(2, iIsoSpin3);
 63       encoding += 100 * GetQuarkContents(2, iI <<  75     } else if (iIsoSpin3== -1){
 64     }                                          <<  76       // 1st <--> 0th quark 
 65     else if (iIsoSpin3 == -1) {                <<  77       encoding +=  100*GetQuarkContents(0, iIsoSpin3);
 66       // 1st <--> 0th quark                    <<  78       encoding += 1000*GetQuarkContents(1, iIsoSpin3);
 67       encoding += 100 * GetQuarkContents(0, iI <<  79       encoding +=   10*GetQuarkContents(2, iIsoSpin3);
 68       encoding += 1000 * GetQuarkContents(1, i << 
 69       encoding += 10 * GetQuarkContents(2, iIs << 
 70     }                                              80     }
 71     encoding += GetiSpin(idxState) + 1;        <<  81     encoding += GetiSpin(idxState) +1;
 72   }                                            <<  82   } else {
 73   else {                                       << 
 74     encoding = G4ExcitedBaryonConstructor::Get     83     encoding = G4ExcitedBaryonConstructor::GetEncoding(iIsoSpin3, idxState);
 75   }                                                84   }
 76   return encoding;                                 85   return encoding;
 77 }                                                  86 }
 78                                                <<  87 G4DecayTable* G4ExcitedDeltaConstructor::CreateDecayTable(
 79 G4DecayTable* G4ExcitedDeltaConstructor::Creat <<  88              const G4String&  parentName,  
 80                                                <<  89              G4int iIso3, 
                                                   >>  90              G4int iState,
                                                   >>  91              G4bool fAnti)
 81 {                                                  92 {
 82   // create decay table                            93   // create decay table
 83   auto decayTable = new G4DecayTable();        <<  94   G4DecayTable* decayTable =  new G4DecayTable();
 84                                                    95 
 85   G4double br;                                     96   G4double br;
 86   if ((br = bRatio[iState][NGamma]) > 0.0) {   <<  97   if ( (br=bRatio[iState][NGamma]) >0.0) {
 87     AddNGammaMode(decayTable, parentName, br,  <<  98     AddNGammaMode( decayTable, parentName, br, iIso3, fAnti);
 88   }                                                99   }
 89                                                   100 
 90   if ((br = bRatio[iState][NPi]) > 0.0) {      << 101   if ( (br=bRatio[iState][NPi]) >0.0) {
 91     AddNPiMode(decayTable, parentName, br, iIs << 102     AddNPiMode( decayTable, parentName, br, iIso3, fAnti);
 92   }                                               103   }
 93                                                   104 
 94   if ((br = bRatio[iState][NRho]) > 0.0) {     << 105   if ( (br=bRatio[iState][NRho]) >0.0) {
 95     AddNRhoMode(decayTable, parentName, br, iI << 106     AddNRhoMode( decayTable, parentName, br, iIso3, fAnti);
 96   }                                               107   }
 97                                                   108 
 98   if ((br = bRatio[iState][DeltaPi]) > 0.0) {  << 109   if ( (br=bRatio[iState][DeltaPi]) >0.0) {
 99     AddDeltaPiMode(decayTable, parentName, br, << 110     AddDeltaPiMode( decayTable, parentName, br, iIso3, fAnti);
100   }                                               111   }
101                                                   112 
102   if ((br = bRatio[iState][NStarPi]) > 0.0) {  << 113   if ( (br=bRatio[iState][NStarPi]) >0.0) {
103     AddNStarPiMode(decayTable, parentName, br, << 114     AddNStarPiMode( decayTable, parentName, br, iIso3, fAnti);
104   }                                               115   }
105                                                   116 
106   return decayTable;                           << 117   return  decayTable;
107 }                                                 118 }
108                                                   119 
109 G4DecayTable* G4ExcitedDeltaConstructor::AddNG << 120 G4DecayTable*  G4ExcitedDeltaConstructor::AddNGammaMode( 
110                                                << 121            G4DecayTable* decayTable, const G4String& nameParent,
111                                                << 122             G4double br, G4int iIso3, G4bool fAnti)
112 {                                                 123 {
113   G4VDecayChannel* mode;                          124   G4VDecayChannel* mode;
114                                                   125 
115   //                                           << 126   // 
116   G4String daughterN;                             127   G4String daughterN;
117   if (iIso3 == +1) {                           << 128   if (iIso3 == +1) { 
118     daughterN = "proton";                      << 129     daughterN = "proton";  
119   }                                            << 130   } else if (iIso3 == -1) {
120   else if (iIso3 == -1) {                      << 131     daughterN = "neutron"; 
121     daughterN = "neutron";                     << 132   } else {
122   }                                            << 
123   else {                                       << 
124     // can not decay into N+gamma                 133     // can not decay into N+gamma
125     return decayTable;                            134     return decayTable;
126   }                                               135   }
127                                                   136 
128   if (fAnti) daughterN = "anti_" + daughterN;     137   if (fAnti) daughterN = "anti_" + daughterN;
129                                                   138 
130   // create decay channel  [parent    BR     #    139   // create decay channel  [parent    BR     #daughters]
131   mode = new G4PhaseSpaceDecayChannel(namePare << 140   mode = new G4PhaseSpaceDecayChannel(nameParent, br, 2,
                                                   >> 141                                            daughterN,"gamma");
132   // add decay table                              142   // add decay table
133   decayTable->Insert(mode);                       143   decayTable->Insert(mode);
134                                                   144 
135   return decayTable;                              145   return decayTable;
136 }                                                 146 }
137                                                   147 
138 G4DecayTable* G4ExcitedDeltaConstructor::AddNP << 148 G4DecayTable*  G4ExcitedDeltaConstructor::AddNPiMode( 
139                                                << 149             G4DecayTable* decayTable, const G4String& nameParent,
140                                                << 150             G4double br, G4int iIso3, G4bool fAnti)
141 {                                                 151 {
142   G4VDecayChannel* mode;                          152   G4VDecayChannel* mode;
143                                                   153 
144   G4String daughterN;                             154   G4String daughterN;
145   G4String daughterPi;                            155   G4String daughterPi;
146   G4double r = 0.;                                156   G4double r = 0.;
147                                                   157 
148   // ------------ N pi0 ------------           << 158   // ------------ N pi0 ------------ 
149   // determine daughters                          159   // determine daughters
150   if ((iIso3 == +1) || (iIso3 == -1)) {        << 160   if ((iIso3 == +1)||(iIso3 == -1)) {
151     if (iIso3 == +1) {                            161     if (iIso3 == +1) {
152       daughterN = "proton";                    << 162       daughterN  = "proton";
153       daughterPi = "pi0";                         163       daughterPi = "pi0";
154       r = br * 2. / 3.;                        << 164       r = br*2./3.;
155     }                                          << 165     } else  if (iIso3 == -1) {
156     else if (iIso3 == -1) {                    << 166       daughterN  = "neutron";
157       daughterN = "neutron";                   << 
158       daughterPi = "pi0";                         167       daughterPi = "pi0";
159       r = br / 3.;                             << 168       r = br/3.;
160     }                                          << 169     } 
161     if (fAnti) daughterN = "anti_" + daughterN    170     if (fAnti) daughterN = "anti_" + daughterN;
162     // create decay channel  [parent    BR        171     // create decay channel  [parent    BR     #daughters]
163     mode = new G4PhaseSpaceDecayChannel(namePa << 172     mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 173           daughterN,daughterPi);
164     // add decay table                            174     // add decay table
165     decayTable->Insert(mode);                     175     decayTable->Insert(mode);
166   }                                               176   }
167                                                   177 
168   // -------------N pi +/- --------------      << 178   // -------------N pi +/- -------------- 
169   // determine daughters                          179   // determine daughters
170   if (iIso3 == +3) {                              180   if (iIso3 == +3) {
171     daughterN = "proton";                      << 181     daughterN  = "proton";
172     if (!fAnti) {                                 182     if (!fAnti) {
173       daughterPi = "pi+";                         183       daughterPi = "pi+";
174     }                                          << 184     } else {
175     else {                                     << 
176       daughterPi = "pi-";                         185       daughterPi = "pi-";
177     }                                             186     }
178     r = br;                                       187     r = br;
179   }                                            << 188   } else  if (iIso3 == +1) {
180   else if (iIso3 == +1) {                      << 189     daughterN  = "neutron";
181     daughterN = "neutron";                     << 
182     if (!fAnti) {                                 190     if (!fAnti) {
183       daughterPi = "pi+";                         191       daughterPi = "pi+";
184     }                                          << 192     } else {
185     else {                                     << 
186       daughterPi = "pi-";                         193       daughterPi = "pi-";
187     }                                             194     }
188     r = br / 3.;                               << 195     r = br/3.;
189   }                                            << 196   } else if (iIso3 == -1) {
190   else if (iIso3 == -1) {                      << 197     daughterN  = "proton";
191     daughterN = "proton";                      << 
192     if (!fAnti) {                                 198     if (!fAnti) {
193       daughterPi = "pi-";                         199       daughterPi = "pi-";
194     }                                          << 200     } else {
195     else {                                     << 
196       daughterPi = "pi+";                         201       daughterPi = "pi+";
197     }                                             202     }
198     r = br * 2. / 3.;                          << 203     r = br*2./3.;
199   }                                            << 204   } else if (iIso3 == -3) {
200   else if (iIso3 == -3) {                      << 205     daughterN  = "neutron";
201     daughterN = "neutron";                     << 
202     if (!fAnti) {                                 206     if (!fAnti) {
203       daughterPi = "pi-";                         207       daughterPi = "pi-";
204     }                                          << 208     } else {
205     else {                                     << 
206       daughterPi = "pi+";                         209       daughterPi = "pi+";
207     }                                             210     }
208     r = br;                                       211     r = br;
209   }                                               212   }
210   if (fAnti) daughterN = "anti_" + daughterN;     213   if (fAnti) daughterN = "anti_" + daughterN;
211                                                   214 
212   // create decay channel  [parent    BR     #    215   // create decay channel  [parent    BR     #daughters]
213   mode = new G4PhaseSpaceDecayChannel(namePare << 216   mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 217                                            daughterN,daughterPi);
214   // add decay table                              218   // add decay table
215   decayTable->Insert(mode);                       219   decayTable->Insert(mode);
216                                                   220 
217   return decayTable;                              221   return decayTable;
218 }                                                 222 }
219                                                   223 
220 G4DecayTable* G4ExcitedDeltaConstructor::AddNR << 224 
221                                                << 225 G4DecayTable*  G4ExcitedDeltaConstructor::AddNRhoMode( 
222                                                << 226             G4DecayTable* decayTable, const G4String& nameParent,
                                                   >> 227             G4double br, G4int iIso3, G4bool fAnti)
223 {                                                 228 {
224   G4VDecayChannel* mode;                          229   G4VDecayChannel* mode;
225                                                   230 
226   G4String daughterN;                             231   G4String daughterN;
227   G4String daughterRho;                           232   G4String daughterRho;
228   G4double r = 0.;                                233   G4double r = 0.;
229                                                   234 
230   // ------------ N Rho0 ------------          << 235   // ------------ N Rho0 ------------ 
231   // determine daughters                          236   // determine daughters
232   if ((iIso3 == +1) || (iIso3 == -1)) {        << 237   if ((iIso3 == +1)||(iIso3 == -1)) {
233     if (iIso3 == +1) {                            238     if (iIso3 == +1) {
234       daughterN = "proton";                    << 239       daughterN  = "proton";
235       daughterRho = "rho0";                       240       daughterRho = "rho0";
236       r = br * 2. / 3.;                        << 241       r = br*2./3.;
237     }                                          << 242     } else  if (iIso3 == -1) {
238     else if (iIso3 == -1) {                    << 243       daughterN  = "neutron";
239       daughterN = "neutron";                   << 
240       daughterRho = "rho0";                       244       daughterRho = "rho0";
241       r = br / 3.;                             << 245       r = br/3.;
242     }                                          << 246     } 
243     if (fAnti) daughterN = "anti_" + daughterN    247     if (fAnti) daughterN = "anti_" + daughterN;
244     // create decay channel  [parent    BR        248     // create decay channel  [parent    BR     #daughters]
245     mode = new G4PhaseSpaceDecayChannel(namePa << 249     mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 250           daughterN,daughterRho);
246     // add decay table                            251     // add decay table
247     decayTable->Insert(mode);                     252     decayTable->Insert(mode);
248   }                                               253   }
249                                                   254 
250   // -------------N Rho +/- --------------     << 255   // -------------N Rho +/- -------------- 
251   // determine daughters                          256   // determine daughters
252   if (iIso3 == +3) {                              257   if (iIso3 == +3) {
253     daughterN = "proton";                      << 258     daughterN  = "proton";
254     if (!fAnti) {                                 259     if (!fAnti) {
255       daughterRho = "rho+";                       260       daughterRho = "rho+";
256     }                                          << 261     } else {
257     else {                                     << 
258       daughterRho = "rho-";                       262       daughterRho = "rho-";
259     }                                             263     }
260     r = br;                                       264     r = br;
261   }                                            << 265   } else  if (iIso3 == +1) {
262   else if (iIso3 == +1) {                      << 266     daughterN  = "neutron";
263     daughterN = "neutron";                     << 
264     if (!fAnti) {                                 267     if (!fAnti) {
265       daughterRho = "rho+";                       268       daughterRho = "rho+";
266     }                                          << 269     } else {
267     else {                                     << 
268       daughterRho = "rho-";                       270       daughterRho = "rho-";
269     }                                             271     }
270     r = br / 3.;                               << 272     r = br/3.;
271   }                                            << 273   } else if (iIso3 == -1) {
272   else if (iIso3 == -1) {                      << 274     daughterN  = "proton";
273     daughterN = "proton";                      << 
274     if (!fAnti) {                                 275     if (!fAnti) {
275       daughterRho = "rho-";                       276       daughterRho = "rho-";
276     }                                          << 277     } else {
277     else {                                     << 
278       daughterRho = "rho+";                       278       daughterRho = "rho+";
279     }                                             279     }
280     r = br * 2. / 3.;                          << 280     r = br*2./3.;
281   }                                            << 281   } else if (iIso3 == -3) {
282   else if (iIso3 == -3) {                      << 282     daughterN  = "neutron";
283     daughterN = "neutron";                     << 
284     if (!fAnti) {                                 283     if (!fAnti) {
285       daughterRho = "rho-";                       284       daughterRho = "rho-";
286     }                                          << 285     } else {
287     else {                                     << 
288       daughterRho = "rho+";                       286       daughterRho = "rho+";
289     }                                             287     }
290     r = br;                                       288     r = br;
291   }                                               289   }
292   if (fAnti) daughterN = "anti_" + daughterN;     290   if (fAnti) daughterN = "anti_" + daughterN;
293                                                   291 
294   // create decay channel  [parent    BR     #    292   // create decay channel  [parent    BR     #daughters]
295   mode = new G4PhaseSpaceDecayChannel(namePare << 293   mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 294                                            daughterN,daughterRho);
296   // add decay table                              295   // add decay table
297   decayTable->Insert(mode);                       296   decayTable->Insert(mode);
298                                                   297 
299   return decayTable;                              298   return decayTable;
300 }                                                 299 }
301                                                   300 
302 G4DecayTable* G4ExcitedDeltaConstructor::AddNS << 301 G4DecayTable*  G4ExcitedDeltaConstructor::AddNStarPiMode( 
303                                                << 302             G4DecayTable* decayTable, const G4String& nameParent,
304                                                << 303             G4double br, G4int iIso3, G4bool fAnti)
305 {                                                 304 {
306   G4VDecayChannel* mode;                          305   G4VDecayChannel* mode;
307                                                   306 
308   G4String daughterN;                             307   G4String daughterN;
309   G4String daughterPi;                            308   G4String daughterPi;
310   G4double r = 0.;                                309   G4double r = 0.;
311                                                   310 
312   // ------------ N pi0 ------------           << 311   // ------------ N pi0 ------------ 
313   // determine daughters                          312   // determine daughters
314   if ((iIso3 == +1) || (iIso3 == -1)) {        << 313   if ((iIso3 == +1)||(iIso3 == -1)) {
315     if (iIso3 == +1) {                            314     if (iIso3 == +1) {
316       daughterN = "N(1440)+";                  << 315       daughterN  = "N(1440)+";
317       daughterPi = "pi0";                         316       daughterPi = "pi0";
318       r = br * 2. / 3.;                        << 317       r = br*2./3.;
319     }                                          << 318     } else  if (iIso3 == -1) {
320     else if (iIso3 == -1) {                    << 319       daughterN  = "N(1440)0";
321       daughterN = "N(1440)0";                  << 
322       daughterPi = "pi0";                         320       daughterPi = "pi0";
323       r = br / 3.;                             << 321       r = br/3.;
324     }                                          << 322     } 
325     if (fAnti) daughterN = "anti_" + daughterN    323     if (fAnti) daughterN = "anti_" + daughterN;
326     // create decay channel  [parent    BR        324     // create decay channel  [parent    BR     #daughters]
327     mode = new G4PhaseSpaceDecayChannel(namePa << 325     mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 326           daughterN,daughterPi);
328     // add decay table                            327     // add decay table
329     decayTable->Insert(mode);                     328     decayTable->Insert(mode);
330   }                                               329   }
331                                                   330 
332   // -------------N pi +/- --------------      << 331   // -------------N pi +/- -------------- 
333   // determine daughters                          332   // determine daughters
334   if (iIso3 == +3) {                              333   if (iIso3 == +3) {
335     daughterN = "N(1440)+";                    << 334     daughterN  = "N(1440)+";
336     if (!fAnti) {                                 335     if (!fAnti) {
337       daughterPi = "pi+";                         336       daughterPi = "pi+";
338     }                                          << 337     } else {
339     else {                                     << 
340       daughterPi = "pi-";                         338       daughterPi = "pi-";
341     }                                             339     }
342     r = br;                                       340     r = br;
343   }                                            << 341   } else  if (iIso3 == +1) {
344   else if (iIso3 == +1) {                      << 342     daughterN  = "N(1440)0";
345     daughterN = "N(1440)0";                    << 
346     if (!fAnti) {                                 343     if (!fAnti) {
347       daughterPi = "pi+";                         344       daughterPi = "pi+";
348     }                                          << 345     } else {
349     else {                                     << 
350       daughterPi = "pi-";                         346       daughterPi = "pi-";
351     }                                             347     }
352     r = br / 3.;                               << 348     r = br/3.;
353   }                                            << 349   } else if (iIso3 == -1) {
354   else if (iIso3 == -1) {                      << 350     daughterN  = "N(1440)+";
355     daughterN = "N(1440)+";                    << 
356     if (!fAnti) {                                 351     if (!fAnti) {
357       daughterPi = "pi-";                         352       daughterPi = "pi-";
358     }                                          << 353     } else {
359     else {                                     << 
360       daughterPi = "pi+";                         354       daughterPi = "pi+";
361     }                                             355     }
362     r = br * 2. / 3.;                          << 356     r = br*2./3.;
363   }                                            << 357   } else if (iIso3 == -3) {
364   else if (iIso3 == -3) {                      << 358     daughterN  = "N(1440)0";
365     daughterN = "N(1440)0";                    << 
366     if (!fAnti) {                                 359     if (!fAnti) {
367       daughterPi = "pi-";                         360       daughterPi = "pi-";
368     }                                          << 361     } else {
369     else {                                     << 
370       daughterPi = "pi+";                         362       daughterPi = "pi+";
371     }                                             363     }
372     r = br;                                       364     r = br;
373   }                                               365   }
374   if (fAnti) daughterN = "anti_" + daughterN;     366   if (fAnti) daughterN = "anti_" + daughterN;
375                                                   367 
376   // create decay channel  [parent    BR     #    368   // create decay channel  [parent    BR     #daughters]
377   mode = new G4PhaseSpaceDecayChannel(namePare << 369   mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 370                                            daughterN,daughterPi);
378   // add decay table                              371   // add decay table
379   decayTable->Insert(mode);                       372   decayTable->Insert(mode);
380                                                   373 
381   return decayTable;                              374   return decayTable;
382 }                                                 375 }
383                                                   376 
384 G4DecayTable* G4ExcitedDeltaConstructor::AddDe << 377 G4DecayTable*  G4ExcitedDeltaConstructor::AddDeltaPiMode( 
385                                                << 378             G4DecayTable* decayTable, const G4String& nameParent,
386                                                << 379             G4double br, G4int iIso3, G4bool fAnti)
387 {                                                 380 {
388   G4VDecayChannel* mode;                          381   G4VDecayChannel* mode;
389                                                   382 
390   G4String daughterDelta;                         383   G4String daughterDelta;
391   G4String daughterPi;                            384   G4String daughterPi;
392   G4double r;                                     385   G4double r;
393                                                   386 
394   // ------------ Delta pi +------------       << 387   // ------------ Delta pi +------------ 
395   // determine daughters                          388   // determine daughters
396   if (iIso3 == +3) {                              389   if (iIso3 == +3) {
397     daughterDelta = "delta+";                  << 390     daughterDelta  = "delta+";
398     r = br * 0.4;                              << 391     r = br*0.4;
399   }                                            << 392   } else  if (iIso3 == +1) {
400   else if (iIso3 == +1) {                      << 393     daughterDelta  = "delta0";
401     daughterDelta = "delta0";                  << 394     r = br*8./15.0;
402     r = br * 8. / 15.0;                        << 395   } else  if (iIso3 == -1) {
403   }                                            << 396     daughterDelta  = "delta-";
404   else if (iIso3 == -1) {                      << 397     r = br*6./15.;
405     daughterDelta = "delta-";                  << 398   } else {
406     r = br * 6. / 15.;                         << 399      r  = 0.;
407   }                                            << 
408   else {                                       << 
409     r = 0.;                                    << 
410   }                                               400   }
411   if (!fAnti) {                                   401   if (!fAnti) {
412     daughterPi = "pi+";                           402     daughterPi = "pi+";
413   }                                            << 403   } else {
414   else {                                       << 
415     daughterPi = "pi-";                           404     daughterPi = "pi-";
416   }                                               405   }
417   if (fAnti) daughterDelta = "anti_" + daughte << 406    if (fAnti) daughterDelta = "anti_" + daughterDelta;
418   if (r > 0.0) {                               << 407   if (r>0.0) {
419     // create decay channel  [parent    BR        408     // create decay channel  [parent    BR     #daughters]
420     mode = new G4PhaseSpaceDecayChannel(namePa << 409     mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 410           daughterDelta,daughterPi);
421     // add decay table                            411     // add decay table
422     decayTable->Insert(mode);                     412     decayTable->Insert(mode);
423   }                                               413   }
424                                                   414 
425   // ------------ Delta pi0 ------------       << 415   // ------------ Delta pi0 ------------ 
426   // determine daughters                          416   // determine daughters
427   if (iIso3 == +3) {                              417   if (iIso3 == +3) {
428     daughterDelta = "delta++";                 << 418     daughterDelta  = "delta++";
429     r = br * 0.6;                              << 419     r = br*0.6;
430   }                                            << 420   } else  if (iIso3 == +1) {
431   else if (iIso3 == +1) {                      << 421     daughterDelta  = "delta+";
432     daughterDelta = "delta+";                  << 422     r = br*1./15.0;
433     r = br * 1. / 15.0;                        << 423   } else  if (iIso3 == -1) {
434   }                                            << 424     daughterDelta  = "delta0";
435   else if (iIso3 == -1) {                      << 425     r = br*1./15.;
436     daughterDelta = "delta0";                  << 426   } else {
437     r = br * 1. / 15.;                         << 427     daughterDelta  = "delta-";
438   }                                            << 428     r = br*0.6;
439   else {                                       << 
440     daughterDelta = "delta-";                  << 
441     r = br * 0.6;                              << 
442   }                                               429   }
443   daughterPi = "pi0";                             430   daughterPi = "pi0";
444   if (fAnti) daughterDelta = "anti_" + daughte    431   if (fAnti) daughterDelta = "anti_" + daughterDelta;
445                                                << 432   
446   // create decay channel  [parent    BR     #    433   // create decay channel  [parent    BR     #daughters]
447   mode = new G4PhaseSpaceDecayChannel(namePare << 434   mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 435               daughterDelta,daughterPi);
448   // add decay table                              436   // add decay table
449   decayTable->Insert(mode);                       437   decayTable->Insert(mode);
450                                                   438 
451   // ------------ Delta pi - -------------     << 439   // ------------ Delta pi - ------------- 
452   // determine daughters                          440   // determine daughters
453   if (iIso3 == +3) {                              441   if (iIso3 == +3) {
454     r = 0.;                                    << 442     r= 0.;
455   }                                            << 443   } else  if (iIso3 == +1) {
456   else if (iIso3 == +1) {                      << 444     daughterDelta  = "delta++";
457     daughterDelta = "delta++";                 << 445     r = br*6./15.0;
458     r = br * 6. / 15.0;                        << 446   } else  if (iIso3 == -1) {
459   }                                            << 447     daughterDelta  = "delta+";
460   else if (iIso3 == -1) {                      << 448     r = br*8./15.;
461     daughterDelta = "delta+";                  << 449   } else {
462     r = br * 8. / 15.;                         << 450     daughterDelta  = "delta0";
463   }                                            << 451     r = br*0.4;
464   else {                                       << 
465     daughterDelta = "delta0";                  << 
466     r = br * 0.4;                              << 
467   }                                               452   }
468   if (!fAnti) {                                   453   if (!fAnti) {
469     daughterPi = "pi-";                           454     daughterPi = "pi-";
470   }                                            << 455   } else {
471   else {                                       << 
472     daughterPi = "pi+";                           456     daughterPi = "pi+";
473   }                                               457   }
474   if (fAnti) daughterDelta = "anti_" + daughte << 458    if (fAnti) daughterDelta = "anti_" + daughterDelta;
475   if (r > 0.0) {                               << 459   if (r>0.0) {
476     // create decay channel  [parent    BR        460     // create decay channel  [parent    BR     #daughters]
477     mode = new G4PhaseSpaceDecayChannel(namePa << 461     mode = new G4PhaseSpaceDecayChannel(nameParent, r, 2,
                                                   >> 462           daughterDelta,daughterPi);
478     // add decay table                            463     // add decay table
479     decayTable->Insert(mode);                     464     decayTable->Insert(mode);
480   }                                               465   }
481                                                   466 
482   return decayTable;                              467   return decayTable;
483 }                                                 468 }
484                                                   469 
485 // clang-format off                            << 470 const char* G4ExcitedDeltaConstructor::name[] = 
486 const char* G4ExcitedDeltaConstructor::name[]  << 
487 {                                                 471 {
488   "delta(1600)", "delta(1620)", "delta(1700)",    472   "delta(1600)", "delta(1620)", "delta(1700)", "delta(1900)", "delta(1905)",
489   "delta(1910)", "delta(1920)", "delta(1930)",    473   "delta(1910)", "delta(1920)", "delta(1930)", "delta(1950)"
490 };                                                474 };
491                                                   475 
492 const G4double G4ExcitedDeltaConstructor::mass << 476 const G4double G4ExcitedDeltaConstructor::mass[] = 
493 {                                                 477 {
494   1.570*GeV, 1.610*GeV, 1.710*GeV, 1.860*GeV,  << 478   1.600*GeV, 1.630*GeV, 1.700*GeV, 1.900*GeV,  1.890*GeV, 
495   1.900*GeV, 1.920*GeV, 1.950*GeV, 1.930*GeV   << 479   1.910*GeV, 1.920*GeV, 1.960*GeV, 1.930*GeV
496 };                                                480 };
497                                                   481 
498 const G4double G4ExcitedDeltaConstructor::widt    482 const G4double G4ExcitedDeltaConstructor::width[] = {
499   250.0*MeV, 130.0*MeV, 300.0*MeV, 250.0*MeV,  << 483   350.0*MeV, 145.0*MeV, 300.0*MeV, 200.0*MeV, 330.0*MeV,
500   300.0*MeV, 300.0*MeV, 300.0*MeV, 285.0*MeV   << 484   250.0*MeV, 200.0*MeV, 360.0*MeV, 280.0*MeV
501 };                                                485 };
502                                                   486 
503 const G4int G4ExcitedDeltaConstructor::iSpin[] << 487 const G4int G4ExcitedDeltaConstructor::iSpin[] = 
504 {                                                 488 {
505     3,   1,   3,   1,   5,                        489     3,   1,   3,   1,   5,
506     1,   3,   5,   7                              490     1,   3,   5,   7
507 };                                                491 };
508                                                   492 
509 const G4int G4ExcitedDeltaConstructor::iParity    493 const G4int G4ExcitedDeltaConstructor::iParity[] = {
510   +1,  -1,   -1,  -1,  +1,                        494   +1,  -1,   -1,  -1,  +1,
511   +1,  +1,   -1,  +1                              495   +1,  +1,   -1,  +1
512 };                                                496 };
513                                                   497 
514 const G4int G4ExcitedDeltaConstructor::encodin    498 const G4int G4ExcitedDeltaConstructor::encodingOffset[] = {
515   30000,     0, 10000, 10000,     0,              499   30000,     0, 10000, 10000,     0,
516   20000, 20000, 10000,     0                      500   20000, 20000, 10000,     0
517 };                                                501 };
518                                                   502 
519 const G4double G4ExcitedDeltaConstructor::bRat << 503 const G4double G4ExcitedDeltaConstructor::bRatio[ G4ExcitedDeltaConstructor::NStates ][ G4ExcitedDeltaConstructor::NumberOfDecayModes] = 
520 {                                                 504 {
521 //   NGamma    Npi     NRho DeltaPi    N*Pi       505 //   NGamma    Npi     NRho DeltaPi    N*Pi
522    {    0.0,   0.15,    0.0,   0.55,   0.30 },    506    {    0.0,   0.15,    0.0,   0.55,   0.30 },
523    {    0.0,   0.25,    0.0,   0.60,   0.15 },    507    {    0.0,   0.25,    0.0,   0.60,   0.15 },
524    {    0.0,   0.20,   0.10,   0.55,   0.15 },    508    {    0.0,   0.20,   0.10,   0.55,   0.15 },
525    {    0.0,   0.30,   0.15,   0.30,   0.25 },    509    {    0.0,   0.30,   0.15,   0.30,   0.25 },
526    {    0.0,   0.20,   0.60,   0.10,   0.10 },    510    {    0.0,   0.20,   0.60,   0.10,   0.10 },
527    {    0.0,   0.35,   0.40,   0.15,   0.10 },    511    {    0.0,   0.35,   0.40,   0.15,   0.10 },
528    {    0.0,   0.15,   0.30,   0.30,   0.25 },    512    {    0.0,   0.15,   0.30,   0.30,   0.25 },
529    {    0.0,   0.20,   0.25,   0.25,   0.30 },    513    {    0.0,   0.20,   0.25,   0.25,   0.30 },
530    {   0.01,   0.44,   0.15,   0.20,   0.20 }     514    {   0.01,   0.44,   0.15,   0.20,   0.20 }
531 };                                                515 };
                                                   >> 516 
                                                   >> 517 
                                                   >> 518 
                                                   >> 519 
                                                   >> 520 
                                                   >> 521 
                                                   >> 522 
                                                   >> 523 
                                                   >> 524 
                                                   >> 525 
                                                   >> 526 
                                                   >> 527 
                                                   >> 528 
                                                   >> 529 
                                                   >> 530 
                                                   >> 531 
532                                                   532