diff --git a/examples/PARAM/hcana.param b/examples/PARAM/hcana.param index 7b5579de585adb0ccd736c07a0a8e75f516899e9..f7cca3986e6a66e73a0a56b82dc662c93e576012 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 449ada242af8bcfaa9f61181c43aff0dfe55697c..590d756c3238a7c9af7d7ff8c1ddc7e7dd82bdfa 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 88079d79e2248bc3409306a05e6a4c2f2ff4c489..b2dddb9a6b82576837c62f73e9d8fb015f228d06 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