6 #ifdef BUILD_HISTO_FOR_EACH_STANTION
10 #endif // BUILD_HISTO_FOR_EACH_STANTION
38 :
x(T.
x),
y(T.
y),
tx(T.px / T.pz),
ty(T.py / T.pz),
qp(T.q / T.p) {};
71 cout <<
x <<
" " <<
y <<
" " <<
tx <<
" " <<
ty <<
" " <<
qp << endl;
93 void Build(
bool draw = 1);
97 void makeUpHisto(TH1* hist, TString title,
float& sigma);
119 static bool first_call = 1;
128 TString name =
"pull_";
130 histoPull[
i] =
new TH1F(name, name, 50, -10, 10);
133 #ifdef BUILD_HISTO_FOR_EACH_STANTION
139 TString name =
"pull_sta";
143 histoPull[
i] =
new TH1F(name, name, 50, -10, 10);
145 #endif // BUILD_HISTO_FOR_EACH_STANTION \
146 // add global residuals
148 TString name =
"residual_";
152 case 0: size = .01;
break;
153 case 1: size = .01;
break;
154 case 2: size = 0.003;
break;
155 case 3: size = 0.003;
break;
156 case 4: size = 0.1;
break;
158 histoRes[
i] =
new TH1F(name, name, 50, -size, size);
162 histoStyle =
new TStyle(
"histoStyle",
"Plain Style(no colors/fill areas)");
235 if (iMCP < 0)
return;
241 fGRes.push_back(res);
247 #ifdef BUILD_HISTO_FOR_EACH_STANTION
251 #endif // BUILD_HISTO_FOR_EACH_STANTION
256 cout <<
"Correct pulls: " <<
fGPulls.size() << endl;
257 cout <<
"x y tx ty qp" << endl;
273 #ifdef BUILD_HISTO_FOR_EACH_STANTION
275 for (
int iSta = 0; iSta <
NStations; iSta++) {
277 for (
int i = 0;
i <
Pulls.size();
i++) {
286 #endif // BUILD_HISTO_FOR_EACH_STANTION
289 for (
int i = 0;
i <
fGRes.size();
i++) {
301 system(
"mkdir L1_Pulls -p");
303 TCanvas* c2 =
new TCanvas(
"c2",
"c2", 0, 0, 600, 400);
319 residuals[ih][1] =
histoRes[ih]->GetRMS();
322 TString name =
histoRes[ih]->GetName();
330 cout <<
"All entries: " <<
fNAllPulls << endl;
331 cout <<
"Correct entries: " <<
fGPulls.size() << endl;
332 cout <<
"Pulls sigma & RMS: " << endl;
337 if ((ista > 0) && (ipar == 0)) cout <<
"Station " << ista - 1 << endl;
339 << pulls[ih][1] << endl;
341 cout <<
"Residuals sigma & RMS: " << endl;
345 << residuals[ih][1] << endl;
350 if (hist && (hist->GetEntries() != 0)) {
351 TF1* fit =
new TF1(
"fit",
"gaus");
352 fit->SetLineColor(2);
353 fit->SetLineWidth(3);
355 "fit",
"",
"", hist->GetXaxis()->GetXmin(), hist->GetXaxis()->GetXmax());
356 sigma = fit->GetParameter(2);
358 hist->GetXaxis()->SetLabelFont(
textFont);
359 hist->GetXaxis()->SetTitleFont(
textFont);
360 hist->GetYaxis()->SetLabelFont(
textFont);
361 hist->GetYaxis()->SetTitleFont(
textFont);
363 hist->GetXaxis()->SetTitle(title);
364 hist->GetXaxis()->SetTitleOffset(1);
365 hist->GetYaxis()->SetTitle(
"Entries");
366 hist->GetYaxis()->SetTitleOffset(
369 std::cout <<
" E: Read hists error! " << std::endl;