18 for(
int lay=0; lay<
NLAYER; lay++){
19 m_qmin[lay] =
gQmin[lay];
20 m_qmax[lay] =
gQmax[lay];
21 m_qbinw[lay] = (m_qmax[lay] - m_qmin[lay]) / (
double)NQBin;
24 m_fdQt =
new TFolder(
"mfdQt",
"fdQt");
25 m_fdQ_T =
new TFolder(
"mQtPlot",
"QtPlot");
27 hlist ->
Add(m_fdQ_T);
29 for(
int lay=0; lay<
NLAYER; lay++){
30 sprintf(hname,
"mHQ_Layer%02d", lay);
31 m_hqhit[lay] =
new TH1F(hname,
"", 1500, 0, 3000);
32 m_fdQt ->
Add(m_hqhit[lay]);
34 sprintf(hname,
"mHQT_Plot_lay%02d", lay);
35 m_grqt[lay] =
new TGraphErrors();
36 m_grqt[lay]->SetName(hname);
37 m_grqt[lay]->SetMarkerStyle(20);
38 m_grqt[lay]->SetMarkerColor(1);
39 m_grqt[lay]->SetLineColor(10);
40 m_fdQ_T->Add(m_grqt[lay]);
42 sprintf(hname,
"mHQdelT_Plot_lay%02d", lay);
43 m_grqdt[lay] =
new TGraphErrors();
44 m_grqdt[lay]->SetName(hname);
45 m_grqdt[lay]->SetMarkerStyle(10);
46 m_grqdt[lay]->SetMarkerColor(1);
47 m_grqdt[lay]->SetLineColor(10);
48 m_fdQ_T->Add(m_grqdt[lay]);
51 sprintf(hname,
"mHQT_Lay%02d_Bin%02d", lay,
bin);
52 m_hqt[lay][
bin] =
new TH1F(hname,
"", 200, -1, 1);
53 m_fdQt ->
Add(m_hqt[lay][
bin]);
87 TF1* funQt =
new TF1(
"funQt",
qtFun, 200, 2000, 2);
89 ofstream fqtlog(
"qtlog");
90 for(
int lay=0; lay<
NLAYER; lay++){
93 fqtlog <<
"Layer" << lay << endl;
95 for(
int ord=0; ord<QtOrd; ord++) qtini[ord] = calconst->
getQtpar(lay, ord);
97 entry = m_hqt[lay][
bin]->GetEntries();
99 deltw = m_hqt[lay][
bin] -> GetMean();
100 qterr = ( m_hqt[lay][
bin]->GetRMS() ) / sqrt((
double)entry);
107 qbcen = ( (double)
bin + 0.5 ) * m_qbinw[lay] + m_qmin[lay];
110 tw = qtini[1] / sqrt(qbcen) + qtini[0] + deltw;
112 m_grqt[lay]->SetPoint(
bin, qbcen, tw);
113 m_grqt[lay]->SetPointError(
bin, 0, qterr);
115 m_grqdt[lay]->SetPoint(
bin, qbcen, deltw);
116 m_grqdt[lay]->SetPointError(
bin, 0, qterr);
118 fqtlog << setw(3) <<
bin << setw(12) << deltw << setw(12) << tw
119 << setw(12) << qbcen << setw(12) << qterr << endl;
122 m_grqt[lay]->Fit(
"funQt",
"Q+",
"", m_qmin[lay], m_qmax[lay]);
125 for(
int ord=0; ord<QtOrd; ord++){
126 qtpar = funQt->GetParameter(ord);
127 qterr = funQt->GetParError(ord);
128 calconst -> resetQtpar(lay, ord, qtpar);
130 fqtlog << setw(12) << qtpar << setw(12) << qterr << endl;
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)