diff --git a/StRoot/StBTofCalibMaker/StBTofCalibMaker.cxx b/StRoot/StBTofCalibMaker/StBTofCalibMaker.cxx index 89df14c8741..60b8320895a 100644 --- a/StRoot/StBTofCalibMaker/StBTofCalibMaker.cxx +++ b/StRoot/StBTofCalibMaker/StBTofCalibMaker.cxx @@ -2843,9 +2843,9 @@ float StBTofCalibMaker::tofCellResolution(const Int_t itray, const Int_t iModule // mBTofRes::timeres_tof() reports in picoseconds float stop_resolution = mBTofRes->timeres_tof(itray, module, cell)/1000.; - float start_resolution(0); + float start_resolution = 0.0; if (mUseVpdStart) - double start_resolution = mVpdResConfig->singleTubeRes(mVPDHitPatternEast, mVPDHitPatternWest)/1000.; + start_resolution = mVpdResConfig->singleTGubeRes(mVPDHitPatternEast, mVPDHitPatternWest)/1000.; else start_resolution = mBTofRes->average_timeres_tof()/sqrt(mNTzero)/1000.; resolution = sqrt(stop_resolution*stop_resolution + start_resolution*start_resolution); diff --git a/StRoot/StBTofUtil/StVpdSimConfig.h b/StRoot/StBTofUtil/StVpdSimConfig.h index bcf0e700ff6..69d6ee0be95 100644 --- a/StRoot/StBTofUtil/StVpdSimConfig.h +++ b/StRoot/StBTofUtil/StVpdSimConfig.h @@ -29,9 +29,9 @@ class StVpdSimConfig : public StMaker { //! structure containing tube parameters struct SingleTubeParams{ float singleTubeRes; //!< Resolution of a particular Vpd tube in ps - int tubeId; //!< Tube Id (number) [0,37] with west Vpd [0,18] and east Vpd [19,37] - int tubeStatusFlag; //!< Status flag for whether tube was active (1) or inactive (0) - int tubeTriggerFlag; //!< Status flag for whether tube was triggered on (1) or not (0) + int tubeId, //!< Tube Id (number) [0,37] with west Vpd [0,18] and east Vpd [19,37] + tubeStatusFlag, //!< Status flag for whether tube was active (1) or inactive (0) + tubeTriggerFlag; //!< Status flag for whether tube was triggered on (1) or not (0) }; /** @@ -42,8 +42,9 @@ class StVpdSimConfig : public StMaker { * @return double vpd resolution. */ double singleTubeRes(UInt_t mVPDHitPatternEast, UInt_t mVPDHitPatternWest){ - double vpdResSumSqr(0.), vpdresolution(0.); - int total_vpd_hits = 0; //Total number of vpd tubes used. + double vpdResSumSqr(0.), + vpdresolution(0.); + int total_vpd_hits = 0; //Total number of vpd tubes used. for (int i=0; i<19; i++){ if (1 << i & mVPDHitPatternEast) { vpdResSumSqr += (mSimParams[i].singleTubeRes)*(mSimParams[i].singleTubeRes); @@ -54,7 +55,7 @@ class StVpdSimConfig : public StMaker { total_vpd_hits += 1; } } - vpdresolution = sqrt(vpdResSumSqr/total_vpd_hits); + vpdresolution = sqrt(vpdResSumSqr)/total_vpd_hits; return vpdresolution; }