Skip to content

Commit 64d7ce3

Browse files
authored
Merge pull request #18 from brownd1978/kkconfig
Tweaks
2 parents 4027bfa + 0da8fb9 commit 64d7ce3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Tests/MomResComp.C

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void MomResComp(TTree* trks) {
2020
TH1F* gactive = new TH1F("gactive","Active hit fraction",100,0.0,1.0);
2121
TH1F* gnull = new TH1F("gnull","Null hit fraction",100,0.0,1.0);
2222
TH1F* gcell = new TH1F("gcell","hit/cell fraction",100,0.7,1.0);
23-
TH1F* gmomerr = new TH1F("gmomerr","KK fit momentum error",100,0.0,0.8);
23+
TH1F* gmomerr = new TH1F("gmomerr","KK fit momentum error;Mom error (MeV/c)",100,0.0,0.8);
2424
gprob->SetLineColor(kBlue);
2525
gnactive->SetLineColor(kBlue);
2626
gactive->SetLineColor(kBlue);
@@ -40,7 +40,7 @@ void MomResComp(TTree* trks) {
4040
TH1F* bactive = new TH1F("bactive","Active hit fraction",100,0.0,1.0);
4141
TH1F* bnull = new TH1F("bnull","Null hit fraction",100,0.0,1.0);
4242
TH1F* bcell = new TH1F("bcell","hit/cell fraction",100,0.7,1.0);
43-
TH1F* bmomerr = new TH1F("bmomerr","KK fit momentum error",100,0.0,0.8);
43+
TH1F* bmomerr = new TH1F("bmomerr","KK fit momentum error;Mom error (MeV/c)",100,0.0,0.8);
4444
bprob->SetLineColor(kRed);
4545
bnactive->SetLineColor(kRed);
4646
bactive->SetLineColor(kRed);
@@ -74,6 +74,10 @@ void MomResComp(TTree* trks) {
7474
bcell->Scale(10.0);
7575
bmomerr->Scale(10.0);
7676

77+
TLegend* leg = new TLegend(0.1,0.5,0.5,0.9);
78+
leg->AddEntry(gprob,"Good Mom Resolution","L");
79+
leg->AddEntry(bprob,"Bad Mom Resolution (X10)","L");
80+
7781
TCanvas* mccan = new TCanvas("mccan","mccan",1000,600);
7882
mccan->Divide(3,2);
7983
mccan->cd(1);
@@ -82,6 +86,7 @@ void MomResComp(TTree* trks) {
8286
mccan->cd(2);
8387
gactive->Draw();
8488
bactive->Draw("sameh");
89+
leg->Draw();
8590
mccan->cd(3);
8691
gnull->Draw();
8792
bnull->Draw("sameh");

0 commit comments

Comments
 (0)