PandaRoot
PndFtsLineHitSet.h
Go to the documentation of this file.
1 //
2 // Created by Bartosz Sobol on 27.08.2020.
3 //
4 
5 #pragma once
6 
7 #include <iostream>
8 
9 #include "PndFtsHelpers.h"
10 
11 namespace PndFtsTrackFinder {
12 
14  public:
15  PndFtsLineHitSet() = delete;
16 
17  PndFtsLineHitSet(const RawHitVector &hits, const PndFtsGeom &geom);
18 
19  template <class ItT>
20  PndFtsLineHitSet(ItT begin, ItT end, const PndFtsGeom &geom)
21  {
22  Reserve(std::distance(begin, end));
23 
24  std::for_each(begin, end, [this, &geom](const auto hit) { Add(hit, geom); });
25  }
26 
27  [[nodiscard]] bool IsComplete() const noexcept;
28 
33 
34  private:
35  void Reserve(const std::size_t size);
36 
37  void Add(const PndFtsSimpleHit &hit, const PndFtsGeom &geom);
38 };
39 
40 using LineHitSetVector = std::vector<PndFtsLineHitSet>;
41 
42 } // namespace PndFtsTrackFinder
std::vector< PndFtsSimpleHit > RawHitVector
PndFtsLineHitSet(ItT begin, ItT end, const PndFtsGeom &geom)
std::vector< PndFtsLineHitSet > LineHitSetVector
bool IsComplete() const noexcept