Skip to content

Commit

Permalink
[EMCAL-630] Fix assignment of energy and time
Browse files Browse the repository at this point in the history
- Energy must be protected only against negative energies
- Time from the raw fit also only protected against negative entries
- Cell converter needs to store amplitued and time from the
  raw fit results.
  • Loading branch information
mfasDa authored and shahor02 committed Jan 19, 2021
1 parent 54506d2 commit 9cc9887
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Detectors/EMCAL/workflow/src/RawToCellConverterSpec.cxx
Expand Up @@ -131,15 +131,14 @@ void RawToCellConverterSpec::run(framework::ProcessingContext& ctx)
int CellID = mGeometry->GetAbsCellIdFromCellIndexes(iSM, iRow, iCol);

// define the conatiner for the fit results, and perform the raw fitting using the stadnard raw fitter
double amp = 0., time = 0.;
o2::emcal::CaloFitResults fitResults = mRawFitter->evaluate(chan.getBunches(), 0, 0);
if (fitResults.getAmp() > 0) {
if (fitResults.getAmp() < 0) {
fitResults.setAmp(0.);
}
if (fitResults.getTime() < 0) {
fitResults.setTime(0.);
}
currentCellContainer->emplace_back(CellID, amp * CONVADCGEV, time, chantype);
currentCellContainer->emplace_back(CellID, fitResults.getAmp() * CONVADCGEV, fitResults.getTime(), chantype);
}
}
}
Expand Down

0 comments on commit 9cc9887

Please sign in to comment.