1 #ifndef NPdet_SimpleCalorimeterDigi_H
2 #define NPdet_SimpleCalorimeterDigi_H
9 namespace calorimeters {
11 template<
typename H1,
typename H2>
13 std::vector<H2> digi_hits;
15 std::random_device rd;
16 std::mt19937 gen(rd());
17 std::normal_distribution<> time_dist(0,2.0);
18 std::normal_distribution<> adc_dist(5.0,3.0);
20 for(
const auto& h: hits) {
21 auto pos = h->position;
24 ahit.cellID0 = (int)h->cellID;
25 ahit.cellID1 = (
int)h->cellID;
26 ahit.channelID = (int)h->cellID;
28 ahit.time = pos.z() + time_dist(gen);
29 ahit.adc = adc_dist(gen);
30 digi_hits.push_back(ahit);