PandaRoot
PndHypCluster.h
Go to the documentation of this file.
1 #ifndef PNDHYPCLUSTER_H
2 #define PNDHYPCLUSTER_H
3 
4 #include "TObject.h"
5 #include <vector>
6 #include <iostream>
7 
8 #include "PndHypHit.h" // contains SensorSide enumeration
9 
17 class PndHypCluster : public TObject {
18  public:
19  PndHypCluster() : fClusterList(), fSide(SensorSide::kTOP){};
21  PndHypCluster(std::vector<Int_t> list);
22 
23  void SetClusterList(std::vector<Int_t> list) { fClusterList = list; }
24  std::vector<Int_t> GetClusterList() const { return fClusterList; };
25  Int_t GetClusterSize() const { return fClusterList.size(); };
26  Int_t GetDigiIndex(Int_t i) const { return fClusterList[i]; }
27 
28  SensorSide GetSensorSide() const { return fSide; };
29  void SetSensorSide(SensorSide s) { fSide = s; }
30  bool DigiBelongsToCluster(Int_t digiIndex);
31  void Print();
32 
33  friend std::ostream &operator<<(std::ostream &out, PndHypCluster &cl)
34  {
35  std::vector<Int_t> list = cl.GetClusterList();
36  out << "Hits in Cluster:" << std::endl;
37  for (unsigned int i = 0; i < list.size(); i++)
38  out << list[i] << std::endl;
39  out << std::endl;
40 
41  return out;
42  }
43 
44  private:
45  std::vector<Int_t> fClusterList;
46  SensorSide fSide;
47 
48  ClassDef(PndHypCluster, 1);
49 };
50 
51 #endif
Class to store the Digis which belong to one cluster This class holds the information which Digi belo...
Definition: PndHypCluster.h:17
Int_t GetDigiIndex(Int_t i) const
Definition: PndHypCluster.h:26
void SetSensorSide(SensorSide s)
Definition: PndHypCluster.h:29
unsigned int i
Definition: P4_F32vec4.h:21
Int_t GetClusterSize() const
Definition: PndHypCluster.h:25
void SetClusterList(std::vector< Int_t > list)
Definition: PndHypCluster.h:23
SensorSide
std::vector< Int_t > GetClusterList() const
Definition: PndHypCluster.h:24
SensorSide GetSensorSide() const
Definition: PndHypCluster.h:28
friend std::ostream & operator<<(std::ostream &out, PndHypCluster &cl)
Definition: PndHypCluster.h:33
bool DigiBelongsToCluster(Int_t digiIndex)