Commit 53869ff5 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Fix issue where global and local position where swapped

parent 83a155e3
......@@ -208,16 +208,16 @@ namespace Jug::Reco {
// m_geoSvc->cellIDPositionConverter()->findContext(id)->volumePlacement().volIDs().str()
// << endmsg;
hits.push_back({
rh.cellID(),
rh.ID(),
lid,
sid, // cell id, cluster id, layer id, sector id
0, // @TODO: hit type
energy,
0, // @TODO: energy error
time, // energy, time
{gpos.x() / m_lUnit, gpos.y() / m_lUnit, gpos.z() / m_lUnit},
{pos.x() / m_lUnit, pos.y() / m_lUnit, pos.z() / m_lUnit},
rh.cellID(), // cellID
rh.ID(), // ID
lid, // layer
sid, // sector
0, // @TODO: hit type
energy, // energy
0, // @TODO: energy error
time, // time
{gpos.x() / m_lUnit, gpos.y() / m_lUnit, gpos.z() / m_lUnit}, // global pos
{pos.x() / m_lUnit, pos.y() / m_lUnit, pos.z() / m_lUnit}, // local pos
{dim[0], dim[1], dim[2]}
});
}
......
......@@ -137,16 +137,16 @@ namespace Jug::Reco {
auto pos = alignment.worldToLocal(dd4hep::Position(gpos.x(), gpos.y(), gpos.z()));
hits.push_back(eic::CalorimeterHit{
id,
nhits++,
lid,
sid,
0,
static_cast<float>(energy),
0,
static_cast<float>(time),
{pos.x() / m_lUnit, pos.y() / m_lUnit, pos.z() / m_lUnit}, // local pos
id, // cellID
nhits++, // ID
lid, // layer
sid, // sector
0, // type
static_cast<float>(energy), // energy
0, // energyError
static_cast<float>(time), // time
{gpos.x() / m_lUnit, gpos.y() / m_lUnit, gpos.z() / m_lUnit}, // global pos
{pos.x() / m_lUnit, pos.y() / m_lUnit, pos.z() / m_lUnit}, // local pos
{0, 0, 0}}); // @TODO: add dimension
}
return StatusCode::SUCCESS;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment