Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Detectors/MUON/MID/GlobalMapping/exe/global-mapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ void stripsInfo2json(const std::vector<o2::mid::ExtendedMappingInfo>& infos, con
writer.Int(infos[idx].locId);
writer.Key("locIdDcs");
writer.String(infos[idx].locIdDcs.c_str());
writer.Key("locIdHw");
writer.String(infos[idx].locIdHw.c_str());
writer.EndObject();
}
writer.EndArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct ExtendedMappingInfo {
int cathode; ///< Bending (0) or Non-bending (1) planes
int locId; ///< Local board ID
std::string locIdDcs; ///< Local board ID for DCS
std::string locIdHw; /// Local board ID in the hardware
int xpos; ///< Position X
int ypos; ///< Position Y
int xwidth; ///< Width X (signed)
Expand Down
4 changes: 4 additions & 0 deletions Detectors/MUON/MID/GlobalMapping/src/GlobalMapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ std::array<int, 4> GlobalMapper::getStripGeom(int deId, int columnId, int lineId
ExtendedMappingInfo GlobalMapper::buildExtendedInfo(int deId, int columnId, int lineId, int stripId, int cathode) const
{
ExtendedMappingInfo info;
std::array<std::string, 4> boards{"12", "34", "56", "78"};
info.id = getStripId(deId, columnId, lineId, stripId, cathode);
int irpc = detparams::getRPCLine(deId);
int iline = (irpc == 5 && columnId == 0) ? lineId - 1 : lineId;
auto locId = static_cast<int>(mCrateMapper.deLocalBoardToRO(deId, columnId, lineId));
info.locId = locId;
std::string side = detparams::isRightSide(deId) ? "R" : "L";
Expand All @@ -92,6 +95,7 @@ ExtendedMappingInfo GlobalMapper::buildExtendedInfo(int deId, int columnId, int
info.stripId = stripId;
info.cathode = cathode;
info.locIdDcs = fmt::format("{}{}{}{}", crateId, side, (locInCrate >= 8 ? "1" : "0"), locInCrate);
info.locIdHw = fmt::format("{}{}C{}L{}B{}", detparams::getChamber(deId) + 1, side, columnId + 1, irpc + 1, boards[iline]);
auto geom = getStripGeom(deId, columnId, lineId, stripId, cathode);
info.xpos = geom[0];
info.ypos = geom[1];
Expand Down