Skip to content

Commit d87ac18

Browse files
mfasDashahor02
authored andcommitted
[EMCAL-630] Store result of the raw fit as energy
As the range of the cell object is truncated and designed for storing energy values from 0 to 250 GeV the ADC counts must be converted to energy with the standard ADC to GeV conversion 1 ADC count = 16 MeV. Energy calibration will be done relative to this.
1 parent de3f16d commit d87ac18

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Detectors/EMCAL/workflow/src/RawToCellConverterSpec.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ void RawToCellConverterSpec::init(framework::InitContext& ctx)
6464
void RawToCellConverterSpec::run(framework::ProcessingContext& ctx)
6565
{
6666
LOG(DEBUG) << "[EMCALRawToCellConverter - run] called";
67+
const double CONVADCGEV = 0.016; // Conversion from ADC counts to energy: E = 16 MeV / ADC
6768

6869
// Cache cells from for bunch crossings as the component reads timeframes from many links consecutively
6970
std::map<o2::InteractionRecord, std::shared_ptr<std::vector<o2::emcal::Cell>>> cellBuffer; // Internal cell buffer
@@ -138,7 +139,7 @@ void RawToCellConverterSpec::run(framework::ProcessingContext& ctx)
138139
if (fitResults.getTime() < 0) {
139140
fitResults.setTime(0.);
140141
}
141-
currentCellContainer->emplace_back(CellID, amp, time, chantype);
142+
currentCellContainer->emplace_back(CellID, amp * CONVADCGEV, time, chantype);
142143
}
143144
}
144145
}

0 commit comments

Comments
 (0)