35 { {900100, 900101, 900102, 900103, 900104},
36 {900200, 900201, 900202, 900203, 900204},
37 {900300, 900301, 900302, 900303, 900304} }
40 { {910100, 910101, 910102, 910103, 910104},
41 {910200, 910201, 910202, 910203, 910204},
42 {910300, 910301, 910302, 910303, 910304} }
45 { {920100, 920101, 920102, 920103, 920104},
46 {920200, 920201, 920202, 920203, 920204},
47 {920300, 920301, 920302, 920303, 920304} }
61 cout <<
" ***** running: QEL.6" << endl;
63 if(isample<0 || isample >=
kNSamples)
return;
65 const char * label =
kLabel[isample];
70 TFile fsig(
"../sig/splines.root",
"read");
71 TDirectory * sig_dir = (TDirectory *) fsig.Get(label);
73 TGraph * sig_totcc = (TGraph*) sig_dir->Get(
"tot_cc");
77 const int nKEnuc = 100;
78 const double KEnucmin = 0.00;
79 const double KEnucmax = 1.30;
83 ostringstream out_filename;
84 out_filename << label <<
".qel_6.dsigCCQElike_dKEp.data";
86 ofstream out_stream(out_filename.str().c_str(), ios::out);
90 out_stream <<
"# [" << label <<
"]" << endl;
91 out_stream <<
"# " << endl;
92 out_stream <<
"# [QEL.6]:" << endl;
93 out_stream <<
"# CCQE-like cross section (1 nucleon + 0 pions after FSI) at E_nu = 0.5, 1.0 and 1.5 GeV as a function of the nucleon kinetic energy" << endl;
94 out_stream <<
"# " << endl;
95 out_stream <<
"# Note:" << endl;
96 out_stream <<
"# - nucleon kinetic energy KE in GeV, linear spacing between KEmin = " << KEnucmin <<
" GeV, KEmax = " << KEnucmax <<
" GeV " << endl;
97 out_stream <<
"# - cross sections in 1E-38 cm^2 / GeV" << endl;
98 out_stream <<
"# - quoted cross section is nuclear cross section divided with number of nucleons A" << endl;
99 out_stream <<
"# Columns:" << endl;
100 out_stream <<
"# | KE(proton) | dsig(numu CCQE-like; Enu = 0.5 GeV) | dsig(numu CCQE-like; Enu = 1.0 GeV) | dsig(numu CCQE-like; Enu = 1.5 GeV) | " << endl;
101 out_stream << std::fixed << setprecision(6);
107 TChain * chain =
new TChain(
"gst");
110 for(
int iwkcur=0; iwkcur<
kNWCur; iwkcur++) {
116 ostringstream filename;
118 filename <<
"../gst/gntp." << run_number <<
".gst.root";
120 cout <<
"Adding " << filename.str() <<
" to event chain" << endl;
121 chain->Add(filename.str().c_str());
129 double sig_totcc_0500MeV = sig_totcc -> Eval (0.5) /
A;
130 double sig_totcc_1000MeV = sig_totcc -> Eval (1.0) /
A;
131 double sig_totcc_1500MeV = sig_totcc -> Eval (1.5) /
A;
136 TH1D * hst_dsig_dKEnuc_0500MeV =
new TH1D(
"hst_dsig_dKEnuc_0500MeV",
"dsig/dKEp, numu CCQE-like after FSI, Enu=0.5 GeV", nKEnuc, KEnucmin, KEnucmax);
137 TH1D * hst_dsig_dKEnuc_1000MeV =
new TH1D(
"hst_dsig_dKEnuc_1000MeV",
"dsig/dKEp, numu CCQE-like after FSI, Enu=1.0 GeV", nKEnuc, KEnucmin, KEnucmax);
138 TH1D * hst_dsig_dKEnuc_1500MeV =
new TH1D(
"hst_dsig_dKEnuc_1500MeV",
"dsig/dKEp, numu CCQE-like after FSI, Enu=1.5 GeV", nKEnuc, KEnucmin, KEnucmax);
143 chain->Draw(
"(Ef-0.938)>>hst_dsig_dKEnuc_0500MeV",
"cc&&Ev>0.49&&Ev<0.51&&nfp==1&&nfn==0&&nfpip==1&&nfpim==0&&nfpi0==0&&nfother==0",
"GOFF");
144 chain->Draw(
"(Ef-0.938)>>hst_dsig_dKEnuc_1000MeV",
"cc&&Ev>0.99&&Ev<1.01&&nfp==1&&nfn==0&&nfpip==1&&nfpim==0&&nfpi0==0&&nfother==0",
"GOFF");
145 chain->Draw(
"(Ef-0.938)>>hst_dsig_dKEnuc_1500MeV",
"cc&&Ev>1.49&&Ev<1.51&&nfp==1&&nfn==0&&nfpip==1&&nfpim==0&&nfpi0==0&&nfother==0",
"GOFF");
150 double norm_0500MeV = hst_dsig_dKEnuc_0500MeV -> Integral(
"width") / sig_totcc_0500MeV;
151 double norm_1000MeV = hst_dsig_dKEnuc_1000MeV -> Integral(
"width") / sig_totcc_1000MeV;
152 double norm_1500MeV = hst_dsig_dKEnuc_1500MeV -> Integral(
"width") / sig_totcc_1500MeV;
154 if (norm_0500MeV > 0) hst_dsig_dKEnuc_0500MeV -> Scale(1./norm_0500MeV);
155 if (norm_1000MeV > 0) hst_dsig_dKEnuc_1000MeV -> Scale(1./norm_1000MeV);
156 if (norm_1500MeV > 0) hst_dsig_dKEnuc_1500MeV -> Scale(1./norm_1500MeV);
161 for(
int i=1;
i <= hst_dsig_dKEnuc_1000MeV->GetNbinsX();
i++) {
163 double KEnuc = hst_dsig_dKEnuc_1000MeV -> GetBinCenter(
i);
165 double dsig_dKEnuc_0500MeV = hst_dsig_dKEnuc_0500MeV -> GetBinContent(
i);
166 double dsig_dKEnuc_1000MeV = hst_dsig_dKEnuc_1000MeV -> GetBinContent(
i);
167 double dsig_dKEnuc_1500MeV = hst_dsig_dKEnuc_1500MeV -> GetBinContent(
i);
169 dsig_dKEnuc_0500MeV = TMath::Max(0., dsig_dKEnuc_0500MeV);
170 dsig_dKEnuc_1000MeV = TMath::Max(0., dsig_dKEnuc_1000MeV);
171 dsig_dKEnuc_1500MeV = TMath::Max(0., dsig_dKEnuc_1500MeV);
173 out_stream << setw(15) << KEnuc
174 << setw(15) << dsig_dKEnuc_0500MeV
175 << setw(15) << dsig_dKEnuc_1000MeV
176 << setw(15) << dsig_dKEnuc_1500MeV
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 kRunNuQEL6[kNSamples][kNWCur][kNEnergies][kNRunsPerCase]
const char * kLabel[kNSamples]
void nuint09_qel6(int isample)