Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/electromagnetic/TestEm0/DirectAccess.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/electromagnetic/TestEm0/DirectAccess.cc (Version 11.3.0) and /examples/extended/electromagnetic/TestEm0/DirectAccess.cc (Version 10.2.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 /// \file electromagnetic/TestEm0/DirectAccess     26 /// \file electromagnetic/TestEm0/DirectAccess.cc
 27 /// \brief Main program of the electromagnetic     27 /// \brief Main program of the electromagnetic/TestEm0 example
 28 //                                                 28 //
 29 //                                                 29 //
 30 //                                             <<  30 // $Id: DirectAccess.cc 94302 2015-11-11 12:58:04Z gcosmo $
                                                   >>  31 // 
 31 // -------------------------------------------     32 // ------------------------------------------------------------
 32 //                                                 33 //
 33 //  To print cross sections per atom and mean      34 //  To print cross sections per atom and mean free path for simple material
 34 //                                                 35 //
 35 #include "G4BetheBlochModel.hh"                << 
 36 #include "G4BetheHeitlerModel.hh"              << 
 37 #include "G4BraggModel.hh"                     << 
 38 #include "G4DataVector.hh"                     << 
 39 #include "G4Electron.hh"                       << 
 40 #include "G4Gamma.hh"                          << 
 41 #include "G4KleinNishinaCompton.hh"            << 
 42 #include "G4Material.hh"                           36 #include "G4Material.hh"
                                                   >>  37 
                                                   >>  38 #include "G4PEEffectFluoModel.hh"
                                                   >>  39 #include "G4KleinNishinaCompton.hh"
                                                   >>  40 #include "G4BetheHeitlerModel.hh"
                                                   >>  41 
                                                   >>  42 #include "G4eeToTwoGammaModel.hh"
                                                   >>  43 
 43 #include "G4MollerBhabhaModel.hh"                  44 #include "G4MollerBhabhaModel.hh"
                                                   >>  45 #include "G4SeltzerBergerModel.hh"
                                                   >>  46 
                                                   >>  47 #include "G4BetheBlochModel.hh"
                                                   >>  48 #include "G4BraggModel.hh"
                                                   >>  49 
 44 #include "G4MuBetheBlochModel.hh"                  50 #include "G4MuBetheBlochModel.hh"
 45 #include "G4MuBremsstrahlungModel.hh"              51 #include "G4MuBremsstrahlungModel.hh"
 46 #include "G4MuPairProductionModel.hh"              52 #include "G4MuPairProductionModel.hh"
                                                   >>  53 
                                                   >>  54 #include "globals.hh"
                                                   >>  55 #include "G4UnitsTable.hh"
                                                   >>  56 #include "G4SystemOfUnits.hh"
                                                   >>  57 
                                                   >>  58 #include "G4Gamma.hh"
                                                   >>  59 #include "G4Positron.hh"
                                                   >>  60 #include "G4Electron.hh"
                                                   >>  61 #include "G4Proton.hh"
 47 #include "G4MuonPlus.hh"                           62 #include "G4MuonPlus.hh"
                                                   >>  63 
                                                   >>  64 #include "G4DataVector.hh"
 48 #include "G4NistManager.hh"                        65 #include "G4NistManager.hh"
 49 #include "G4PEEffectFluoModel.hh"              << 
 50 #include "G4ParticleTable.hh"                      66 #include "G4ParticleTable.hh"
 51 #include "G4Positron.hh"                       << 
 52 #include "G4Proton.hh"                         << 
 53 #include "G4SeltzerBergerModel.hh"             << 
 54 #include "G4SystemOfUnits.hh"                  << 
 55 #include "G4UnitsTable.hh"                     << 
 56 #include "G4eeToTwoGammaModel.hh"              << 
 57 #include "globals.hh"                          << 
 58                                                    67 
 59 int main()                                     <<  68 int main() {
 60 {                                              <<  69 
 61   G4UnitDefinition::BuildUnitsTable();             70   G4UnitDefinition::BuildUnitsTable();
 62                                                    71 
 63   G4ParticleDefinition* gamma = G4Gamma::Gamma     72   G4ParticleDefinition* gamma = G4Gamma::Gamma();
 64   G4ParticleDefinition* posit = G4Positron::Po     73   G4ParticleDefinition* posit = G4Positron::Positron();
 65   G4ParticleDefinition* elec = G4Electron::Ele     74   G4ParticleDefinition* elec = G4Electron::Electron();
 66   G4ParticleDefinition* prot = G4Proton::Proto     75   G4ParticleDefinition* prot = G4Proton::Proton();
 67   G4ParticleDefinition* muon = G4MuonPlus::Muo     76   G4ParticleDefinition* muon = G4MuonPlus::MuonPlus();
 68   G4ParticleTable* partTable = G4ParticleTable     77   G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
 69   partTable->SetReadiness();                       78   partTable->SetReadiness();
 70                                                    79 
 71   G4DataVector cuts;                               80   G4DataVector cuts;
 72   cuts.push_back(1 * keV);                     <<  81   cuts.push_back(1*keV);
 73                                                    82 
 74   // define materials                              83   // define materials
 75   //                                               84   //
 76   G4Material* material = G4NistManager::Instan <<  85   G4Material* material = 
                                                   >>  86     G4NistManager::Instance()->FindOrBuildMaterial("G4_Fe");
 77                                                    87 
 78   G4cout << *(G4Material::GetMaterialTable())      88   G4cout << *(G4Material::GetMaterialTable()) << G4endl;
 79                                                    89 
 80   G4MaterialCutsCouple* couple = new G4Materia     90   G4MaterialCutsCouple* couple = new G4MaterialCutsCouple(material);
 81   couple->SetIndex(0);                             91   couple->SetIndex(0);
 82                                                    92 
 83   // work only for simple materials                93   // work only for simple materials
 84   G4double Z = material->GetZ();                   94   G4double Z = material->GetZ();
 85   G4double A = material->GetA();                   95   G4double A = material->GetA();
 86                                                    96 
 87   // initialise gamma processes (models)           97   // initialise gamma processes (models)
 88   //                                           <<  98   //  
 89   G4VEmModel* phot = new G4PEEffectFluoModel()     99   G4VEmModel* phot = new G4PEEffectFluoModel();
 90   G4VEmModel* comp = new G4KleinNishinaCompton    100   G4VEmModel* comp = new G4KleinNishinaCompton();
 91   G4VEmModel* conv = new G4BetheHeitlerModel() << 101   G4VEmModel* conv = new G4BetheHeitlerModel(); 
 92   phot->Initialise(gamma, cuts);                  102   phot->Initialise(gamma, cuts);
 93   comp->Initialise(gamma, cuts);                  103   comp->Initialise(gamma, cuts);
 94   conv->Initialise(gamma, cuts);                  104   conv->Initialise(gamma, cuts);
 95                                                   105 
 96   // valid pointer to a couple is needed for t    106   // valid pointer to a couple is needed for this model
 97   phot->SetCurrentCouple(couple);                 107   phot->SetCurrentCouple(couple);
 98                                                   108 
 99   // compute CrossSection per atom and MeanFre    109   // compute CrossSection per atom and MeanFreePath
100   //                                              110   //
101   G4double Emin = 1.01 * MeV, Emax = 2.01 * Me << 111   G4double Emin = 1.01*MeV, Emax = 2.01*MeV, dE = 100*keV;
102                                                   112 
103   G4cout << "\n #### Gamma : CrossSectionPerAt << 113   G4cout << "\n #### Gamma : CrossSectionPerAtom and MeanFreePath for " 
104          << G4endl;                            << 114          << material->GetName() << G4endl;
105   G4cout << "\n Energy \t PhotoElec \t Compton    115   G4cout << "\n Energy \t PhotoElec \t Compton \t Conversion \t";
106   G4cout << "\t PhotoElec \t Compton \t Conver << 116   G4cout <<           "\t PhotoElec \t Compton \t Conversion" << G4endl;
107                                                << 117   
108   for (G4double Energy = Emin; Energy <= Emax;    118   for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
109     G4cout << "\n " << G4BestUnit(Energy, "Ene << 119     G4cout << "\n " << G4BestUnit (Energy, "Energy")
110            << G4BestUnit(phot->ComputeCrossSec << 120      << "\t" 
111            << G4BestUnit(comp->ComputeCrossSec << 121      << G4BestUnit (phot->ComputeCrossSectionPerAtom(gamma,Energy,Z),"Surface")
112            << G4BestUnit(conv->ComputeCrossSec << 122      << "\t"         
113            << G4BestUnit(phot->ComputeMeanFree << 123      << G4BestUnit (comp->ComputeCrossSectionPerAtom(gamma,Energy,Z),"Surface")
114            << G4BestUnit(comp->ComputeMeanFree << 124      << "\t"         
115            << G4BestUnit(conv->ComputeMeanFree << 125      << G4BestUnit (conv->ComputeCrossSectionPerAtom(gamma,Energy,Z),"Surface")
                                                   >> 126      << "\t \t"         
                                                   >> 127      << G4BestUnit (phot->ComputeMeanFreePath(gamma,Energy,material),"Length")
                                                   >> 128      << "\t"         
                                                   >> 129      << G4BestUnit (comp->ComputeMeanFreePath(gamma,Energy,material),"Length")
                                                   >> 130      << "\t"         
                                                   >> 131      << G4BestUnit (conv->ComputeMeanFreePath(gamma,Energy,material),"Length");
116   }                                               132   }
117                                                   133 
118   G4cout << G4endl;                               134   G4cout << G4endl;
119                                                   135 
120   // initialise positron annihilation (model)     136   // initialise positron annihilation (model)
121   //                                           << 137   //    
122   G4VEmModel* anni = new G4eeToTwoGammaModel()    138   G4VEmModel* anni = new G4eeToTwoGammaModel();
123   anni->Initialise(posit, cuts);                  139   anni->Initialise(posit, cuts);
124                                                << 140   
125   // compute CrossSection per atom and MeanFre    141   // compute CrossSection per atom and MeanFreePath
126   //                                              142   //
127   Emin = 1.01 * MeV;                           << 143   Emin = 1.01*MeV; Emax = 2.01*MeV; dE = 100*keV;
128   Emax = 2.01 * MeV;                           << 
129   dE = 100 * keV;                              << 
130                                                   144 
131   G4cout << "\n #### e+ annihilation : CrossSe    145   G4cout << "\n #### e+ annihilation : CrossSectionPerAtom and MeanFreePath"
132          << " for " << material->GetName() <<     146          << " for " << material->GetName() << G4endl;
133   G4cout << "\n Energy \t e+ annihil \t";         147   G4cout << "\n Energy \t e+ annihil \t";
134   G4cout << "\t e+ annihil" << G4endl;         << 148   G4cout <<           "\t e+ annihil" << G4endl;
135                                                << 149   
136   for (G4double Energy = Emin; Energy <= Emax;    150   for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
137     G4cout << "\n " << G4BestUnit(Energy, "Ene << 151     G4cout << "\n " << G4BestUnit (Energy, "Energy")
138            << G4BestUnit(anni->ComputeCrossSec << 152      << "\t" 
139            << G4BestUnit(anni->ComputeMeanFree << 153      << G4BestUnit (anni->ComputeCrossSectionPerAtom(posit,Energy,Z),"Surface")
                                                   >> 154      << "\t \t"         
                                                   >> 155      << G4BestUnit (anni->ComputeMeanFreePath(posit,Energy,material),"Length");
140   }                                               156   }
141                                                   157 
142   G4cout << G4endl;                               158   G4cout << G4endl;
143                                                   159 
144   // initialise electron processes (models)       160   // initialise electron processes (models)
145   //                                           << 161   //    
146   G4VEmModel* ioni = new G4MollerBhabhaModel()    162   G4VEmModel* ioni = new G4MollerBhabhaModel();
147   G4VEmModel* brem = new G4SeltzerBergerModel(    163   G4VEmModel* brem = new G4SeltzerBergerModel();
148   ioni->Initialise(elec, cuts);                   164   ioni->Initialise(elec, cuts);
149   brem->Initialise(elec, cuts);                   165   brem->Initialise(elec, cuts);
150                                                << 166   
151   // compute CrossSection per atom and MeanFre    167   // compute CrossSection per atom and MeanFreePath
152   //                                              168   //
153   Emin = 1.01 * MeV;                           << 169   Emin = 1.01*MeV; Emax = 101.01*MeV; dE = 10*MeV;
154   Emax = 101.01 * MeV;                         << 170   G4double Ecut = 100*keV;
155   dE = 10 * MeV;                               << 
156   G4double Ecut = 100 * keV;                   << 
157                                                   171 
158   G4cout << "\n ####electron: CrossSection, Me    172   G4cout << "\n ####electron: CrossSection, MeanFreePath and StoppingPower"
159          << " for " << material->GetName() <<  << 173          << " for " << material->GetName() 
160          << G4endl;                            << 174          << ";\tEnergy cut = " << G4BestUnit (Ecut, "Energy") << G4endl;
161                                                << 175          
162   G4cout << "\n Energy \t ionization \t bremss    176   G4cout << "\n Energy \t ionization \t bremsstra \t";
163   G4cout << "\t ionization \t bremsstra \t";   << 177   G4cout <<           "\t ionization \t bremsstra \t";
164   G4cout << "\t ionization \t bremsstra" << G4 << 178   G4cout <<           "\t ionization \t bremsstra" << G4endl;
165                                                << 179   
166   for (G4double Energy = Emin; Energy <= Emax;    180   for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
167     G4cout << "\n " << G4BestUnit(Energy, "Ene << 181     G4cout << "\n " << G4BestUnit (Energy, "Energy")
168            << G4BestUnit(ioni->ComputeCrossSec << 182      << "\t" 
169            << "\t"                             << 183      << G4BestUnit (ioni->ComputeCrossSectionPerAtom(elec,Energy,Z,A,Ecut),
170            << G4BestUnit(brem->ComputeCrossSec << 184                    "Surface")
171            << "\t \t"                          << 185      << "\t" 
172            << G4BestUnit(ioni->ComputeMeanFree << 186      << G4BestUnit (brem->ComputeCrossSectionPerAtom(elec,Energy,Z,A,Ecut),
173            << G4BestUnit(brem->ComputeMeanFree << 187                    "Surface")                   
174            << "\t \t"                          << 188      << "\t \t"         
175            << G4BestUnit(ioni->ComputeDEDXPerV << 189      << G4BestUnit (ioni->ComputeMeanFreePath(elec,Energy,material,Ecut),
176            << "\t"                             << 190                    "Length")
177            << G4BestUnit(brem->ComputeDEDXPerV << 191      << "\t"         
                                                   >> 192      << G4BestUnit (brem->ComputeMeanFreePath(elec,Energy,material,Ecut),
                                                   >> 193                    "Length")                   
                                                   >> 194      << "\t \t"         
                                                   >> 195      << G4BestUnit (ioni->ComputeDEDXPerVolume(material,elec,Energy,Ecut),
                                                   >> 196                    "Energy/Length")
                                                   >> 197      << "\t"         
                                                   >> 198      << G4BestUnit (brem->ComputeDEDXPerVolume(material,elec,Energy,Ecut),
                                                   >> 199                    "Energy/Length");                                      
178   }                                               200   }
179                                                << 201   
180   G4cout << G4endl;                               202   G4cout << G4endl;
181                                                << 203   
182   // initialise proton processes (models)         204   // initialise proton processes (models)
183   //                                           << 205   //    
184   ioni = new G4BetheBlochModel();                 206   ioni = new G4BetheBlochModel();
185   ioni->Initialise(prot, cuts);                   207   ioni->Initialise(prot, cuts);
186                                                << 208   
187   // compute CrossSection per atom and MeanFre    209   // compute CrossSection per atom and MeanFreePath
188   //                                              210   //
189   Emin = 1.01 * MeV;                           << 211   Emin = 1.01*MeV; Emax = 102.01*MeV; dE = 10*MeV;
190   Emax = 102.01 * MeV;                         << 212   Ecut = 100*keV;
191   dE = 10 * MeV;                               << 
192   Ecut = 100 * keV;                            << 
193                                                   213 
194   G4cout << "\n #### proton : CrossSection, Me    214   G4cout << "\n #### proton : CrossSection, MeanFreePath and StoppingPower"
195          << " for " << material->GetName() <<  << 215          << " for " << material->GetName() 
196          << G4endl;                            << 216          << ";\tEnergy cut = " << G4BestUnit (Ecut, "Energy") << G4endl;
197                                                << 217          
198   G4cout << "\n Energy \t ionization \t";         218   G4cout << "\n Energy \t ionization \t";
199   G4cout << "\t ionization \t";                << 219   G4cout <<           "\t ionization \t";
200   G4cout << "\t ionization" << G4endl;         << 220   G4cout <<           "\t ionization" << G4endl;
201                                                << 221   
202   for (G4double Energy = Emin; Energy <= Emax;    222   for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
203     G4cout << "\n " << G4BestUnit(Energy, "Ene << 223     G4cout << "\n " << G4BestUnit (Energy, "Energy")
204            << G4BestUnit(ioni->ComputeCrossSec << 224      << "\t" 
205            << "\t \t"                          << 225      << G4BestUnit (ioni->ComputeCrossSectionPerAtom(prot,Energy,Z,A,Ecut),
206            << G4BestUnit(ioni->ComputeMeanFree << 226                    "Surface")
207            << "\t \t"                          << 227      << "\t \t"         
208            << G4BestUnit(ioni->ComputeDEDXPerV << 228      << G4BestUnit (ioni->ComputeMeanFreePath(prot,Energy,material,Ecut),
                                                   >> 229                    "Length")           
                                                   >> 230      << "\t \t"         
                                                   >> 231      << G4BestUnit (ioni->ComputeDEDXPerVolume(material,prot,Energy,Ecut),
                                                   >> 232                    "Energy/Length");
209   }                                               233   }
210                                                << 234   
211   G4cout << G4endl;                               235   G4cout << G4endl;
212                                                << 236   
213   // low energy : Bragg Model                     237   // low energy : Bragg Model
214   ioni = new G4BraggModel(prot);                  238   ioni = new G4BraggModel(prot);
215   ioni->Initialise(prot, cuts);                   239   ioni->Initialise(prot, cuts);
216                                                << 240   
217   // compute CrossSection per atom and MeanFre    241   // compute CrossSection per atom and MeanFreePath
218   //                                              242   //
219   Emin = 1.1 * keV;                            << 243   Emin = 1.1*keV; Emax = 2.01*MeV; dE = 300*keV;
220   Emax = 2.01 * MeV;                           << 244   Ecut = 10*keV;
221   dE = 300 * keV;                              << 245   
222   Ecut = 10 * keV;                             << 
223                                                << 
224   G4cout << "\n #### proton : low energy model    246   G4cout << "\n #### proton : low energy model (Bragg) "
225          << ";\tEnergy cut = " << G4BestUnit(E << 247          << ";\tEnergy cut = " << G4BestUnit (Ecut, "Energy") << G4endl;
226                                                << 248                            
227   G4cout << "\n Energy \t ionization \t";         249   G4cout << "\n Energy \t ionization \t";
228   G4cout << "\t ionization \t";                << 250   G4cout <<           "\t ionization \t";
229   G4cout << "\t ionization" << G4endl;         << 251   G4cout <<           "\t ionization" << G4endl;
230                                                << 252   
231   for (G4double Energy = Emin; Energy <= Emax;    253   for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
232     G4cout << "\n " << G4BestUnit(Energy, "Ene << 254     G4cout << "\n " << G4BestUnit (Energy, "Energy")
233            << G4BestUnit(ioni->ComputeCrossSec << 255      << "\t" 
234            << "\t \t"                          << 256      << G4BestUnit (ioni->ComputeCrossSectionPerAtom(prot,Energy,Z,A,Ecut),
235            << G4BestUnit(ioni->ComputeMeanFree << 257                    "Surface")
236            << "\t \t"                          << 258      << "\t \t"         
237            << G4BestUnit(ioni->ComputeDEDXPerV << 259      << G4BestUnit (ioni->ComputeMeanFreePath(prot,Energy,material,Ecut),
                                                   >> 260                    "Length")           
                                                   >> 261      << "\t \t"         
                                                   >> 262      << G4BestUnit (ioni->ComputeDEDXPerVolume(material,prot,Energy,Ecut),
                                                   >> 263                    "Energy/Length");
238   }                                               264   }
239                                                << 265   
240   G4cout << G4endl;                               266   G4cout << G4endl;
241                                                << 267   
242   // initialise muon processes (models)           268   // initialise muon processes (models)
243   //                                           << 269   //  
244   ioni = new G4MuBetheBlochModel();               270   ioni = new G4MuBetheBlochModel();
245   brem = new G4MuBremsstrahlungModel();           271   brem = new G4MuBremsstrahlungModel();
246   G4VEmModel* pair = new G4MuPairProductionMod    272   G4VEmModel* pair = new G4MuPairProductionModel();
247   ioni->Initialise(muon, cuts);                   273   ioni->Initialise(muon, cuts);
248   brem->Initialise(muon, cuts);                   274   brem->Initialise(muon, cuts);
249   pair->Initialise(muon, cuts);                   275   pair->Initialise(muon, cuts);
250                                                << 276    
251   // compute CrossSection per atom and MeanFre    277   // compute CrossSection per atom and MeanFreePath
252   //                                              278   //
253   Emin = 1.01 * GeV;                           << 279   Emin = 1.01*GeV; Emax = 101.01*GeV; dE = 10*GeV;
254   Emax = 101.01 * GeV;                         << 280   Ecut = 10*MeV;
255   dE = 10 * GeV;                               << 
256   Ecut = 10 * MeV;                             << 
257                                                << 
258   G4cout << "\n ####muon: CrossSection and Mea << 
259          << ";\tEnergy cut = " << G4BestUnit(E << 
260                                                   281 
                                                   >> 282   G4cout << "\n ####muon: CrossSection and MeanFreePath for "
                                                   >> 283          << material->GetName() 
                                                   >> 284          << ";\tEnergy cut = " << G4BestUnit (Ecut, "Energy") << G4endl;
                                                   >> 285          
261   G4cout << "\n Energy \t ionization \t bremss    286   G4cout << "\n Energy \t ionization \t bremsstra \t pair_prod \t";
262   G4cout << "\t ionization \t bremsstra \t pai << 287   G4cout <<           "\t ionization \t bremsstra \t pair_prod" << G4endl;
263                                                << 288   
264   for (G4double Energy = Emin; Energy <= Emax;    289   for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
265     G4cout << "\n " << G4BestUnit(Energy, "Ene << 290     G4cout << "\n " << G4BestUnit (Energy, "Energy")
266            << G4BestUnit(ioni->ComputeCrossSec << 291      << "\t" 
267            << "\t"                             << 292      << G4BestUnit (ioni->ComputeCrossSectionPerAtom(muon,Energy,Z,A,Ecut),
268            << G4BestUnit(brem->ComputeCrossSec << 293                    "Surface")
269            << "\t"                             << 294      << "\t" 
270            << G4BestUnit(pair->ComputeCrossSec << 295      << G4BestUnit (brem->ComputeCrossSectionPerAtom(muon,Energy,Z,A,Ecut),
271            << "\t \t"                          << 296                    "Surface")
272            << G4BestUnit(ioni->ComputeMeanFree << 297      << "\t"                    
273            << G4BestUnit(brem->ComputeMeanFree << 298      << G4BestUnit (pair->ComputeCrossSectionPerAtom(muon,Energy,Z,A,Ecut),
274            << G4BestUnit(pair->ComputeMeanFree << 299                    "Surface")                                      
                                                   >> 300      << "\t \t"         
                                                   >> 301      << G4BestUnit (ioni->ComputeMeanFreePath(muon,Energy,material,Ecut),
                                                   >> 302                    "Length")
                                                   >> 303      << "\t"         
                                                   >> 304      << G4BestUnit (brem->ComputeMeanFreePath(muon,Energy,material,Ecut),
                                                   >> 305                    "Length")
                                                   >> 306      << "\t"         
                                                   >> 307      << G4BestUnit (pair->ComputeMeanFreePath(muon,Energy,material,Ecut),
                                                   >> 308                    "Length");
275   }                                               309   }
276                                                << 310   
277   G4cout << G4endl;                               311   G4cout << G4endl;
278                                                << 312   
279   G4cout << "\n ####muon: StoppingPower for "  << 313   G4cout << "\n ####muon: StoppingPower for "
280          << ";\tEnergy cut = " << G4BestUnit(E << 314          << material->GetName() 
281                                                << 315          << ";\tEnergy cut = " << G4BestUnit (Ecut, "Energy") << G4endl;
                                                   >> 316          
282   G4cout << "\n Energy \t ionization \t bremss    317   G4cout << "\n Energy \t ionization \t bremsstra \t pair_prod \t" << G4endl;
283                                                << 318   
284   for (G4double Energy = Emin; Energy <= Emax;    319   for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
285     G4cout << "\n " << G4BestUnit(Energy, "Ene << 320     G4cout << "\n " << G4BestUnit (Energy, "Energy")
286            << G4BestUnit(ioni->ComputeDEDXPerV << 321      << "\t"         
287            << "\t"                             << 322      << G4BestUnit (ioni->ComputeDEDXPerVolume(material,muon,Energy,Ecut),
288            << G4BestUnit(brem->ComputeDEDXPerV << 323                    "Energy/Length")
289            << "\t"                             << 324      << "\t"         
290            << G4BestUnit(pair->ComputeDEDXPerV << 325      << G4BestUnit (brem->ComputeDEDXPerVolume(material,muon,Energy,Ecut),
                                                   >> 326                    "Energy/Length")
                                                   >> 327      << "\t"         
                                                   >> 328      << G4BestUnit (pair->ComputeDEDXPerVolume(material,muon,Energy,Ecut),
                                                   >> 329                    "Energy/Length");
291   }                                               330   }
292                                                << 331   
293   G4cout << G4endl;                            << 332   G4cout << G4endl;                                   
294   return EXIT_SUCCESS;                            333   return EXIT_SUCCESS;
295 }                                                 334 }
296                                                   335 
297 //....oooOO0OOooo........oooOO0OOooo........oo    336 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
298                                                   337