00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "G4ExcitedBaryonConstructor.hh"
00039
00040 #include "G4SystemOfUnits.hh"
00041 #include "G4ParticleDefinition.hh"
00042 #include "G4ParticleTable.hh"
00043 #include "G4ShortLivedTable.hh"
00044 #include "G4PhaseSpaceDecayChannel.hh"
00045 #include "G4VDecayChannel.hh"
00046 #include "G4DecayTable.hh"
00047
00048
00049 G4ExcitedBaryonConstructor::G4ExcitedBaryonConstructor(G4int nStates,
00050 G4int isoSpin)
00051 : NumberOfStates(nStates), iIsoSpin(isoSpin), type("baryon"),
00052 iConjugation(0), iGParity(0), leptonNumber(0), baryonNumber(1)
00053 {
00054 }
00055
00056 G4ExcitedBaryonConstructor::~G4ExcitedBaryonConstructor()
00057 {
00058 }
00059
00060 void G4ExcitedBaryonConstructor::Construct(G4int idx)
00061 {
00062 if (idx < 0 ) {
00063 for (G4int state=0; state< NumberOfStates; state +=1) {
00064 ConstructParticle(state);
00065 ConstructAntiParticle(state);
00066 }
00067 } else if (idx < NumberOfStates) {
00068 ConstructParticle(idx);
00069 ConstructAntiParticle(idx);
00070 } else {
00071 #ifdef G4VERBOSE
00072 if (G4ParticleTable::GetParticleTable()->GetVerboseLevel()>1) {
00073 G4cerr << "G4ExcitedBaryonConstructor::Construct()";
00074 G4cerr << " illegal index os state = " << idx << G4endl;
00075 }
00076 #endif
00077 }
00078 }
00079
00080
00081 #include "G4ExcitedBaryons.hh"
00082
00083 void G4ExcitedBaryonConstructor::ConstructParticle(G4int idx)
00084 {
00085 if (!Exist(idx) ) return;
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096 G4String name;
00097 G4ParticleDefinition* particle;
00098
00099 for (G4int iIso3 = -1*iIsoSpin; iIso3 <= iIsoSpin; iIso3 +=2) {
00100 name= GetName(iIso3, idx);
00101
00102 particle = new G4ExcitedBaryons(
00103 name, GetMass(idx,iIso3), GetWidth(idx,iIso3), GetCharge(iIso3),
00104 GetiSpin(idx), GetiParity(idx), iConjugation,
00105 iIsoSpin, iIso3, iGParity,
00106 type, leptonNumber, baryonNumber, GetEncoding( iIso3,idx),
00107 false, 0.0, NULL
00108 );
00109 ((G4ExcitedBaryons*)(particle))->SetMultipletName(GetMultipletName(idx));
00110 particle->SetDecayTable(CreateDecayTable( name, iIso3, idx, false));
00111 }
00112 }
00113
00114 void G4ExcitedBaryonConstructor::ConstructAntiParticle(G4int idx)
00115 {
00116 if (!Exist(idx) ) return;
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127 G4String name;
00128 G4ParticleDefinition* particle;
00129
00130 for (G4int iIso3 = -1*iIsoSpin; iIso3 <= iIsoSpin; iIso3 +=2) {
00131 name = GetName(iIso3, idx);
00132 name = "anti_" + name;
00133
00134 particle = new G4ExcitedBaryons(
00135 name, GetMass(idx,iIso3), GetWidth(idx,iIso3), -1.0*GetCharge(iIso3),
00136 GetiSpin(idx), GetiParity(idx), iConjugation,
00137 iIsoSpin, -1*iIso3, iGParity,
00138 type, leptonNumber,
00139 -1*baryonNumber,
00140 -1*GetEncoding( iIso3,idx),
00141 false, 0.0, NULL
00142 );
00143
00144 ((G4ExcitedBaryons*)(particle))->SetMultipletName(GetMultipletName(idx));
00145 particle->SetDecayTable(CreateDecayTable( name, iIso3, idx, true));
00146 }
00147
00148 }
00149
00150 G4double G4ExcitedBaryonConstructor::GetCharge(G4int iIsoSpin3)
00151 {
00152 G4double charge = 0.0;
00153 static G4double quark_charge[7] =
00154 {
00155 0., -1./3., +2./3., -1./3., +2./3., -1./3., +2./3.
00156 };
00157
00158 for (G4int idx=0; idx<3; idx+=1){
00159 charge += quark_charge[GetQuarkContents(idx, iIsoSpin3)]*eplus;
00160 }
00161 return charge;
00162 }
00163
00164 G4int G4ExcitedBaryonConstructor::GetEncoding(G4int iIsoSpin3, G4int idxState)
00165 {
00166 G4int encoding = GetEncodingOffset(idxState);
00167 encoding += 1000*GetQuarkContents(0, iIsoSpin3);
00168 encoding += 100*GetQuarkContents(1, iIsoSpin3);
00169 encoding += 10*GetQuarkContents(2, iIsoSpin3);
00170 if (GetiSpin(idxState) <9) {
00171 encoding += GetiSpin(idxState) +1;
00172 } else {
00173 encoding += (GetiSpin(idxState) +1)*10000000;
00174 }
00175 return encoding;
00176 }