PandaRoot
PndFtsLineHitSet.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //
14 // Created by Bartosz Sobol on 27.08.2020.
15 //
16 
17 #pragma once
18 
19 #include <iostream>
20 
21 #include "PndFtsHelpers.h"
22 
23 namespace PndFtsTrackFinder {
24 
26  public:
27  PndFtsLineHitSet() = delete;
28 
29  PndFtsLineHitSet(const SimpleHitVector &hits, const PndFtsGeom &geom);
30 
31  template <class ItT>
32  PndFtsLineHitSet(ItT begin, ItT end, const PndFtsGeom &geom)
33  {
34  Reserve(std::distance(begin, end));
35 
36  std::for_each(begin, end, [this, &geom](const auto hit) { Add(hit, geom); });
37  }
38 
39  [[nodiscard]] bool IsComplete() const noexcept;
40 
45 
46  private:
47  void Reserve(const std::size_t size);
48 
49  void Add(const PndFtsSimpleHit &hit, const PndFtsGeom &geom);
50 };
51 
52 } // namespace PndFtsTrackFinder
PndFtsLineHitSet(ItT begin, ItT end, const PndFtsGeom &geom)
std::vector< PndFtsSimpleHit > SimpleHitVector
bool IsComplete() const noexcept