G4CrossSectionPairGG Class Reference

#include <G4CrossSectionPairGG.hh>

Inheritance diagram for G4CrossSectionPairGG:

G4VCrossSectionDataSet

Public Member Functions

 G4CrossSectionPairGG (G4VCrossSectionDataSet *low, G4double Etransit)
virtual ~G4CrossSectionPairGG ()
virtual void CrossSectionDescription (std::ostream &) const
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
virtual void DumpPhysicsTable (const G4ParticleDefinition &)

Detailed Description

Definition at line 51 of file G4CrossSectionPairGG.hh.


Constructor & Destructor Documentation

G4CrossSectionPairGG::G4CrossSectionPairGG ( G4VCrossSectionDataSet low,
G4double  Etransit 
)

Definition at line 48 of file G4CrossSectionPairGG.cc.

References G4NistManager::Instance(), and G4VCrossSectionDataSet::verboseLevel.

00049                          :
00050       G4VCrossSectionDataSet("G4CrossSectionPairGG"), theLowX(low), ETransition(
00051             Etransit) {
00052    NistMan = G4NistManager::Instance();
00053    theHighX = new G4GlauberGribovCrossSection();
00054    verboseLevel = 0;
00055 }

G4CrossSectionPairGG::~G4CrossSectionPairGG (  )  [virtual]

Definition at line 57 of file G4CrossSectionPairGG.cc.

00057                                             {
00058    //   The cross section registry wil delete these
00059    //    delete theLowX;
00060    //    delete theHighX;
00061 }


Member Function Documentation

