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