Skip to content
Snippets Groups Projects
Commit f3ce2a2e authored by zhang's avatar zhang
Browse files

Add features to do ID correction. (Based on the functions in nsrl-ii_lib.cc)

parent b364391f
Branches
Tags
No related merge requests found
......@@ -711,6 +711,49 @@ int main(int argc, char *argv[]) {
fclose(outf);
}
}
/*
To do ID correction.
Based on parts of functions get_param( ) & ID_corr(), etc in nsls-ii_lib.cc
*/
else if(strcmp(CommandStr,"IDCorrFlag") == 0) {
int k = 0;
printf("Begin ID matching:................ \n");
// read the family index of quadrupoles used for ID correction
if (N_calls > 0) {
if (N_Fam > N_Fam_max) {
printf("get_param: N_Fam > N_Fam_max: %d (%d)\n",
N_Fam, N_Fam_max);
exit_(0);
}
for (k = 0; k < N_Fam; k++)
Q_Fam[k] = ElemIndex(IDCq_name[k]);
}
// ID correction
for (int k = 0; k < 11; k++)
printf("%d\n",Q_Fam[k]);
ini_ID_corr();
printlatt("linlat00.out");
ID_corr0();
printlatt("linlat01.out");
// exit(0);
ini_ID_corr();
printlatt("linlat0.out");
ID_corr(N_calls,N_steps);
printlatt("linlat1.out");
}
else
printf("Wrong!!!!!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment