5 template <
class TrackingGeoParams>
7 const SidesArray<std::vector<TrackingGeoParams>> &geoParamsColl) {
10 TrkHits3D =
new TEveStraightLineSet(
"Clusters");
16 TEvePointSet *TrkHits =
nullptr;
19 auto &sideColl = clColl.
at(side);
21 for (
size_t iLayer = 0; iLayer < sideColl.size(); iLayer++) {
22 auto geoParams = geoParamsColl.at(side).at(iLayer);
35 for (
auto &cluster : sideColl.at(iLayer)) {
36 auto longitudinalRange =
GetLineRange(cluster, geoParams);
37 auto clusterPos = cluster.COGPosition(geoParams);
40 auto lineStart = clusterPos, lineEnd = clusterPos;
41 lineStart[
RefFrame::ToCoo(geoParams.SegmentationDirections().second)] = longitudinalRange.first;
42 lineEnd[
RefFrame::ToCoo(geoParams.SegmentationDirections().second)] = longitudinalRange.second;
43 TrkHits3D->AddLine(lineStart[RefFrame::Coo::X], lineStart[RefFrame::Coo::Y], lineStart[RefFrame::Coo::Z],
44 lineEnd[RefFrame::Coo::X], lineEnd[RefFrame::Coo::Y], lineEnd[RefFrame::Coo::Z]);
62 return {elementPos - 0.5 * elementSize, elementPos + 0.5 * elementSize};
71 float elementSize = geoParams.
MatSize()[axis];
75 return {elementPos - 0.5 * elementSize, elementPos + 0.5 * elementSize};
virtual std::pair< RefFrame::Direction, RefFrame::Direction > SegmentationDirections() const
Return the segmentation directions of the tracking elements.
Definition: TrackingDetectorGeoParams.h:111
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
const std::vector< Hit > & Hits() const
Gets the hits forming the cluster.
Definition: Cluster.h:54
Tracker cluster object for transient data model.
Definition: Cluster.h:30
Data structure for single silicon layer geometry parameters.
Definition: FitGeoParams.h:64
ContainedClass & at(const RefFrame::Side &side)
Accesses an element with validity check on the element index.
Definition: SidesArray.h:107
unsigned int MatIDFromChannelID(unsigned int channelID) const
Retrieves the volume ID of the mat containing the sipm with the given channelID.
Definition: FitGeoParams.cpp:34
Axis ToAxis(Coo coo)
Associates an axis to a coordinate .
Definition: RefFrame.h:191
Axis
Aliases for the axes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:36
TEvePointSet * TrkHitsYZ
Definition: HWTrackingDetectorEventDisplay.h:33
size_t SeedHitIndex() const
Gets the index of the seed hit within the hits vector.
Definition: Cluster.h:71
Coo ToCoo(Axis axis)
Associates a coordinate to an axis.
Definition: RefFrame.h:182
TEvePointSet * TrkHitsXZ
Definition: HWTrackingDetectorEventDisplay.h:32
An array that accepts side as subscripts.
Definition: SidesArray.h:72
TEveStraightLineSet * TrkHits3D
Definition: HWTrackingDetectorEventDisplay.h:36
std::pair< float, float > GetLineRange(const Cluster &cl, const TrackingGeoParams &geoParams)
unsigned int LadderIDFromStripID(unsigned int stripID) const
Retrieves the volume ID of the ladder containing the strip with the given volumeID.
Definition: SiliconDetectorGeoParams.cpp:185
Point MatPosition(unsigned int matID) const
Get position of a given mat.
Definition: FitGeoParams.h:156
Data structure for single silicon layer geometry parameters.
Definition: SiliconDetectorGeoParams.h:34
constexpr std::array< Side, NSides > Sides
Array of all the sides.
Definition: RefFrame.h:123
void ImportClusters(const ClustersColl &clColl, const SidesArray< std::vector< TrackingGeoParams >> &geoParamsColl)
Definition: HWTrackingDetectorEventDisplay.hpp:6
const AxesArray< float > & MatSize() const
Get the dimensions of the single mat.
Definition: FitGeoParams.h:125
const AxesArray< float > & WaferSize() const
Get the dimensions of the single wafer.
Definition: SiliconDetectorGeoParams.h:105
const AxesArray< int > & NWafersPerLadder() const
Get the number of wafers that make up a ladder. This is intended as number of wafers along each direc...
Definition: SiliconDetectorGeoParams.h:90
TEvePointSet * TrkHitsXY
Definition: HWTrackingDetectorEventDisplay.h:34
Point LadderPosition(unsigned int ladderID) const
Get position of a given ladder.
Definition: SiliconDetectorGeoParams.cpp:173