Skip to content
Snippets Groups Projects
Commit 210c3500 authored by Mark K Jones's avatar Mark K Jones Committed by GitHub
Browse files

Merge pull request #142 from Yero1990/shms_dc_calib

Shms dc calib
parents 57f5fb17 cb6a38c2
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ Running code
* From the calibration results, two parameter files will be produced in:
* hallc_replay/PARAM/SHMS/DC/pdc_tzero_per_wire_run%d_NEW.param. %d=run_number
* hallc_replay/PARAM/SHMS/DC/pdriftmap_new.param
* hallc_replay/PARAM/SHMS/DC/pdriftmap_run%d_NEW.param
* Rename the new parameter files as follows:
* copy: pdc_tzero_per_wire_run%d_NEW.param to pdc_tzero_per_wire.param
......
......@@ -38,7 +38,7 @@ void get_LookUp_Values() {
//Create an output file to store lookup values
ofstream ofs;
TString lookup_table = "../../../PARAM/SHMS/DC/pdriftmap_new.param";
TString lookup_table = Form("../../../PARAM/SHMS/DC/pdriftmap_run%d_NEW.param", run_NUM);
ofs.open (lookup_table);
......
......@@ -69,15 +69,16 @@ Double_t **t0 = new Double_t*[NPLANES];
// cout << line << endl;
if (line[0]!='#')
{
if(!input.good()) {break;}
// if(!input.good()) {break;}
sscanf(line.c_str(), "%d %lf", &nwire, &nt0);
if(sw>0) {
t0[ip][nwire-1] = nt0;
}
sw++;
// if(sw>0) {
t0[ip][nwire-1] = nt0;
// }
// sw++;
}
......@@ -111,18 +112,18 @@ Double_t **t0 = new Double_t*[NPLANES];
for (sw=0; sw<fNWires[ip]; sw++) {
out << setprecision(3) << t0[ip][sw] << endl;
out << setprecision(6) << t0[ip][sw] << endl;
if (sw <= 10)
{
ofs << setprecision(3) << t0[ip][sw] << fixed << ",";
ofs << setprecision(6) << t0[ip][sw] << fixed << ",";
}
else if (sw>10 && sw <(fNWires[ip]-1))
{
ofs << setprecision(3) << t0[ip][sw] << ((sw+1) % 16 ? ", " : "\n") << fixed;
ofs << setprecision(6) << t0[ip][sw] << ((sw+1) % 16 ? ", " : "\n") << fixed;
}
else if (sw==78 || sw == 106) {
ofs << setprecision(3) << t0[ip][sw] << fixed << endl;
ofs << setprecision(6) << t0[ip][sw] << fixed << endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment