Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
MuCrossSections Class Reference

#include <MuCrossSections.hh>

Public Member Functions

 MuCrossSections ()
 
 ~MuCrossSections ()
 
G4double CR_Macroscopic (const G4String &, G4Material *, G4double, G4double)
 
G4double CR_PerAtom (const G4String &, G4Element *, G4double, G4double)
 

Detailed Description

Definition at line 44 of file MuCrossSections.hh.

Constructor & Destructor Documentation

MuCrossSections::MuCrossSections ( )

Definition at line 44 of file MuCrossSections.cc.

45 { }
MuCrossSections::~MuCrossSections ( )

Definition at line 49 of file MuCrossSections.cc.

50 { }

Member Function Documentation

G4double MuCrossSections::CR_Macroscopic ( const G4String process,
G4Material material,
G4double  tkin,
G4double  ep 
)

Definition at line 54 of file MuCrossSections.cc.

References G4Material::GetElementVector(), G4Material::GetNumberOfElements(), and G4Material::GetVecNbOfAtomsPerVolume().

58 {
59  const G4ElementVector* theElementVector = material->GetElementVector();
60  const G4double* NbOfAtomsPerVolume = material->GetVecNbOfAtomsPerVolume();
61 
62  G4double SIGMA = 0 ;
63 
64  for ( size_t i=0 ; i < material->GetNumberOfElements() ; i++ )
65  {
66  G4Element* element = (*theElementVector)[i];
67  SIGMA += NbOfAtomsPerVolume[i] * CR_PerAtom(process, element, tkin, ep);
68  }
69  return SIGMA;
70 }
std::vector< G4Element * > G4ElementVector
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:188
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:204
G4double CR_PerAtom(const G4String &, G4Element *, G4double, G4double)
size_t GetNumberOfElements() const
Definition: G4Material.hh:184
double G4double
Definition: G4Types.hh:76
G4double MuCrossSections::CR_PerAtom ( const G4String process,
G4Element element,
G4double  tkin,
G4double  ep 
)

Definition at line 74 of file MuCrossSections.cc.

References test::a, python.hepunit::Avogadro, python.hepunit::cm2, g(), G4Element::GetA(), G4Element::GetZ(), python.hepunit::GeV, python.hepunit::mole, and z.

76 {
77  G4double z = element->GetZ();
78  G4double a = element->GetA();
79 
80  G4double sigma = 0.;
81  if (process == "muBrems")
82  sigma = CRB_Mephi(z,a/(g/mole),tkin/GeV,ep/GeV)*(cm2/(g*GeV))*a/Avogadro;
83 
84  else if (process == "muIoni")
85  sigma = CRK_Mephi(z,a/(g/mole),tkin/GeV,ep/GeV)*(cm2/(g*GeV))*a/Avogadro;
86 
87  //else if (process == "muNucl")
88  else if (process == "muonNuclear")
89  sigma = CRN_Mephi(z,a/(g/mole),tkin/GeV,ep/GeV)*(cm2/(g*GeV))*a/Avogadro;
90 
91  else if (process == "muPairProd")
92  sigma = CRP_Mephi(z,a/(g/mole),tkin/GeV,ep/GeV)*(cm2/(g*GeV))*a/Avogadro;
93 
94  return sigma;
95 }
G4double z
Definition: TRTMaterials.hh:39
G4double GetZ() const
Definition: G4Element.hh:131
G4double GetA() const
Definition: G4Element.hh:138
float Avogadro
Definition: hepunit.py:253
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
double G4double
Definition: G4Types.hh:76

The documentation for this class was generated from the following files: