PandaRoot
PndFtsCircleHitSet.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 24.03.2021.
15 //
16 
17 #pragma once
18 
19 #include <iostream>
20 
21 #include "PndFtsHelpers.h"
22 
23 namespace PndFtsTrackFinder {
24 
26  public:
27  PndFtsCircleHitSet() = delete;
28 
29  PndFtsCircleHitSet(const SimpleHitVector &hits, const PndFtsGeom &geom);
30 
31  template <class ItT>
32  PndFtsCircleHitSet(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 
44 
45  private:
46  void Reserve(const std::size_t size);
47 
48  void Add(const PndFtsSimpleHit &hit, const PndFtsGeom &geom);
49 };
50 
51 } // namespace PndFtsTrackFinder
PndFtsCircleHitSet(ItT begin, ItT end, const PndFtsGeom &geom)
std::vector< PndFtsSimpleHit > SimpleHitVector