333 double sqrts=
energy.Atof();
354 TCanvas *
c2=
new TCanvas(
"c2",
"c2",20,20,1800,800);
355 c2->Divide(5,2,0.005,0.01);
358 double PhiMass =
DbMass(
"phi");
360 double D0Mass =
DbMass(
"D0");
361 double DpmMass =
DbMass(
"D+");
362 double DsMass =
DbMass(
"D_s+");
364 double JpsiMass =
DbMass(
"J/psi");
365 double EtacMass =
DbMass(
"eta_c");
366 double Chic0Mass =
DbMass(
"chi_0c");
368 double LamMass =
DbMass(
"Lambda0");
369 double LamcMass =
DbMass(
"Lambda_c+");
372 double fPhiQaMin = PhiMass - 0.1;
373 double fPhiQaMax = PhiMass + 0.1;
376 double fD0QaMin = D0Mass - 0.3;
377 double fD0QaMax = D0Mass + 0.3;
379 double fDpmQaMin = DpmMass - 0.3;
380 double fDpmQaMax = DpmMass + 0.3;
382 double fDsQaMin = DsMass - 0.25;
383 double fDsQaMax = DsMass + 0.25;
386 double fLamcQaMin = LamcMass - 0.2;
387 double fLamcQaMax = LamcMass + 0.2;
389 double fLamQaMin = LamMass - 0.15;
390 double fLamQaMax = LamMass + 0.15;
393 double fEtacQaMin = EtacMass - 0.65;
394 double fEtacQaMax = EtacMass + 0.65;
396 double fJpsiQaMin = JpsiMass - 1.00;
397 double fJpsiQaMax = JpsiMass + 0.75;
401 double fEcm = sqrts/10.;
402 double f2eQaMin = fEcm - 1.5;
403 double f2eQaMax = fEcm + 1.0;
408 TH1F *h_jpsi1=
new TH1F(
"h_jpsi1",
"J/#psi #rightarrow e^{+}e^{-}",
nbins,fJpsiQaMin,fJpsiQaMax);
409 TH1F *h_jpsi1sel=
new TH1F(
"h_jpsi1sel",
"J/psi",
nbins,fJpsiQaMin,fJpsiQaMax);
410 TH1F *h_jpsi1sig=
new TH1F(
"h_jpsi1sig",
"J/psi",
nbins,fJpsiQaMin,fJpsiQaMax);
411 h_jpsi1sig->SetLineColor(2);
415 TH1F *h_jpsi2=
new TH1F(
"h_jpsi2",
"J/#psi #rightarrow #mu^{+}#mu^{-}",
nbins,fJpsiQaMin,fJpsiQaMax);
416 TH1F *h_jpsi2sel=
new TH1F(
"h_jpsi2sel",
"J/psi",
nbins,fJpsiQaMin,fJpsiQaMax);
417 TH1F *h_jpsi2sig=
new TH1F(
"h_jpsi2sig",
"J/psi",
nbins,fJpsiQaMin,fJpsiQaMax);
418 h_jpsi2sig->SetLineColor(2);
422 TH1F *h_etac=
new TH1F(
"h_etac",
"#eta_{c} #rightarrow K_{S} K^{+} #pi^{-}",
nbins,fEtacQaMin,fEtacQaMax);
423 TH1F *h_etacsel=
new TH1F(
"h_etacsel",
"etac",
nbins,fEtacQaMin,fEtacQaMax);
424 TH1F *h_etacsig=
new TH1F(
"h_etacsig",
"etac",
nbins,fEtacQaMin,fEtacQaMax);
425 h_etacsig->SetLineColor(2);
429 TH1F *h_d0=
new TH1F(
"h_d0",
"D^{0} #rightarrow K^{-}#pi^{+}",
nbins,fD0QaMin,fD0QaMax);
430 TH1F *h_d0sel=
new TH1F(
"h_d0sel",
"D0",
nbins,fD0QaMin,fD0QaMax);
431 TH1F *h_d0sig=
new TH1F(
"h_d0sig",
"D0",
nbins,fD0QaMin,fD0QaMax);;
432 h_d0sig->SetLineColor(2);
436 TH1F *h_dpm=
new TH1F(
"h_dpm",
"D^{+} #rightarrow K^{-}#pi^{+}#pi^{+}",
nbins,fDpmQaMin,fDpmQaMax);
437 TH1F *h_dpmsel=
new TH1F(
"h_dpmsel",
"D#pm",
nbins,fDpmQaMin,fDpmQaMax);
438 TH1F *h_dpmsig=
new TH1F(
"h_dpmsig",
"D#pm",
nbins,fDpmQaMin,fDpmQaMax);
439 h_dpmsig->SetLineColor(2);
443 TH1F *h_ds=
new TH1F(
"h_ds",
"D_{s}^{+} #rightarrow K^{+}K^{-}#pi^{+}",
nbins,fDsQaMin,fDsQaMax);
444 TH1F *h_dssel=
new TH1F(
"h_dssel",
"Ds",
nbins,fDsQaMin,fDsQaMax);
445 TH1F *h_dssig=
new TH1F(
"h_dssig",
"Ds",
nbins,fDsQaMin,fDsQaMax);
446 h_dssig->SetLineColor(2);
450 TH1F *h_phi=
new TH1F(
"h_phi",
"#phi #rightarrow K^{+}K^{-}",
nbins,fPhiQaMin,fPhiQaMax);
451 TH1F *h_phisel=
new TH1F(
"h_phisel",
"Phi",
nbins,fPhiQaMin,fPhiQaMax);
452 TH1F *h_phisig=
new TH1F(
"h_phisig",
"Phi",
nbins,fPhiQaMin,fPhiQaMax);
453 h_phisig->SetLineColor(2);
457 TH1F *h_lamc=
new TH1F(
"h_lamc",
"#Lambda_{c} #rightarrow pK^{-}#pi^{+}",
nbins,fLamcQaMin,fLamcQaMax);
458 TH1F *h_lamcsel=
new TH1F(
"h_lamcsel",
"Lam_c",
nbins,fLamcQaMin,fLamcQaMax);
459 TH1F *h_lamcsig=
new TH1F(
"h_lamcsig",
"Lam_c",
nbins,fLamcQaMin,fLamcQaMax);
460 h_lamcsig->SetLineColor(2);
464 TH1F *h_lam=
new TH1F(
"h_lam",
"#Lambda #rightarrow p#pi^{-}",
nbins,fLamQaMin,fLamQaMax);
465 TH1F *h_lamsel=
new TH1F(
"h_lamsel",
"Lam",
nbins,fLamQaMin,fLamQaMax);
466 TH1F *h_lamsig=
new TH1F(
"h_lamsig",
"Lam",
nbins,fLamQaMin,fLamQaMax);
467 h_lamsig->SetLineColor(2);
471 TH1F *h_ee=
new TH1F(
"h_ee",
"p#bar{p} #rightarrow e^{+}e^{-}",
nbins,f2eQaMin,f2eQaMax);
472 TH1F *h_eesel=
new TH1F(
"h_eesel",
"ee",
nbins,f2eQaMin,f2eQaMax);
473 TH1F *h_eesig=
new TH1F(
"h_eesig",
"ee",
nbins,f2eQaMin,f2eQaMax);
474 h_eesig->SetLineColor(2);
477 h_jpsi1->SetXTitle(
"m(e^{+}e^{-}) [GeV/c^{2}]");
478 h_jpsi2->SetXTitle(
"m(#mu^{+}#mu^{-}) [GeV/c^{2}]");
479 h_etac->SetXTitle(
"m(K_{S} K^{+}#pi^{-}) [GeV/c^{2}]");
481 h_d0->SetXTitle(
"m(K^{-}#pi^{+}) [GeV/c^{2}]");
483 h_dpm->SetXTitle(
"m(K^{-}#pi^{+}#pi^{+}) [GeV/c^{2}]");
485 h_ds->SetXTitle(
"m(K^{+}K^{-}#pi^{+}) [GeV/c^{2}]");
487 h_phi->SetXTitle(
"m(K^{+}K^{-}) [GeV/c^{2}]");
488 h_lamc->SetXTitle(
"m(pK^{-}#pi^{+}) [GeV/c^{2}]");
489 h_lam->SetXTitle(
"m(p#pi^{-}) [GeV/c^{2}]");
490 h_ee->SetXTitle(
"m(e^{+}e^{-}) [GeV/c^{2}]");
493 fillHistos(t[0],
"phim",
cuts[
"nphi"],
"h_phi",
"h_phisel",
"h_phisig");
494 fillHistos(t[1],
"lamm",
cuts[
"nlam"],
"h_lam",
"h_lamsel",
"h_lamsig");
495 fillHistos(t[2],
"eem",
cuts[
"n2e"],
"h_ee",
"h_eesel",
"h_eesig");
499 fillHistos(t[3],
"jpsim",
cuts[
"njpsi1"],
"h_jpsi1",
"h_jpsi1sel",
"h_jpsi1sig");
500 fillHistos(t[4],
"jpsim",
cuts[
"njpsi2"],
"h_jpsi2",
"h_jpsi2sel",
"h_jpsi2sig");
501 fillHistos(t[5],
"etacm",
cuts[
"netac2"],
"h_etac",
"h_etacsel",
"h_etacsig");
502 fillHistos(t[6],
"d0m",
cuts[
"nd01"],
"h_d0",
"h_d0sel",
"h_d0sig");
503 fillHistos(t[7],
"dpmm",
cuts[
"ndpm1"],
"h_dpm",
"h_dpmsel",
"h_dpmsig");
507 fillHistos(t[8],
"dsm",
cuts[
"nds1"],
"h_ds",
"h_dssel",
"h_dssig");
510 fillHistos(t[9],
"lamcm",
cuts[
"nlamc"],
"h_lamc",
"h_lamcsel",
"h_lamcsig");
514 double channelcount[10]={0,0,0,0,0,0,0,0,0,0};
515 double eff[10]={0,0,0,0,0,0,0,0,0,0};
521 cout <<i<<
" "<<channelcount[
i]<<endl;
528 cout <<i<<
" "<<channelcount[
i]<<endl;
534 cout <<i<<
" "<<channelcount[
i]<<endl;
540 cout <<i<<
" "<<channelcount[
i]<<endl;
543 double evCnt =
evcnt.size();
544 for (i=0;i<10;++
i) eff[i]=channelcount[i]/nev*100.;
546 cout <<
"all:"<<evCnt<<endl;
550 latex.SetTextSize(0.08);
560 c2->cd(2); h_phi->Draw(); h_phisel->Draw(
"same"); h_phisig->Draw(
"same");
561 sprintf(tmp,
"#epsilon = %4.1f%%",eff[0]);
562 latex.DrawLatexNDC(posx,posy,tmp);
564 c2->cd(1); h_ee->Draw(); h_eesel->Draw(
"same"); h_eesig->Draw(
"same");
565 sprintf(tmp,
"#epsilon = %4.1f%%",eff[2]);
566 latex.DrawLatexNDC(posx,posy,tmp);
568 c2->cd(9); h_lam->Draw(); h_lamsel->Draw(
"same"); h_lamsig->Draw(
"same");
569 sprintf(tmp,
"#epsilon = %4.1f%%",eff[1]);
570 latex.DrawLatexNDC(posx,posy,tmp);
572 c2->cd(3); h_etac->Draw(); h_etacsel->Draw(
"same"); h_etacsig->Draw(
"same");
573 sprintf(tmp,
"#epsilon = %4.1f%%",eff[5]);
574 latex.DrawLatexNDC(posx,posy,tmp);
576 c2->cd(4); h_jpsi1->Draw(); h_jpsi1sel->Draw(
"same"); h_jpsi1sig->Draw(
"same");
577 sprintf(tmp,
"#epsilon = %4.1f%%",eff[3]);
578 latex.DrawLatexNDC(posx,posy,tmp);
580 c2->cd(5); h_jpsi2->Draw(); h_jpsi2sel->Draw(
"same"); h_jpsi2sig->Draw(
"same");
581 sprintf(tmp,
"#epsilon = %4.1f%%",eff[4]);
582 latex.DrawLatexNDC(posx,posy,tmp);
584 c2->cd(7); h_dpm->Draw(); h_dpmsel->Draw(
"same"); h_dpmsig->Draw(
"same");
585 sprintf(tmp,
"#epsilon = %4.1f%%",eff[7]);
586 latex.DrawLatexNDC(posx,posy,tmp);
588 c2->cd(6); h_d0->Draw(); h_d0sel->Draw(
"same"); h_d0sig->Draw(
"same");
589 sprintf(tmp,
"#epsilon = %4.1f%%",eff[6]);
590 latex.DrawLatexNDC(posx,posy,tmp);
592 c2->cd(8); h_ds->Draw(); h_dssel->Draw(
"same"); h_dssig->Draw(
"same");
593 sprintf(tmp,
"#epsilon = %4.1f%%",eff[8]);
594 latex.DrawLatexNDC(posx,posy,tmp);
596 c2->cd(10); h_lamc->Draw(); h_lamcsel->Draw(
"same"); h_lamcsig->Draw(
"same");
597 sprintf(tmp,
"#epsilon = %4.1f%%",eff[9]);
598 latex.DrawLatexNDC(posx,posy,tmp);
602 posy = h_jpsi2->GetMaximum()*1.12;
603 if (posy==0) posy=1.12;
604 sprintf(tmp,
"(#epsilon_{t} = %4.1f%%)",
double(evCnt)/
double(nev)*100.);
605 latex.SetTextColor(kMagenta+2);
606 latex.DrawLatex(3.0,posy,tmp);
612 TString plot(fname(fname.Last(
'/')+1,6));
613 if (!tagonly) plot+=
"_opt_supr";
618 c2->SaveAs(
"figfull_v2/full_"+plot+
".gif");
619 c2->SaveAs(
"figfull_v2/full_"+plot+
".pdf");
624 TString result=TString::Format(
"%s & %3.1f & %6.2f & %6.2f & %6.2f & %6.2f & %6.2f & %6.2f & %6.2f & %6.2f & %6.2f & %6.2f & %6.2f \\\\\n",
625 mode.Data(), sqrts/10., eff[2], eff[0], eff[5], eff[3], eff[4], eff[6], eff[7], eff[8], eff[1], eff[9], evCnt/nev*100);
void init_cuts_1000(TString energy)
double DbMass(TString name)
std::map< TString, TString > cuts
int cnt_events(TChain *t, TString cut, bool globcnt=false)
std::map< int, int > evcnt
void fillHistos(TChain *t, TString var, TString cut, TString all, TString sel, TString sig)