Belle II Software development
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#include <Math/Vector2D.h>
14
15namespace Belle2 {
23 public:
26 m_xmin(0), m_xmax(0), m_ymin(0), m_ymax(0) { }
27
29 CDCTriggerHoughCluster(int x1, int x2, int y1, int y2,
30 const std::vector<ROOT::Math::XYVector>& cellList):
31 m_xmin(x1), m_xmax(x2), m_ymin(y1), m_ymax(y2), m_cells(cellList) { }
32
35
36 // accessors
38 ROOT::Math::XYVector getClusterArea() const { return ROOT::Math::XYVector(m_xmax - m_xmin + 1, m_ymax - m_ymin + 1); }
40 ROOT::Math::XYVector getCornerBL() const { return ROOT::Math::XYVector(m_xmin, m_ymin); }
42 ROOT::Math::XYVector getCornerTR() const { return ROOT::Math::XYVector(m_xmax, m_ymax); }
44 std::vector<ROOT::Math::XYVector> getCells() const { return m_cells; }
45
46 protected:
48 int m_xmin;
50 int m_xmax;
52 int m_ymin;
54 int m_ymax;
56 std::vector<ROOT::Math::XYVector> m_cells = {};
57
60 };
62}
63#endif
Cluster created by the Hough finder of the CDC trigger.
~CDCTriggerHoughCluster()
destructor, empty because we don't allocate memory anywhere.
ClassDef(CDCTriggerHoughCluster, 2)
Needed to make the ROOT object storable.
std::vector< ROOT::Math::XYVector > getCells() const
get list of cell indices
ROOT::Math::XYVector getCornerBL() const
get left bottom corner
int m_ymax
y index of top boundary cell
int m_xmax
x index of right boundary cell
CDCTriggerHoughCluster(int x1, int x2, int y1, int y2, const std::vector< ROOT::Math::XYVector > &cellList)
constructor with arguments
int m_xmin
x index of left boundary cell
int m_ymin
y index of bottom boundary cell
ROOT::Math::XYVector getClusterArea() const
get size of bounding rectangle of cluster
ROOT::Math::XYVector getCornerTR() const
get top right corner
CDCTriggerHoughCluster()
default constructor
std::vector< ROOT::Math::XYVector > m_cells
list of cell indices in the cluster
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.