PandaRoot
PndSdsCluster.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 PNDSDSCLUSTER_H
14 #define PNDSDSCLUSTER_H
15 
16 //#include "FairMultiLinkedData.h"
17 #include "PndDetectorList.h" // contains SensorSide enumeration
18 #include "FairMultiLinkedData_Interface.h"
19 #include "TObject.h"
20 #include <vector>
21 #include <iostream>
22 
30 class PndSdsCluster : public FairMultiLinkedData_Interface {
31 
32  friend std::ostream &operator<<(std::ostream &out, PndSdsCluster &cl)
33  {
34  std::vector<Int_t> list = cl.GetClusterList();
35  out << "Hits in Cluster: (";
36  for (UInt_t i = 0; i < list.size(); i++)
37  out << list[i] << " ";
38  out << ")" << std::endl;
39 
40  return out;
41  }
42 
43  public:
46  PndSdsCluster(std::vector<Int_t> list);
47 
48  virtual void SetClusterList(Int_t DigiType, std::vector<Int_t> list, Int_t fileId, Int_t eventId) = 0;
49  std::vector<Int_t> GetClusterList() const { return fClusterList; }
50  Int_t GetClusterSize() const { return fClusterList.size(); }
51  Int_t GetDigiIndex(Int_t i) const { return fClusterList[i]; }
52 
53  bool DigiBelongsToCluster(Int_t digiIndex);
54 
55  virtual void Print();
56 
57  protected:
58  std::vector<Int_t> fClusterList;
59 
61 };
62 
63 #endif
friend std::ostream & operator<<(std::ostream &out, PndSdsCluster &cl)
Definition: PndSdsCluster.h:32
std::vector< Int_t > GetClusterList() const
Definition: PndSdsCluster.h:49
virtual void Print()
Class to store the Digis which belong to one cluster This class holds the information which Digi belo...
Definition: PndSdsCluster.h:30
Int_t GetDigiIndex(Int_t i) const
Definition: PndSdsCluster.h:51
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:33
Int_t GetClusterSize() const
Definition: PndSdsCluster.h:50
bool DigiBelongsToCluster(Int_t digiIndex)
std::vector< Int_t > fClusterList
Definition: PndSdsCluster.h:58