84 std::cout<<
" tofcalgsec::TofCalibFit:" <<
m_name <<
": the number of histograms is NOT same as the number of histograms saved!" <<
" nhist=" << nhist <<
" calculated=" << (nCounter*
nHistPerCounter +
nHistogram) <<
" nCounter=" << nCounter <<
" nHistPerCounter=" <<
nHistPerCounter <<
" nHistogram=" <<
nHistogram << std::endl;
88 unsigned int numgraph1 = 0;
89 unsigned int numgraph2 = 0;
93 numgraph1 = numgraph1 + (*iter);
99 numgraph2 = numgraph2 + (*iter);
102 unsigned int ngraph =
m_graphs.size();
103 if( ngraph != ( nCounter*numgraph1+numgraph2) ) {
104 std::cout<<
" tofcalgsec::TofCalibFit:"<<
m_name <<
": the number of graphs is NOT same as the number of graphs saved!" <<
" ngraph=" << ngraph <<
" nCounter=" << nCounter <<
" numgraph1=" << numgraph1 <<
" numgraph2=" << numgraph2 << std::endl;
108 TFile
f(
file,
"RECREATE");
110 gStyle->SetOptStat(2211);
111 gStyle->SetOptFit(1111);
112 gStyle->SetLabelSize(0.03,
"x");
113 gStyle->SetLabelSize(0.03,
"y");
116 char canvasname[256];
118 std::vector<TH1F*>::iterator iter1 =
m_histograms.begin();
119 std::vector<TH1F*>::iterator iter2 =
m_graphs.begin();
120 for(
unsigned int i=0; i<nCounter; i++ ) {
121 sprintf( dirname,
"tofid%i", i );
122 TDirectory* cdresult =
f.mkdir( dirname );
126 (*(iter1+j))->
Write();
133 sprintf( canvasname,
"%s-tofid-%i", (*it1).c_str(), i );
134 TCanvas* c1 =
new TCanvas( canvasname, canvasname, 1);
135 c1->SetFillColor(10);
136 for(
unsigned int k=0; k<(*it2); k++ ) {
138 (*(iter2+k))->
Draw(
"E");
141 (*(iter2+k))->
Draw(
"Esame");
144 iter2 = iter2 + (*it2);
152 TDirectory* cdresult =
f.mkdir( dirname );
156 std::vector<TH1F*>::iterator iter2 =
m_graphs.begin() + nCounter*numgraph1;
161 for(
unsigned int j=0; j<
nCanvas; j++ ) {
162 std::vector<string>::iterator it1 =
CanvasName.begin() + j;
164 sprintf( canvasname, (*it1).c_str() );
165 TCanvas* c1 =
new TCanvas( canvasname, canvasname, 1);
166 c1->SetFillColor(10);
167 for(
unsigned int k=0; k<(*it2); k++ ) {
169 (*(iter2+k))->
Draw(
"E");
172 (*(iter2+k))->
Draw(
"Esame");
175 iter2 = iter2 + (*it2);
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)