StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
compareDalitz.C
1 void compareDalitz() {
2 
3  compareDalitzPlot("rootFiles/DDalitzMode1.root", "rootFiles/XmlDalitzMode1.root", "Mode1");
4  compareDalitzPlot("rootFiles/DDalitzMode1b.root", "rootFiles/XmlDalitzMode1b.root", "Mode1b");
5 
6  compareDalitzPlot("rootFiles/DDalitzMode2.root", "rootFiles/XmlDalitzMode2.root", "Mode2");
7  compareDalitzPlot("rootFiles/DDalitzMode2b.root", "rootFiles/XmlDalitzMode2b.root", "Mode2b");
8  compareDalitzPlot("rootFiles/DDalitzMode2KS.root", "rootFiles/XmlDalitzMode2KS.root", "Mode2KS");
9  compareDalitzPlot("rootFiles/DDalitzMode2KL.root", "rootFiles/XmlDalitzMode2KL.root", "Mode2KL");
10  compareDalitzPlot("rootFiles/DDalitzMode2KSb.root", "rootFiles/XmlDalitzMode2KSb.root", "Mode2KSb");
11  compareDalitzPlot("rootFiles/DDalitzMode2KLb.root", "rootFiles/XmlDalitzMode2KLb.root", "Mode2KLb");
12 
13  compareDalitzPlot("rootFiles/DDalitzMode3.root", "rootFiles/XmlDalitzMode3.root", "Mode3");
14  compareDalitzPlot("rootFiles/DDalitzMode3b.root", "rootFiles/XmlDalitzMode3b.root", "Mode3b");
15  compareDalitzPlot("rootFiles/DDalitzMode3KS.root", "rootFiles/XmlDalitzMode3KS.root", "Mode3KS");
16  compareDalitzPlot("rootFiles/DDalitzMode3KL.root", "rootFiles/XmlDalitzMode3KL.root", "Mode3KL");
17  compareDalitzPlot("rootFiles/DDalitzMode3KSb.root", "rootFiles/XmlDalitzMode3KSb.root", "Mode3KSb");
18  compareDalitzPlot("rootFiles/DDalitzMode3KLb.root", "rootFiles/XmlDalitzMode3KLb.root", "Mode3KLb");
19 
20  compareDalitzPlot("rootFiles/DDalitzMode4.root", "rootFiles/XmlDalitzMode4.root", "Mode4");
21  compareDalitzPlot("rootFiles/DDalitzMode4b.root", "rootFiles/XmlDalitzMode4b.root", "Mode4b");
22 
23  compareDalitzPlot("rootFiles/DDalitzMode5.root", "rootFiles/XmlDalitzMode5.root", "Mode5");
24  compareDalitzPlot("rootFiles/DDalitzMode5b.root", "rootFiles/XmlDalitzMode5b.root", "Mode5b");
25  compareDalitzPlot("rootFiles/DDalitzMode5KS.root", "rootFiles/XmlDalitzMode5KS.root", "Mode5KS");
26  compareDalitzPlot("rootFiles/DDalitzMode5KL.root", "rootFiles/XmlDalitzMode5KL.root", "Mode5KL");
27  compareDalitzPlot("rootFiles/DDalitzMode5KSb.root", "rootFiles/XmlDalitzMode5KSb.root", "Mode5KSb");
28  compareDalitzPlot("rootFiles/DDalitzMode5KLb.root", "rootFiles/XmlDalitzMode5KLb.root", "Mode5KLb");
29 
30  compareDalitzPlot("rootFiles/DDalitzMode6.root", "rootFiles/XmlDalitzMode6.root", "Mode6");
31  compareDalitzPlot("rootFiles/DDalitzMode6b.root", "rootFiles/XmlDalitzMode6b.root", "Mode6b");
32 
33  compareDalitzPlot("rootFiles/DDalitzMode7.root", "rootFiles/XmlDalitzMode7.root", "Mode7");
34  compareDalitzPlot("rootFiles/DDalitzMode7b.root", "rootFiles/XmlDalitzMode7b.root", "Mode7b");
35 
36  compareDalitzPlot("rootFiles/DDalitzMode8.root", "rootFiles/XmlDalitzMode8.root", "Mode8");
37  compareDalitzPlot("rootFiles/DDalitzMode8b.root", "rootFiles/XmlDalitzMode8b.root", "Mode8b");
38 
39  compareDalitzPlot("rootFiles/DDalitzMode9.root", "rootFiles/XmlDalitzMode9.root", "Mode9");
40  compareDalitzPlot("rootFiles/DDalitzMode9b.root", "rootFiles/XmlDalitzMode9b.root", "Mode9b");
41 
42  compareDalitzPlot("rootFiles/DDalitzMode10.root", "rootFiles/XmlDalitzMode10.root", "Mode10");
43  compareDalitzPlot("rootFiles/DDalitzMode10b.root", "rootFiles/XmlDalitzMode10b.root", "Mode10b");
44 
45  compareDalitzPlot("rootFiles/DDalitzMode11.root", "rootFiles/XmlDalitzMode11.root", "Mode11");
46  compareDalitzPlot("rootFiles/DDalitzMode11b.root", "rootFiles/XmlDalitzMode11b.root", "Mode11b");
47 
48  compareDalitzPlot("rootFiles/DDalitzMode12.root", "rootFiles/XmlDalitzMode12.root", "Mode12");
49  compareDalitzPlot("rootFiles/DDalitzMode12b.root", "rootFiles/XmlDalitzMode12b.root", "Mode12b");
50 
51 }
52 
53 void compareDalitzPlot(TString name1, TString name2, TString save="") {
54  TCanvas c1;
55  c1.Divide(2,2);
56  TFile f1(name1);
57  TFile f2(name2);
58  TTree* t1 = (TTree*)f1.Get("dalitzTree");
59  TTree* t2 = (TTree*)f2.Get("dalitzTree");
60  t1->SetMarkerColor(kRed);
61  t1->SetLineColor(kRed);
62  t1->SetFillColor(kRed);
63  t1->SetFillStyle(3004);
64  t2->SetMarkerColor(kBlue);
65  t2->SetLineColor(kBlue);
66  t2->SetFillColor(kBlue);
67  t2->SetFillStyle(3005);
68  gStyle->SetOptStat(0);
69  c1.cd(1);
70  t1->Draw("invMass12Sq:invMass23Sq","");
71  t2->Draw("invMass12Sq:invMass23Sq","","same");
72  ((TH1F*)gPad->GetPrimitive("htemp"))->SetTitle("");
73  ((TH1F*)gPad->GetPrimitive("htemp"))->SetXTitle("Mass^{2} 23 [GeV/c^{2}]^{2}");
74  ((TH1F*)gPad->GetPrimitive("htemp"))->SetYTitle("Mass^{2} 12 [GeV/c^{2}]^{2}");
75  c1.cd(2);
76  t1->Draw("invMass12Sq","");
77  t2->Draw("invMass12Sq","","same");
78  ((TH1F*)gPad->GetPrimitive("htemp"))->SetTitle("");
79  ((TH1F*)gPad->GetPrimitive("htemp"))->SetXTitle("Mass^{2} 12 [GeV/c^{2}]^{2}");
80  ((TH1F*)gPad->GetPrimitive("htemp"))->SetYTitle("");
81  c1.cd(3);
82  t1->Draw("invMass23Sq","");
83  t2->Draw("invMass23Sq","","same");
84  ((TH1F*)gPad->GetPrimitive("htemp"))->SetTitle("");
85  ((TH1F*)gPad->GetPrimitive("htemp"))->SetXTitle("Mass^{2} 23 [GeV/c^{2}]^{2}");
86  ((TH1F*)gPad->GetPrimitive("htemp"))->SetYTitle("");
87  c1.cd(4);
88  t1->Draw("invMass13Sq","");
89  t2->Draw("invMass13Sq","","same");
90  ((TH1F*)gPad->GetPrimitive("htemp"))->SetTitle("");
91  ((TH1F*)gPad->GetPrimitive("htemp"))->SetXTitle("Mass^{2} 13 [GeV/c^{2}]^{2}");
92  ((TH1F*)gPad->GetPrimitive("htemp"))->SetYTitle("");
93  c1.Update();
94 
95  if(save!="") {
96  c1.SaveAs(save+".png");
97  } else {
98  cout <<"Hit Enter to continue"<<endl;
99  while (getchar() != '\n');
100  }
101 }