G4ExcitedBaryonConstructor.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 // --------------------------------------------------------------
00031 //      GEANT 4 class implementation file 
00032 //
00033 //      History: first implementation, based on object model of
00034 //      10 oct 1998  H.Kurashige
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   //    Construct Resonace particles as dynamic object
00088   //    Arguments for constructor are as follows
00089   //               name             mass          width         charge
00090   //             2*spin           parity  C-conjugation
00091   //          2*Isospin       2*Isospin3       G-parity
00092   //               type    lepton number  baryon number   PDG encoding
00093   //             stable         lifetime    decay table 
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   //    Construct Resonace particles as dynamic object
00119   //    Arguments for constructor are as follows
00120   //               name             mass          width         charge
00121   //             2*spin           parity  C-conjugation
00122   //          2*Isospin       2*Isospin3       G-parity
00123   //               type    lepton number  baryon number   PDG encoding
00124   //             stable         lifetime    decay table 
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 }

Generated on Mon May 27 17:48:13 2013 for Geant4 by  doxygen 1.4.7