Commit 8cdea869 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Suite debug fit auto-correlations comprenant des traces avec l'option NOAC...

Suite debug fit auto-correlations comprenant des traces avec l'option NOAC (Don't Use for AutoCor fit), Reza 02/03/2019
parent eb539467
......@@ -110,6 +110,9 @@ public:
double D_dish = parm[0];
double theta_b = parm[1];
double phi_b = parm[2];
double A = parm[3+2*j];
double B = parm[4+2*j];
/*
double A = 1.;
double B = 1.;
if (v_idxparam[j]>=0) {
......@@ -117,6 +120,7 @@ public:
A = parm[3+2*jj];
B = parm[4+2*jj];
}
*/
return getExpectedSignal(j, sig, D_dish, theta_b, phi_b, A, B);
}
......@@ -136,7 +140,7 @@ public:
double xi2=0.;
npts=0;
for(size_t j=0; j<v_time_data.size(); j++) {
if (v_noAC[j]) continue; // On ne peut pas faire ca , il faut modifier sinon la liste des parametres
if (v_noAC[j]) continue; // pour sauter les signaux faibles en autocorrelation
vector<double> sig;
npts += getExpectedSignal(j, sig, parm);
vector<double> & vdata = vv_data[j][nac_];
......
......@@ -475,20 +475,24 @@ int ACxSetFitter::doACfit(string outfilename)
// mFit.SetFix(1, thetaAntenne);
// mFit.SetFix(2, phiAntenne);
size_t jj=0;
//DEL size_t jj=0;
for(size_t j=0; j<NTRK; j++) {
double A = acxd_.v_max_data[j][ii];
double B = acxd_.v_min_data[j][ii];
v_A[ii][j]=A; v_err_A[ii][j]=0.;
v_B[ii][j]=B; v_err_B[ii][j]=0.;
if (acxd_.v_noAC[j]) continue;
//DEL if (acxd_.v_noAC[j]) continue;
char pname[32];
sprintf(pname,"A%d",(int)(j+1));
mFit.SetParam(2*jj+3,pname,A,A/10.,A/20,A*5);
mFit.SetParam(2*j+3,pname,A,A/10.,A/20,A*5);
sprintf(pname,"B%d",(int)(j+1));
mFit.SetParam(2*jj+4,pname,B,B/10.,B/20,B*5);
mFit.SetFix(2*jj+4, B);
jj++;
mFit.SetParam(2*j+4,pname,B,B/10.,B/20,B*5);
// mFit.SetFix(2*jj+4, B);
if (acxd_.v_noAC[j]) {
mFit.SetFix(2*j+3, A);
mFit.SetFix(2*j+4, B);
}
//DEL jj++;
}
//DBG mFit.PrintFit();
// cout << "do_p4_trkfit 2."<<ii+1<<" Performing the fit for AutoCor Antenna= " << ii+1 << endl;
......@@ -529,21 +533,21 @@ int ACxSetFitter::doACfit(string outfilename)
<<setw(12)<<Angle(err_phiant).ToDegree()<<" (azimuth ="
<<setw(8)<<azimdeg<<" +/- "<<setw(8)<<err_azimdeg<<" ) deg."<<endl;
ofr <<setw(8)<<azimdeg<<" "<<setw(8)<<err_azimdeg<<" ";
jj=0;
//DEL jj=0;
for(size_t j=0; j<NTRK; j++) {
double A = acxd_.v_max_data[j][ii];
double B = acxd_.v_min_data[j][ii];
double err_A = 0.;
double err_B = 0.;
if (!acxd_.v_noAC[j]) {
A=mFit.GetParm(3+2*jj); err_A=mFit.GetParmErr(3+2*jj);
B=mFit.GetParm(4+2*jj); err_B=mFit.GetParmErr(4+2*jj);
jj++;
A=mFit.GetParm(3+2*j); err_A=mFit.GetParmErr(3+2*j);
B=mFit.GetParm(4+2*j); err_B=mFit.GetParmErr(4+2*j);
// jj++;
}
v_A[ii][j]=A; v_err_A[ii][j]=err_A; v_B[ii][j]=B; v_err_B[ii][j]=err_B;
cout << " Trk/Sat["<<j<<"] -> A= "<<A<<" +/- "<<err_A<<" B= "<<B<<" +/- "<<err_B<<(acxd_.v_noAC[j]?" NOT Fitted":"")<<endl;
cout << " Trk/Sat["<<j<<"] -> A= "<<A<<" +/- "<<err_A<<" B= "<<B<<" +/- "<<err_B<<(acxd_.v_noAC[j]?" FIXED":"")<<endl;
if (acxd_.v_noAC[j])
ofr <<setw(8)<<A<<" "<<setw(8)<<" NOFIT "<<" "<<setw(8)<<B<<" "<<setw(8)<<" NOFIT "<<" ";
ofr <<setw(8)<<A<<" "<<setw(8)<<" NOFIT "<<" "<<setw(8)<<B<<" "<<setw(8)<<" FIXED "<<" ";
else
ofr <<setw(8)<<A<<" "<<setw(8)<<err_A<<" "<<setw(8)<<B<<" "<<setw(8)<<err_B<<" ";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment