Skip to content

Commit df02068

Browse files
committed
fix in time slewing object (too slow to be loaded)
1 parent e8b92d6 commit df02068

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

DataFormats/Detectors/TOF/include/DataFormatsTOF/CalibTimeSlewingParamTOF.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ class CalibTimeSlewingParamTOF
8787

8888
private:
8989
// TOF channel calibrations
90-
std::array<std::array<int, NCHANNELXSECTOR>, NSECTORS> mChannelStart; ///< array with the index of the first element of a channel in the time slewing vector (per sector)
91-
std::array<std::array<float, NCHANNELXSECTOR>, NSECTORS> mGlobalOffset; ///< array with the sigma of the peak
92-
std::array<std::vector<std::pair<unsigned short, short>>, NSECTORS> mTimeSlewing; ///< array of sector vectors; first element of the pair is TOT (in ps), second is t-texp_pi (in ps)
93-
std::array<std::array<float, NCHANNELXSECTOR>, NSECTORS> mFractionUnderPeak; ///< array with the fraction of entries below the peak
94-
std::array<std::array<float, NCHANNELXSECTOR>, NSECTORS> mSigmaPeak; ///< array with the sigma of the peak
90+
std::array<int, NCHANNELXSECTOR> mChannelStart[NSECTORS]; ///< array with the index of the first element of a channel in the time slewing vector (per sector)
91+
std::array<float, NCHANNELXSECTOR> mGlobalOffset[NSECTORS]; ///< array with the sigma of the peak
92+
std::vector<std::pair<unsigned short, short>> mTimeSlewing[NSECTORS]; ///< array of sector vectors; first element of the pair is TOT (in ps), second is t-texp_pi (in ps)
93+
std::array<float, NCHANNELXSECTOR> mFractionUnderPeak[NSECTORS]; ///< array with the fraction of entries below the peak
94+
std::array<float, NCHANNELXSECTOR> mSigmaPeak[NSECTORS]; ///< array with the sigma of the peak
9595

9696
ClassDefNV(CalibTimeSlewingParamTOF, 2); // class for TOF time slewing params
9797
};

Detectors/TOF/calibration/src/CalibTOFapi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ float CalibTOFapi::getTimeCalibration(int ich, float tot)
9999
LOG(WARNING) << "Either LHC phase or slewing object null: mLHCphase = " << mLHCphase << ", mSlewParam = " << mSlewParam;
100100
return corr;
101101
}
102+
// printf("LHC phase apply\n");
102103
// LHCphase
103104
corr += mLHCphase->getLHCphase(int(mTimeStamp / 1000)); // timestamp that we use in LHCPhase is in seconds, but for CCDB we need it in ms
104-
105105
// time slewing + channel offset
106106
//printf("eval time sleweing calibration: ch=%d tot=%f (lhc phase = %f)\n",ich,tot,corr);
107107
corr += mSlewParam->evalTimeSlewing(ich, tot);

Detectors/TOF/reconstruction/src/Clusterer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void Clusterer::calibrateStrip()
5454
dig->setBC(dig->getBC() - mBCOffset); // RS Don't use raw BC, always start from the beginning of the TF
5555
double calib = mCalibApi->getTimeCalibration(dig->getChannel(), dig->getTOT() * Geo::TOTBIN_NS);
5656
//printf("channel %d) isProblematic = %d, fractionUnderPeak = %f\n",dig->getChannel(),mCalibApi->isProblematic(dig->getChannel()),mCalibApi->getFractionUnderPeak(dig->getChannel())); // toberem
57-
dig->setIsProblematic(mCalibApi->isProblematic(dig->getChannel()));
57+
dig->setIsProblematic(0); // to be replaced with -> mCalibApi->isProblematic(dig->getChannel())
5858
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 :-)
5959
//printf("calibration correction = %f\n",calib); // toberem
6060
}

Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ class TOFDPLClustererTask
119119

120120
o2::tof::CalibTOFapi calibapi(long(0), &lhcPhaseObj, channelCalibObj.get());
121121

122+
calibapi.setURL("http://ccdb-test.cern.ch:8080");
123+
calibapi.setTimeStamp(0);
124+
calibapi.readTimeSlewingParam();
125+
122126
mClusterer.setCalibApi(&calibapi);
123127

124128
mClusterer.clearDiagnostic();

0 commit comments

Comments
 (0)