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 @@ -59,7 +59,7 @@ class HMPIDDigitizer
}
}
}

// void setOrbit(double timeNS) {mOrbit = }
uint32_t getOrbit() { return mOrbit; };
uint16_t getBc() { return mBc; };

Expand Down Expand Up @@ -99,7 +99,7 @@ class HMPIDDigitizer
std::vector<o2::hmpid::Digit> mDigits; // internal store for digits

constexpr static double TRACKHOLDTIME = 1200; // defines the window for pile-up after a trigger received in nanoseconds
constexpr static double BUSYTIME = 22000; // the time for which no new trigger can be received in nanoseconds
constexpr static double BUSYTIME = 40000; // the time for which no new trigger can be received in nanoseconds

std::map<int, int> mIndexForPad; //! logarithmic mapping of pad to digit index

Expand Down
49 changes: 23 additions & 26 deletions Steer/DigitizerWorkflow/src/HMPIDDigitizerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
using namespace o2::framework;
using SubSpecificationType = o2::framework::DataAllocator::SubSpecificationType;


namespace o2
{
namespace hmpid
Expand Down Expand Up @@ -102,34 +101,32 @@ class HMPIDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
// try to start new readout cycle by setting the trigger time
auto triggeraccepted = mDigitizer.setTriggerTime(irecords[collID].getTimeNS());
if (triggeraccepted) {
flushDigitsAndLabels(); // flush previous readout cycle
}
auto withinactivetime = mDigitizer.setEventTime(irecords[collID].getTimeNS());
if (withinactivetime) {
// for each collision, loop over the constituents event and source IDs
// (background signal merging is basically taking place here)
for (auto& part : eventParts[collID]) {
mDigitizer.setEventID(part.entryID);
mDigitizer.setSrcID(part.sourceID);

// get the hits for this event and this source
std::vector<o2::hmpid::HitType> hits;
context->retrieveHits(mSimChains, "HMPHit", part.sourceID, part.entryID, &hits);
LOG(info) << "For collision " << collID << " eventID " << part.entryID << " found HMP " << hits.size() << " hits ";

mDigitizer.setLabelContainer(&mLabels);
mLabels.clear();
mDigits.clear();

mDigitizer.process(hits, mDigits);
auto withinactivetime = mDigitizer.setEventTime(irecords[collID].getTimeNS());
if (withinactivetime) {
// for each collision, loop over the constituents event and source IDs
// (background signal merging is basically taking place here)
for (auto& part : eventParts[collID]) {
mDigitizer.setEventID(part.entryID);
mDigitizer.setSrcID(part.sourceID);

// get the hits for this event and this source
std::vector<o2::hmpid::HitType> hits;
context->retrieveHits(mSimChains, "HMPHit", part.sourceID, part.entryID, &hits);
LOG(info) << "For collision " << collID << " eventID " << part.entryID << " found HMP " << hits.size() << " hits ";

mDigitizer.setLabelContainer(&mLabels);
mLabels.clear();
mDigits.clear();

mDigitizer.process(hits, mDigits);
}

flushDigitsAndLabels(); // flush previous readout cycle
} else {
LOG(info) << "COLLISION " << collID << "FALLS WITHIN A DEAD TIME";
}

} else {
LOG(info) << "COLLISION " << collID << "FALLS WITHIN A DEAD TIME";
}
}
// final flushing step; getting everything not yet written out
flushDigitsAndLabels();

// send out to next stage
pc.outputs().snapshot(Output{"HMP", "DIGITS", 0}, digitsAccum);
Expand Down