diff --git a/examples/DBASE/test.database b/examples/DBASE/test.database index 577f1a66e1ecfb783d2e8d070499977634c70cd2..d4dae4a85cabfb629f2db613651b56e8804371cb 100644 --- a/examples/DBASE/test.database +++ b/examples/DBASE/test.database @@ -10,6 +10,11 @@ hpartmass = 0.13957 52949 g_ctp_parm_filename="PARAM/52949/general.param" g_decode_map_filename="MAPS/july04.map" +# From DBASE/online04.kinematics_online. +gpbeam = 1.2048 +hpcentral = 0.811 +htheta_lab = 55. +hpartmass = 0.00051099 47000-48000 g_ctp_parm_filename="PARAM/general.param" g_decode_map_filename="MAPS/jan03.map" diff --git a/examples/PARAM/52949/hcana.param b/examples/PARAM/52949/hcana.param deleted file mode 100644 index d49faaa41e6d7cb2de2eae66d474da35c8f4c7d1..0000000000000000000000000000000000000000 --- a/examples/PARAM/52949/hcana.param +++ /dev/null @@ -1,22 +0,0 @@ -; -; Parameters that were built into Fortran analyzer that we want -; to pass as parameters so that the resulting code can be more generic. -; - -hhodo_num_planes = 4 - -hcal_num_layers = 4 - -hcal_fv_delta = 5. - -haero_num_pairs = 8 - -# Names of planes so that parameter names can be constructed -hdc_plane_names = "1x1 1y1 1u1 1v1 1y2 1x2 2x1 2y1 2u1 2v1 2y2 2x2" - -hcal_layer_names = "1pr 2ta 3ta 4ta" - -hhodo_plane_names = "1x 1y 2x 2y" - -hpcentral=0.811 - diff --git a/examples/PARAM/52949/hcana.param b/examples/PARAM/52949/hcana.param new file mode 120000 index 0000000000000000000000000000000000000000..7fd888b6ebf1fb22416f5b98f23bbabf7f0d745c --- /dev/null +++ b/examples/PARAM/52949/hcana.param @@ -0,0 +1 @@ +../hcana.param \ No newline at end of file diff --git a/examples/PARAM/52949/hhodo.param.vt b/examples/PARAM/52949/hhodo.param.vt index 39dc74b856107ae518d7e4452fc3cc725488a9f6..bb261605b7f0960a872cd251401414aabd8462de 100644 --- a/examples/PARAM/52949/hhodo.param.vt +++ b/examples/PARAM/52949/hhodo.param.vt @@ -8,7 +8,7 @@ hscin_tdc_max = 4000 ; hscin_tdc_to_time scin tdc time per channel hscin_tdc_to_time = 0.0259 - new variable for picking good hits for tof fitting +; new variable for picking good hits for tof fitting ; this should not be set tight until you are ready to fit ; tof and you figured out good values htof_tolerance = 100.0 diff --git a/examples/PARAM/hcana.param b/examples/PARAM/hcana.param index e4c572f1d41d44d467c1eae590fed24e889eff05..1f9e393f0b67fed0ccc4079beadd84ae881bd61b 100644 --- a/examples/PARAM/hcana.param +++ b/examples/PARAM/hcana.param @@ -8,7 +8,13 @@ hhodo_num_planes = 4 hcal_num_layers = 4 # Exclusion band width for the calorimeter's fiducial volume. -hcal_fv_delta = 5.0 +hcal_fv_delta = 5. + +# Constants for the coordiante correction of the calorimeter energy depositions +hcal_a_cor = 200. +hcal_b_cor = 8000. +hcal_c_cor = 64.36 +hcal_d_cor = 1.66 haero_num_pairs = 8 diff --git a/examples/comphh.C b/examples/comphh.C new file mode 100644 index 0000000000000000000000000000000000000000..f8a2ba7ea2f006488abed6f8e6727955df7f9ecd --- /dev/null +++ b/examples/comphh.C @@ -0,0 +1,45 @@ +void comphh(Int_t run, TH1F* h1, TH1F* h2) +{ + TFile* f = new TFile(Form("hodtest_%d.root",run)); + cout << "hcana root file " << Form("hodtest_%d.root",run) << endl; + + TCanvas *c1 = new TCanvas("c1", "h1 vs h2", 1000, 667); + + // gPad->SetLogy(); + + h1->SetFillColor(kGreen); + h1->SetLineColor(kGreen); + h1->Draw(); + + h2->SetLineColor(kBlue); + h2->SetFillStyle(0); + h2->SetLineWidth(2); + h2->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,"h1"); + l.SetTextColor(kBlue); + l.DrawLatex(xt,0.75*maxy,"h2"); + + // Difference between the histograms. + + TCanvas *c2 = new TCanvas("c2", "Epr differences", 1000, 667); + + TH1F* dif = h2->Clone(); + + dif->Add(h2,h1,1.,-1.); + + dif->SetTitle("Difference"); + dif->SetFillColor(kRed); + dif->SetLineColor(kRed); + dif->SetLineWidth(1); + dif->SetFillStyle(1111); + dif->Draw(); +} diff --git a/examples/comptrackedepcor.C b/examples/comptrackedepcor.C new file mode 100644 index 0000000000000000000000000000000000000000..fbed4f46857d78ca64dadf18c96dc0b8d9e179a2 --- /dev/null +++ b/examples/comptrackedepcor.C @@ -0,0 +1,61 @@ +void comptrackedepcor(Int_t run) +{ + TFile* f = new TFile(Form("hodtest_%d.root",run)); + cout << "hcana root file " << Form("hodtest_%d.root",run) << endl; + TH1F* h = trecor; + + 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 = h422; //edep y corrected + } + + TCanvas *c1 = new TCanvas("c1", "Shower Track 1 Edep (Y-corr.)", 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("Edep cor. Difference"); + dif->SetFillColor(kRed); + dif->SetLineColor(kRed); + dif->SetLineWidth(1); + dif->SetFillStyle(1111); + dif->Draw(); +} diff --git a/examples/comptrackedepcor.pdf b/examples/comptrackedepcor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f4427ce7cc8645b21b58f50daf418ba81de981de Binary files /dev/null and b/examples/comptrackedepcor.pdf differ diff --git a/examples/comptrackeprcor.C b/examples/comptrackeprcor.C new file mode 100644 index 0000000000000000000000000000000000000000..099541edbd33b793f2a17803625f0f80f3afd59a --- /dev/null +++ b/examples/comptrackeprcor.C @@ -0,0 +1,61 @@ +void comptrackeprcor(Int_t run) +{ + TFile* f = new TFile(Form("hodtest_%d.root",run)); + cout << "hcana root file " << Form("hodtest_%d.root",run) << endl; + TH1F* h = treprcor; + + 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 = h423; //epr y corrected + } + + TCanvas *c1 = new TCanvas("c1", "Shower Track 1 Edep (Y-corr.)", 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("Epr cor. Difference"); + dif->SetFillColor(kRed); + dif->SetLineColor(kRed); + dif->SetLineWidth(1); + dif->SetFillStyle(1111); + dif->Draw(); +} diff --git a/examples/comptrackeprcor.pdf b/examples/comptrackeprcor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c08f6fdb0fec904e12a262ce6c2e196a533e5119 Binary files /dev/null and b/examples/comptrackeprcor.pdf differ diff --git a/examples/output_52949.def b/examples/output_52949.def index 283b044a4bcd26a8b73cd4b04ed259ef8c1ffbe9..22c1ef534728789c195675e84653b84b42c206a7 100644 --- a/examples/output_52949.def +++ b/examples/output_52949.def @@ -74,89 +74,98 @@ TH1F tre 'HMS Cal Track Clust. Edep' H.cal.tre 200 -0.1 1.622 H.dc.ntrack==1 # Preshower Energy of the cluster associated to the main (currently 1st) track TH1F trepr 'HMS PrSh Track Clust. Edep' H.cal.trepr 100 -0.1 0.811 H.dc.ntrack==1 -#Calorimeter ADC channels -TH1F hcaladc_A1p 'HMS Cal ADC A1p - PED' H.cal.1pr.apos_p[0] 150 50 500 -TH1F hcaladc_A2p 'HMS Cal ADC A2p - PED' H.cal.1pr.apos_p[1] 150 50 500 -TH1F hcaladc_A3p 'HMS Cal ADC A3p - PED' H.cal.1pr.apos_p[2] 150 50 500 -TH1F hcaladc_A4p 'HMS Cal ADC A4p - PED' H.cal.1pr.apos_p[3] 150 50 500 -TH1F hcaladc_A5p 'HMS Cal ADC A5p - PED' H.cal.1pr.apos_p[4] 150 50 500 -TH1F hcaladc_A6p 'HMS Cal ADC A6p - PED' H.cal.1pr.apos_p[5] 150 50 500 -TH1F hcaladc_A7p 'HMS Cal ADC A7p - PED' H.cal.1pr.apos_p[6] 150 50 500 -TH1F hcaladc_A8p 'HMS Cal ADC A8p - PED' H.cal.1pr.apos_p[7] 150 50 500 -TH1F hcaladc_A9p 'HMS Cal ADC A9p - PED' H.cal.1pr.apos_p[8] 150 50 500 -TH1F hcaladc_A10p 'HMS Cal ADC A10p - PED' H.cal.1pr.apos_p[9] 150 50 500 -TH1F hcaladc_A11p 'HMS Cal ADC A11p - PED' H.cal.1pr.apos_p[10] 150 50 500 -TH1F hcaladc_A12p 'HMS Cal ADC A12p - PED' H.cal.1pr.apos_p[11] 150 50 500 -TH1F hcaladc_A13p 'HMS Cal ADC A13p - PED' H.cal.1pr.apos_p[12] 150 50 500 -TH1F hcaladc_B1p 'HMS Cal ADC B1p - PED' H.cal.2ta.apos_p[0] 150 50 500 -TH1F hcaladc_B2p 'HMS Cal ADC B2p - PED' H.cal.2ta.apos_p[1] 150 50 500 -TH1F hcaladc_B3p 'HMS Cal ADC B3p - PED' H.cal.2ta.apos_p[2] 150 50 500 -TH1F hcaladc_B4p 'HMS Cal ADC B4p - PED' H.cal.2ta.apos_p[3] 150 50 500 -TH1F hcaladc_B5p 'HMS Cal ADC B5p - PED' H.cal.2ta.apos_p[4] 150 50 500 -TH1F hcaladc_B6p 'HMS Cal ADC B6p - PED' H.cal.2ta.apos_p[5] 150 50 500 -TH1F hcaladc_B7p 'HMS Cal ADC B7p - PED' H.cal.2ta.apos_p[6] 150 50 500 -TH1F hcaladc_B8p 'HMS Cal ADC B8p - PED' H.cal.2ta.apos_p[7] 150 50 500 -TH1F hcaladc_B9p 'HMS Cal ADC B9p - PED' H.cal.2ta.apos_p[8] 150 50 500 -TH1F hcaladc_B10p 'HMS Cal ADC B10p - PED' H.cal.2ta.apos_p[9] 150 50 500 -TH1F hcaladc_B11p 'HMS Cal ADC B11p - PED' H.cal.2ta.apos_p[10] 150 50 500 -TH1F hcaladc_B12p 'HMS Cal ADC B12p - PED' H.cal.2ta.apos_p[11] 150 50 500 -TH1F hcaladc_B13p 'HMS Cal ADC B13p - PED' H.cal.2ta.apos_p[12] 150 50 500 - -TH1F hcaladc_C1p 'HMS Cal ADC C1p - PED' H.cal.3ta.apos_p[0] 150 50 500 -TH1F hcaladc_C2p 'HMS Cal ADC C2p - PED' H.cal.3ta.apos_p[1] 150 50 500 -TH1F hcaladc_C3p 'HMS Cal ADC C3p - PED' H.cal.3ta.apos_p[2] 150 50 500 -TH1F hcaladc_C4p 'HMS Cal ADC C4p - PED' H.cal.3ta.apos_p[3] 150 50 500 -TH1F hcaladc_C5p 'HMS Cal ADC C5p - PED' H.cal.3ta.apos_p[4] 150 50 500 -TH1F hcaladc_C6p 'HMS Cal ADC C6p - PED' H.cal.3ta.apos_p[5] 150 50 500 -TH1F hcaladc_C7p 'HMS Cal ADC C7p - PED' H.cal.3ta.apos_p[6] 150 50 500 -TH1F hcaladc_C8p 'HMS Cal ADC C8p - PED' H.cal.3ta.apos_p[7] 150 50 500 -TH1F hcaladc_C9p 'HMS Cal ADC C9p - PED' H.cal.3ta.apos_p[8] 150 50 500 -TH1F hcaladc_C10p 'HMS Cal ADC C10p - PED' H.cal.3ta.apos_p[9] 150 50 500 -TH1F hcaladc_C11p 'HMS Cal ADC C11p - PED' H.cal.3ta.apos_p[10] 150 50 500 -TH1F hcaladc_C12p 'HMS Cal ADC C12p - PED' H.cal.3ta.apos_p[11] 150 50 500 -TH1F hcaladc_C13p 'HMS Cal ADC C13p - PED' H.cal.3ta.apos_p[12] 150 50 500 - -TH1F hcaladc_D1p 'HMS Cal ADC D1p - PED' H.cal.4ta.apos_p[0] 150 50 500 -TH1F hcaladc_D2p 'HMS Cal ADC D2p - PED' H.cal.4ta.apos_p[1] 150 50 500 -TH1F hcaladc_D3p 'HMS Cal ADC D3p - PED' H.cal.4ta.apos_p[2] 150 50 500 -TH1F hcaladc_D4p 'HMS Cal ADC D4p - PED' H.cal.4ta.apos_p[3] 150 50 500 -TH1F hcaladc_D5p 'HMS Cal ADC D5p - PED' H.cal.4ta.apos_p[4] 150 50 500 -TH1F hcaladc_D6p 'HMS Cal ADC D6p - PED' H.cal.4ta.apos_p[5] 150 50 500 -TH1F hcaladc_D7p 'HMS Cal ADC D7p - PED' H.cal.4ta.apos_p[6] 150 50 500 -TH1F hcaladc_D8p 'HMS Cal ADC D8p - PED' H.cal.4ta.apos_p[7] 150 50 500 -TH1F hcaladc_D9p 'HMS Cal ADC D9p - PED' H.cal.4ta.apos_p[8] 150 50 500 -TH1F hcaladc_D10p 'HMS Cal ADC D10p - PED' H.cal.4ta.apos_p[9] 150 50 500 -TH1F hcaladc_D11p 'HMS Cal ADC D11p - PED' H.cal.4ta.apos_p[10] 150 50 500 -TH1F hcaladc_D12p 'HMS Cal ADC D12p - PED' H.cal.4ta.apos_p[11] 150 50 500 -TH1F hcaladc_D13p 'HMS Cal ADC D13p - PED' H.cal.4ta.apos_p[12] 150 50 500 - -TH1F hcaladc_A1n 'HMS Cal ADC A1n - PED' H.cal.1pr.aneg_p[0] 150 50 500 -TH1F hcaladc_A2n 'HMS Cal ADC A2n - PED' H.cal.1pr.aneg_p[1] 150 50 500 -TH1F hcaladc_A3n 'HMS Cal ADC A3n - PED' H.cal.1pr.aneg_p[2] 150 50 500 -TH1F hcaladc_A4n 'HMS Cal ADC A4n - PED' H.cal.1pr.aneg_p[3] 150 50 500 -TH1F hcaladc_A5n 'HMS Cal ADC A5n - PED' H.cal.1pr.aneg_p[4] 150 50 500 -TH1F hcaladc_A6n 'HMS Cal ADC A6n - PED' H.cal.1pr.aneg_p[5] 150 50 500 -TH1F hcaladc_A7n 'HMS Cal ADC A7n - PED' H.cal.1pr.aneg_p[6] 150 50 500 -TH1F hcaladc_A8n 'HMS Cal ADC A8n - PED' H.cal.1pr.aneg_p[7] 150 50 500 -TH1F hcaladc_A9n 'HMS Cal ADC A9n - PED' H.cal.1pr.aneg_p[8] 150 50 500 -TH1F hcaladc_A10n 'HMS Cal ADC A10n - PED' H.cal.1pr.aneg_p[9] 150 50 500 -TH1F hcaladc_A11n 'HMS Cal ADC A11n - PED' H.cal.1pr.aneg_p[10] 150 50 500 -TH1F hcaladc_A12n 'HMS Cal ADC A12n - PED' H.cal.1pr.aneg_p[11] 150 50 500 -TH1F hcaladc_A13n 'HMS Cal ADC A13n - PED' H.cal.1pr.aneg_p[12] 150 50 500 - -TH1F hcaladc_B1n 'HMS Cal ADC B1n - PED' H.cal.2ta.aneg_p[0] 150 50 500 -TH1F hcaladc_B2n 'HMS Cal ADC B2n - PED' H.cal.2ta.aneg_p[1] 150 50 500 -TH1F hcaladc_B3n 'HMS Cal ADC B3n - PED' H.cal.2ta.aneg_p[2] 150 50 500 -TH1F hcaladc_B4n 'HMS Cal ADC B4n - PED' H.cal.2ta.aneg_p[3] 150 50 500 -TH1F hcaladc_B5n 'HMS Cal ADC B5n - PED' H.cal.2ta.aneg_p[4] 150 50 500 -TH1F hcaladc_B6n 'HMS Cal ADC B6n - PED' H.cal.2ta.aneg_p[5] 150 50 500 -TH1F hcaladc_B7n 'HMS Cal ADC B7n - PED' H.cal.2ta.aneg_p[6] 150 50 500 -TH1F hcaladc_B8n 'HMS Cal ADC B8n - PED' H.cal.2ta.aneg_p[7] 150 50 500 -TH1F hcaladc_B9n 'HMS Cal ADC B9n - PED' H.cal.2ta.aneg_p[8] 150 50 500 -TH1F hcaladc_B10n 'HMS Cal ADC B10n - PED' H.cal.2ta.aneg_p[9] 150 50 500 -TH1F hcaladc_B11n 'HMS Cal ADC B11n - PED' H.cal.2ta.aneg_p[10] 150 50 500 -TH1F hcaladc_B12n 'HMS Cal ADC B12n - PED' H.cal.2ta.aneg_p[11] 150 50 500 -TH1F hcaladc_B13n 'HMS Cal ADC B13n - PED' H.cal.2ta.aneg_p[12] 150 50 500 +# Coordinate corrected energy deposition from the main track (currently first) +TH1F trecor 'HMS Cal Track Edep' H.cal.trecor 200 -0.1 1.622 H.dc.ntrack==1 + +# Coordinate corrected preshower energy from the main track (currently first) +TH1F treprcor 'HMS PrSh Track Edep' H.cal.treprcor 100 -0.1 0.811 H.dc.ntrack==1 +# Coordinate corrected energy deposition from the main track (currently first) +# in the planes. Currently works for the 1-st pnae only. +TH1F treplcor 'HMS Cal Track E1' H.cal.treplcor 100 -0.1 0.811 H.dc.ntrack==1 + +# Calorimeter ADC channels +#TH1F hcaladc_A1p 'HMS Cal ADC A1p - PED' H.cal.1pr.apos_p[0] 150 50 500 +#TH1F hcaladc_A2p 'HMS Cal ADC A2p - PED' H.cal.1pr.apos_p[1] 150 50 500 +#TH1F hcaladc_A3p 'HMS Cal ADC A3p - PED' H.cal.1pr.apos_p[2] 150 50 500 +#TH1F hcaladc_A4p 'HMS Cal ADC A4p - PED' H.cal.1pr.apos_p[3] 150 50 500 +#TH1F hcaladc_A5p 'HMS Cal ADC A5p - PED' H.cal.1pr.apos_p[4] 150 50 500 +#TH1F hcaladc_A6p 'HMS Cal ADC A6p - PED' H.cal.1pr.apos_p[5] 150 50 500 +#TH1F hcaladc_A7p 'HMS Cal ADC A7p - PED' H.cal.1pr.apos_p[6] 150 50 500 +#TH1F hcaladc_A8p 'HMS Cal ADC A8p - PED' H.cal.1pr.apos_p[7] 150 50 500 +#TH1F hcaladc_A9p 'HMS Cal ADC A9p - PED' H.cal.1pr.apos_p[8] 150 50 500 +#TH1F hcaladc_A10p 'HMS Cal ADC A10p - PED' H.cal.1pr.apos_p[9] 150 50 500 +#TH1F hcaladc_A11p 'HMS Cal ADC A11p - PED' H.cal.1pr.apos_p[10] 150 50 500 +#TH1F hcaladc_A12p 'HMS Cal ADC A12p - PED' H.cal.1pr.apos_p[11] 150 50 500 +#TH1F hcaladc_A13p 'HMS Cal ADC A13p - PED' H.cal.1pr.apos_p[12] 150 50 500 +#TH1F hcaladc_B1p 'HMS Cal ADC B1p - PED' H.cal.2ta.apos_p[0] 150 50 500 +#TH1F hcaladc_B2p 'HMS Cal ADC B2p - PED' H.cal.2ta.apos_p[1] 150 50 500 +#TH1F hcaladc_B3p 'HMS Cal ADC B3p - PED' H.cal.2ta.apos_p[2] 150 50 500 +#TH1F hcaladc_B4p 'HMS Cal ADC B4p - PED' H.cal.2ta.apos_p[3] 150 50 500 +#TH1F hcaladc_B5p 'HMS Cal ADC B5p - PED' H.cal.2ta.apos_p[4] 150 50 500 +#TH1F hcaladc_B6p 'HMS Cal ADC B6p - PED' H.cal.2ta.apos_p[5] 150 50 500 +#TH1F hcaladc_B7p 'HMS Cal ADC B7p - PED' H.cal.2ta.apos_p[6] 150 50 500 +#TH1F hcaladc_B8p 'HMS Cal ADC B8p - PED' H.cal.2ta.apos_p[7] 150 50 500 +#TH1F hcaladc_B9p 'HMS Cal ADC B9p - PED' H.cal.2ta.apos_p[8] 150 50 500 +#TH1F hcaladc_B10p 'HMS Cal ADC B10p - PED' H.cal.2ta.apos_p[9] 150 50 500 +#TH1F hcaladc_B11p 'HMS Cal ADC B11p - PED' H.cal.2ta.apos_p[10] 150 50 500 +#TH1F hcaladc_B12p 'HMS Cal ADC B12p - PED' H.cal.2ta.apos_p[11] 150 50 500 +#TH1F hcaladc_B13p 'HMS Cal ADC B13p - PED' H.cal.2ta.apos_p[12] 150 50 500 + +#TH1F hcaladc_C1p 'HMS Cal ADC C1p - PED' H.cal.3ta.apos_p[0] 150 50 500 +#TH1F hcaladc_C2p 'HMS Cal ADC C2p - PED' H.cal.3ta.apos_p[1] 150 50 500 +#TH1F hcaladc_C3p 'HMS Cal ADC C3p - PED' H.cal.3ta.apos_p[2] 150 50 500 +#TH1F hcaladc_C4p 'HMS Cal ADC C4p - PED' H.cal.3ta.apos_p[3] 150 50 500 +#TH1F hcaladc_C5p 'HMS Cal ADC C5p - PED' H.cal.3ta.apos_p[4] 150 50 500 +#TH1F hcaladc_C6p 'HMS Cal ADC C6p - PED' H.cal.3ta.apos_p[5] 150 50 500 +#TH1F hcaladc_C7p 'HMS Cal ADC C7p - PED' H.cal.3ta.apos_p[6] 150 50 500 +#TH1F hcaladc_C8p 'HMS Cal ADC C8p - PED' H.cal.3ta.apos_p[7] 150 50 500 +#TH1F hcaladc_C9p 'HMS Cal ADC C9p - PED' H.cal.3ta.apos_p[8] 150 50 500 +#TH1F hcaladc_C10p 'HMS Cal ADC C10p - PED' H.cal.3ta.apos_p[9] 150 50 500 +#TH1F hcaladc_C11p 'HMS Cal ADC C11p - PED' H.cal.3ta.apos_p[10] 150 50 500 +#TH1F hcaladc_C12p 'HMS Cal ADC C12p - PED' H.cal.3ta.apos_p[11] 150 50 500 +#TH1F hcaladc_C13p 'HMS Cal ADC C13p - PED' H.cal.3ta.apos_p[12] 150 50 500 + +#TH1F hcaladc_D1p 'HMS Cal ADC D1p - PED' H.cal.4ta.apos_p[0] 150 50 500 +#TH1F hcaladc_D2p 'HMS Cal ADC D2p - PED' H.cal.4ta.apos_p[1] 150 50 500 +#TH1F hcaladc_D3p 'HMS Cal ADC D3p - PED' H.cal.4ta.apos_p[2] 150 50 500 +#TH1F hcaladc_D4p 'HMS Cal ADC D4p - PED' H.cal.4ta.apos_p[3] 150 50 500 +#TH1F hcaladc_D5p 'HMS Cal ADC D5p - PED' H.cal.4ta.apos_p[4] 150 50 500 +#TH1F hcaladc_D6p 'HMS Cal ADC D6p - PED' H.cal.4ta.apos_p[5] 150 50 500 +#TH1F hcaladc_D7p 'HMS Cal ADC D7p - PED' H.cal.4ta.apos_p[6] 150 50 500 +#TH1F hcaladc_D8p 'HMS Cal ADC D8p - PED' H.cal.4ta.apos_p[7] 150 50 500 +#TH1F hcaladc_D9p 'HMS Cal ADC D9p - PED' H.cal.4ta.apos_p[8] 150 50 500 +#TH1F hcaladc_D10p 'HMS Cal ADC D10p - PED' H.cal.4ta.apos_p[9] 150 50 500 +#TH1F hcaladc_D11p 'HMS Cal ADC D11p - PED' H.cal.4ta.apos_p[10] 150 50 500 +#TH1F hcaladc_D12p 'HMS Cal ADC D12p - PED' H.cal.4ta.apos_p[11] 150 50 500 +#TH1F hcaladc_D13p 'HMS Cal ADC D13p - PED' H.cal.4ta.apos_p[12] 150 50 500 + +#TH1F hcaladc_A1n 'HMS Cal ADC A1n - PED' H.cal.1pr.aneg_p[0] 150 50 500 +#TH1F hcaladc_A2n 'HMS Cal ADC A2n - PED' H.cal.1pr.aneg_p[1] 150 50 500 +#TH1F hcaladc_A3n 'HMS Cal ADC A3n - PED' H.cal.1pr.aneg_p[2] 150 50 500 +#TH1F hcaladc_A4n 'HMS Cal ADC A4n - PED' H.cal.1pr.aneg_p[3] 150 50 500 +#TH1F hcaladc_A5n 'HMS Cal ADC A5n - PED' H.cal.1pr.aneg_p[4] 150 50 500 +#TH1F hcaladc_A6n 'HMS Cal ADC A6n - PED' H.cal.1pr.aneg_p[5] 150 50 500 +#TH1F hcaladc_A7n 'HMS Cal ADC A7n - PED' H.cal.1pr.aneg_p[6] 150 50 500 +#TH1F hcaladc_A8n 'HMS Cal ADC A8n - PED' H.cal.1pr.aneg_p[7] 150 50 500 +#TH1F hcaladc_A9n 'HMS Cal ADC A9n - PED' H.cal.1pr.aneg_p[8] 150 50 500 +#TH1F hcaladc_A10n 'HMS Cal ADC A10n - PED' H.cal.1pr.aneg_p[9] 150 50 500 +#TH1F hcaladc_A11n 'HMS Cal ADC A11n - PED' H.cal.1pr.aneg_p[10] 150 50 500 +#TH1F hcaladc_A12n 'HMS Cal ADC A12n - PED' H.cal.1pr.aneg_p[11] 150 50 500 +#TH1F hcaladc_A13n 'HMS Cal ADC A13n - PED' H.cal.1pr.aneg_p[12] 150 50 500 + +#TH1F hcaladc_B1n 'HMS Cal ADC B1n - PED' H.cal.2ta.aneg_p[0] 150 50 500 +#TH1F hcaladc_B2n 'HMS Cal ADC B2n - PED' H.cal.2ta.aneg_p[1] 150 50 500 +#TH1F hcaladc_B3n 'HMS Cal ADC B3n - PED' H.cal.2ta.aneg_p[2] 150 50 500 +#TH1F hcaladc_B4n 'HMS Cal ADC B4n - PED' H.cal.2ta.aneg_p[3] 150 50 500 +#TH1F hcaladc_B5n 'HMS Cal ADC B5n - PED' H.cal.2ta.aneg_p[4] 150 50 500 +#TH1F hcaladc_B6n 'HMS Cal ADC B6n - PED' H.cal.2ta.aneg_p[5] 150 50 500 +#TH1F hcaladc_B7n 'HMS Cal ADC B7n - PED' H.cal.2ta.aneg_p[6] 150 50 500 +#TH1F hcaladc_B8n 'HMS Cal ADC B8n - PED' H.cal.2ta.aneg_p[7] 150 50 500 +#TH1F hcaladc_B9n 'HMS Cal ADC B9n - PED' H.cal.2ta.aneg_p[8] 150 50 500 +#TH1F hcaladc_B10n 'HMS Cal ADC B10n - PED' H.cal.2ta.aneg_p[9] 150 50 500 +#TH1F hcaladc_B11n 'HMS Cal ADC B11n - PED' H.cal.2ta.aneg_p[10] 150 50 500 +#TH1F hcaladc_B12n 'HMS Cal ADC B12n - PED' H.cal.2ta.aneg_p[11] 150 50 500 +#TH1F hcaladc_B13n 'HMS Cal ADC B13n - PED' H.cal.2ta.aneg_p[12] 150 50 500 # Can we use variables for the constants. In CTP we used hdc_nwire(i) # diff --git a/src/THcShower.cxx b/src/THcShower.cxx index 5dec1873d82efd31b45e5edd37b2188b58d6a09b..167807d0d7cc0591afe463192b1830401cd1b39b 100644 --- a/src/THcShower.cxx +++ b/src/THcShower.cxx @@ -187,6 +187,23 @@ Int_t THcShower::ReadDatabase( const TDatime& date ) cout << "Cluster debug flag = " << fdbg_clusters_cal << endl; cout << "Tracking debug flag = " << fdbg_tracks_cal << endl; + { + DBRequest list[]={ + {"cal_a_cor", &fAcor, kDouble}, + {"cal_b_cor", &fBcor, kDouble}, + {"cal_c_cor", &fCcor, kDouble}, + {"cal_d_cor", &fDcor, kDouble}, + {0} + }; + gHcParms->LoadParmValues((DBRequest*)&list, prefix); + } + + cout << "HMS Calorimeter coordinate correction constants:" << endl; + cout << " fAcor = " << fAcor << endl; + cout << " fBcor = " << fBcor << endl; + cout << " fCcor = " << fCcor << endl; + cout << " fDcor = " << fDcor << endl; + BlockThick = new Double_t [fNLayers]; fNBlocks = new Int_t [fNLayers]; fNLayerZPos = new Double_t [fNLayers]; @@ -393,6 +410,12 @@ Int_t THcShower::ReadDatabase( const TDatime& date ) cout << endl; }; + // Corrdiante corrected track energies per plane + + fTREpl_cor = new Double_t [fNLayers]; + fTREpl_pos_cor = new Double_t [fNLayers]; + fTREpl_neg_cor = new Double_t [fNLayers]; + // Origin of the calorimeter, at tha middle of the face of the detector, // or at the middle of the front plane of the 1-st layer. // @@ -445,8 +468,8 @@ Int_t THcShower::DefineVariables( EMode mode ) // { "asum_p", "Sum of ped-subtracted ADCs", "fAsum_p" }, // { "asum_c", "Sum of calibrated ADCs", "fAsum_c" }, { "nclust", "Number of clusters", "fNclust" }, - { "emax", "Energy (MeV) of largest cluster", "fE" }, - { "eprmax", "Preshower Energy (MeV) of largest cluster", "fEpr" }, + { "emax", "Energy of largest cluster", "fE" }, + { "eprmax", "Preshower Energy of largest cluster", "fEpr" }, { "xmax", "x-position (cm) of largest cluster", "fX" }, // { "z", "z-position (cm) of largest cluster", "fZ" }, { "mult", "Multiplicity of largest cluster", "fMult" }, @@ -456,10 +479,28 @@ Int_t THcShower::DefineVariables( EMode mode ) { "try", "track y-position in det plane (1st track)", "fTRY" }, { "tre", "track energy in the calorimeter (1st track)", "fTRE" }, { "trepr", "track energy in the preshower (1st track)", "fTREpr" }, + { "trecor", "Y-corrected track Edep (1st track)", "fTRE_cor" }, + { "treprcor", "Y-corrected track Epr (1st track)", "fTREpr_cor" }, + { "treplcor", "Y-corrected track Edep for planes", "fTREpl_cor" }, { 0 } }; return DefineVarsFromList( vars, mode ); + /* + for (Int_t i=0; i<fNLayers; i++) { + RVarDef vars[] = { + { Form("treplcor%d",i+1), + Form("Y-corrected track Edep for plane %d",i+1), + Form("fTREpl_cor[%d]",i) }, + { 0 } + }; + return DefineVarsFromList( vars, mode ); + }; + */ + + //{ "treplposcor","Y-corrected track pos. Edep per plane", "fTREpl_pos_cor"}, + //{ "treplnegcor","Y-corrected track neg. Edep per plane", "fTREpl_neg_cor"}, + return kOK; } @@ -513,8 +554,15 @@ void THcShower::Clear(Option_t* opt) fX = -75.; //out of acceptance fTRX = -75.; //out of acceptance fTRY = -40.; //out of acceptance - fTRE = -1.; - fTREpr = -1.; + fTRE = -0.; + fTREpr = -0.; + fTRE_cor = -0.; + fTREpr_cor = -0.; + for(Int_t ip=0;ip<fNLayers;ip++) { + fTREpl_cor[ip] = -0.; + fTREpl_pos_cor[ip] = -0.; + fTREpl_neg_cor[ip] = -0.; + } } //_____________________________________________________________________________ @@ -623,9 +671,11 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) fPlanes[j]->GetAneg(i) - fPlanes[j]->GetNegPed(i) > fPlanes[j]->GetNegThr(i) - fPlanes[j]->GetNegPed(i)) { //hit Double_t Edep = fPlanes[j]->GetEmean(i); + Double_t Epos = fPlanes[j]->GetEpos(i); + Double_t Eneg = fPlanes[j]->GetEneg(i); Double_t x = XPos[j][i] + BlockThick[j]/2.; //top + thick/2 Double_t z = fNLayerZPos[j] + BlockThick[j]/2.; //front + thick/2 - THcShowerHit* hit = new THcShowerHit(i,j,x,z,Edep); + THcShowerHit* hit = new THcShowerHit(i,j,x,z,Edep,Epos,Eneg); HitList.push_back(hit); @@ -656,7 +706,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) //Print out the cluster list. // - fNclust = (*ClusterList).NbClusters(); + if (fdbg_clusters_cal) cout << "Cluster_list size: " << fNclust << endl; for (Int_t i=0; i!=fNclust; i++) { @@ -719,12 +769,12 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) cout << "Number of reconstructed tracks = " << Ntracks << endl; } - for (Int_t i=0; i<Ntracks; i++) { + for (Int_t itrk=0; itrk<Ntracks; itrk++) { - THaTrack* theTrack = static_cast<THaTrack*>( tracks[i] ); + THaTrack* theTrack = static_cast<THaTrack*>( tracks[itrk] ); if (fdbg_tracks_cal) { - cout << " Track " << i << ": " + cout << " Track " << itrk << ": " << " X = " << theTrack->GetX() << " Y = " << theTrack->GetY() << " Theta = " << theTrack->GetTheta() @@ -732,22 +782,67 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) << endl; } - Double_t Xtr; - Double_t Ytr; + Double_t Xtr = -75.; + Double_t Ytr = -40.; Int_t mclust = MatchCluster(theTrack, ClusterList, Xtr, Ytr); - if (i==0) { + if (itrk==0) { + fTRX = Xtr; fTRY = Ytr; + if (mclust >= 0) { + THcShowerCluster* cluster = (*ClusterList).ListedCluster(mclust); fTRE = (*cluster).clE(); fTREpr = (*cluster).clEpr(); - } - } - } + fTRE_cor = 0.; + + for (Int_t ip=0; ip<fNLayers; ip++) { + + Float_t corpos = 1.; + Float_t corneg = 1.; + if (ip < fNegCols) { + corpos = Ycor(Ytr,0); + corneg = Ycor(Ytr,1); + } + else { + corpos = Ycor(Ytr); + corneg = 0.; + } + + if (fdbg_tracks_cal) { + cout << " Plane " << ip << " Ytr = " << Ytr + << " corpos = " << corpos + << " corneg = " << corneg << endl; + } + + fTREpl_pos_cor[ip] = (*cluster).clEplane(ip,0) * corpos; + fTREpl_neg_cor[ip] = (*cluster).clEplane(ip,1) * corneg;; + fTREpl_cor[ip] = fTREpl_pos_cor[ip] + fTREpl_neg_cor[ip]; + + if (fdbg_tracks_cal) { + cout << " fTREpl_pos_cor = " << fTREpl_pos_cor[ip] + << " fTREpl_neg_cor = " << fTREpl_neg_cor[ip] << endl; + } + + fTRE_cor += fTREpl_cor[ip]; + + } //over planes + + fTREpr_cor = fTREpl_cor[0]; + + if (fdbg_tracks_cal) + cout << " fTREpr = " << fTREpr + << " fTREpr_cor = " << fTREpr_cor << endl; + + } //mclust>=0 + + } //itrk==0 + + } //over tracks if (fdbg_tracks_cal) cout << "1st track cluster: fTRX = " << fTRX << " fTRY = " << fTRY diff --git a/src/THcShower.h b/src/THcShower.h index 04a05797d6377f0b5dfe7bc1e4d2840fc98f0b48..0452731cee3a76e65b4c7bf2034b8719b06b0164 100644 --- a/src/THcShower.h +++ b/src/THcShower.h @@ -12,6 +12,7 @@ #include "THcHitList.h" #include "THcShowerPlane.h" #include "THcShowerCluster.h" +#include "TMath.h" class THaScCalib; @@ -84,6 +85,31 @@ public: return fMult; } + Int_t GetNLayers() { + return fNLayers; + } + + //Coordinate correction for single PMT modules. + //PMT attached at right (negative) side. + + Float_t Ycor(Double_t y) { + return TMath::Exp(y/fAcor)/(1. + y*y/fBcor); + // return TMath::Exp(-y/fAcor)/(1. + y*y/fBcor); + } + + //Coordinate correction for double PMT modules. + // + + Float_t Ycor(Double_t y, Int_t side) { + if (side!=0&&side!=1) { + cout << "THcShower::Ycor : wrong side " << side << endl; + return 0.; + } + Int_t sign = 1 - 2*side; + // Int_t sign = 2*side - 1; + return (fCcor + sign*y)/(fCcor + sign*y/fDcor); + } + THcShower(); // for ROOT I/O protected: @@ -102,8 +128,8 @@ protected: Int_t fNhits; // Total number of hits Int_t fNclust; // Number of clusters - Double_t fE; // Energy (MeV) of the largest cluster - Double_t fEpr; // Preshower Energy (MeV) of the largest cluster + Double_t fE; // Energy of the largest cluster + Double_t fEpr; // Preshower Energy of the largest cluster Double_t fX; // x-position (cm) of the largest cluster Double_t fZ; // z-position (cm) of the largest cluster Int_t fMult; // # of hits in the largest cluster @@ -111,8 +137,13 @@ protected: // Double_t* fEblk; // Energies of blocks in main cluster Double_t fTRX; // track x-position in det plane (1st track) Double_t fTRY; // track y-position in det plane (1st track) - Double_t fTRE; // Energy (MeV) of the cluster associated to track - Double_t fTREpr; // Preshower Energy (MeV) of the track's cluster + Double_t fTRE; // Energy of the cluster associated to track + Double_t fTREpr; // Preshower Energy of the track's cluster + Double_t fTRE_cor; // Y-corrected track total energy + Double_t fTREpr_cor; // Y-corrected track Preshower energy + Double_t* fTREpl_cor; // Y-corrected track energy per plane + Double_t* fTREpl_pos_cor; // Y-corrected track positive energy per plane + Double_t* fTREpl_neg_cor; // Y-corrected track negative energy per plane // Potential Hall C parameters. Mostly here for demonstration @@ -141,6 +172,11 @@ protected: Int_t fdbg_clusters_cal; Int_t fdbg_tracks_cal; + Double_t fAcor; // Coordinate correction constants + Double_t fBcor; + Double_t fCcor; + Double_t fDcor; + THcShowerPlane** fPlanes; // [fNLayers] Shower Plane objects TClonesArray* fTrackProj; // projection of track onto plane @@ -152,11 +188,14 @@ protected: void Setup(const char* name, const char* description); + // cluster to track association method. + Int_t MatchCluster(THaTrack*, THcShowerClusterList*, Double_t&, Double_t&); - friend class THcShowerPlane; + friend class THcShowerPlane; //to access debug flags. + // friend class THcShowerCluster; //to access fNLayers - ClassDef(THcShower,0) // Generic class + ClassDef(THcShower,0) // Generic class }; /////////////////////////////////////////////////////////////////////////////// diff --git a/src/THcShowerCluster.h b/src/THcShowerCluster.h index 6516a4092c6f88a075ae86d6c573e45acad743da..5705abbf024b602660f1ddeea88d81fec664cea5 100644 --- a/src/THcShowerCluster.h +++ b/src/THcShowerCluster.h @@ -3,6 +3,7 @@ //HMS calorimeter hit cluster, version 3. +//#include "THcShower.h" #include "THcShowerHit.h" //HMS calorimeter hit cluster @@ -87,17 +88,54 @@ class THcShowerCluster : THcShowerHitList { return Etot; } - //Energy deposition in the Preshower (1st layer) for a cluster + //Energy deposition in the Preshower (1st plane) for a cluster // Double_t clEpr() { Double_t Epr=0.; for (THcShowerHitIt it=THcShowerHitList::begin(); it!=THcShowerHitList::end(); it++) { - if ((*it)->hitColumn() == 0) Epr += (*it)->hitE(); + if ((*it)->hitColumn() == 0) { + Epr += (*it)->hitE(); + } } return Epr; } + //Cluster energy deposition in plane iplane=0,..,3. + // side=0 -- from positive PMTs only + // side=1 -- from negative PMTs only + // side=2 -- from postive and negative PMTs + // + + Double_t clEplane(Int_t iplane, Int_t side) { + + if (side!=0&&side!=1&&side!=2) { + cout << "*** Wrong Side in clEplane:" << side << " ***" << endl; + return -1; + } + + Double_t Eplane=0.; + for (THcShowerHitIt it=THcShowerHitList::begin(); + it!=THcShowerHitList::end(); it++) { + + if ((*it)->hitColumn() == iplane) + + switch (side) { + case 0 : Eplane += (*it)->hitEpos(); + break; + case 1 : Eplane += (*it)->hitEneg(); + break; + case 2 : Eplane += (*it)->hitE(); + break; + default : ; + } + + } + + return Eplane; + } + + //Cluster size (number of hits in the cluster). // UInt_t clSize() { diff --git a/src/THcShowerHit.h b/src/THcShowerHit.h index 7d31b060593683f807042eb2bd09ff0775927181..76f70d9082a2242b711907353d440082ce114e49 100644 --- a/src/THcShowerHit.h +++ b/src/THcShowerHit.h @@ -14,7 +14,9 @@ class THcShowerHit { //HMS calorimeter hit class private: UInt_t fCol, fRow; //hit colomn and row Double_t fX, fZ; //hit X (vert.) and Z (along spect.axis) coordinates - Double_t fE; //hit energy deposition + Double_t fE; //hit mean energy deposition + Double_t fEpos; //hit energy deposition from positive PMT + Double_t fEneg; //hit energy deposition from negative PMT public: @@ -22,15 +24,19 @@ public: fCol=fRow=0; fX=fZ=0.; fE=0.; + fEpos=0.; + fEneg=0.; } THcShowerHit(UInt_t hRow, UInt_t hCol, Double_t hX, Double_t hZ, - Double_t hE) { + Double_t hE, Double_t hEpos, Double_t hEneg) { fRow=hRow; fCol=hCol; fX=hX; fZ=hZ; fE=hE; + fEpos=hEpos; + fEneg=hEneg; } ~THcShowerHit() { @@ -57,6 +63,14 @@ public: return fE; } + Double_t hitEpos() { + return fEpos; + } + + Double_t hitEneg() { + return fEneg; + } + // Decide if a hit is neighbouring the current hit. // Two hits are neighbours if share a side or a corner. // @@ -69,8 +83,9 @@ public: //Print out hit information // void show() { - cout << "row=" << fRow << " column=" << fCol << - " x=" << fX << " z=" << fZ << " E=" << fE << endl; + cout << "row=" << fRow << " column=" << fCol + << " x=" << fX << " z=" << fZ + << " E=" << fE << " Epos=" << fEpos << " Eneg=" << fEneg << endl; } }; diff --git a/src/THcShowerPlane.cxx b/src/THcShowerPlane.cxx index edafce1319d3be9132c90a425e770bd996f3713a..bdca666c4e1d3478dbc6af4551430f6c56c217a9 100644 --- a/src/THcShowerPlane.cxx +++ b/src/THcShowerPlane.cxx @@ -207,8 +207,10 @@ Int_t THcShowerPlane::DefineVariables( EMode mode ) {"aneg_p", "Ped-subtracted Negative ADC Amplitudes", "fA_Neg_p"}, {"epos", "Energy Depositions from Positive Side PMTs", "fEpos"}, {"eneg", "Energy Depositions from Negative Side PMTs", "fEneg"}, - {"emean", "Mean Energy Depositions", "fEMean"}, + {"emean", "Mean Energy Depositions", "fEmean"}, {"eplane", "Energy Deposition per plane", "fEplane"}, + {"eplane_pos", "Energy Deposition per plane from pos. PMTs","fEplane_pos"}, + {"eplane_neg", "Energy Deposition per plane from neg. PMTs","fEplane_neg"}, { 0 } }; @@ -296,6 +298,8 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) } fEplane = 0; + fEplane_pos = 0; + fEplane_neg = 0; Int_t nrawhits = rawhits->GetLast()+1; @@ -348,6 +352,8 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) fEmean[hit->fCounter-1] += (fEpos[hit->fCounter-1] + fEneg[hit->fCounter-1]); fEplane += fEmean[hit->fCounter-1]; + fEplane_pos += fEpos[hit->fCounter-1]; + fEplane_neg += fEneg[hit->fCounter-1]; ihit++; } diff --git a/src/THcShowerPlane.h b/src/THcShowerPlane.h index eb684108c7cea8c8f05ac04d2f86042b57715016..8b4de6f8e83fc478b16d116bf85ff1f1011033f4 100644 --- a/src/THcShowerPlane.h +++ b/src/THcShowerPlane.h @@ -54,10 +54,26 @@ public: return fEplane; }; + Double_t GetEplane_pos() { + return fEplane_pos; + }; + + Double_t GetEplane_neg() { + return fEplane_neg; + }; + Double_t GetEmean(Int_t i) { return fEmean[i]; }; + Double_t GetEpos(Int_t i) { + return fEpos[i]; + }; + + Double_t GetEneg(Int_t i) { + return fEneg[i]; + }; + Double_t GetAposP(Int_t i) { return fA_Pos_p[i]; }; @@ -101,6 +117,9 @@ protected: Double_t* fEneg; // [fNelem] energy depositions seen by negative PMTs Double_t* fEmean; // [fNelem] mean energy depositions (pos + neg) Double_t fEplane; // Energy deposition in the plane + Double_t fEplane_pos; // Energy deposition in the plane from positive PMTs + Double_t fEplane_neg; // Energy deposition in the plane from negative PMTs + TClonesArray* fPosADCHits; // List of positive ADC hits TClonesArray* fNegADCHits; // List of negative ADC hits