HerdSoftware  0.1.1
HWTrackingDetectorEventDisplay.hpp
Go to the documentation of this file.
2 
3 namespace Herd {
4 
5 template <class TrackingGeoParams>
7  const SidesArray<std::vector<TrackingGeoParams>> geoParamsColl) {
8 
9  TrkHitsXY->Reset();
10  TrkHitsXZ->Reset();
11  TrkHitsYZ->Reset();
12 
13  TEvePointSet *TrkHits = nullptr;
14 
15  for (auto side : RefFrame::Sides) {
16  auto &sideColl = clColl.at(side);
17 
18  for (size_t iLayer = 0; iLayer < sideColl.size(); iLayer++) {
19  auto geoParams = geoParamsColl.at(side).at(iLayer);
20 
21  if (RefFrame::ToAxis(geoParams.NormalDirection()) != RefFrame::Axis::Y &&
22  RefFrame::ToAxis(geoParams.SegmentationDirections().first) != RefFrame::Axis::Y) {
23  TrkHits = TrkHitsXZ;
24  } else if (RefFrame::ToAxis(geoParams.NormalDirection()) != RefFrame::Axis::X &&
25  RefFrame::ToAxis(geoParams.SegmentationDirections().first) != RefFrame::Axis::X) {
26  TrkHits = TrkHitsYZ;
27  } else if (RefFrame::ToAxis(geoParams.NormalDirection()) != RefFrame::Axis::Z &&
28  RefFrame::ToAxis(geoParams.SegmentationDirections().first) != RefFrame::Axis::Z) {
29  TrkHits = TrkHitsXY;
30  }
31 
32  for (auto &cluster : sideColl.at(iLayer)) {
33  TrkHits->SetNextPoint(cluster.COGPosition(geoParams)[RefFrame::Coo::X],
34  cluster.COGPosition(geoParams)[RefFrame::Coo::Y],
35  cluster.COGPosition(geoParams)[RefFrame::Coo::Z]);
36  }
37  }
38  }
39 
40  return;
41 }
42 
43 } // namespace Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
ContainedClass & at(const RefFrame::Side &side)
Accesses an element with validity check on the element index.
Definition: SidesArray.h:107
Axis ToAxis(Coo coo)
Associates an axis to a coordinate .
Definition: RefFrame.h:177
TEvePointSet * TrkHitsYZ
Definition: HWTrackingDetectorEventDisplay.h:31
void ImportClusters(const ClustersColl &clColl, const SidesArray< std::vector< TrackingGeoParams >> geoParamsColl)
Definition: HWTrackingDetectorEventDisplay.hpp:6
TEvePointSet * TrkHitsXZ
Definition: HWTrackingDetectorEventDisplay.h:30
An array that accepts side as subscripts.
Definition: SidesArray.h:72
constexpr std::array< Side, NSides > Sides
Array of all the sides.
Definition: RefFrame.h:114
TEvePointSet * TrkHitsXY
Definition: HWTrackingDetectorEventDisplay.h:32