67 TMinuit* gmxt =
new TMinuit(6);
68 gmxt -> SetPrintLevel(-1);
69 gmxt -> SetFCN(
fcnXT);
70 gmxt -> SetErrorDef(1.0);
71 gmxt -> mnparm(0,
"xtpar0", 0, 0.1, 0, 0, ierflg);
72 gmxt -> mnparm(1,
"xtpar1", 0, 0.1, 0, 0, ierflg);
73 gmxt -> mnparm(2,
"xtpar2", 0, 0.1, 0, 0, ierflg);
74 gmxt -> mnparm(3,
"xtpar3", 0, 0.1, 0, 0, ierflg);
75 gmxt -> mnparm(4,
"xtpar4", 0, 0.1, 0, 0, ierflg);
76 gmxt -> mnparm(5,
"xtpar5", 0, 0.1, 0, 0, ierflg);
78 gmxt -> mnexcm(
"SET NOW", arglist, 0, ierflg);
80 TMinuit* gmxtEd =
new TMinuit(1);
81 gmxtEd -> SetPrintLevel(-1);
83 gmxtEd -> SetErrorDef(1.0);
84 gmxtEd -> mnparm(0,
"xtpar0", 0, 0.1, 0, 0, ierflg);
86 gmxtEd -> mnexcm(
"SET NOW", arglist, 0, ierflg);
99 ofstream fxtlog(
"xtlog");
100 for(
int lay=0; lay<43; lay++){
102 for(
int iEntr=0; iEntr<
gNEntr[lay]; iEntr++){
103 for(
int iLR=0; iLR<
NLR; iLR++){
104 fxtlog <<
"Layer " << setw(3) << lay << setw(3) << iEntr
105 << setw(3) << iLR << endl;
106 for(
int ord=0; ord<
NXTPAR; ord++){
107 if(0 == iEntr) xtpar = calconst -> getXtpar(lay, 8, iLR, ord);
108 else if(1 == iEntr) xtpar = calconst -> getXtpar(lay, 9, iLR, ord);
115 histEntry = (int)(m_hxt[lay][iEntr][iLR][
bin] -> GetEntries());
117 deltx = m_hxt[lay][iEntr][iLR][
bin] -> GetMean();
118 xerr = m_hxt[lay][iEntr][iLR][
bin]->GetRMS();
125 else tbcen = xtini[6];
126 xcor =
xtFun(tbcen, xtini) - deltx;
130 XMEAS.push_back( xcor );
137 fxtlog << setw(3) <<
bin
145 if(
XMEAS.size() < 12 ){
157 for(
int ord=0; ord<=5; ord++){
158 arglist[0] = ord + 1;
159 arglist[1] = xtini[ord];
160 gmxt -> mnexcm(
"SET PARameter", arglist, 2, ierflg);
167 gmxt -> mnexcm(
"SET PARameter", arglist, 2, ierflg);
168 gmxt -> mnexcm(
"FIX", arglist, 1, ierflg);
173 gmxt -> mnexcm(
"MIGRAD", arglist, 2, ierflg);
174 gmxt -> mnstat(fmin, edm, errdef, nvpar, nparx, istat);
176 fxtlog <<
"Xtpar: " << endl;
177 if( (0 == ierflg) && (istat >= 2) ){
178 for(
int ord=0; ord<=5; ord++){
179 gmxt -> GetParameter(ord, xtpar, xterr);
185 calconst -> resetXtpar(lay, i, iLR, ord, xtpar);
186 }
else if(2 ==
gNEntr[lay]){
189 calconst->
resetXtpar(lay, i, iLR, ord, xtpar);
192 calconst->
resetXtpar(lay, i, iLR, ord, xtpar);
195 fxtlog << setw(15) << xtpar << setw(15) << xterr << endl;
198 for(
int ord=0; ord<=5; ord++){
199 fxtlog << setw(15) << xtini[ord] << setw(15) <<
"0" << endl;
202 fxtlog << setw(15) <<
Tmax << setw(15) <<
"0" << endl;
207 gmxt -> mnexcm(
"REL", arglist, 1, ierflg);
215 arglist[1] = xtini[7];
216 gmxtEd -> mnexcm(
"SET PARameter", arglist, 2, ierflg);
220 gmxtEd -> mnexcm(
"MIGRAD", arglist, 2, ierflg);
221 gmxtEd -> mnstat(fmin, edm, errdef, nvpar, nparx, istat);
223 if( (0 == ierflg) && (istat >=2) ){
224 gmxtEd -> GetParameter(0, xtpar, xterr);
225 if(xtpar < 0.0) xtpar = 0.0;
230 calconst -> resetXtpar(lay, i, iLR, 7, xtpar);
231 }
else if(2 ==
gNEntr[lay]){
240 fxtlog << setw(15) << xtpar << setw(15) << xterr << endl;
242 fxtlog << setw(15) << xtini[7] << setw(15) <<
"0" << endl;
245 fxtlog << setw(15) << xtini[7] << setw(15) <<
"0" << endl;
247 fxtlog <<
"Tm " << setw(15) <<
Tmax
248 <<
" Dmax " << setw(15) <<
Dmax << endl;