Skip to content

Commit 1a7e045

Browse files
authored
Fix TRD sim param busy time (#11440)
1 parent dc5e11d commit 1a7e045

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Detectors/TRD/simulation/include/TRDSimulation/TRDSimParams.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct TRDSimParams : public o2::conf::ConfigurableParamHelper<TRDSimParams> {
3131
// Trigger parameters
3232
float readoutTimeNS = 3000; ///< the time the readout takes in ns (default 30 time bins = 3 us)
3333
float deadTimeNS = 11000; ///< trigger deadtime in ns (default 11 us)
34-
float busyTimeNS = readoutTimeNS + deadTimeNS; ///< the time for which no new trigger can be received in nanoseconds
34+
float busyTimeNS() const { return readoutTimeNS + deadTimeNS; } ///< the time for which no new trigger can be received in nanoseconds
3535
// digitization settings
3636
int digithreads = 4; ///< number of digitizer threads
3737
float maxMCStepSize = 0.1; ///< maximum size of MC steps

Detectors/TRD/workflow/src/TRDDigitizerSpec.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ class TRDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
107107
firstEvent = false;
108108
} else {
109109
double dT = currentTime.getTimeNS() - triggerTime.getTimeNS();
110-
if (dT < mParams.busyTimeNS) {
110+
if (dT < mParams.busyTimeNS()) {
111111
// busyTimeNS = readoutTimeNS + deadTimeNS, if less than that, pile up the signals and update the last time
112-
LOGF(debug, "Collision %lu Not creating new trigger at time %.2f since dT=%.2f ns < busy time of %.1f us", collID, currentTime.getTimeNS(), dT, mParams.busyTimeNS / 1000);
112+
LOGF(debug, "Collision %lu Not creating new trigger at time %.2f since dT=%.2f ns < busy time of %.1f us", collID, currentTime.getTimeNS(), dT, mParams.busyTimeNS() / 1000);
113113
isNewTrigger = false;
114114
mDigitizer.pileup();
115115
} else {
@@ -132,7 +132,7 @@ class TRDDPLDigitizerTask : public o2::base::BaseDPLDigitizer
132132
triggerTime = currentTime;
133133
digits.clear();
134134
labels.clear();
135-
if (triggerTime.getTimeNS() - previousTime.getTimeNS() > mParams.busyTimeNS) {
135+
if (triggerTime.getTimeNS() - previousTime.getTimeNS() > mParams.busyTimeNS()) {
136136
// we safely clear all pileup signals, because any previous collision cannot contribute signal anymore
137137
mDigitizer.clearPileupSignals();
138138
}

0 commit comments

Comments
 (0)