28 m_h_total_efficiency{
nullptr},
42 m_h_trkvtx_x_lb{
nullptr},
43 m_h_trkvtx_y_lb{
nullptr},
44 m_h_trkvtx_z_lb{
nullptr},
45 m_h_npixvseta{
nullptr},
46 m_h_npixvsphi{
nullptr},
47 m_h_npixvsd0{
nullptr},
48 m_h_npixvspT{
nullptr},
49 m_h_nsctvseta{
nullptr},
50 m_h_nsctvsphi{
nullptr},
51 m_h_nsctvsd0{
nullptr},
52 m_h_nsctvspT{
nullptr},
53 m_h_ntrtvseta{
nullptr},
54 m_h_ntrtvsphi{
nullptr},
55 m_h_nsihits_lb{
nullptr},
56 m_h_npixvseta_rec{
nullptr},
57 m_h_npixvsphi_rec{
nullptr},
58 m_h_npixvsd0_rec{
nullptr},
59 m_h_npixvspT_rec{
nullptr},
60 m_h_nsctvseta_rec{
nullptr},
61 m_h_nsctvsphi_rec{
nullptr},
62 m_h_nsctvsd0_rec{
nullptr},
63 m_h_nsctvspT_rec{
nullptr},
64 m_h_ntrtvseta_rec{
nullptr},
65 m_h_ntrtvsphi_rec{
nullptr},
66 m_h_nsihits_lb_rec{
nullptr},
68 m_h_d0vsphi_rec{
nullptr},
78 m_h_trkd0sig{
nullptr},
83 m_h_ntrk_rec{
nullptr},
85 m_h_trkpT_rec{
nullptr},
86 m_h_trketa_rec{
nullptr},
87 m_h_trkphi_rec{
nullptr},
88 m_h_trkd0_rec{
nullptr},
89 m_h_trkz0_rec{
nullptr},
90 m_h_trkdd0_rec{
nullptr},
91 m_h_trkdz0_rec{
nullptr},
92 m_h_trkd0sig_rec{
nullptr},
93 m_h_npix_rec{
nullptr},
94 m_h_nsct_rec{
nullptr},
95 m_h_nsihits_rec{
nullptr},
96 m_h_ntrt_rec{
nullptr},
97 m_h_layer_rec{
nullptr},
98 m_h_trkpT_residual{
nullptr},
99 m_h_trkipT_residual{
nullptr},
100 m_h_trketa_residual{
nullptr},
101 m_h_trkphi_residual{
nullptr},
102 m_h_trkd0_residual{
nullptr},
103 m_h_trkz0_residual{
nullptr},
104 m_h_trkdd0_residual{
nullptr},
105 m_h_trkdz0_residual{
nullptr},
120 std::cout <<
"\nAnalysis_Tier0:: chain specification: " << cname <<
"\t" << cname.
raw() << std::endl;
121 std::cout <<
"\tchain: " << cname.
head() << std::endl;
122 std::cout <<
"\tkey: " << cname.
tail() << std::endl;
123 std::cout <<
"\troi: " << cname.
roi() << std::endl;
124 std::cout <<
"\tvtx: " << cname.
vtx() << std::endl;
125 std::cout <<
"\tte: " << cname.
element() << std::endl;
131 m_h_chain->GetXaxis()->SetBinLabel(1,
"Nrois" );
132 m_h_chain->GetXaxis()->SetBinLabel(2,
"Nevents" );
133 m_h_chain->GetXaxis()->SetBinLabel(3,
"N ref tracks" );
134 m_h_chain->GetXaxis()->SetBinLabel(4,
"N matched tracks" );
135 m_h_chain->GetXaxis()->SetBinLabel(5,
"N total test tracks" );
146 double vnbins[81] = {
148 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
149 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5,
150 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5,
151 31.5, 32.5, 33.5, 34.5, 36.5, 37.5, 39.5,
152 40.5, 42.5, 43.5, 45.5, 47.5, 49.5,
153 50.5, 52.5, 54.5, 57.5, 59.5,
154 61.5, 63.5, 66.5, 69.5,
171 double vnbins[101] = {
173 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 17.5, 18.5, 19.5, 21.5,
174 23.5, 24.5, 26.5, 28.5, 30.5, 32.5, 35.5, 37.5, 40.5, 43.5, 46.5, 50.5, 53.5, 57.5, 61.5, 66.5, 71.5, 76.5, 81.5, 87.5,
175 93.5, 100.5, 107.5, 114.5, 123.5, 131.5, 141.5, 150.5, 161.5, 172.5, 185.5, 198.5, 211.5, 226.5, 242.5, 259.5, 277.5, 297.5, 317.5, 340.5,
176 363.5, 389.5, 416.5, 445.5, 476.5, 509.5,
177 544.5, 582.5, 623.5, 666.5, 713.5, 762.5, 815.5, 872.5, 933.5, 998.5, 1067.5,
178 1141.5, 1221.5, 1305.5, 1396.5, 1493.5, 1597.5,
179 1708.5, 1827.5, 1953.5, 2089.5,
180 2234.5, 2389.5, 2555.5,
181 2733.5, 2923.5, 3125.5,
192 m_h_ntrk =
new TH1F(
"reftrk_N",
"Reference tracks", 77, vnbins );
200 std::vector<double> ptbins;
202 for (
int i=0 ;
i<=25 ;
i++ ) {
204 double y = std::log10(1) +
i*( std::log10(100)-std::log10(1) )/25;
212 m_h_trkpT =
new TH1F(
"reftrk_pT" ,
"Reference track pT", 25, &ptbins[0] );
214 m_h_trketa =
new TH1F(
"reftrk_eta",
"Reference track Eta", 25, -2.5, 2.5) ;
215 if (
name().
find(
"LRT")!=std::string::npos ||
name().
find(
"lrt")!=std::string::npos) {
216 m_h_trkd0 =
new TH1F(
"reftrk_d0" ,
"Reference track d0", 201, -100.0, 100.0 );
218 m_h_trkd0 =
new TH1F(
"reftrk_d0" ,
"Reference track d0", 101, -5.0, 5.0 );
220 m_h_trkz0 =
new TH1F(
"reftrk_z0" ,
"Reference track z0", 50, -225., 225.);
223 m_h_trkdd0 =
new TH1F(
"reftrk_dd0" ,
"Reference track sigma(d0)", 50, 0, 0.5);
224 m_h_trkdz0 =
new TH1F(
"reftrk_dz0" ,
"Reference track sigma(z0)", 50, 0, 2.5);
226 m_h_trkd0sig =
new TH1F(
"reftrk_d0sig" ,
"Reference track d0 significance", 101, -5., 5.);
253 if (
name().
find(
"LRT")!=std::string::npos ||
name().
find(
"lrt")!=std::string::npos) {
279 double d0bins_LRT[124] = { -100.5,
283 -69.5, -66.5, -63.5, -61.5,
284 -59.5, -57.5, -54.5, -52.5, -50.5,
285 -49.5, -47.5, -45.5, -43.5, -42.5, -40.5,
286 -39.5, -37.5, -36.5, -34.5, -33.5, -32.5, -31.5,
287 -29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, -20.5,
288 -19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5,
289 -9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5,
290 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
291 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5,
292 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5,
293 31.5, 32.5, 33.5, 34.5, 36.5, 37.5, 39.5,
294 40.5, 42.5, 43.5, 45.5, 47.5, 49.5,
295 50.5, 52.5, 54.5, 57.5, 59.5,
296 61.5, 63.5, 66.5, 69.5,
302 double d0bins[40] = { -5.0, -4.0, -3.0, -2.5,
303 -2.0, -1.8, -1.6, -1.4, -1.2,
304 -1.05, -0.95, -0.85, -0.75, -0.65, -0.55, -0.45, -0.35, -0.25, -0.15, -0.05,
305 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95, 1.05,
306 1.2, 1.4, 1.6, 1.8, 2.0,
307 2.5, 3.0, 4.0, 5.0 };
317 if (
name().
find(
"LRT")!=std::string::npos ||
name().
find(
"lrt")!=std::string::npos) {
326 m_h_lbeff =
new TProfile(
"Eff_lb",
"efficinecy vs lumiblock", 301, -0.5, 3009.5 );
339 m_h_npixvseta =
new TProfile(
"npix_vs_eta",
"offline npix vs eta;offline #eta;# mean number of offline pixel hits", 30, -2.5, 2.5);
340 m_h_npixvseta_rec =
new TProfile(
"npix_vs_eta_rec",
"trigger npix vs eta;offline #eta;# mean number of trigger pixel hits", 30, -2.5, 2.5);
342 m_h_nsctvseta =
new TProfile(
"nsct_vs_eta",
"offline nsct vs eta;offline #eta;# mean number of offline sct hits", 30, -2.5, 2.5);
343 m_h_nsctvseta_rec =
new TProfile(
"nsct_vs_eta_rec",
"trigger nsct vs eta;offline #eta;# mean number of trigger sct hits", 30, -2.5, 2.5);
345 m_h_ntrtvseta =
new TProfile(
"ntrt_vs_eta",
"offline ntrt vs eta;offline #eta;# mean number of offline trt hits", 30, -2.5, 2.5 );
346 m_h_ntrtvseta_rec =
new TProfile(
"ntrt_vs_eta_rec",
"trigger ntrt vs eta;offline #eta;# mean number of trigger trt hits", 30, -2.5, 2.5 );
357 if (
name().
find(
"LRT")!=std::string::npos ||
name().
find(
"lrt")!=std::string::npos) {
358 m_h_npixvsd0 =
new TProfile(
"npix_vs_d0",
"offline npix vs d0;offline #d0;# mean number of offline pixel hits", 123, d0bins_LRT );
359 m_h_npixvsd0_rec =
new TProfile(
"npix_vs_d0_rec",
"trigger npix vs d0;offline #d0;# mean number of trigger pixel hits", 123, d0bins_LRT );
361 m_h_nsctvsd0 =
new TProfile(
"nsct_vs_d0",
"offline nsct vs d0;offline #d0;# mean number of offline sct hits", 123, d0bins_LRT );
362 m_h_nsctvsd0_rec =
new TProfile(
"nsct_vs_d0_rec",
"trigger nsct vs d0;offline #d0;# mean number of trigger sct hits", 123, d0bins_LRT );
364 m_h_npixvsd0 =
new TProfile(
"npix_vs_d0",
"offline npix vs d0;offline #d0;# mean number of offline pixel hits", 39, d0bins );
365 m_h_npixvsd0_rec =
new TProfile(
"npix_vs_d0_rec",
"trigger npix vs d0;offline #d0;# mean number of trigger pixel hits", 39, d0bins );
367 m_h_nsctvsd0 =
new TProfile(
"nsct_vs_d0",
"offline nsct vs d0;offline #d0;# mean number of offline sct hits", 39, d0bins );
368 m_h_nsctvsd0_rec =
new TProfile(
"nsct_vs_d0_rec",
"trigger nsct vs d0;offline #d0;# mean number of trigger sct hits", 39, d0bins );
371 m_h_npixvspT =
new TProfile(
"npix_vs_pT",
"offline npix vs pT;offline #p_{T};# mean number of offline pixel hits", 25, &ptbins[0] );
372 m_h_npixvspT_rec =
new TProfile(
"npix_vs_pT_rec",
"trigger npix vs pT;offline #p_{T};# mean number of trigger pixel hits", 25, &ptbins[0] );
374 m_h_nsctvspT =
new TProfile(
"nsct_vs_pT",
"offline nsct vs pT;offline #p_{T} [GeV];# mean number of offline pixel hits", 25, &ptbins[0] );
375 m_h_nsctvspT_rec =
new TProfile(
"nsct_vs_pT_rec",
"trigger nsct vs pT;offline #p_{T} [GeV];# mean number of trigger pixel hits", 25, &ptbins[0] );
385 m_h_layer =
new TH1F(
"layer",
"hit layers", 32, -0.5, 31.5 );
442 m_h_pTres =
new TProfile(
"Res_pT",
"pT residual;#eta_{ref};#Delta pT [Gev]", 25, -2.5, 2.5 );
443 m_h_ipTres =
new TProfile(
"Res_ipT",
"ipT residual;#eta_{ref};#Delta pT^{-1} [Gev^{-1}]", 25, -2.5, 2.5);
444 m_h_etares =
new TProfile(
"Res_eta",
"Eta residual;#eta_{ref};#Delta #eta", 25, -2.5, 2.5);
445 m_h_phires =
new TProfile(
"Res_phi",
"Phi residual;#eta_{ref};#Delta #phi", 25, -2.5, 2.5);
446 m_h_d0res =
new TProfile(
"Res_d0",
"d0 residual;#eta_{ref};#Delta d0 [mm]", 25, -2.5, 2.5);
447 m_h_z0res =
new TProfile(
"Res_z0",
"z0 residual;#eta_{ref};#Delta z0 [mm]", 25, -2.5, 2.5);
526 if (
name().
find(
"vtx")!=std::string::npos ||
name().
find(
"Vtx")!=std::string::npos ||
527 name().
find(
"vx")!=std::string::npos ||
name().
find(
"Vx")!=std::string::npos ) {
554 const std::vector<TIDA::Track*>& testTracks,
558 std::vector<TIDA::Track*>::const_iterator
reference = referenceTracks.begin();
559 std::vector<TIDA::Track*>::const_iterator referenceEnd = referenceTracks.end();
572 m_h_ntrk->Fill( referenceTracks.size() );
576 m_h_chain->Fill(4.5, testTracks.size() );
582 double referenceEta = (*reference)->eta();
583 double referencePhi =
phi((*reference)->phi());
584 double referenceZ0 = (*reference)->z0();
585 double referenceD0 = (*reference)->a0();
586 double referencePT = (*reference)->pT();
588 double referenceDZ0 = (*reference)->dz0();
589 double referenceDD0 = (*reference)->da0();
594 double eff_weight = 0;
595 if (
test) eff_weight = 1;
599 m_h_pTeff->Fill( std::fabs(referencePT)*0.001, eff_weight );
600 m_h_z0eff->Fill( referenceZ0, eff_weight );
601 m_h_d0eff->Fill( referenceD0, eff_weight );
608 m_h_trkpT->Fill( std::fabs(referencePT)*0.001 );
617 if ( referenceDD0!=0 )
m_h_trkd0sig->Fill( referenceD0/referenceDD0 );
619 m_h_npixvseta->Fill( referenceEta,
int(((*reference)->pixelHits()+0.5)*0.5) );
620 m_h_nsctvseta->Fill( referenceEta, (*reference)->sctHits() );
621 m_h_ntrtvseta->Fill( referenceEta, (*reference)->strawHits() );
624 m_h_npixvsphi->Fill( referencePhi,
int(((*reference)->pixelHits()+0.5)*0.5) );
625 m_h_nsctvsphi->Fill( referencePhi, (*reference)->sctHits() );
626 m_h_ntrtvsphi->Fill( referencePhi, (*reference)->strawHits() );
628 m_h_npixvsd0->Fill( referenceD0,
int(((*reference)->pixelHits()+0.5)*0.5) );
629 m_h_nsctvsd0->Fill( referenceD0, (*reference)->sctHits() );
631 m_h_npixvspT->Fill( std::fabs(referencePT)*0.001,
int(((*reference)->pixelHits()+0.5)*0.5) );
632 m_h_nsctvspT->Fill( std::fabs(referencePT)*0.001, (*reference)->sctHits() );
635 m_h_npix->Fill(
int(((*reference)->pixelHits()+0.5)*0.5) );
636 m_h_nsct->Fill( (*reference)->sctHits() );
638 m_h_ntrt->Fill( (*reference)->strawHits() );
649 for (
size_t ilayer=0 ; ilayer<32 ; ilayer++ ) {
650 if ( (*reference)->hitPattern()&(1U<<ilayer) )
m_h_layer->Fill( ilayer );
669 m_h_pTres->Fill( referenceEta, (
test->pT() - referencePT)*0.001 );
670 m_h_ipTres->Fill( referenceEta, (1000/
test->pT() - 1000/referencePT) );
680 for (
size_t ilayer=0 ; ilayer<32 ; ilayer++ ) {
756 const std::vector<TIDA::Vertex*>& vtx1,