34 #include "RunAction.hh"
35 #include "DetectorConstruction.hh"
36 #include "PrimaryGeneratorAction.hh"
51 :fDetector(det), fPrimary(kin)
83 G4cout <<
"\n " << partName <<
" ("
85 << material->
GetName() <<
" (density: "
86 <<
G4BestUnit(density,
"Volumic Mass") <<
"; radiation length: "
92 G4cout <<
"\n Range cuts : \t gamma "
93 << std::setw(8) <<
G4BestUnit(fRangeCut[0],
"Length")
94 <<
"\t e- " << std::setw(8) <<
G4BestUnit(fRangeCut[1],
"Length");
95 G4cout <<
"\n Energy cuts : \t gamma "
96 << std::setw(8) <<
G4BestUnit(fEnergyCut[0],
"Energy")
97 <<
"\t e- " << std::setw(8) <<
G4BestUnit(fEnergyCut[1],
"Energy")
105 G4double gamM1 = energy/Mass_c2,
gam = gamM1 + 1., gamP1 = gam + 1.;
118 std::vector<G4String> emName;
119 std::vector<G4double> enerCut;
120 size_t length = plist->
size();
121 for (
size_t j=0; j<length; j++) {
122 procName = (*plist)[j]->GetProcessName();
124 if ((procName ==
"eBrem")||(procName ==
"muBrems")) cut = fEnergyCut[0];
126 (procName !=
"msc")) {
127 emName.push_back(procName);
128 enerCut.push_back(cut);
133 G4cout <<
"\n processes : ";
134 for (
size_t j=0; j<emName.size();j++)
135 G4cout <<
"\t" << std::setw(13) << emName[j] <<
"\t";
136 G4cout <<
"\t" << std::setw(13) <<
"total";
143 std::vector<G4double> sigma0;
146 for (
size_t j=0; j<emName.size();j++) {
148 (energy,particle,emName[j],Z,A,enerCut[j]);
150 sigma0.push_back(sig);
152 sigma0.push_back(sigtot);
154 G4cout <<
"\n \n cross section per atom : ";
155 for (
size_t j=0; j<sigma0.size();j++) {
162 std::vector<G4double> sigma0;
163 std::vector<G4double> sigma1;
164 std::vector<G4double> sigma2;
165 G4double Sig, SigtotComp = 0., Sigtot = 0.;
167 for (
size_t j=0; j<emName.size();j++) {
169 (energy,particle,emName[j],material,enerCut[j]);
171 sigma0.push_back(Sig);
174 sigma1.push_back(Sig);
175 sigma2.push_back(Sig/density);
177 sigma0.push_back(SigtotComp);
178 sigma1.push_back(Sigtot);
179 sigma2.push_back(Sigtot/density);
182 G4cout <<
"\n \n compCrossSectionPerVolume : ";
183 for (
size_t j=0; j<sigma0.size();j++) {
184 G4cout <<
"\t" << std::setw(13) << sigma0[j]*
cm <<
" cm^-1";
186 G4cout <<
"\n cross section per volume : ";
187 for (
size_t j=0; j<sigma1.size();j++) {
188 G4cout <<
"\t" << std::setw(13) << sigma1[j]*
cm <<
" cm^-1";
191 G4cout <<
"\n cross section per mass : ";
192 for (
size_t j=0; j<sigma2.size();j++) {
193 G4cout <<
"\t" << std::setw(13)
201 G4cout <<
"\n \n mean free path : ";
202 for (
size_t j=0; j<sigma1.size();j++) {
204 if (sigma1[j] > 0.) lambda = 1/sigma1[j];
209 G4cout <<
"\n (g/cm2) : ";
210 for (
size_t j=0; j<sigma2.size();j++) {
212 if (sigma2[j] > 0.) lambda = 1/sigma2[j];
219 G4cout <<
"\n-------------------------------------------------------------\n"
225 std::vector<G4double> dedx1;
226 std::vector<G4double> dedx2;
229 for (
size_t j=0; j<emName.size();j++) {
230 dedx = emCal.
ComputeDEDX(energy,particle,emName[j],material,enerCut[j]);
231 dedx1.push_back(dedx);
232 dedx2.push_back(dedx/density);
234 dedxtot = emCal.
GetDEDX(energy,particle,material);
235 dedx1.push_back(dedxtot);
236 dedx2.push_back(dedxtot/density);
239 G4cout <<
"\n \n restricted dE/dx : ";
240 for (
size_t j=0; j<sigma1.size();j++) {
244 G4cout <<
"\n (MeV/g/cm2) : ";
245 for (
size_t j=0; j<sigma2.size();j++) {
246 G4cout <<
"\t" << std::setw(13) <<
G4BestUnit(dedx2[j],
"Energy*Surface/Mass");
258 G4cout <<
"\n \n range from restrict dE/dx: "
259 <<
"\t" << std::setw(8) <<
G4BestUnit(range1,
"Length")
260 <<
" (" << std::setw(8) <<
G4BestUnit(range2,
"Mass/Surface") <<
")";
262 G4cout <<
"\n range from full dE/dx : "
263 <<
"\t" << std::setw(8) <<
G4BestUnit(Range1,
"Length")
264 <<
" (" << std::setw(8) <<
G4BestUnit(Range2,
"Mass/Surface") <<
")";
271 G4cout <<
"\n \n transport mean free path : "
272 <<
"\t" << std::setw(8) <<
G4BestUnit(MSmfp1,
"Length")
273 <<
" (" << std::setw(8) <<
G4BestUnit(MSmfp2,
"Mass/Surface") <<
")";
277 G4cout <<
"\n-------------------------------------------------------------\n";
303 for (
size_t i=0; i<numOfCouples; i++) {
338 G4int iter = 0 , itermax = 10;
339 while (err > errmax && iter < itermax) {
343 err = std::abs(deioni - ekin)/ekin;
346 G4cout <<
"\n \n critical energy (Rossi) : "
347 <<
"\t" << std::setw(8) <<
G4BestUnit(ekin,
"Energy");
358 EcPdg = pdga[istat]/Zeff;
359 G4cout <<
"\t\t\t (from Pdg formula : "
360 << std::setw(8) <<
G4BestUnit(EcPdg,
"Energy") <<
")";
364 G4double rMolier1 = Es/ekin, rMolier2 = rMolier1*radl;
365 G4cout <<
"\n Moliere radius : "
366 <<
"\t" << std::setw(8) << rMolier1 <<
" X0 "
367 <<
"= " << std::setw(8) <<
G4BestUnit(rMolier2,
"Length");
371 G4cout <<
"\t (from Pdg formula : "
372 << std::setw(8) <<
G4BestUnit(rMPdg,
"Length") <<
")";