51 cout <<
" ***** running: 1PI.3" << endl;
53 if(isample<0 || isample >=
kNSamples)
return;
54 if(single_pion_sources<0 || single_pion_sources>2)
return;
56 const char * label =
kLabel[isample];
60 TFile fsig(
"./cc1pip_tmp.root",
"read");
61 TGraph * sig_graph_cc1pip = (TGraph*) fsig.Get(
"CC1pip");
65 const int nKEpip = 60;
66 const double KEpipmin = 0.00;
67 const double KEpipmax = 1.50;
69 const int ncosth = 30;
70 const double costhmin = -1;
71 const double costhmax = +1;
75 ostringstream out_filename;
76 out_filename << label;
78 if (single_pion_sources==0) out_filename <<
".1pi_3a.";
79 else if (single_pion_sources==1) out_filename <<
".1pi_3b.";
80 else if (single_pion_sources==2) out_filename <<
".1pi_3c.";
82 if(stage==0) out_filename <<
"no_FSI.";
84 out_filename << label <<
"d2sig1pi_dKEpidOmega.data";
86 ofstream out_stream(out_filename.str().c_str(), ios::out);
90 out_stream <<
"# [" << label <<
"]" << endl;
91 out_stream <<
"# " << endl;
92 out_stream <<
"# [1PI.3]:" << endl;
93 out_stream <<
"# d^Sigma / dOmega_pi+ dKE_pi+ at E_nu= 1.0 and 1.5 GeV" << endl;
95 out_stream <<
"# ***** NO FSI: The {X pi+} state is a primary hadronic state" << endl;
97 if(single_pion_sources==0) {
98 out_stream <<
"# 1pi sources: All" << endl;
100 else if(single_pion_sources==1) {
101 out_stream <<
"# 1pi sources: P33(1232) resonance only" << endl;
103 else if(single_pion_sources==2) {
104 out_stream <<
"# 1pi sources: All resonances only" << endl;
106 out_stream <<
"# " << endl;
107 out_stream <<
"# Note:" << endl;
108 out_stream <<
"# - pi+ kinetic energy KE in GeV, linear spacing between KEmin = " << KEpipmin <<
" GeV, KEmax = " << KEpipmax <<
" GeV " << endl;
109 out_stream <<
"# - cross sections in 1E-38 cm^2 /GeV /sr" << endl;
110 out_stream <<
"# - quoted cross section is nuclear cross section divided with number of nucleons A" << endl;
111 out_stream <<
"# Columns:" << endl;
112 out_stream <<
"# | KE(pi+) | cos(theta_pi+) | dsig(numu A -> mu- 1pi+ X; Enu = 1.0 GeV) | dsig(numu A -> mu- 1pi+ X; Enu = 1.5 GeV) | " << endl;
114 out_stream << std::fixed << setprecision(6);
120 TChain * chain =
new TChain(
"gst");
123 for(
int iwkcur=0; iwkcur<
kNWCur; iwkcur++) {
129 ostringstream filename;
131 filename <<
"../gst/gntp." << run_number <<
".gst.root";
133 cout <<
"Adding " << filename.str() <<
" to event chain" << endl;
134 chain->Add(filename.str().c_str());
142 double sig_cc1pip_1000MeV = sig_graph_cc1pip -> Eval (1.0);
143 double sig_cc1pip_1500MeV = sig_graph_cc1pip -> Eval (1.5);
148 TH2D * hst_d2sig_dKEpipdOmg_1000MeV =
new TH2D(
"hst_d2sig_dKEpipdOmg_1000MeV",
149 "d2sig / dKEpi+ dOmega, numu A -> mu- 1pi+ X, Enu=1.0 GeV", nKEpip, KEpipmin, KEpipmax, ncosth, costhmin, costhmax);
150 TH2D * hst_d2sig_dKEpipdOmg_1500MeV =
new TH2D(
"hst_d2sig_dKEpipdOmg_1500MeV",
151 "d2sig / dKEpi+ dOmega, numu A -> mu- 1pi+ X, Enu=1.5 GeV", nKEpip, KEpipmin, KEpipmax, ncosth, costhmin, costhmax);
157 if(single_pion_sources==0) {
159 chain->Draw(
"pzf/sqrt(pzf*pzf+pyf*pyf+pxf*pxf):(Ef-0.139)>>hst_d2sig_dKEpipdOmg_1000MeV",
"cc&&Ev>0.99&&Ev<1.01&&pdgf==211&&nfpip==1&&nfpim==0&&nfpi0==0",
"GOFF");
160 chain->Draw(
"pzf/sqrt(pzf*pzf+pyf*pyf+pxf*pxf):(Ef-0.139)>>hst_d2sig_dKEpipdOmg_1500MeV",
"cc&&Ev>1.49&&Ev<1.51&&pdgf==211&&nfpip==1&&nfpim==0&&nfpi0==0",
"GOFF");
162 else if(single_pion_sources==1) {
164 chain->Draw(
"pzf/sqrt(pzf*pzf+pyf*pyf+pxf*pxf):(Ef-0.139)>>hst_d2sig_dKEpipdOmg_1000MeV",
"cc&&resid==0&&res&&Ev>0.99&&Ev<1.01&&pdgf==211&&nfpip==1&&nfpim==0&&nfpi0==0",
"GOFF");
165 chain->Draw(
"pzf/sqrt(pzf*pzf+pyf*pyf+pxf*pxf):(Ef-0.139)>>hst_d2sig_dKEpipdOmg_1500MeV",
"cc&&resid==0&&res&&Ev>1.49&&Ev<1.51&&pdgf==211&&nfpip==1&&nfpim==0&&nfpi0==0",
"GOFF");
167 else if(single_pion_sources==2) {
169 chain->Draw(
"pzf/sqrt(pzf*pzf+pyf*pyf+pxf*pxf):(Ef-0.139)>>hst_d2sig_dKEpipdOmg_1000MeV",
"cc&&res&&Ev>0.99&&Ev<1.01&&pdgf==211&&nfpip==1&&nfpim==0&&nfpi0==0",
"GOFF");
170 chain->Draw(
"pzf/sqrt(pzf*pzf+pyf*pyf+pxf*pxf):(Ef-0.139)>>hst_d2sig_dKEpipdOmg_1500MeV",
"cc&&res&&Ev>1.49&&Ev<1.51&&pdgf==211&&nfpip==1&&nfpim==0&&nfpi0==0",
"GOFF");
174 if(single_pion_sources==0) {
176 chain->Draw(
"pzi/sqrt(pzi*pzi+pyi*pyi+pxi*pxi):(Ei-0.139)>>hst_d2sig_dKEpipdOmg_1000MeV",
"cc&&Ev>0.99&&Ev<1.01&&pdgi==211&&nipip==1&&nipim==0&&nipi0==0",
"GOFF");
177 chain->Draw(
"pzi/sqrt(pzi*pzi+pyi*pyi+pxi*pxi):(Ei-0.139)>>hst_d2sig_dKEpipdOmg_1500MeV",
"cc&&Ev>1.49&&Ev<1.51&&pdgi==211&&nipip==1&&nipim==0&&nipi0==0",
"GOFF");
179 else if(single_pion_sources==1) {
181 chain->Draw(
"pzi/sqrt(pzi*pzi+pyi*pyi+pxi*pxi):(Ei-0.139)>>hst_d2sig_dKEpipdOmg_1000MeV",
"cc&&resid==0&&res&&Ev>0.99&&Ev<1.01&&pdgi==211&&nipip==1&&nipim==0&&nipi0==0",
"GOFF");
182 chain->Draw(
"pzi/sqrt(pzi*pzi+pyi*pyi+pxi*pxi):(Ei-0.139)>>hst_d2sig_dKEpipdOmg_1500MeV",
"cc&&resid==0&&res&&Ev>1.49&&Ev<1.51&&pdgi==211&&nipip==1&&nipim==0&&nipi0==0",
"GOFF");
184 else if(single_pion_sources==2) {
186 chain->Draw(
"pzi/sqrt(pzi*pzi+pyi*pyi+pxi*pxi):(Ei-0.139)>>hst_d2sig_dKEpipdOmg_1000MeV",
"cc&&res&&Ev>0.99&&Ev<1.01&&pdgi==211&&nipip==1&&nipim==0&&nipi0==0",
"GOFF");
187 chain->Draw(
"pzi/sqrt(pzi*pzi+pyi*pyi+pxi*pxi):(Ei-0.139)>>hst_d2sig_dKEpipdOmg_1500MeV",
"cc&&res&&Ev>1.49&&Ev<1.51&&pdgi==211&&nipip==1&&nipim==0&&nipi0==0",
"GOFF");
194 double norm_cc1pip_1000MeV = hst_d2sig_dKEpipdOmg_1000MeV -> Integral(
"width") * 2*TMath::Pi() / sig_cc1pip_1000MeV;
195 double norm_cc1pip_1500MeV = hst_d2sig_dKEpipdOmg_1500MeV -> Integral(
"width") * 2*TMath::Pi() / sig_cc1pip_1500MeV;
197 if (norm_cc1pip_1000MeV > 0) hst_d2sig_dKEpipdOmg_1000MeV -> Scale(1./norm_cc1pip_1000MeV);
198 if (norm_cc1pip_1500MeV > 0) hst_d2sig_dKEpipdOmg_1500MeV -> Scale(1./norm_cc1pip_1500MeV);
200 for(
int i = 1;
i <= hst_d2sig_dKEpipdOmg_1500MeV->GetNbinsX();
i++) {
201 for(
int j = 1; j <= hst_d2sig_dKEpipdOmg_1500MeV->GetNbinsY(); j++) {
203 double KEpip = hst_d2sig_dKEpipdOmg_1500MeV ->
GetXaxis() -> GetBinCenter(
i);
204 double costhpip = hst_d2sig_dKEpipdOmg_1500MeV ->
GetYaxis() -> GetBinCenter(j);
206 double d2sig_dKEpipdOmg_1000MeV = hst_d2sig_dKEpipdOmg_1000MeV -> GetBinContent(
i,j);
207 double d2sig_dKEpipdOmg_1500MeV = hst_d2sig_dKEpipdOmg_1500MeV -> GetBinContent(
i,j);
209 d2sig_dKEpipdOmg_1000MeV = TMath::Max(0., d2sig_dKEpipdOmg_1000MeV);
210 d2sig_dKEpipdOmg_1500MeV = TMath::Max(0., d2sig_dKEpipdOmg_1500MeV);
212 out_stream << setw(15) << KEpip
213 << setw(15) << costhpip
214 << setw(15) << d2sig_dKEpipdOmg_1000MeV
215 << setw(15) << d2sig_dKEpipdOmg_1500MeV
const int kRunNu1PI3[kNSamples][kNWCur][kNEnergies][kNRunsPerCase]
a1 GetYaxis() -> SetTitle("F2")
the ParameterSet object passed in for the configuration of a destination should be the only source that can affect the behavior of that destination This is to eliminate the dependencies of configuring a destination from multiple mostly from the defaults It suppresses possible glitches about changing the configuration file somewhere outside of a destination segament might still affect the behavior of that destination In the previous configuration for a specific the value of a certain e may come from following and have been suppressed It the configuring ParameterSet object for each destination will be required to carry a parameter list as complete as possible If a parameter still cannot be found in the ParameterSet the configuration code will go look for a hardwired default directly The model is a great simplicity comparing with the previous especially when looking for default values Another great advantage is most of the parameters now have very limited places that allows to appear Usually they can only appear at one certain level in a configuration file For in the old configuring model or in a default ParameterSet object inside of a or in a category or in a severity object This layout of multiple sources for a single parameter brings great confusion in both writing a configuration and in processing the configuration file Under the new the only allowed place for the parameter limit to appear is inside of a category which is inside of a destination object Other improvements simplify the meaning of a destination name In the old a destination name has multiple folds of meanings the e cout and cerr have the special meaning of logging messages to standard output or standard error the name also serves as the output filename if the destination is a file these names are also references to look up for detailed configurations in configuring the MessageFacility The multi purpose of the destination name might cause some unwanted behavior in either writing or parsing the configuration file To amend in the new model the destination name is now merely a name for a which might represent the literal purpose of this or just an id All other meanings of the destinations names now go into the destination ParameterSet as individual such as the type parameter and filename parameter Following is the deatiled rule for the new configuring Everything that is related with MessageFacility configuration must be wrapped in a single ParameterSet object with the name MessageFacility The MessageFacility ParameterSet object contains a series of top level parameters These parameters can be chosen a vector of string listing the name of debug enabled models Or use *to enable debug messages in all modules a vector of string a vector of string a vector of string a ParameterSet object containing the list of all destinations The destinations ParameterSet object is a combination of ParameterSet objects for individual destinations There are two types of destinations that you can insert in the destinations ParameterSet ordinary including cout
a1 GetXaxis() -> SetTitle("Q2")
const char * kLabel[kNSamples]