33 #include "RunAction.hh"
34 #include "DetectorConstruction.hh"
35 #include "PrimaryGeneratorAction.hh"
84 G4cout <<
"\n " << partName <<
" ("
86 << material->
GetName() <<
" (density: "
87 <<
G4BestUnit(density,
"Volumic Mass") <<
"; radiation length: "
93 G4cout <<
"\n Range cuts : \t gamma "
96 G4cout <<
"\n Energy cuts : \t gamma "
106 G4double gamM1 = energy/Mass_c2,
gam = gamM1 + 1., gamP1 = gam + 1.;
123 std::vector<G4String> emName;
124 std::vector<G4double> enerCut;
126 for (
size_t j=0; j<
length; j++) {
127 procName = (*plist)[j]->GetProcessName();
129 if ((procName ==
"eBrem")||(procName ==
"muBrems")) cut =
fEnergyCut[0];
131 (procName !=
"msc")) {
132 emName.push_back(procName);
133 enerCut.push_back(cut);
138 char* htmlDocName = std::getenv(
"G4PhysListName");
139 char* htmlDocDir = std::getenv(
"G4PhysListDocDir");
140 if (htmlDocName && htmlDocDir) {
145 G4cout <<
"\n processes : ";
146 for (
size_t j=0; j<emName.size();j++)
147 G4cout <<
"\t" << std::setw(13) << emName[j] <<
"\t";
148 G4cout <<
"\t" << std::setw(13) <<
"total";
155 std::vector<G4double> sigma0;
158 for (
size_t j=0; j<emName.size();j++) {
160 (energy,particle,emName[j],Z,A,enerCut[j]);
162 sigma0.push_back(sig);
164 sigma0.push_back(sigtot);
166 G4cout <<
"\n \n cross section per atom : ";
167 for (
size_t j=0; j<sigma0.size();j++) {
174 std::vector<G4double> sigma0;
175 std::vector<G4double> sigma1;
176 std::vector<G4double> sigma2;
177 G4double Sig, SigtotComp = 0., Sigtot = 0.;
179 for (
size_t j=0; j<emName.size();j++) {
181 (energy,particle,emName[j],material,enerCut[j]);
183 sigma0.push_back(Sig);
186 sigma1.push_back(Sig);
187 sigma2.push_back(Sig/density);
189 sigma0.push_back(SigtotComp);
190 sigma1.push_back(Sigtot);
191 sigma2.push_back(Sigtot/density);
194 G4cout <<
"\n \n compCrossSectionPerVolume : ";
195 for (
size_t j=0; j<sigma0.size();j++) {
196 G4cout <<
"\t" << std::setw(13) << sigma0[j]*
cm <<
" cm^-1";
198 G4cout <<
"\n cross section per volume : ";
199 for (
size_t j=0; j<sigma1.size();j++) {
200 G4cout <<
"\t" << std::setw(13) << sigma1[j]*
cm <<
" cm^-1";
203 G4cout <<
"\n cross section per mass : ";
204 for (
size_t j=0; j<sigma2.size();j++) {
205 G4cout <<
"\t" << std::setw(13)
213 G4cout <<
"\n \n mean free path : ";
214 for (
size_t j=0; j<sigma1.size();j++) {
216 if (sigma1[j] > 0.) lambda = 1/sigma1[j];
221 G4cout <<
"\n (g/cm2) : ";
222 for (
size_t j=0; j<sigma2.size();j++) {
224 if (sigma2[j] > 0.) lambda = 1/sigma2[j];
231 G4cout <<
"\n-----------------------------------------------------------\n"
237 std::vector<G4double> dedx1;
238 std::vector<G4double> dedx2;
240 size_t nproc = emName.size();
242 for (
size_t j=0; j<nproc; j++) {
243 dedx = emCal.
ComputeDEDX(energy,particle,emName[j],material,enerCut[j]);
245 dedx1.push_back(dedx);
246 dedx2.push_back(dedx/density);
248 dedx1.push_back(dedxtot);
249 dedx2.push_back(dedxtot/density);
252 G4cout <<
"\n \n restricted dE/dx : ";
253 for (
size_t j=0; j<=nproc; j++) {
254 G4cout <<
"\t" << std::setw(13)
258 G4cout <<
"\n (MeV/g/cm2) : ";
259 for (
size_t j=0; j<=nproc; j++) {
260 G4cout <<
"\t" << std::setw(13)
261 <<
G4BestUnit(dedx2[j],
"Energy*Surface/Mass");
265 for (
size_t j=0; j<nproc; j++) {
266 dedx = emCal.
ComputeDEDX(energy,particle,emName[j],material,energy);
269 dedx2[j] = dedx/density;
271 dedx1[nproc] = dedxtot;
272 dedx2[nproc] = dedxtot/density;
275 G4cout <<
"\n \n unrestricted dE/dx : ";
276 for (
size_t j=0; j<=nproc; j++) {
280 G4cout <<
"\n (MeV/g/cm2) : ";
281 for (
size_t j=0; j<=nproc; j++) {
282 G4cout <<
"\t" << std::setw(13)
283 <<
G4BestUnit(dedx2[j],
"Energy*Surface/Mass");
291 G4cout <<
"\n \n range from restrict dE/dx: "
292 <<
"\t" << std::setw(8) <<
G4BestUnit(range1,
"Length")
293 <<
" (" << std::setw(8) <<
G4BestUnit(range2,
"Mass/Surface") <<
")";
297 if(energy < EmaxTable) {
301 G4cout <<
"\n range from full dE/dx : "
302 <<
"\t" << std::setw(8) <<
G4BestUnit(Range1,
"Length")
303 <<
" (" << std::setw(8) <<
G4BestUnit(Range2,
"Mass/Surface") <<
")";
311 G4cout <<
"\n \n transport mean free path : "
312 <<
"\t" << std::setw(8) <<
G4BestUnit(MSmfp1,
"Length")
313 <<
" (" << std::setw(8) <<
G4BestUnit(MSmfp2,
"Mass/Surface") <<
")";
317 G4cout <<
"\n-------------------------------------------------------------\n";
343 for (
size_t i=0; i<numOfCouples; i++) {
378 G4int iter = 0 , itermax = 10;
379 while (err > errmax && iter < itermax) {
386 G4cout <<
"\n \n critical energy (Rossi) : "
387 <<
"\t" << std::setw(8) <<
G4BestUnit(ekin,
"Energy");
398 EcPdg = pdga[istat]/Zeff;
399 G4cout <<
"\t\t\t (from Pdg formula : "
400 << std::setw(8) <<
G4BestUnit(EcPdg,
"Energy") <<
")";
404 G4double rMolier1 = Es/ekin, rMolier2 = rMolier1*radl;
405 G4cout <<
"\n Moliere radius : "
406 <<
"\t" << std::setw(8) << rMolier1 <<
" X0 "
407 <<
"= " << std::setw(8) <<
G4BestUnit(rMolier2,
"Length");
411 G4cout <<
"\t (from Pdg formula : "
412 << std::setw(8) <<
G4BestUnit(rMPdg,
"Length") <<
")";