Skip to content

Commit 1f92653

Browse files
committed
Upgrading deuteron tasks
1 parent e0b8b91 commit 1f92653

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

DPG/Tasks/AOTTrack/PID/HMPID/hmpidTableProducer.cxx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ struct HmpidTableProducer {
157157
histos.add("hChamberAssignment",
158158
"Chamber assignment outcome; category; counts",
159159
kTH1F, {{4, -0.5, 3.5, ""}});
160+
161+
histos.add("hProdVertex", ";X (cm);Y (cm);Z (cm)", HistType::kTH3F, {{500, -500., 500.}, {500, -500., 500.}, {500, -500., 500.}});
160162
}
161163

162164
// -----------------------------------------------------------------------
@@ -360,14 +362,14 @@ struct HmpidTableProducer {
360362
}
361363

362364
// subtract the box center (translation is not rotated, see geometry block above)
363-
const double dx = vx - centerX;
364-
const double dy = vy; // centerY = 0
365-
const double dz = vz - centerZ;
365+
const double rx = vx * mAbsCosT + vy * mAbsSinT;
366+
const double ry = -vx * mAbsSinT + vy * mAbsCosT;
367+
const double rz = vz;
366368

367369
// rotate by -theta into the box local frame
368-
const double lx = dx * mAbsCosT + dy * mAbsSinT;
369-
const double ly = -dx * mAbsSinT + dy * mAbsCosT;
370-
const double lz = dz;
370+
const double lx = rx - centerX;
371+
const double ly = ry; // centerY = 0
372+
const double lz = rz - centerZ;
371373

372374
return std::abs(lx) <= halfX && std::abs(ly) <= AbsHalfY && std::abs(lz) <= AbsHalfZ;
373375
}
@@ -516,6 +518,8 @@ struct HmpidTableProducer {
516518
for (int32_t idx = dIds.front(); idx <= dIds.back(); ++idx) {
517519
auto daughter = mcParticles.rawIteratorAt(idx);
518520

521+
histos.fill(HIST("hProdVertex"), daughter.vx(), daughter.vy(), daughter.vz());
522+
519523
if (isInAbsorber(daughter.vx(), daughter.vy(), daughter.vz(), chamberM3)) {
520524
interactionInAbsorber = true;
521525
break;

0 commit comments

Comments
 (0)