76 const char * xsecfile,
77 const char * skfluxfile,
84 double Mfv = 2.25E+10;
86 double Na = 6.023E+23;
94 int nE = (Emax-Emin)/dE;
99 xsec_water.ReadFile(xsecfile,
"E/D:xsec_numu/D:xsec_numubar/D:xsec_nue/D:xsec_nuebar/D");
100 TH1D * xnumu =
new TH1D(
"xnumu",
"", nE, Emin, Emax);
101 TH1D * xnumubar =
new TH1D(
"xnumubar",
"", nE, Emin, Emax);
102 TH1D * xnue =
new TH1D(
"xnue",
"", nE, Emin, Emax);
103 TH1D * xnuebar =
new TH1D(
"xnuebar",
"", nE, Emin, Emax);
104 xsec_water.Draw(
"E>>xnumu",
"xsec_numu",
"goff");
105 xsec_water.Draw(
"E>>xnumubar",
"xsec_numubar",
"goff");
106 xsec_water.Draw(
"E>>xnue",
"xsec_nue",
"goff");
107 xsec_water.Draw(
"E>>xnuebar",
"xsec_nuebar",
"goff");
111 TFile * flux =
new TFile(skfluxfile,
"read");
112 TH1D * fnumu = (TH1D*) flux->Get(
"numu_flux");
113 TH1D * fnumubar = (TH1D*) flux->Get(
"numubar_flux");
114 TH1D * fnue = (TH1D*) flux->Get(
"nue_flux");
115 TH1D * fnuebar = (TH1D*) flux->Get(
"nuebar_flux");
125 for(
int i=1;
i<=fnumu->GetNbinsX();
i++) {
126 double E = fnumu->GetBinCenter(
i);
128 double xsec_numu = xnumu -> GetBinContent (xnumu -> FindBin(E));
129 double flux_numu = fnumu -> GetBinContent (fnumu -> FindBin(E));
130 double xsec_numubar = xnumubar -> GetBinContent (xnumubar -> FindBin(E));
131 double flux_numubar = fnumubar -> GetBinContent (fnumubar -> FindBin(E));
132 double xsec_nue = xnue -> GetBinContent (xnue -> FindBin(E));
133 double flux_nue = fnue -> GetBinContent (fnue -> FindBin(E));
134 double xsec_nuebar = xnuebar -> GetBinContent (xnuebar -> FindBin(E));
135 double flux_nuebar = fnuebar -> GetBinContent (fnuebar -> FindBin(E));
137 cout <<
"E = " << E <<
" GeV";
138 cout <<
" - numu : sigma(H20) = " << xsec_numu <<
" x1E-38 cm2, flux(@SK) = " << flux_numu
139 <<
" /" << dE <<
" GeV /" << (NF*IF) <<
" POT /cm2" << endl;
140 cout <<
" - numubar: sigma(H20) = " << xsec_numubar <<
" x1E-38 cm2, flux(@SK) = " << flux_numubar
141 <<
" /" << dE <<
" GeV /" << (NF*IF) <<
" POT /cm2" << endl;
142 cout <<
" - nue : sigma(H20) = " << xsec_nue <<
" x1E-38 cm2, flux(@SK) = " << flux_nue
143 <<
" /" << dE <<
" GeV /" << (NF*IF) <<
" POT /cm2" << endl;
144 cout <<
" - nuebar : sigma(H20) = " << xsec_nuebar <<
" x1E-38 cm2, flux(@SK) = " << flux_nuebar
145 <<
" /" << dE <<
" GeV /" << (NF*IF) <<
" POT /cm2" << endl;
147 Nnumu += ( flux_numu * xsec_numu );
148 Nnumubar += ( flux_numubar * xsec_numubar );
149 Nnue += ( flux_nue * xsec_nue );
150 Nnuebar += ( flux_nuebar * xsec_nuebar );
151 Nnuesig += ( flux_numu * xsec_nue );
154 double f = Na * 1
E-38 * (Mfv/
A) * I0 / (NF*IF);
166 cout <<
"---------------------------------------------------------------------------" << endl;
167 cout <<
"species | # of SK events per " 168 << I0 <<
" POT per " << Mfv/1E+9 <<
" kton fiducial"<< endl;
169 cout <<
"---------------------------------------------------------------------------" << endl;
170 cout <<
"numu | " << Nnumu << endl;
171 cout <<
"numubar | " << Nnumubar << endl;
172 cout <<
"nue(bkg) | " << Nnue << endl;
173 cout <<
"nuebar(bkg) | " << Nnuebar << endl;
174 cout <<
"nue(sig,100% numu->nue) | " << Nnuesig << endl;
175 cout <<
"---------------------------------------------------------------------------" << endl;
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
void sk_sample_norm_abs(const char *xsecfile, const char *skfluxfile, double IF=1E+21, int NF=500)
Calculate absolute normalization of SuperK event samples.