diff --git a/StRoot/StEventUtilities/StEbyET0.cxx b/StRoot/StEventUtilities/StEbyET0.cxx index b256b5f6f86..98d1c188da2 100644 --- a/StRoot/StEventUtilities/StEbyET0.cxx +++ b/StRoot/StEventUtilities/StEbyET0.cxx @@ -44,12 +44,13 @@ double StEbyET0::getTime(StEvent* event, int mode) { mRunId = event->runId(); mEventId = event->id(); + mTime = 0.; // default event time should always be zero, not correcting for some other global T0 // check for calibration mode + // fill tree without mTime subtracted if (mode == 1) fillTree(event); // determine event time - mTime = 0.; // default should always be zero, not correcting for some other global T0 double info[12]; St_EbyET0C* ebyeTable = St_EbyET0C::instance(); for (int row = 0; row < ebyeTable->GetNRows(); row++) { @@ -95,6 +96,10 @@ double StEbyET0::getTime(StEvent* event, int mode) { break; } + // check for QA mode + // fill tree with mTime added + if (mode == 2) fillTree(event); + return mTime; } //_____________________________________________________________________________ @@ -217,6 +222,9 @@ void StEbyET0::getTpcInfo(StEvent* event, double* info) { // because constant shifts aren't relavant for the EbyET0 calibration double time = coorS.position().z() / (StTpcDb::instance()->DriftVelocity()*1e-6); + // apply the EbyE T0 time correction (if it is already determined) + time += mTime; + if (innerRow) { if (tb < innerMaxTB && tb > innerMinTB) { // use only prompt hit candidates if (sector <= 12) {