G4ChipsComponentXS.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 //  Calculation of the total, elastic and inelastic cross-sections
00027 //  of hadron (proton, neutron, pi+, pi-, K+, K-, anti_proton, anti_neutron
00028 //  interactions with nuclei based on CHIPS model
00029 //
00030 //   Created by V. Uzhinsky, 31.05.2011  
00031 //  Copied to hadronic/cross_sections by W. Pokorski
00032 
00033 #include "G4ChipsComponentXS.hh"
00034 
00035 #include "G4SystemOfUnits.hh"
00036 #include "G4ParticleTable.hh"
00037 #include "G4IonTable.hh"
00038 #include "G4ParticleDefinition.hh"
00039 
00040 #include "G4CrossSectionDataSetRegistry.hh"
00041 
00043 
00044 
00045 G4ChipsComponentXS::G4ChipsComponentXS():G4VComponentCrossSection("G4ChipsComponentXS"), fUpperLimit( 10000 * GeV ),
00046                                          fLowerLimit( 10 * MeV )
00047 {
00048   PxsManagerEl      = (G4ChipsProtonElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsProtonElasticXS::Default_Name());
00049   PxsManagerInEl    = (G4ChipsProtonInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsProtonInelasticXS::Default_Name());
00050 
00051   NxsManagerEl      = (G4ChipsNeutronElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsNeutronElasticXS::Default_Name());
00052   NxsManagerInEl    = (G4ChipsNeutronInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsNeutronInelasticXS::Default_Name());
00053 
00054   PBARxsManagerEl   = (G4ChipsAntiBaryonElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsAntiBaryonElasticXS::Default_Name());
00055   PBARxsManagerInEl = (G4ChipsAntiBaryonInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsAntiBaryonInelasticXS::Default_Name());
00056 
00057   PIPxsManagerEl    = (G4ChipsPionPlusElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsPionPlusElasticXS::Default_Name());
00058   PIPxsManagerInEl  = (G4ChipsPionPlusInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsPionPlusInelasticXS::Default_Name()); 
00059 
00060   PIMxsManagerEl    = (G4ChipsPionMinusElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsPionMinusElasticXS::Default_Name());
00061   PIMxsManagerInEl  = (G4ChipsPionMinusInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsPionMinusInelasticXS::Default_Name());
00062 
00063   KPxsManagerEl     = (G4ChipsKaonPlusElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusElasticXS::Default_Name());
00064   KPxsManagerInEl   = (G4ChipsKaonPlusInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name());
00065 
00066   KMxsManagerEl     = (G4ChipsKaonMinusElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusElasticXS::Default_Name());
00067   KMxsManagerInEl   = (G4ChipsKaonMinusInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name());
00068 
00069   KZxsManagerEl     = (G4ChipsKaonZeroElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroElasticXS::Default_Name());
00070   KZxsManagerInEl   = (G4ChipsKaonZeroInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name());
00071 
00072   HxsManagerEl     = (G4ChipsHyperonElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsHyperonElasticXS::Default_Name());
00073   HxsManagerInEl   = (G4ChipsHyperonInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsHyperonInelasticXS::Default_Name());
00074 }
00075 
00077 G4ChipsComponentXS::~G4ChipsComponentXS()
00078 {
00079 }
00080 
00082 G4double G4ChipsComponentXS::GetTotalElementCrossSection
00083 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4double N)
00084 {
00085   G4double momentum = std::sqrt(kinEnergy*(kinEnergy+2.*aParticle->GetPDGMass()));
00086   G4int PDGcode=aParticle->GetPDGEncoding();
00087 
00088   G4double Xelastic(0.), Xinelastic(0.);
00089 
00090   if     (PDGcode == 2212)   // Projectile is Proton
00091   {
00092    Xelastic   = PxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);  
00093    Xinelastic = PxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00094   } else if(PDGcode == 2112)  // Projectile is Neutron 
00095   {
00096    Xelastic = NxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);  
00097    Xinelastic = NxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);   
00098   } else if(PDGcode == -2212) // Projectile is Anti-Proton
00099   {
00100    Xelastic = PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00101    Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00102   } else if(PDGcode == -2112) // Projectile is Anti-Neutron
00103   {
00104    Xelastic = PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00105    Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00106   }else if(PDGcode == -3122 || PDGcode == -3222  || PDGcode == -3212  || PDGcode == -3112  || PDGcode == -3322  
00107            || PDGcode == -3312  || PDGcode == -3334) // Projectile is other Anti-baryon
00108   {
00109    Xelastic = PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00110    Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00111   } else if(PDGcode ==   211) // Projectile is Pi+ 
00112   {
00113    Xelastic = PIPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00114    Xinelastic = PIPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00115   } else if(PDGcode ==  -211) // Projectile is Pi-
00116   {
00117    Xelastic = PIMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00118    Xinelastic = PIMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00119   } else if(PDGcode ==  321)  // Projectile is K+ 
00120   {
00121    Xelastic = KPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00122    Xinelastic = KPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00123   } else if(PDGcode ==  -321) // Projectile is K- 
00124   {
00125    Xelastic = KMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00126    Xinelastic = KMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);  
00127   } else if(PDGcode ==  130 || PDGcode ==  310 || PDGcode ==  311 || PDGcode ==  -311) // Projectile is K0
00128   {
00129    Xelastic = KZxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00130    Xinelastic = KZxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00131   }else if(PDGcode ==   3122 || PDGcode ==  3222 || PDGcode ==  3112 || PDGcode ==  3212
00132            || PDGcode ==   3312 || PDGcode ==  3322 || PDGcode ==   3334) // Projectile is hyperon
00133   {
00134    Xelastic = HxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00135    Xinelastic = HxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode); 
00136   } 
00137 
00138   return Xelastic+Xinelastic; 
00139 }
00140 
00142 G4double G4ChipsComponentXS::GetTotalIsotopeCrossSection
00143 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4int A )
00144 { return GetTotalElementCrossSection(aParticle, kinEnergy, Z, (G4double) A);  }
00145 
00147 G4double G4ChipsComponentXS::GetInelasticElementCrossSection
00148 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4double N)
00149 {
00150   G4double momentum = std::sqrt(kinEnergy*(kinEnergy+2.*aParticle->GetPDGMass()));
00151   G4int PDGcode=aParticle->GetPDGEncoding();
00152 
00153   G4double Xinelastic(0.);
00154 
00155   if     (PDGcode == 2212)   // Projectile is Proton
00156   {
00157    Xinelastic = PxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00158   } else if(PDGcode == 2112)  // Projectile is Neutron 
00159   {
00160    Xinelastic = NxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00161   } else if(PDGcode == -2212) // Projectile is Anti-Proton
00162   {
00163    Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00164   } else if(PDGcode == -2112) // Projectile is Anti-Neutron
00165   {
00166    Xinelastic = PBARxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00167   } else if(PDGcode ==   211) // Projectile is Pi+ 
00168   {
00169    Xinelastic = PIPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00170   } else if(PDGcode ==  -211) // Projectile is Pi-
00171   {
00172    Xinelastic = PIMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00173   } else if(PDGcode ==  321)  // Projectile is K+ 
00174   {
00175    Xinelastic = KPxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00176   } else if(PDGcode ==  -321) // Projectile is K- 
00177   {
00178    Xinelastic = KMxsManagerInEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);; 
00179   } 
00180 
00181   return Xinelastic; 
00182 }
00183 
00185 G4double G4ChipsComponentXS::GetInelasticIsotopeCrossSection
00186 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4int A)
00187 {return GetInelasticElementCrossSection(aParticle, kinEnergy, Z, (G4double) A); }
00188  
00190 G4double G4ChipsComponentXS::GetElasticElementCrossSection
00191 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4double N)
00192 {
00193   G4double momentum = std::sqrt(kinEnergy*(kinEnergy+2.*aParticle->GetPDGMass()));
00194   G4int PDGcode=aParticle->GetPDGEncoding();
00195 
00196   G4double Xelastic(0.);
00197   
00198   if     (PDGcode == 2212)   // Projectile is Proton
00199   {
00200    Xelastic=PxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00201   } else if(PDGcode == 2112)  // Projectile is Neutron 
00202   {
00203    Xelastic=NxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);   
00204   } else if(PDGcode == -2212) // Projectile is Anti-Proton
00205   {
00206    Xelastic=PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00207   } else if(PDGcode == -2112) // Projectile is Anti-Neutron
00208   {
00209    Xelastic=PBARxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00210   } else if(PDGcode ==   211) // Projectile is Pi+ 
00211   {
00212    Xelastic=PIPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00213   } else if(PDGcode ==  -211) // Projectile is Pi-
00214   {
00215    Xelastic=PIMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00216   } else if(PDGcode ==  321)  // Projectile is K+ 
00217   {
00218    Xelastic=KPxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00219   } else if(PDGcode ==  -321) // Projectile is K- 
00220   {
00221    Xelastic=KMxsManagerEl->GetChipsCrossSection(momentum,Z,(G4int)N,PDGcode);
00222   } 
00223   return Xelastic; 
00224 }
00225  
00227 G4double G4ChipsComponentXS::GetElasticIsotopeCrossSection
00228 (const G4ParticleDefinition* aParticle, G4double kinEnergy, G4int Z, G4int A)
00229 { return GetElasticElementCrossSection(aParticle, kinEnergy, Z, (G4double) A); }

Generated on Mon May 27 17:47:52 2013 for Geant4 by  doxygen 1.4.7