Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -0,0 +1,21 @@
{
fin = filp[ipart] + filt[itarg] + ".root";
TFile* fff = new TFile(fin);
TH1F* hhh;
cout << "Opened file " << fin << " ixs= " << ixs << endl;
if(ixs==0) hhh = (TH1F*)fff->Get("h1");
if(ixs==1) hhh = (TH1F*)fff->Get("h2");
if(ixs==2) hhh = (TH1F*)fff->Get("h3");
if(ixs==3) hhh = (TH1F*)fff->Get("h4");
if(ixs==4) hhh = (TH1F*)fff->Get("h5");
if(ixs==5) hhh = (TH1F*)fff->Get("h6");
if(ixs==6) hhh = (TH1F*)fff->Get("h7");
hhh->SetLineColor(col[itarg]);
hhh->SetLineWidth(2);
leg[ixs]->AddEntry(hhh, targ[itarg], "l");
hhh->Draw("C HIST SAME");
c1->Update();
}
@@ -0,0 +1,11 @@
{
gROOT->ProcessLine(".x $G4INSTALL/examples/extended/hadronic/Hadr00/scripts/Style.C");
for(ipart = 0; ipart<4; ipart++) {
for(ixs=0; ixs<7; ixs++) {
bool yes = true;
if(ipart != 1 && (ixs == 4 || ixs == 5)) yes = false;
if(yes)gROOT->ProcessLine(".x $G4INSTALL/examples/extended/hadronic/Hadr00/scripts/PlotSingle.C");
}
}
}
@@ -0,0 +1,23 @@
{
c1 = new TCanvas("c1"," ",0.5, 5, 800, 600);
gtit = hed[ixs] + " Cross Section for " + part[ipart];
hh[ixs] = gPad->DrawFrame(x1[ixs], y1[ixs], x2[ixs], y2[ixs], gtit);
hh[ixs]->GetYaxis()->SetTitle(axtit[1]);
gPad->SetLogy();
if(ixs==0 || ixs==2) hh[ixs]->GetXaxis()->SetTitle(axtit[2]);
else hh[ixs]->GetXaxis()->SetTitle(axtit[0]);
leg[ixs] = new TLegend(0.9, 0.6, 1.1, 0.9);
for(itarg=0; itarg<ntarg; itarg++) {
gROOT->ProcessLine(".x $G4INSTALL/examples/extended/hadronic/Hadr00/scripts/AddMC.C");
cout << "Target# " << itarg << " max# " << ntarg << endl;
}
cout << "Loop is completed ixs= " << ixs << endl;
leg[ixs]->Draw("SAME");
cout << "Legend is done " << endl;
c1->Update();
c1->Print("a"+filp[ipart] + fil0[ixs] + ".gif");
}
@@ -0,0 +1,34 @@
{
gROOT->Reset();
gROOT->SetStyle("Plain");
gStyle->SetOptStat(0);
Int_t ntarg = 5;
Int_t npart = 4;
Int_t nxs = 7;
Int_t ipart = 0;
Int_t itarg = 0;
Int_t ixs = 0;
TString axtit[3] = {"log10(E/MeV)", "Cross section (bn)","log10(p/GeV)"};
TString hed[nxs] = {"Elastic","Elastic","Inelastic","Inelastic","Capture","Fission","ChargeExchange"};
TString fil0[nxs]= {"elp","el","inlp","inl","cap","fis","cex"};
Double_t x1[nxs] = {-3,-1,-3,-1,-1,-1,-1};
Double_t x2[nxs] = {5,6,5,6,6,6,6};
Double_t y1[nxs] = {0.001,0.001,0.001,0.001,0.00001,0.00001,0.0001};
Double_t y2[nxs] = {20,10,20,5,1,1,1};
TLegend* leg[nxs];
TH1F* hh[nxs];
TString gtit, fin;
TFile ff[ntarg];
TString targ[ntarg] = {"H","C","Al","Fe","Pb"};
TString filt[ntarg] = {"h","c","al","fe","pb"};
Int_t col[ntarg] = {2, 3, 4, 5, 6};
TString filp[npart] = {"p_","n_","pi+","pi-"};
TString part[npart] = {"proton","neutron","#pi^{+}","#pi^{-}"};
}
@@ -0,0 +1,10 @@
#/bin/csh
#================================================
# Macro file for Hadr00 run over all Physics Lists
# 26.06.2009 V.Ivanchneko
#================================================
source $G4INSTALL/examples/extended/hadronic/Hadr00/scripts/run_single.csh QGSP_BERT
source $G4INSTALL/examples/extended/hadronic/Hadr00/scripts/run_single.csh QBBC
#
@@ -0,0 +1,15 @@
#/bin/csh
#================================================
# Macro file for Hadr00 run over all Physics Lists
# 26.06.2009 V.Ivanchneko
#================================================
mkdir -p $1
cd $1
rm -f *.*
setenv PHYSLIST $1
$G4BIN/$G4SYSTEM/Hadr00 $G4INSTALL/examples/extended/hadronic/Hadr00/pn.mac >& pn.out
$G4BIN/$G4SYSTEM/Hadr00 $G4INSTALL/examples/extended/hadronic/Hadr00/pi.mac >& pi.out
root -b -q $G4INSTALL/examples/extended/hadronic/Hadr00/scripts/Plot.C
cd ../
#