Belle II Software  release-05-02-19
DATCONTrackCand.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 {
30  class DATCONTrackCand {
31  public:
33  DATCONTrackCand(std::vector<unsigned int>& list, TVector2 coord): hitList(list), coordinate(coord)
34  {
35  hash = 0;
36  hitSize = 0;
37  for (unsigned int i = 0; i < hitList.size(); ++i) {
38  hash += hitList[i];
39  ++hitSize;
40  }
41  }
42 
43  ~DATCONTrackCand() {}
44 
46  std::vector<unsigned int> getIdList() { return hitList; }
47 
49  TVector2 getCoord() { return coordinate; }
50 
52  unsigned int getHash() const { return hash; }
53 
55  unsigned int getHitSize() const { return hitSize; }
56 
57  private:
59  std::vector<unsigned int> hitList;
61  TVector2 coordinate;
63  unsigned int hash;
65  unsigned int hitSize;
66  }; // end class definition
67 
69 }; // end namespace Belle2
Belle2::DATCONTrackCand::getHash
unsigned int getHash() const
Get Hash of hit list.
Definition: DATCONTrackCand.h:60
Belle2::DATCONTrackCand::getIdList
std::vector< unsigned int > getIdList()
Get Index list.
Definition: DATCONTrackCand.h:54
Belle2::DATCONTrackCand::hash
unsigned int hash
Hash for id list.
Definition: DATCONTrackCand.h:71
Belle2::DATCONTrackCand::hitList
std::vector< unsigned int > hitList
List of IDs of hits that belong to this DATCONTrackCand.
Definition: DATCONTrackCand.h:67
Belle2::DATCONTrackCand::coordinate
TVector2 coordinate
Coordinate of this candidate.
Definition: DATCONTrackCand.h:69
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DATCONTrackCand::hitSize
unsigned int hitSize
Size of this DATCONTrackCand.
Definition: DATCONTrackCand.h:73
Belle2::DATCONTrackCand
The DATCONTrackCand represents the candidates of tracks found by the DATCON algoritms for u-side and ...
Definition: DATCONTrackCand.h:38
Belle2::DATCONTrackCand::getHitSize
unsigned int getHitSize() const
Get Size of hit list.
Definition: DATCONTrackCand.h:63
Belle2::DATCONTrackCand::getCoord
TVector2 getCoord()
Get Index list.
Definition: DATCONTrackCand.h:57
Belle2::DATCONTrackCand::DATCONTrackCand
DATCONTrackCand(std::vector< unsigned int > &list, TVector2 coord)
Constructor for hough candidates.
Definition: DATCONTrackCand.h:41