int detElemId{100}; bool isBendingPlane{true};
o2::mch::mapping::Segmentation seg{detElemId, isBendingPlane};
double x{1.5}; double y{18.6};
int paduid = seg.findPadByPosition(x, y);
if (seg.isValid(paduid)) {
std::cout << "There is a pad at position " << x << "," << y << "\n"
<< " which belongs to dualSampa " << seg.padDualSampaId(paduid)
<< " and has a x-size of " << seg.padSizeX(paduid) << " cm\n";
}
assert(paduid == seg.findPadByFEE(76, 9));
> mch-mapping-svg-segmentation3 --help
Generic options:
--help produce help message
--hidepads hide pad outlines
--hidedualsampas hide dualsampa outlines
--hidedes hide detection element outline
--hidepadchannels hide pad channel numbering
--de arg which detection element to consider
--prefix arg (=seg) prefix used for outfile filename(s)
--point arg points to show
--all use all detection elements
> mch-mapping-svg-segmentation3 --hidepadchannels --hidepads --de 501
> open seg-501-B.html
<g class="dualsampas">
<polygon points="40,-4 40,-20 45,-20 45,-4 40,-4 "/>
<polygon points="45,-4 45,-20 50,-20 50,-4 45,-4 "/>
<polygon points="50,-4 50,-20 55,-20 55,-4 50,-4 "/>
...
.detectionelements { fill: none; stroke: yellow; stroke-width: 0.5; }
.dualsampas { fill: black; stroke: gray; stroke-width: 0.25; opacity: 0.2; }