11#define ele_to_fC 1.6e-4
15 histo_q_vs_t =
new TH1F(
"histo_q_vs_t",
"", 27, 0, 675);
23 histo_q_vs_t->Fill(
t,
q);
28 double qmax = histo_q_vs_t->GetMaximum();
37 double maxbin = histo_q_vs_t->GetMaximumBin();
44 for(
int ibin = maxbin; ibin > 1; ibin--){
45 if(histo_q_vs_t->GetBinContent(ibin) < 0.1 * QMaxHisto) {
50 double startvalues[5] = {0};
51 double fitlimup[5] = {0};
52 double fitlimlow[5] = {0};
54 double meanfirstbin = (histo_q_vs_t->GetBinContent(minbin-1) + histo_q_vs_t->GetBinContent(minbin-2) + histo_q_vs_t->GetBinContent(minbin-3))/3.;
55 double sigma_MFB = TMath::Sqrt( ( pow(histo_q_vs_t->GetBinContent(minbin-1) - meanfirstbin, 2) + pow(histo_q_vs_t->GetBinContent(minbin-2) - meanfirstbin,2) + pow(histo_q_vs_t->GetBinContent(minbin-3)- meanfirstbin,2)) / 3.);
56 if(sigma_MFB < TMath::Abs(meanfirstbin)) sigma_MFB = TMath::Abs(meanfirstbin);
58 startvalues[0] = meanfirstbin;
59 startvalues[1] = QMaxHisto;
60 startvalues[2] = 0.5* (minbin + maxbin) *
tstep;
61 startvalues[3] = 0.5*
tstep;
64 fitlimlow[0] = startvalues[0] - 2 * sigma_MFB;
65 fitlimlow[1] = startvalues[1] - 0.3 * startvalues[1];
66 fitlimlow[2] = minbin *
tstep;
67 fitlimlow[3] = 0.1*
tstep;
69 fitlimup[0] = startvalues[0] + 2 * sigma_MFB;
70 fitlimup[1] = startvalues[1] + 0.3 * startvalues[1];
71 fitlimup[2] = maxbin *
tstep;
72 fitlimup[3] = 0.9*
tstep;
82 double minFD = minbin - 4;
83 double maxFD = maxbin + 0;
85 TF1 f_FD(
"f_FD",
"[0] + [1]/(1+TMath::Exp(-(x - [2])/[3]))", minFD*
tstep, maxFD*
tstep);
86 f_FD.SetParameters(startvalues[0], startvalues[1], startvalues[2], startvalues[3]);
87 f_FD.SetParLimits(0, fitlimlow[0], fitlimup[0]);
88 f_FD.SetParLimits(1, fitlimlow[1], fitlimup[1]);
89 f_FD.SetParLimits(2, fitlimlow[2], fitlimup[2]);
90 f_FD.SetParLimits(3, fitlimlow[3], fitlimup[3]);
92 gStyle->SetOptFit(1111);
93 histo_q_vs_t->Fit(
"f_FD",
"WQRB");
96 tFD = gRandom->Gaus(f_FD.GetParameter(2), 8);
98 dtFD = f_FD.GetParError(2);
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
void add_charge(double q, double t)
void set_FD_par(int i, double p)