G4GeneralSpaceNNCrossSection Class Reference

#include <G4GeneralSpaceNNCrossSection.hh>

Inheritance diagram for G4GeneralSpaceNNCrossSection:

G4VCrossSectionDataSet

Public Member Functions

 G4GeneralSpaceNNCrossSection ()
 ~G4GeneralSpaceNNCrossSection ()
virtual G4bool IsElementApplicable (const G4DynamicParticle *theProjectile, G4int Z, const G4Material *)
virtual G4double GetElementCrossSection (const G4DynamicParticle *theProjectile, G4int Z, const G4Material *)

Detailed Description

Definition at line 87 of file G4GeneralSpaceNNCrossSection.hh.


Constructor & Destructor Documentation

G4GeneralSpaceNNCrossSection::G4GeneralSpaceNNCrossSection (  ) 

Definition at line 78 of file G4GeneralSpaceNNCrossSection.cc.

References G4Proton::Proton().

00079  : G4VCrossSectionDataSet("General Space NN")
00080 {
00081   protonInelastic = new G4ProtonInelasticCrossSection();
00082   ionProton       = new G4IonProtonCrossSection();
00083   TripathiGeneral = new G4TripathiCrossSection();
00084   TripathiLight   = new G4TripathiLightCrossSection();
00085   Shen            = new G4IonsShenCrossSection();
00086   theProton       = G4Proton::Proton();  
00087 }

G4GeneralSpaceNNCrossSection::~G4GeneralSpaceNNCrossSection (  ) 

Definition at line 89 of file G4GeneralSpaceNNCrossSection.cc.

00090 {
00091   delete protonInelastic;
00092   delete ionProton;
00093   delete TripathiGeneral;
00094   delete TripathiLight;
00095   delete Shen;
00096 }


Member Function Documentation

G4double G4GeneralSpaceNNCrossSection::GetElementCrossSection ( const G4DynamicParticle theProjectile,
G4int  Z,
const G4Material  
) [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 111 of file G4GeneralSpaceNNCrossSection.cc.

References G4cout, G4endl, G4lrint(), G4ParticleDefinition::GetBaryonNumber(), G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), and G4ParticleDefinition::GetPDGCharge().

00112 {
00113   G4double result = 0.0;
00114   G4int ZP = G4lrint(theProjectile->GetDefinition()->GetPDGCharge()/eplus);
00115 
00116   if (verboseLevel >= 2)
00117   {
00118     G4int AP = theProjectile->GetDefinition()->GetBaryonNumber();
00119     G4cout <<"In G4GeneralSpaceNNCrossSection::GetCrossSection" <<G4endl;
00120     G4cout <<"Projectile A = " <<std::setw(8) <<AP 
00121            <<" Z = "           <<std::setw(8) <<ZP
00122            <<" Energy = "      <<theProjectile->GetKineticEnergy()/AP
00123            <<" MeV/nuc" <<G4endl;
00124     G4cout <<"Target     Z = " <<std::setw(8) <<ZT
00125            <<G4endl;
00126   }
00127   if (theProjectile->GetDefinition()==theProton)
00128   {
00129     if (ZT>5)
00130     {
00131       result = protonInelastic->
00132         GetElementCrossSection(theProjectile, ZT, mat);
00133       if (verboseLevel >= 2)
00134         G4cout <<"Selecting G4ProtonInelasticCrossSection" <<G4endl;
00135     }
00136     else
00137     {
00138       result = TripathiLight->
00139         GetElementCrossSection(theProjectile, ZT, mat);
00140       if (verboseLevel >= 2)
00141         G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
00142     }
00143   }
00144   else if (ZT==1)
00145   {
00146     if (ZP>5)
00147     {
00148       result = ionProton->
00149         GetElementCrossSection(theProjectile, ZT, mat);
00150       if (verboseLevel >= 2)
00151         G4cout <<"Selecting G4IonProtonCrossSection" <<G4endl;
00152     }
00153     else
00154     {
00155       result = TripathiLight->
00156         GetElementCrossSection(theProjectile, ZT, mat);
00157       if (verboseLevel >= 2)
00158         G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
00159     }
00160   }
00161   else
00162   {
00163     if (TripathiLight->IsElementApplicable(theProjectile, ZT, mat))
00164     {
00165       result = TripathiLight->
00166         GetElementCrossSection(theProjectile, ZT, mat);
00167       if (verboseLevel >= 2)
00168         G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
00169     }
00170     else if (TripathiGeneral->IsElementApplicable(theProjectile, ZT, mat))
00171     {
00172       result = TripathiGeneral->
00173         GetElementCrossSection(theProjectile, ZT, mat);
00174       if (verboseLevel >= 2)
00175         G4cout <<"Selecting G4TripathiCrossSection" <<G4endl;
00176     }
00177     else if (Shen->IsElementApplicable(theProjectile, ZT, mat))
00178     {
00179       result = Shen->
00180         GetElementCrossSection(theProjectile, ZT, mat);
00181       if (verboseLevel >= 2)
00182         G4cout <<"Selecting G4IonsShenCrossSection" <<G4endl;
00183     }
00184   }
00185   if (verboseLevel >= 2)
00186   {
00187     G4cout <<"Cross-section = " <<result/millibarn <<" mbarn" <<G4endl;
00188     G4cout <<G4endl;
00189   }
00190 
00191   return result;
00192 }

G4bool G4GeneralSpaceNNCrossSection::IsElementApplicable ( const G4DynamicParticle theProjectile,
G4int  Z,
const G4Material  
) [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 102 of file G4GeneralSpaceNNCrossSection.cc.

References G4ParticleDefinition::GetBaryonNumber(), and G4DynamicParticle::GetDefinition().

00103 {
00104   return (1 <= theProjectile->GetDefinition()->GetBaryonNumber());
00105 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:04 2013 for Geant4 by  doxygen 1.4.7