23 for (
size_t iProj = 0; iProj < nProj; iProj++) {
27 sigProj.push_back(0.);
30 hPtDeltaProj.push_back(NULL);
31 fPtDeltaProj.push_back(NULL);
32 sPtProj.push_back(
"");
36 for (
size_t iCut = 0; iCut < nDPtCuts; iCut++) {
39 nNormCut.push_back(0.);
40 nWeirdCut.push_back(0.);
44 hPtDeltaProj.push_back(NULL);
45 hPtDeltaCut.push_back(NULL);
46 hPtTrackCut.push_back(NULL);
47 hPtFracCut.push_back(NULL);
48 hPtTrkTruCut.push_back(NULL);
49 hEffCut.push_back(NULL);
50 hPtDeltaVsFracCut.push_back(NULL);
51 hPtDeltaVsTrueCut.push_back(NULL);
52 hPtDeltaVsTrackCut.push_back(NULL);
53 hPtTrueVsTrackCut.push_back(NULL);
57 for (
size_t iSig = 0; iSig < nSigCuts; iSig++) {
60 nNormSig.push_back(0.);
61 nWeirdSig.push_back(0.);
65 vector<double> vecHiProj(nProj, 0.);
66 vector<double> vecLoProj(nProj, 0.);
67 muHiProj.push_back(vecHiProj);
68 muLoProj.push_back(vecLoProj);
71 hPtDeltaSig.push_back(NULL);
72 hPtTrackSig.push_back(NULL);
73 hPtFracSig.push_back(NULL);
74 hPtTrkTruSig.push_back(NULL);
75 hEffSig.push_back(NULL);
76 hPtDeltaVsFracSig.push_back(NULL);
77 hPtDeltaVsTrueSig.push_back(NULL);
78 hPtDeltaVsTrackSig.push_back(NULL);
79 hPtTrueVsTrackSig.push_back(NULL);
82 fPtDeltaProj.push_back(NULL);
83 fMuHiProj.push_back(NULL);
84 fMuLoProj.push_back(NULL);
85 grMuHiProj.push_back(NULL);
86 grMuLoProj.push_back(NULL);
89 cout <<
" Initialized vectors." << endl;
295 cout <<
" Initialized input tuples." << endl;
305 const uint64_t nPtBins(1000);
306 const uint64_t nFracBins(1000);
307 const uint64_t nDeltaBins(5000);
313 TString sPtTruth(
"h");
314 TString sPtDelta(
"h");
315 TString sPtTrack(
"h");
316 TString sPtFrac(
"h");
317 TString sPtTrkTru(
"h");
318 sPtTruth.Append(sPtTrueBase.Data());
319 sPtDelta.Append(sPtDeltaBase.Data());
320 sPtTrack.Append(sPtRecoBase.Data());
321 sPtFrac.Append(sPtFracBase.Data());
322 sPtTrkTru.Append(sPtTrkTruBase.Data());
324 TString sPtDeltaVsFrac(
"h");
325 TString sPtDeltaVsTrue(
"h");
326 TString sPtDeltaVsTrack(
"h");
327 TString sPtTrueVsTrack(
"h");
328 sPtDeltaVsFrac.Append(sPtDeltaBase.Data());
329 sPtDeltaVsTrue.Append(sPtDeltaBase.Data());
330 sPtDeltaVsTrack.Append(sPtDeltaBase.Data());
331 sPtTrueVsTrack.Append(sPtTrueBase.Data());
332 sPtDeltaVsFrac.Append(
"Vs");
333 sPtDeltaVsTrue.Append(
"Vs");
334 sPtDeltaVsTrack.Append(
"Vs");
335 sPtTrueVsTrack.Append(
"Vs");
336 sPtDeltaVsFrac.Append(sPtFracBase.Data());
337 sPtDeltaVsTrue.Append(sPtTrueBase.Data());
338 sPtDeltaVsTrack.Append(sPtRecoBase.Data());
339 sPtTrueVsTrack.Append(sPtRecoBase.Data());
342 for (
size_t iProj = 0; iProj < nProj; iProj++) {
343 sPtProj[iProj] =
"h";
344 sPtProj[iProj].Append(sPtProjBase.Data());
345 sPtProj[iProj].Append(sProjSuffix[iProj].
Data());
349 vector<TString> sPtDeltaCut(nDPtCuts);
350 vector<TString> sPtTrackCut(nDPtCuts);
351 vector<TString> sPtFracCut(nDPtCuts);
352 vector<TString> sPtTrkTruCut(nDPtCuts);
353 vector<TString> sPtDeltaVsFracCut(nDPtCuts);
354 vector<TString> sPtDeltaVsTrueCut(nDPtCuts);
355 vector<TString> sPtDeltaVsTrackCut(nDPtCuts);
356 vector<TString> sPtTrueVsTrackCut(nDPtCuts);
357 for (
size_t iCut = 0; iCut < nDPtCuts; iCut++) {
358 sPtDeltaCut[iCut] =
"h";
359 sPtTrackCut[iCut] =
"h";
360 sPtFracCut[iCut] =
"h";
361 sPtTrkTruCut[iCut] =
"h";
362 sPtDeltaCut[iCut].Append(sPtDeltaBase.Data());
363 sPtTrackCut[iCut].Append(sPtRecoBase.Data());
364 sPtFracCut[iCut].Append(sPtFracBase.Data());
365 sPtTrkTruCut[iCut].Append(sPtTrkTruBase.Data());
366 sPtDeltaCut[iCut].Append(sDPtSuffix[iCut].
Data());
367 sPtTrackCut[iCut].Append(sDPtSuffix[iCut].
Data());
368 sPtFracCut[iCut].Append(sDPtSuffix[iCut].
Data());
369 sPtTrkTruCut[iCut].Append(sDPtSuffix[iCut].
Data());
371 sPtDeltaVsFracCut[iCut] =
"h";
372 sPtDeltaVsTrueCut[iCut] =
"h";
373 sPtDeltaVsTrackCut[iCut] =
"h";
374 sPtTrueVsTrackCut[iCut] =
"h";
375 sPtDeltaVsFracCut[iCut].Append(sPtDeltaBase.Data());
376 sPtDeltaVsFracCut[iCut].Append(sPtDeltaBase.Data());
377 sPtDeltaVsTrueCut[iCut].Append(sPtDeltaBase.Data());
378 sPtDeltaVsTrackCut[iCut].Append(sPtDeltaBase.Data());
379 sPtTrueVsTrackCut[iCut].Append(sPtTrueBase.Data());
380 sPtDeltaVsFracCut[iCut].Append(
"Vs");
381 sPtDeltaVsTrueCut[iCut].Append(
"Vs");
382 sPtDeltaVsTrackCut[iCut].Append(
"Vs");
383 sPtTrueVsTrackCut[iCut].Append(
"Vs");
384 sPtDeltaVsFracCut[iCut].Append(sPtFracBase.Data());
385 sPtDeltaVsTrueCut[iCut].Append(sPtTrueBase.Data());
386 sPtDeltaVsTrackCut[iCut].Append(sPtRecoBase.Data());
387 sPtTrueVsTrackCut[iCut].Append(sPtRecoBase.Data());
388 sPtDeltaVsFracCut[iCut].Append(sDPtSuffix[iCut].
Data());
389 sPtDeltaVsTrueCut[iCut].Append(sDPtSuffix[iCut].
Data());
390 sPtDeltaVsTrackCut[iCut].Append(sDPtSuffix[iCut].
Data());
391 sPtTrueVsTrackCut[iCut].Append(sDPtSuffix[iCut].
Data());
395 vector<TString> sPtDeltaSig(nSigCuts);
396 vector<TString> sPtTrackSig(nSigCuts);
397 vector<TString> sPtFracSig(nSigCuts);
398 vector<TString> sPtTrkTruSig(nSigCuts);
399 vector<TString> sPtDeltaVsFracSig(nSigCuts);
400 vector<TString> sPtDeltaVsTrueSig(nSigCuts);
401 vector<TString> sPtDeltaVsTrackSig(nSigCuts);
402 vector<TString> sPtTrueVsTrackSig(nSigCuts);
403 for (
size_t iSig = 0; iSig < nSigCuts; iSig++) {
404 sPtDeltaSig[iSig] =
"h";
405 sPtTrackSig[iSig] =
"h";
406 sPtFracSig[iSig] =
"h";
407 sPtTrkTruSig[iSig] =
"h";
408 sPtDeltaSig[iSig].Append(sPtDeltaBase.Data());
409 sPtTrackSig[iSig].Append(sPtRecoBase.Data());
410 sPtFracSig[iSig].Append(sPtFracBase.Data());
411 sPtTrkTruSig[iSig].Append(sPtTrkTruBase.Data());
412 sPtDeltaSig[iSig].Append(sSigSuffix[iSig].
Data());
413 sPtTrackSig[iSig].Append(sSigSuffix[iSig].
Data());
414 sPtFracSig[iSig].Append(sSigSuffix[iSig].
Data());
415 sPtTrkTruSig[iSig].Append(sSigSuffix[iSig].
Data());
417 sPtDeltaVsFracSig[iSig] =
"h";
418 sPtDeltaVsTrueSig[iSig] =
"h";
419 sPtDeltaVsTrackSig[iSig] =
"h";
420 sPtTrueVsTrackSig[iSig] =
"h";
421 sPtDeltaVsFracSig[iSig].Append(sPtDeltaBase.Data());
422 sPtDeltaVsFracSig[iSig].Append(sPtDeltaBase.Data());
423 sPtDeltaVsTrueSig[iSig].Append(sPtDeltaBase.Data());
424 sPtDeltaVsTrackSig[iSig].Append(sPtDeltaBase.Data());
425 sPtTrueVsTrackSig[iSig].Append(sPtTrueBase.Data());
426 sPtDeltaVsFracSig[iSig].Append(
"Vs");
427 sPtDeltaVsTrueSig[iSig].Append(
"Vs");
428 sPtDeltaVsTrackSig[iSig].Append(
"Vs");
429 sPtTrueVsTrackSig[iSig].Append(
"Vs");
430 sPtDeltaVsFracSig[iSig].Append(sPtFracBase.Data());
431 sPtDeltaVsTrueSig[iSig].Append(sPtTrueBase.Data());
432 sPtDeltaVsTrackSig[iSig].Append(sPtRecoBase.Data());
433 sPtTrueVsTrackSig[iSig].Append(sPtRecoBase.Data());
434 sPtDeltaVsFracSig[iSig].Append(sSigSuffix[iSig].
Data());
435 sPtDeltaVsTrueSig[iSig].Append(sSigSuffix[iSig].
Data());
436 sPtDeltaVsTrackSig[iSig].Append(sSigSuffix[iSig].
Data());
437 sPtTrueVsTrackSig[iSig].Append(sSigSuffix[iSig].
Data());
441 hPtTruth =
new TH1D(sPtTruth.Data(),
"", nPtBins, rPtBins[0], rPtBins[1]);
442 hPtDelta =
new TH1D(sPtDelta.Data(),
"", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
443 hPtTrack =
new TH1D(sPtTrack.Data(),
"", nPtBins, rPtBins[0], rPtBins[1]);
444 hPtFrac =
new TH1D(sPtFrac.Data(),
"", nFracBins, rFracBins[0], rFracBins[1]);
445 hPtTrkTru =
new TH1D(sPtTrkTru.Data(),
"", nPtBins, rPtBins[0], rPtBins[1]);
450 hPtTrkTru -> Sumw2();
452 hPtDeltaVsFrac =
new TH2D(sPtDeltaVsFrac.Data(),
"", nFracBins, rFracBins[0], rFracBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
453 hPtDeltaVsTrue =
new TH2D(sPtDeltaVsTrue.Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
454 hPtDeltaVsTrack =
new TH2D(sPtDeltaVsTrack.Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
455 hPtTrueVsTrack =
new TH2D(sPtTrueVsTrack.Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nPtBins, rPtBins[0], rPtBins[1]);
456 hPtDeltaVsFrac -> Sumw2();
457 hPtDeltaVsTrue -> Sumw2();
458 hPtDeltaVsTrack -> Sumw2();
459 hPtTrueVsTrack -> Sumw2();
462 for (
size_t iProj = 0; iProj < nProj; iProj++) {
463 hPtDeltaProj[iProj] =
new TH1D(sPtProj[iProj].
Data(),
"", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
464 hPtDeltaProj[iProj] -> Sumw2();
468 for (
size_t iCut = 0; iCut < nDPtCuts; iCut++) {
469 hPtDeltaCut[iCut] =
new TH1D(sPtDeltaCut[iCut].
Data(),
"", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
470 hPtTrackCut[iCut] =
new TH1D(sPtTrackCut[iCut].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1]);
471 hPtFracCut[iCut] =
new TH1D(sPtFracCut[iCut].
Data(),
"", nFracBins, rFracBins[0], rFracBins[1]);
472 hPtTrkTruCut[iCut] =
new TH1D(sPtTrkTruCut[iCut].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1]);
473 hPtDeltaCut[iCut] -> Sumw2();
474 hPtTrackCut[iCut] -> Sumw2();
475 hPtFracCut[iCut] -> Sumw2();
476 hPtTrkTruCut[iCut] -> Sumw2();
478 hPtDeltaVsFracCut[iCut] =
new TH2D(sPtDeltaVsFracCut[iCut].
Data(),
"", nFracBins, rFracBins[0], rFracBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
479 hPtDeltaVsTrueCut[iCut] =
new TH2D(sPtDeltaVsTrueCut[iCut].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
480 hPtDeltaVsTrackCut[iCut] =
new TH2D(sPtDeltaVsTrackCut[iCut].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
481 hPtTrueVsTrackCut[iCut] =
new TH2D(sPtTrueVsTrackCut[iCut].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nPtBins, rPtBins[0], rPtBins[1]);
482 hPtDeltaVsFracCut[iCut] -> Sumw2();
483 hPtDeltaVsTrueCut[iCut] -> Sumw2();
484 hPtDeltaVsTrackCut[iCut] -> Sumw2();
485 hPtTrueVsTrackCut[iCut] -> Sumw2();
489 for (
size_t iSig = 0; iSig < nSigCuts; iSig++) {
490 hPtDeltaSig[iSig] =
new TH1D(sPtDeltaSig[iSig].
Data(),
"", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
491 hPtTrackSig[iSig] =
new TH1D(sPtTrackSig[iSig].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1]);
492 hPtFracSig[iSig] =
new TH1D(sPtFracSig[iSig].
Data(),
"", nFracBins, rFracBins[0], rFracBins[1]);
493 hPtTrkTruSig[iSig] =
new TH1D(sPtTrkTruSig[iSig].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1]);
494 hPtDeltaSig[iSig] -> Sumw2();
495 hPtTrackSig[iSig] -> Sumw2();
496 hPtFracSig[iSig] -> Sumw2();
497 hPtTrkTruSig[iSig] -> Sumw2();
499 hPtDeltaVsFracSig[iSig] =
new TH2D(sPtDeltaVsFracSig[iSig].
Data(),
"", nFracBins, rFracBins[0], rFracBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
500 hPtDeltaVsTrueSig[iSig] =
new TH2D(sPtDeltaVsTrueSig[iSig].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
501 hPtDeltaVsTrackSig[iSig] =
new TH2D(sPtDeltaVsTrackSig[iSig].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
502 hPtTrueVsTrackSig[iSig] =
new TH2D(sPtTrueVsTrackSig[iSig].
Data(),
"", nPtBins, rPtBins[0], rPtBins[1], nPtBins, rPtBins[0], rPtBins[1]);
503 hPtDeltaVsFracSig[iSig] -> Sumw2();
504 hPtDeltaVsTrueSig[iSig] -> Sumw2();
505 hPtDeltaVsTrackSig[iSig] -> Sumw2();
506 hPtTrueVsTrackSig[iSig] -> Sumw2();
509 cout <<
" Initialized output histograms." << endl;