Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Chip
/// reset points container
o2::iotof::LabeledDigit* findDigit(ULong64_t key);

void addDigit(UShort_t row, UShort_t col, Int_t charge, double time);
void addDigit(UShort_t row, UShort_t col, Int_t charge, double time, o2::MCCompLabel label);

protected:
Int_t mChipIndex = -1; ///< Chip ID
Expand Down
4 changes: 2 additions & 2 deletions Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Chip.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Chip::Chip(Int_t index)
{
}
//_______________________________________________________________________
void Chip::addDigit(UShort_t row, UShort_t col, Int_t charge, double time)
void Chip::addDigit(UShort_t row, UShort_t col, Int_t charge, double time, o2::MCCompLabel label)
{
ULong64_t key = Digit::getOrderingKey(mChipIndex, row, col);
mDigits.emplace(std::make_pair(key, LabeledDigit(mChipIndex, row, col, charge, time)));
mDigits.emplace(std::make_pair(key, LabeledDigit(mChipIndex, row, col, charge, time, label)));
}
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void Digitizer::registerDigits(Chip& chip, uint32_t roFrame, float timeInitROF,
o2::iotof::LabeledDigit* existingDigit = chip.findDigit(key);
if (!existingDigit) {
// No existing digit, create a new one
chip.addDigit(row, col, nElectrons, timeInitROF); // Last one should really just be time
chip.addDigit(row, col, nElectrons, timeInitROF, label); // Last one should really just be time
} else {
// Digit already exists, update charge and labels
const int storedCharge = existingDigit->getCharge();
Expand Down
4 changes: 1 addition & 3 deletions Steer/DigitizerWorkflow/src/IOTOFDigitizerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ class IOTOFDPLDigitizerTask : o2::base::BaseDPLDigitizer
pc.outputs().snapshot(Output{mOrigin, "DIGITSROF", 0}, mROFRecords);
if (mWithMCTruth) {
auto& sharedlabels = pc.outputs().make<o2::dataformats::ConstMCTruthContainer<o2::MCCompLabel>>(Output{mOrigin, "DIGITSMCTR", 0});
mLabelsAccum.flatten_to(sharedlabels);
mLabels.flatten_to(sharedlabels);
// free space of existing label containers
mLabels.clear_andfreememory();
mLabelsAccum.clear_andfreememory();

// write dummy MC2ROF vector to keep writer/readers backward compatible
// NOTE: Steer/DigitizerWorkflow/src/ITSMFTDigitizerSpec.cxx also uses dummy MC2ROF
Expand Down Expand Up @@ -172,7 +171,6 @@ class IOTOFDPLDigitizerTask : o2::base::BaseDPLDigitizer
std::vector<o2::itsmft::Hit> mHits{};
std::vector<o2::itsmft::Hit>* mHitsP{&mHits};
o2::dataformats::MCTruthContainer<o2::MCCompLabel> mLabels{};
o2::dataformats::MCTruthContainer<o2::MCCompLabel> mLabelsAccum{};
std::vector<TChain*> mSimChains{};
o2::parameters::GRPObject::ROMode mROMode = o2::parameters::GRPObject::PRESENT; // readout mode
};
Expand Down
Loading