Skip to content

Commit f4f4377

Browse files
peressounkoDmitri Peresunko
andauthored
Fix timestamp and trig digits (#2354)
Co-authored-by: Dmitri Peresunko <Dmitri.Peresunko@cern.ch>
1 parent fe6ca05 commit f4f4377

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Common/TableProducer/caloClusterProducer.cxx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct caloClusterProducerTask {
100100

101101
int64_t timestamp = 0;
102102
if (bcs.begin() != bcs.end()) {
103-
bcs.begin().timestamp(); // timestamp for CCDB object retrieval
103+
timestamp = bcs.begin().timestamp(); // timestamp for CCDB object retrieval
104104
}
105105
std::map<int64_t, int> bcMap;
106106
int bcId = 0;
@@ -166,6 +166,10 @@ struct caloClusterProducerTask {
166166
for (auto& c : cells) {
167167
if (c.caloType() != kPHOS) // PHOS
168168
continue;
169+
// Fix for bug in trigger digits
170+
if ((c.cellType() == phos::TRU2x2 || c.cellType() == phos::TRU4x4) && c.cellNumber() == 0) {
171+
continue;
172+
}
169173
if (phosCellTRs.size() == 0) { // first cell, first TrigRec
170174
ir.setFromLong(c.bc_as<aod::BCsWithTimestamps>().globalBC());
171175
phosCellTRs.emplace_back(ir, 0, 0); // BC,first cell, ncells
@@ -398,7 +402,7 @@ struct caloClusterProducerTask {
398402

399403
int64_t timestamp = 0;
400404
if (bcs.begin() != bcs.end()) {
401-
bcs.begin().timestamp(); // timestamp for CCDB object retrieval
405+
timestamp = bcs.begin().timestamp(); // timestamp for CCDB object retrieval
402406
}
403407
std::map<int64_t, int> bcMap;
404408
int bcId = 0;
@@ -463,6 +467,10 @@ struct caloClusterProducerTask {
463467
for (auto& c : cells) {
464468
if (c.caloType() != kPHOS) // PHOS
465469
continue;
470+
// Fix for bug in trigger digits
471+
if ((c.cellType() == phos::TRU2x2 || c.cellType() == phos::TRU4x4) && c.cellNumber() == 0) {
472+
continue;
473+
}
466474
if (phosCellTRs.size() == 0) { // first cell, first TrigRec
467475
ir.setFromLong(c.bc_as<aod::BCsWithTimestamps>().globalBC());
468476
phosCellTRs.emplace_back(ir, 0, 0); // BC,first cell, ncells

0 commit comments

Comments
 (0)