27 cout <<
"Using method = " << method <<
", Levy(c) = " << c << endl;
31 double nav_min = 0.25;
32 double nav_max = 3.00;
33 double dnav = (nav_max-nav_min)/(nnav-1);
36 TCanvas * canvas =
new TCanvas(
"canvas",
"",20,20,700,700);
37 canvas->SetFillColor(0);
38 canvas->SetBorderMode(0);
39 TH1F * frame = (TH1F*) canvas->DrawFrame(nav_min,nav_min,nav_max,nav_max);
45 for(
int i=0;
i<nnav;
i++) {
47 double nav_input = nav_min +
i*dnav;
49 cout <<
"** nav(in) = " << nav_input << endl;
53 int nbins = TMath::Nint(maxmult-minmult+1);
55 TH1D * mult_prob =
new TH1D(
"mult_prob",
56 "hadronic multiplicity distribution", nbins, minmult-0.5, maxmult+0.5);
57 mult_prob->SetDirectory(0);
59 int nbins = mult_prob->FindBin(maxmult);
60 for(
int j=1; j<=
nbins; j++) {
61 double n = mult_prob->GetBinCenter(j);
68 cout <<
" n = " << n <<
" -> P(n) = " << P << endl;
71 double nav_output = mult_prob->GetMean();
74 cout <<
" ** nav(out) = " << nav_output << endl;
76 nav_in[
i] = nav_input;
77 nav_out[
i] = nav_output;
80 TGraph * gr =
new TGraph(nnav,nav_in,nav_out);
81 gr->SetMarkerStyle(20);
84 TGraph *
id =
new TGraph(nnav,nav_in,nav_in);
97 double nav[nnav] = { 0.5, 4. };
98 TH1D * mult_prob[nnav][2];
102 int nbins = TMath::Nint(maxmult-minmult+1);
105 TCanvas * canvas =
new TCanvas(
"canvas",
"",120,120,800,800);
106 canvas->SetFillColor(0);
107 canvas->SetBorderMode(0);
109 for(
int i=0;
i<nnav;
i++) {
111 double nav_input = nav[
i];
113 cout <<
"** nav = " << nav_input << endl;
115 for(
int method=0; method<=1; method++) {
116 mult_prob[
i][method] =
new TH1D(
"mult_prob",
117 "hadronic multiplicity distribution", nbins, minmult-0.5, maxmult+0.5);
118 mult_prob[
i][method]->SetDirectory(0);
120 int nbins = mult_prob[
i][method]->FindBin(maxmult);
121 for(
int j=1; j<=
nbins; j++) {
122 double n = mult_prob[
i][method]->GetBinCenter(j);
128 cout <<
" n = " << n <<
" -> P(n) = " << P << endl;
129 mult_prob[
i][method]->Fill(n,P);
131 mult_prob[
i][method]->Scale(1/mult_prob[
i][method]->Integral(
"width"));
135 for(
int i=0;
i<nnav;
i++) {
136 for(
int method=0; method<=1; method++) {
137 mult_prob[
i][method]->SetLineStyle(1);
138 mult_prob[
i][method]->SetLineWidth(1);
139 mult_prob[
i][method]->SetLineColor(method+1);
144 canvas->Divide(1,nnav);
146 for(
int i=0;
i<nnav;
i++) {
148 mult_prob[
i][0]->Draw();
149 mult_prob[
i][1]->Draw(
"SAME");
158 TF1 * intg =
new TF1(
"integrand",
integrand,0,10,3);
160 intg->SetParameter(0,n);
161 intg->SetParameter(1,nav);
162 intg->SetParameter(2,-999999);
164 double P = intg->Integral(0,10);
175 TF1 * intg =
new TF1(
"integrand",
integrand,0,10,3);
177 intg->SetParameter(0,n);
178 intg->SetParameter(1,nav);
179 intg->SetParameter(2,c);
181 double P = intg->Integral(0,10);
216 else psi = TMath::Gamma(xx);
220 double fct = TMath::Factorial((
int)n);
221 double pwr = TMath::Power(nav*xx,n);
222 double expn = TMath::Exp(-nav*xx);
224 double f = psi * (pwr/fct) * expn;
234 double psi = 2*TMath::Exp(-c)*TMath::Power(c,x)/TMath::Gamma(x);
void levy_func_problem(double c, int method)
double prob_method2(double n, double nav, double c)
void plot_multiplicity_prob(double c)
double kno_func(double z, double c)
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
double prob_method1(double n, double nav, double c)
double integrand(double *x, double *par)
double prob_method0(double n, double nav, double c)