diff --git a/macros/CCEScan/voltageFit_spline.C b/macros/CCEScan/voltageFit_spline.C index e8bfc04..9f60bc9 100755 --- a/macros/CCEScan/voltageFit_spline.C +++ b/macros/CCEScan/voltageFit_spline.C @@ -130,7 +130,7 @@ } - + std::vector v_volt_val; std::vector v_volt_err; @@ -177,7 +177,7 @@ TString dn_data(Form("%s/data/ST/Aging" ,diskVar)); - TString fn_data(Form("%s/CCEScan.root",//Michele for TESTING + TString fn_data(Form("%s/CCEScan_TEST.root",//Michele for TESTING dn_data.Data())); TString fn_dummy(Form("%s/check",dn_data.Data())); @@ -222,8 +222,12 @@ fill)); - - + FILE* myfile; + TString myfile_nm(Form("%s/noSystematic_val%d.txt",dn_graph.Data(),val)); + cout << myfile_nm << endl; + myfile =fopen(myfile_nm,"w"); + fprintf(myfile, "List of the calibration steps with no estimated systematic on pulse shape\n\n"); + //for (int i=0; i<11; i++) { for (int i=0; i<12; i++) { //MIchele TString vn_input(Form("%s/v_pulse%d_val%d",dn_input.Data(),i,val)); @@ -260,7 +264,7 @@ double height_val = v_input(0); double height_err = v_input(1); double height_sys = v_input(11);//Michele - + //This is a fake if... if (true || det.EqualTo("IT")) { @@ -278,15 +282,22 @@ Printf(" %8.2f V: %8.4f+/-%8.4f(stat) +/-%8.4f (sys)",volt,height_val,height_err, height_sys);//MIchele // Load the input values in to vector - v_adc_val.push_back(height_val); - v_adc_err.push_back(height_err + height_sys); //Putting systematic and statistical togther, temporary fix - v_volt_val.push_back(volt); - v_volt_err.push_back(0.0); - + + if (height_sys == -999){ + fprintf(myfile," det=%s lay=%s sect=%d fill=%d val=%d rad=%f\n", det.Data(),lay.Data(),sector,fill,val,radius); + continue; + + }else{ + + v_adc_val.push_back(height_val); + v_adc_err.push_back(height_err + height_sys); //Putting systematic and statistical togther, temporary fix + v_volt_val.push_back(volt); + v_volt_err.push_back(0.0); + } } - + fclose(myfile); if (v_adc_val.size()<3) { Error("voltageFit_spline","Too few (%d) data points",v_adc_val.size());