Belle II Software  release-08-01-10
CDCTriggerHoughCluster.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef CDCTRIGGERHOUGHCLUSTER_H
9 #define CDCTRIGGERHOUGHCLUSTER_H
10 
11 #include <framework/datastore/RelationsObject.h>
12 
13 namespace Belle2 {
21  public:
24  xmin(0), xmax(0), ymin(0), ymax(0) { }
25 
27  CDCTriggerHoughCluster(int x1, int x2, int y1, int y2,
28  const std::vector<TVector2>& cellList):
29  xmin(x1), xmax(x2), ymin(y1), ymax(y2), cells(cellList) { }
30 
33 
34  // accessors
36  TVector2 getClusterArea() const { return TVector2(xmax - xmin + 1, ymax - ymin + 1); }
38  TVector2 getCornerBL() const { return TVector2(xmin, ymin); }
40  TVector2 getCornerTR() const { return TVector2(xmax, ymax); }
42  std::vector<TVector2> getCells() const { return cells; }
43 
44  protected:
46  int xmin;
48  int xmax;
50  int ymin;
52  int ymax;
54  std::vector<TVector2> cells = {};
55 
58  };
60 }
61 #endif
Cluster created by the Hough finder of the CDC trigger.
TVector2 getCornerBL() const
get left bottom corner
TVector2 getClusterArea() const
get size of bounding rectangle of cluster
~CDCTriggerHoughCluster()
destructor, empty because we don't allocate memory anywhere.
int xmax
x index of right boundary cell
TVector2 getCornerTR() const
get top right corner
std::vector< TVector2 > getCells() const
get list of cell indices
int ymax
y index of top boundary cell
ClassDef(CDCTriggerHoughCluster, 1)
Needed to make the ROOT object storable.
int xmin
x index of left boundary cell
std::vector< TVector2 > cells
list of cell indices in the cluster
int ymin
y index of bottom boundary cell
CDCTriggerHoughCluster(int x1, int x2, int y1, int y2, const std::vector< TVector2 > &cellList)
constructor with arguments
CDCTriggerHoughCluster()
default constructor
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.