11 unsigned col1 = kOrange+7;
12 unsigned col2 = kBlue+2;
15 TChain chain(
"ntp_event");
16 chain.Add(
"data_3pions/p250_e20_0events_file1093_LeptoAna_TruthEvent.root");
17 chain.Add(
"data_3pions/p250_e20_0events_file1096_LeptoAna_TruthEvent.root");
18 chain.Add(
"data_3pions/p250_e20_0events_file1101_LeptoAna_TruthEvent.root");
19 chain.Add(
"data_3pions/p250_e20_0events_file1115_LeptoAna_TruthEvent.root");
20 chain.Add(
"data_3pions/p250_e20_0events_file1122_LeptoAna_TruthEvent.root");
21 chain.Add(
"data_3pions/p250_e20_0events_file1127_LeptoAna_TruthEvent.root");
22 chain.Add(
"data_3pions/p250_e20_0events_file1131_LeptoAna_TruthEvent.root");
23 chain.Add(
"data_3pions/p250_e20_0events_file1164_LeptoAna_TruthEvent.root");
25 TH2F* h2_tau =
new TH2F(
"h2_tau",
"Tau;#eta;p (GeV)", 50, -3, 3, 50, 0, 100 );
26 TH2F* h2_uds =
new TH2F(
"h2_uds",
"Tau;#eta;p (GeV)", 50, -3, 3, 50, 0, 100 );
27 TH2F* h2_cor_eta =
new TH2F(
"h2_cor_eta",
";#eta (tau);#eta (quark)", 50, -3, 3, 50, -3, 3 );
28 TH2F* h2_cor_phi =
new TH2F(
"h2_cor_phi",
";#phi (tau);#phi (quark)", 50, -3.14, 3.14, 50, -3.14, 3.14 );
31 chain.Draw(
"tau_p : tau_eta >> h2_tau" );
32 h2_tau->GetYaxis()->SetNdivisions(505);
33 h2_tau->GetZaxis()->SetNdivisions(505);
34 h2_tau->Scale(1./ h2_tau->GetEntries() );
36 chain.Draw(
"uds_p : uds_eta >> h2_uds" );
37 h2_uds->GetYaxis()->SetNdivisions(505);
39 chain.Draw(
"uds_eta : tau_eta >> h2_cor_eta" );
40 h2_cor_eta->GetYaxis()->SetNdivisions(505);
42 chain.Draw(
"uds_phi : tau_phi >> h2_cor_phi",
"" );
45 h2_cor_phi->GetYaxis()->SetNdivisions(505);
48 cout <<
"Total events in TChain: " << chain.GetEntries() << endl;
49 cout <<
"Total events in h2_tau: " << h2_tau->GetEntries() << endl;
50 cout <<
"Total events within |eta|<1.0: " << chain.GetEntries(
"abs(tau_eta)<1.0") << endl;
53 TCanvas *c1 =
new TCanvas(
"c1", h2_tau->GetTitle() );
54 c1->SetRightMargin(0.14);
57 c1->Print(
"plots/true_kinematics_tau_eta.eps");
58 c1->Print(
"plots/true_kinematics_tau_eta.png");
60 TCanvas *
c2 =
new TCanvas();
64 TCanvas *c3 =
new TCanvas();
65 h2_cor_eta->Draw(
"colz");
68 TCanvas *c3 =
new TCanvas();
69 h2_cor_phi->Draw(
"colz");