35 { {200100, 200101, 200102, 200103, 200104},
36 {200200, 200201, 200202, 200203, 200204} }
39 { {210100, 210101, 210102, 210103, 210104},
40 {210200, 210201, 210202, 210203, 210204} }
43 { {220100, 220101, 220102, 220103, 220104},
44 {220200, 220201, 220202, 220203, 220204} }
64 cout <<
" ***** running: QEL.2" << endl;
65 if(include_fsi==0) {
cout <<
"-FSI" << endl; }
67 if(include_fsi==1) {
cout <<
"+FSI" << endl; }
71 if(isample<0 || isample >=
kNSamples)
return;
73 const char * label =
kLabel[isample];
81 TFile fsig(
"../sig/splines.root",
"read");
82 TDirectory * sig_dir = (TDirectory *) fsig.Get(label);
84 TGraph * sig_graph_qelcc = (TGraph*) sig_dir->Get(
"qel_cc_n");
89 const double KEpmin = 0.01;
90 const double KEpmax = 1.50;
94 ostringstream out_filename;
95 if(include_fsi==0) { out_filename << label <<
".qel_2.dsig_dKEp.data"; }
96 else { out_filename << label <<
".qel_2.dsig_dKEp_withFSI.data"; }
98 ofstream out_stream(out_filename.str().c_str(), ios::out);
102 out_stream <<
"# [" << label <<
"]" << endl;
103 out_stream <<
"# " << endl;
104 out_stream <<
"# [QEL.2]:" << endl;
105 out_stream <<
"# Cross section as a function of f/s proton kinetic energy at E_nu= 0.5, 1.0 GeV." << endl;
106 out_stream <<
"# " << endl;
107 out_stream <<
"# Note:" << endl;
110 out_stream <<
"# - INCLUDING FSI " << endl;
112 out_stream <<
"# - proton energies are _kinetic_ energies " << endl;
113 out_stream <<
"# - proton kinetic energy KE in GeV, between KEmin = " << KEpmin <<
" GeV, KEmax = " << KEpmax <<
" GeV " << endl;
114 out_stream <<
"# - cross sections in 1E-38 cm^2 / GeV" << endl;
115 out_stream <<
"# - quoted cross section is nuclear cross section per nucleon contributing in the scattering (eg only neutrons for nu_mu QELCC)" << endl;
116 out_stream <<
"# Columns:" << endl;
117 out_stream <<
"# | KE(p) | sig(QELCC; Ev=0.5GeV) | sig(QELCC; Ev=1.0GeV) | " << endl;
119 out_stream << std::fixed << setprecision(6);
125 TChain * chain =
new TChain(
"gst");
128 for(
int iwkcur=0; iwkcur<
kNWCur; iwkcur++) {
134 ostringstream filename;
135 int run_number =
kRunNu[isample][iwkcur][
ie][ir];
136 filename <<
"../gst/gntp." << run_number <<
".gst.root";
138 cout <<
"Adding " << filename.str() <<
" to event chain" << endl;
139 chain->Add(filename.str().c_str());
148 double sig_qelcc_0500MeV = sig_graph_qelcc->Eval(0.5) /
N;
149 double sig_qelcc_1000MeV = sig_graph_qelcc->Eval(1.0) /
N;
154 TH1D * hst_dsig_dKEp_qelcc_0500MeV =
new TH1D(
"hst_dsig_dKEp_qelcc_0500MeV",
"dsig/dKEp, nu_mu QEL CC, Enu=0.5 GeV", nKEp, KEpmin, KEpmax);
155 TH1D * hst_dsig_dKEp_qelcc_1000MeV =
new TH1D(
"hst_dsig_dKEp_qelcc_1000MeV",
"dsig/dKEp, nu_mu QEL CC, Enu=1.0 GeV", nKEp, KEpmin, KEpmax);
161 chain->Draw(
"(Ei-0.938)>>hst_dsig_dKEp_qelcc_0500MeV",
"qel&&cc&&Ev>0.49&&Ev<0.51&&pdgi==2212",
"GOFF");
162 chain->Draw(
"(Ei-0.938)>>hst_dsig_dKEp_qelcc_1000MeV",
"qel&&cc&&Ev>0.99&&Ev<1.01&&pdgi==2212",
"GOFF");
164 chain->Draw(
"(Ef-0.938)>>hst_dsig_dKEp_qelcc_0500MeV",
"qel&&cc&&Ev>0.49&&Ev<0.51&&pdgf==2212",
"GOFF");
165 chain->Draw(
"(Ef-0.938)>>hst_dsig_dKEp_qelcc_1000MeV",
"qel&&cc&&Ev>0.99&&Ev<1.01&&pdgf==2212",
"GOFF");
171 double norm_qelcc_0500MeV = hst_dsig_dKEp_qelcc_0500MeV -> Integral(
"width") / sig_qelcc_0500MeV;
172 double norm_qelcc_1000MeV = hst_dsig_dKEp_qelcc_1000MeV -> Integral(
"width") / sig_qelcc_1000MeV;
174 if (norm_qelcc_0500MeV > 0) hst_dsig_dKEp_qelcc_0500MeV -> Scale(1./norm_qelcc_0500MeV);
175 if (norm_qelcc_1000MeV > 0) hst_dsig_dKEp_qelcc_1000MeV -> Scale(1./norm_qelcc_1000MeV);
177 for(
int i = 1;
i <= hst_dsig_dKEp_qelcc_1000MeV->GetNbinsX();
i++) {
179 double KEp = hst_dsig_dKEp_qelcc_1000MeV->GetBinCenter(
i);
181 double dsig_dKEp_qelcc_0500MeV = hst_dsig_dKEp_qelcc_0500MeV -> GetBinContent(
i);
182 double dsig_dKEp_qelcc_1000MeV = hst_dsig_dKEp_qelcc_1000MeV -> GetBinContent(
i);
184 dsig_dKEp_qelcc_0500MeV = TMath::Max(0., dsig_dKEp_qelcc_0500MeV);
185 dsig_dKEp_qelcc_1000MeV = TMath::Max(0., dsig_dKEp_qelcc_1000MeV);
187 out_stream << setw(15) << KEp
188 << setw(15) << dsig_dKEp_qelcc_0500MeV
189 << setw(15) << dsig_dKEp_qelcc_1000MeV
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
const int kRunNu[kNSamples][kNWCur][kNEnergies][kNRunsPerCase]
const char * kLabel[kNSamples]
void nuint09_qel2(int isample, int include_fsi=0)