diff --git a/examples/compgoldenenorm.C b/examples/compgoldenenorm.C new file mode 100644 index 0000000000000000000000000000000000000000..5cc16b6b2cb1eac970988a4be65f6ddaa628bc54 --- /dev/null +++ b/examples/compgoldenenorm.C @@ -0,0 +1,65 @@ +void compgoldenenorm(Int_t run=52949) +{ + + //Comapare hsshtrk from Engine with gold.enorm from hcana. + + TFile* f = new TFile(Form("hodtest_%d.root",run)); + cout << "hcana root file " << Form("hodtest_%d.root",run) << endl; + TH1F* h = golden_enorm; + + TFile* f1 = new TFile(Form("%d_hbk.root",run)); + cout << "Engine root file " << Form("%d_hbk.root",run) << endl; + TH1F* h1; + switch (run) { + case 50017 : + // h1 = h212; //A+ + break; + default : + // h1 = h438; //hsshtrk, engine/replay/paw + h1 = h426; //hsshtrk, engine/replay_mkj/paw + } + + TCanvas *c1 = new TCanvas("c1", "Golden track E/P", 800, 1000); + + c1->Divide(1,2); + + // gPad->SetLogy(); + + c1->cd(1); + + h1->SetFillColor(kGreen); + h1->SetLineColor(kGreen); + h1->Draw(); + + h->SetLineColor(kBlue); + h->SetFillStyle(0); + h->SetLineWidth(2); + h->Draw("same"); + + TLatex l; + l.SetTextSize(0.04); + Float_t maxy = h1->GetBinContent(h1->GetMaximumBin()); + Float_t xmin = h1->GetXaxis()->GetXmin(); + Float_t xmax = h1->GetXaxis()->GetXmax(); + Float_t xt = xmin + 0.75*(xmax-xmin); + + l.SetTextColor(kGreen); + l.DrawLatex(xt,0.65*maxy,"Engine"); + l.SetTextColor(kBlue); + l.DrawLatex(xt,0.75*maxy,"hcana"); + + // Difference between the histograms. + + c1->cd(2); + + TH1F* dif = h->Clone(); + + dif->Add(h,h1,1.,-1.); + + dif->SetTitle("Enorm Difference"); + dif->SetFillColor(kRed); + dif->SetLineColor(kRed); + dif->SetLineWidth(1); + dif->SetFillStyle(1111); + dif->Draw(); +} diff --git a/examples/hodtest_mkj.C b/examples/hodtest_mkj.C index f091dbfc80ab290aa075e689bf8350210e30c372..eac9af93dc5cab7c4c675dda0282670d1cde2212 100644 --- a/examples/hodtest_mkj.C +++ b/examples/hodtest_mkj.C @@ -45,6 +45,9 @@ void hodtest_mkj(Int_t RunNumber=50017, Int_t MaxEventToReplay=5000) { THcAerogel* aerogel = new THcAerogel("aero", "Aerogel Cerenkov" ); HMS->AddDetector( aerogel ); + // Add Golden Track + gHaPhysics->Add( new THaGoldenTrack( "H.gold", "HMS Golden Track", "H" )); + // Set up the analyzer - we use the standard one, // but this could be an experiment-specific one as well. // The Analyzer controls the reading of the data, executes diff --git a/examples/output_52949.def b/examples/output_52949.def index d4c4a66a6349b76b3ecd20d0b28458f616b16fa2..c58c9a6c6c2c9d0d033239931262813f40e39dfe 100644 --- a/examples/output_52949.def +++ b/examples/output_52949.def @@ -1,10 +1,11 @@ # See $ANALYZER/examples/output_example.def for examples # -block H.dc.* -block H.hod.* +#block H.dc.* +#block H.hod.* block H.cal.* -block H.aero.* +#block H.aero.* block H.tr.* +block H.gold.* block g.evtyp # TDC spectra @@ -211,4 +212,8 @@ TH1F dtime_hdc2u1 'HDC 2U1 Drift Time' H.dc.2u1.time 200 -100 300 TH1F dtime_hdc2v1 'HDC 2V1 Drift Time' H.dc.2v1.time 200 -100 300 TH1F dtime_hdc2y2 'HDC 2Y2 Drift Time' H.dc.2y2.time 200 -100 300 TH1F dtime_hdc2x2 'HDC 2X2 Drift Time' H.dc.2x2.time 200 -100 300 - +# +# Golden Track momentum +TH1F golden_p 'HMS Golden P' H.gold.p 100 0.011 1.8 H.dc.ntrack!=0 +TH1F golden_e 'HMS Golden E' H.gold.e 100 0.011 1.8 H.dc.ntrack!=0 +TH1F golden_enorm 'HMS Golden E/P' H.gold.e/H.gold.p 100 0.01 1.8 H.gold.index>=0 diff --git a/src/SConscript.py b/src/SConscript.py index cbd967eb18e6671f3d81a81e5831c67e01c45985..8792ee35d1cc63d1335363ffba281dcf26d04a85 100644 --- a/src/SConscript.py +++ b/src/SConscript.py @@ -13,7 +13,7 @@ THcDetectorMap.cxx \ THcRawHit.cxx THcHitList.cxx \ THcSignalHit.cxx \ THcHodoscope.cxx THcScintillatorPlane.cxx \ -THcHodoscopeHit.cxx \ +THcRawHodoHit.cxx \ THcDC.cxx THcDriftChamberPlane.cxx \ THcDriftChamber.cxx \ THcRawDCHit.cxx THcDCHit.cxx \