PandaRoot
PndHypCluster.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 #ifndef PNDHYPCLUSTER_H
14 #define PNDHYPCLUSTER_H
15 
16 #include "TObject.h"
17 #include <vector>
18 #include <iostream>
19 
20 #include "PndHypHit.h" // contains SensorSide enumeration
21 
29 class PndHypCluster : public TObject {
30  public:
31  PndHypCluster() : fClusterList(), fSide(SensorSide::kTOP){};
33  PndHypCluster(std::vector<Int_t> list);
34 
35  void SetClusterList(std::vector<Int_t> list) { fClusterList = list; }
36  std::vector<Int_t> GetClusterList() const { return fClusterList; };
37  Int_t GetClusterSize() const { return fClusterList.size(); };
38  Int_t GetDigiIndex(Int_t i) const { return fClusterList[i]; }
39 
40  SensorSide GetSensorSide() const { return fSide; };
41  void SetSensorSide(SensorSide s) { fSide = s; }
42  bool DigiBelongsToCluster(Int_t digiIndex);
43  void Print();
44 
45  friend std::ostream &operator<<(std::ostream &out, PndHypCluster &cl)
46  {
47  std::vector<Int_t> list = cl.GetClusterList();
48  out << "Hits in Cluster:" << std::endl;
49  for (unsigned int i = 0; i < list.size(); i++)
50  out << list[i] << std::endl;
51  out << std::endl;
52 
53  return out;
54  }
55 
56  private:
57  std::vector<Int_t> fClusterList;
58  SensorSide fSide;
59 
60  ClassDef(PndHypCluster, 1);
61 };
62 
63 #endif
Class to store the Digis which belong to one cluster This class holds the information which Digi belo...
Definition: PndHypCluster.h:29
Int_t GetDigiIndex(Int_t i) const
Definition: PndHypCluster.h:38
void SetSensorSide(SensorSide s)
Definition: PndHypCluster.h:41
unsigned int i
Definition: P4_F32vec4.h:33
Int_t GetClusterSize() const
Definition: PndHypCluster.h:37
void SetClusterList(std::vector< Int_t > list)
Definition: PndHypCluster.h:35
SensorSide
std::vector< Int_t > GetClusterList() const
Definition: PndHypCluster.h:36
SensorSide GetSensorSide() const
Definition: PndHypCluster.h:40
friend std::ostream & operator<<(std::ostream &out, PndHypCluster &cl)
Definition: PndHypCluster.h:45
bool DigiBelongsToCluster(Int_t digiIndex)