From 508d91b764b9e1c2c1c7e5a1b22654fa3cef14e7 Mon Sep 17 00:00:00 2001 From: Vardan Tadevosyan <tadevosn@jlab.org> Date: Thu, 19 Feb 2015 11:41:43 +0400 Subject: [PATCH] Separate constants for coordinate correction of the positive and negative side PMT signals from the HMS and SOS calorimeters. Changes in the Ycor method of the THcShower class, and in examples/PARAM/hcana.param input file. --- examples/PARAM/hcana.param | 4 ++-- src/THcShower.cxx | 12 ++++++------ src/THcShower.h | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/examples/PARAM/hcana.param b/examples/PARAM/hcana.param index 7b5579d..f7cca39 100644 --- a/examples/PARAM/hcana.param +++ b/examples/PARAM/hcana.param @@ -16,8 +16,8 @@ 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 +hcal_c_cor = 64.36, 64.36 # for positive and negative sides +hcal_d_cor = 1.66, 1.66 hcal_layer_names = "1pr 2ta 3ta 4ta" diff --git a/src/THcShower.cxx b/src/THcShower.cxx index 449ada2..590d756 100644 --- a/src/THcShower.cxx +++ b/src/THcShower.cxx @@ -214,8 +214,8 @@ Int_t THcShower::ReadDatabase( const TDatime& date ) DBRequest list[]={ {"cal_a_cor", &fAcor, kDouble}, {"cal_b_cor", &fBcor, kDouble}, - {"cal_c_cor", &fCcor, kDouble}, - {"cal_d_cor", &fDcor, kDouble}, + {"cal_c_cor", fCcor, kDouble, 2}, + {"cal_d_cor", fDcor, kDouble, 2}, {0} }; gHcParms->LoadParmValues((DBRequest*)&list, prefix); @@ -226,8 +226,8 @@ Int_t THcShower::ReadDatabase( const TDatime& date ) cout << " HMS Calorimeter coordinate correction constants:" << endl; cout << " fAcor = " << fAcor << endl; cout << " fBcor = " << fBcor << endl; - cout << " fCcor = " << fCcor << endl; - cout << " fDcor = " << fDcor << endl; + cout << " fCcor = " << fCcor[0] << ", " << fCcor[1] << endl; + cout << " fDcor = " << fDcor[0] << ", " << fDcor[1] << endl; } BlockThick = new Double_t [fNLayers]; @@ -950,8 +950,8 @@ Float_t THcShower::GetShEnergy(THaTrack* Track) { for (UInt_t ip=0; ip<fNLayers; ip++) { // Coordinate correction factors for positive and negative sides, - // different for single PMT counters in the 1-st two layes and for - // 2 PMT counters in the rear two layers. + // different for double PMT counters in the 1-st two layes and for + // single PMT counters in the rear two layers. Float_t corpos = 1.; Float_t corneg = 1.; if (ip < fNegCols) { diff --git a/src/THcShower.h b/src/THcShower.h index 88079d7..b2dddb9 100644 --- a/src/THcShower.h +++ b/src/THcShower.h @@ -215,7 +215,8 @@ public: return 0.; } Int_t sign = 1 - 2*side; - return (fCcor + sign*y)/(fCcor + sign*y/fDcor); + // return (fCcor + sign*y)/(fCcor + sign*y/fDcor); + return (fCcor[side] + sign*y)/(fCcor[side] + sign*y/fDcor[side]); } // Get total energy deposited in the cluster matched to the given @@ -282,8 +283,8 @@ protected: Double_t fAcor; // Coordinate correction constants Double_t fBcor; - Double_t fCcor; - Double_t fDcor; + Double_t fCcor[2]; // for positive ad negative side PMTs + Double_t fDcor[2]; THcShowerPlane** fPlanes; // [fNLayers] Shower Plane objects -- GitLab