diff --git a/DataFormats/Detectors/TOF/include/DataFormatsTOF/CalibTimeSlewingParamTOF.h b/DataFormats/Detectors/TOF/include/DataFormatsTOF/CalibTimeSlewingParamTOF.h index 19bef6436a181..85f3fade3417a 100644 --- a/DataFormats/Detectors/TOF/include/DataFormatsTOF/CalibTimeSlewingParamTOF.h +++ b/DataFormats/Detectors/TOF/include/DataFormatsTOF/CalibTimeSlewingParamTOF.h @@ -87,11 +87,11 @@ class CalibTimeSlewingParamTOF private: // TOF channel calibrations - std::array, NSECTORS> mChannelStart; ///< array with the index of the first element of a channel in the time slewing vector (per sector) - std::array, NSECTORS> mGlobalOffset; ///< array with the sigma of the peak - std::array>, NSECTORS> mTimeSlewing; ///< array of sector vectors; first element of the pair is TOT (in ps), second is t-texp_pi (in ps) - std::array, NSECTORS> mFractionUnderPeak; ///< array with the fraction of entries below the peak - std::array, NSECTORS> mSigmaPeak; ///< array with the sigma of the peak + std::array mChannelStart[NSECTORS]; ///< array with the index of the first element of a channel in the time slewing vector (per sector) + std::array mGlobalOffset[NSECTORS]; ///< array with the sigma of the peak + std::vector> mTimeSlewing[NSECTORS]; ///< array of sector vectors; first element of the pair is TOT (in ps), second is t-texp_pi (in ps) + std::array mFractionUnderPeak[NSECTORS]; ///< array with the fraction of entries below the peak + std::array mSigmaPeak[NSECTORS]; ///< array with the sigma of the peak ClassDefNV(CalibTimeSlewingParamTOF, 2); // class for TOF time slewing params }; diff --git a/Detectors/TOF/calibration/src/CalibTOFapi.cxx b/Detectors/TOF/calibration/src/CalibTOFapi.cxx index 36d02ee1ed555..e6f0689ca023c 100644 --- a/Detectors/TOF/calibration/src/CalibTOFapi.cxx +++ b/Detectors/TOF/calibration/src/CalibTOFapi.cxx @@ -99,9 +99,9 @@ float CalibTOFapi::getTimeCalibration(int ich, float tot) LOG(WARNING) << "Either LHC phase or slewing object null: mLHCphase = " << mLHCphase << ", mSlewParam = " << mSlewParam; return corr; } + // printf("LHC phase apply\n"); // LHCphase corr += mLHCphase->getLHCphase(int(mTimeStamp / 1000)); // timestamp that we use in LHCPhase is in seconds, but for CCDB we need it in ms - // time slewing + channel offset //printf("eval time sleweing calibration: ch=%d tot=%f (lhc phase = %f)\n",ich,tot,corr); corr += mSlewParam->evalTimeSlewing(ich, tot); diff --git a/Detectors/TOF/reconstruction/src/Clusterer.cxx b/Detectors/TOF/reconstruction/src/Clusterer.cxx index d359a8c87a5ca..83bba1db95541 100644 --- a/Detectors/TOF/reconstruction/src/Clusterer.cxx +++ b/Detectors/TOF/reconstruction/src/Clusterer.cxx @@ -54,7 +54,7 @@ void Clusterer::calibrateStrip() dig->setBC(dig->getBC() - mBCOffset); // RS Don't use raw BC, always start from the beginning of the TF double calib = mCalibApi->getTimeCalibration(dig->getChannel(), dig->getTOT() * Geo::TOTBIN_NS); //printf("channel %d) isProblematic = %d, fractionUnderPeak = %f\n",dig->getChannel(),mCalibApi->isProblematic(dig->getChannel()),mCalibApi->getFractionUnderPeak(dig->getChannel())); // toberem - dig->setIsProblematic(mCalibApi->isProblematic(dig->getChannel())); + dig->setIsProblematic(0); // to be replaced with -> mCalibApi->isProblematic(dig->getChannel()) dig->setCalibratedTime(dig->getTDC() * Geo::TDCBIN + dig->getBC() * o2::constants::lhc::LHCBunchSpacingNS * 1E3 - Geo::LATENCYWINDOW * 1E3 - calib); //TODO: to be checked that "-" is correct, and we did not need "+" instead :-) //printf("calibration correction = %f\n",calib); // toberem } diff --git a/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx b/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx index ae7ebfd68fc41..b0e68498d2712 100644 --- a/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx +++ b/Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx @@ -119,6 +119,10 @@ class TOFDPLClustererTask o2::tof::CalibTOFapi calibapi(long(0), &lhcPhaseObj, channelCalibObj.get()); + calibapi.setURL("http://ccdb-test.cern.ch:8080"); + calibapi.setTimeStamp(0); + calibapi.readTimeSlewingParam(); + mClusterer.setCalibApi(&calibapi); mClusterer.clearDiagnostic();