37 edm4hep::CalorimeterHitCollection tof_col;
38 edm4hep::CalorimeterHitCollection hof_col;
40 const int LDTOP = ph::LDTOP;
47 const int ltead = ph::LQ(LDTOP - 10);
55 for (
int lcur = ph::LQ(ltead - 5); lcur > 0; lcur = ph::LQ(lcur)) {
56 const float R = ph::Q(lcur + 5);
57 const float Rphi = ph::Q(lcur + 6);
58 const float Z = ph::Q(lcur + 7);
59 const float t_ns = ph::Q(lcur + 10);
60 const float phi = (R > 0.f) ? (Rphi / R) : 0.f;
61 const float X = R * std::cos(phi);
62 const float Y = R * std::sin(phi);
63 auto hit = tof_col.create();
65 hit.setEnergyError(0.f);
68 hit.setPosition({ X * kCm2Mm, Y * kCm2Mm, Z * kCm2Mm });
72 for (
int lcur = ph::LQ(ltead - 11); lcur > 0; lcur = ph::LQ(lcur)) {
73 const float X = ph::Q(lcur + 5);
74 const float Y = ph::Q(lcur + 6);
75 const float Z = ph::Q(lcur + 7);
76 auto hit = hof_col.create();
78 hit.setEnergyError(0.f);
81 hit.setPosition({ X * kCm2Mm, Y * kCm2Mm, Z * kCm2Mm });