Belle II Software  release-05-01-25
DATCONHoughSpaceClusterCand.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Michael Schnell, Christian Wessel *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <root/TVector2.h>
14 
15 namespace Belle2 {
27  class DATCONHoughSpaceClusterCand {
28  public:
30  DATCONHoughSpaceClusterCand(std::vector<unsigned int>& list, TVector2 coord): hitList(list), coordinate(coord)
31  {
32  hash = 0;
33  hitSize = 0;
34  for (unsigned int i = 0; i < hitList.size(); ++i) {
35  hash += hitList[i];
36  ++hitSize;
37  }
38  }
39 
41 
43  std::vector<unsigned int> getIdList() { return hitList; }
44 
46  TVector2 getCoord() { return coordinate; }
47 
49  unsigned int getHash() const { return hash; }
50 
52  unsigned int getHitSize() const { return hitSize; }
53 
54  private:
56  std::vector<unsigned int> hitList;
58  TVector2 coordinate;
60  unsigned int hash;
62  unsigned int hitSize;
63 
64  }; // end class definition
66 }; // end namespace Belle2
Belle2::DATCONHoughSpaceClusterCand::getHitSize
unsigned int getHitSize() const
Get Size of hit list.
Definition: DATCONHoughSpaceClusterCand.h:60
Belle2::DATCONHoughSpaceClusterCand::getHash
unsigned int getHash() const
Get Hash of hit list.
Definition: DATCONHoughSpaceClusterCand.h:57
Belle2::DATCONHoughSpaceClusterCand::DATCONHoughSpaceClusterCand
DATCONHoughSpaceClusterCand(std::vector< unsigned int > &list, TVector2 coord)
Constructor for Hough Space Cluster Candidates.
Definition: DATCONHoughSpaceClusterCand.h:38
Belle2::DATCONHoughSpaceClusterCand::getIdList
std::vector< unsigned int > getIdList()
Get Index list.
Definition: DATCONHoughSpaceClusterCand.h:51
Belle2::DATCONHoughSpaceClusterCand::hitList
std::vector< unsigned int > hitList
List of IDs of hits that belong to this DATCONHoughSpaceClusterCand.
Definition: DATCONHoughSpaceClusterCand.h:64
Belle2::DATCONHoughSpaceClusterCand::coordinate
TVector2 coordinate
Coordinate of this candidate.
Definition: DATCONHoughSpaceClusterCand.h:66
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DATCONHoughSpaceClusterCand::hash
unsigned int hash
Hash for id list.
Definition: DATCONHoughSpaceClusterCand.h:68
Belle2::DATCONHoughSpaceClusterCand
The Hough Space Cluster Candidate represents the candidates of clusters found in the Hough Space.
Definition: DATCONHoughSpaceClusterCand.h:35
Belle2::DATCONHoughSpaceClusterCand::hitSize
unsigned int hitSize
Size of this DATCONHoughSpaceClusterCand.
Definition: DATCONHoughSpaceClusterCand.h:70
Belle2::DATCONHoughSpaceClusterCand::getCoord
TVector2 getCoord()
Get Index list.
Definition: DATCONHoughSpaceClusterCand.h:54