Skip to content

Commit b35ba4b

Browse files
changes based on comments
1 parent 9a76ad6 commit b35ba4b

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

Detectors/FOCAL/simulation/src/SDigitizer.cxx

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,32 @@ std::vector<o2::focal::LabeledDigit> SDigitizer::process(const std::vector<Hit>&
3838
}
3939
}
4040

41-
// for (auto hit : SHits) {
42-
// try {
41+
for (auto hit : SHits) {
4342

44-
// int tower = hit.GetDetectorID();
45-
// auto[inside, col, row, layer, segment] = mGeometry-> getVirtualInfo(hit.GetX(), hit.GetY(), hit.GetZ());
43+
int tower = hit.GetDetectorID();
44+
auto[inside, col, row, layer, segment] = mGeometry-> getVirtualInfo(hit.GetX(), hit.GetY(), hit.GetZ());
4645

47-
// if (!inside) {
48-
// LOG(warning) << "tower index out of range: " << tower;
49-
// continue;
50-
// }
46+
if (!inside) {
47+
LOG(warning) << "tower index out of range: " << tower;
48+
continue;
49+
}
5150

52-
// double energy = hit.GetEnergyLoss();
51+
double energy = hit.GetEnergyLoss();
5352

54-
// Digit digit(col, row, layer, hit.GetTime(), energy);
55-
// digit.setIndex(tower);
53+
Digit digit(col, row, layer, hit.GetTime(), energy);
54+
digit.setIndex(tower);
5655

57-
// MCLabel label(hit.GetTrackID(), mCurrEvID, mCurrSrcID, false, 1.0);
58-
// if (digit.getEnergy() < __DBL_EPSILON__) {
59-
// label.setAmplitudeFraction(0);
60-
// }
61-
// LabeledDigit d(digit, label);
56+
MCLabel label(hit.GetTrackID(), mCurrEvID, mCurrSrcID, false, 1.0);
57+
if (digit.getEnergy() < __DBL_EPSILON__) {
58+
label.setAmplitudeFraction(0);
59+
}
60+
LabeledDigit d(digit, label);
6261

63-
// digitsPerTower[tower].push_back(d);
62+
digitsPerTower[tower].push_back(d);
6463

65-
// } catch (InvalidPositionException& e) {
66-
// LOG(error) << "Error in creating the digit: " << e.what();
67-
// }
68-
// }
64+
//LOG(error) << "Error in creating the digit: " << e.what();
65+
66+
}
6967

7068
std::vector<LabeledDigit> digitsVector;
7169

0 commit comments

Comments
 (0)