void G4CrossSectionPairGG::BuildPhysicsTable ( const G4ParticleDefinition  )  [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 127 of file G4CrossSectionPairGG.cc.

References G4VCrossSectionDataSet::BuildPhysicsTable(), G4cout, G4endl, G4lrint(), G4NistManager::GetAtomicMassAmu(), G4VCrossSectionDataSet::GetElementCrossSection(), G4GlauberGribovCrossSection::GetInelasticGlauberGribov(), G4VCrossSectionDataSet::GetName(), G4ParticleDefinition::GetParticleName(), G4VCrossSectionDataSet::IsElementApplicable(), and G4VCrossSectionDataSet::verboseLevel.

Referenced by GetElementCrossSection().

00127                                                                              {
00128    theLowX->BuildPhysicsTable(pDef);
00129    theHighX->BuildPhysicsTable(pDef);
00130 
00131    if (verboseLevel > 0) {
00132       G4cout << "G4CrossSectionPairGG::BuildPhysicsTable "
00133             << theLowX->GetName() << "  " << theHighX->GetName() << G4endl;
00134    }
00135 
00136    G4ParticleDefinition * myDef = const_cast<G4ParticleDefinition*>(&pDef);
00137    std::vector<ParticleXScale>::iterator iter;
00138    iter = scale_factors.begin();
00139    while (iter != scale_factors.end() && (*iter).first != myDef) {
00140       ++iter;
00141    }
00142 
00143    //  new particle, initialise
00144 
00145    G4Material* mat = 0;
00146 
00147    if (iter == scale_factors.end()) {
00148       XS_factors factors(93);
00149       G4ThreeVector mom(0.0, 0.0, 1.0);
00150       G4DynamicParticle DynPart(myDef, mom, ETransition); // last is kinetic Energy
00151 
00152       if (verboseLevel > 0) {
00153          G4cout << "G4CrossSectionPairGG::BuildPhysicsTable for particle "
00154                << pDef.GetParticleName() << G4endl;
00155       }
00156       for (G4int aZ = 1; aZ < 93; ++aZ) {
00157          factors[aZ] = 1.; // default, to give reasonable value if only high is applicable
00158          G4int AA = G4lrint(NistMan->GetAtomicMassAmu(aZ));
00159          G4bool isApplicable = theLowX->IsElementApplicable(&DynPart, aZ,
00160                mat) && (aZ > 1);
00161 
00162          if (isApplicable) {
00163             factors[aZ] = theLowX->GetElementCrossSection(&DynPart, aZ, mat)
00164                                                       / theHighX->GetInelasticGlauberGribov(&DynPart, aZ, AA);
00165 
00166          }
00167          if (verboseLevel > 0) {
00168             G4cout << "Z=" << aZ << ",  A=" << AA << ", scale="
00169                   << factors[aZ];
00170             if (verboseLevel == 1) {
00171                G4cout << G4endl;
00172             } else {
00173                if (isApplicable) {
00174                   G4cout << ",  low / high "
00175                         << theLowX->GetElementCrossSection(&DynPart, aZ,
00176                               mat) << "  "
00177                               << theHighX->GetInelasticGlauberGribov(&DynPart,
00178                                     aZ, AA) << G4endl;
00179                } else {
00180                   G4cout << ",   N/A" << G4endl;
00181                }
00182             }
00183          }
00184       }
00185       ParticleXScale forPart(myDef, factors);
00186       scale_factors.push_back(forPart);
00187    }
00188 }

void G4CrossSectionPairGG::CrossSectionDescription ( std::ostream &   )  const [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 63 of file G4CrossSectionPairGG.cc.

00064                                  {
00065    outFile << "G4CrossSectionPairGG is used to add the relativistic rise to\n"
00066          << "hadronic cross section data sets above a given energy.  In this\n"
00067          << "case, the Glauber-Gribov cross section is used above 91 GeV.\n"
00068          << "At this energy the low energy cross section is smoothly joined\n"
00069          << "to the high energy cross section.  Below 91 GeV the Barashenkov\n"
00070          << "cross section is used for pions (G4PiNuclearCrossSection), the\n"
00071          << "Axen-Wellisch cross section is used for protons\n"
00072          << "(G4ProtonInelasticCrossSection), and the Wellisch-Laidlaw cross\n"
00073          << "section is used for neutrons (G4NeutronInelasticCrossSection).\n";
00074 }

void G4CrossSectionPairGG::DumpPhysicsTable ( const G4ParticleDefinition  )  [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 200 of file G4CrossSectionPairGG.cc.

References G4cout, G4endl, and G4VCrossSectionDataSet::GetName().

00200                                                                        {
00201    G4cout << std::setw(24) << " " << " G4CrossSectionPairGG: "
00202          << theLowX->GetName() << " cross sections " << G4endl;
00203    G4cout << std::setw(27) << " " << "below " << ETransition / GeV
00204          << " GeV, Glauber-Gribov above " << G4endl;
00205 }

G4double G4CrossSectionPairGG::GetElementCrossSection ( const G4DynamicParticle ,
G4int  Z,
const G4Material mat = 0 
) [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 88 of file G4CrossSectionPairGG.cc.

References BuildPhysicsTable(), G4cout, G4endl, G4lrint(), G4NistManager::GetAtomicMassAmu(), G4DynamicParticle::GetDefinition(), G4VCrossSectionDataSet::GetElementCrossSection(), G4GlauberGribovCrossSection::GetInelasticGlauberGribov(), G4DynamicParticle::GetKineticEnergy(), and G4VCrossSectionDataSet::verboseLevel.

00090 {
00091    G4double Xsec(0.);
00092 
00093    if (aParticle->GetKineticEnergy() < ETransition)
00094    {
00095       Xsec = theLowX->GetElementCrossSection(aParticle, ZZ, mat);
00096    } else {
00097 
00098       std::vector<ParticleXScale>::iterator iter = scale_factors.begin();
00099       G4ParticleDefinition * pDef = aParticle->GetDefinition();
00100       while (iter != scale_factors.end() && (*iter).first != pDef)
00101       {
00102          ++iter;
00103       }
00104       if (iter != scale_factors.end() )
00105       {
00106          G4int AA = G4lrint(NistMan->GetAtomicMassAmu(ZZ));
00107          Xsec = theHighX->GetInelasticGlauberGribov(aParticle, ZZ, AA)
00108                                             * (*iter).second[ZZ];
00109          if (verboseLevel > 2)
00110          {
00111             G4cout << " scaling .." << ZZ << " " << AA << " "
00112                   << (*iter).second[ZZ] << " "
00113                   << theHighX->GetInelasticGlauberGribov(aParticle, ZZ, AA)
00114                   << "  " << Xsec << G4endl;
00115          }
00116       } else {
00117          // BuildPhysicsTable not done for pDef=aParticle->GetDefinition
00118          //  build table, and recurse
00119          BuildPhysicsTable(*pDef);
00120          Xsec=GetElementCrossSection(aParticle, ZZ, mat);
00121       }
00122    }
00123 
00124    return Xsec;
00125 }

G4bool G4CrossSectionPairGG::IsElementApplicable ( const G4DynamicParticle ,
G4int  Z,
const G4Material mat = 0 
) [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 76 of file G4CrossSectionPairGG.cc.

References G4DynamicParticle::GetKineticEnergy(), and G4VCrossSectionDataSet::IsElementApplicable().

00077                                                                           {
00078    G4bool isApplicable(false);
00079    G4double Ekin = aParticle->GetKineticEnergy();
00080    if (Ekin <= ETransition) {
00081       isApplicable = theLowX->IsElementApplicable(aParticle, Z, mat);
00082    } else if (Z > 1) {
00083       isApplicable = true;
00084    }
00085    return isApplicable;
00086 }


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