18 #ifndef PNDGEMCLUSTER_H 19 #define PNDGEMCLUSTER_H 1 23 #include "FairTimeStamp.h" 34 <<
" to " << cluster.
GetClusterEnd() <<
" > charge = " << cluster.
GetCharge() <<
", cor = " << cluster.
GetCor() <<
", timestamp " << cluster.GetTimeStamp()
35 <<
", from Point(s) ";
36 std::vector<Int_t> indices = cluster.
GetIndices();
37 for (
unsigned int i = 0;
i < indices.size();
i++) {
38 out << indices[
i] <<
" ";
56 PndGemCluster(Int_t iDetectorId, Double_t iChannel, Int_t bChannel, Int_t eChannel, std::vector<Int_t> index);
57 PndGemCluster(Int_t iDetectorId, Double_t iChannel, Int_t bChannel, Int_t eChannel, Double_t signal, Double_t time, std::vector<Int_t> index);
62 void SetCharge(Double_t iCharge) { fClusterCharge = iCharge; }
63 void SetCor(Double_t iCor) { fClusterCor = iCor; }
68 void AddCharge(Double_t iCharge) { fClusterCharge += iCharge; }
74 Int_t
GetSystemId()
const {
return ((fDetectorId & (31 << 27)) >> 27); }
75 Int_t
GetStationNr()
const {
return ((fDetectorId & (8191 << 8)) >> 8); }
78 return ((fDetectorId & (3 << 6)) >> 6);
80 Int_t
GetSide()
const {
return ((fDetectorId & (1 << 5)) >> 5); }
84 Double_t
GetCharge()
const {
return fClusterCharge; }
85 Double_t
GetCor()
const {
return fClusterCor; }
89 std::vector<Int_t> result;
90 std::set<FairLink> myLinks = GetLinks();
91 for (std::set<FairLink>::iterator it = myLinks.begin(); it != myLinks.end(); it++) {
92 result.push_back(it->GetIndex());
97 Int_t
GetIndex(
int i = 0)
const {
return GetLink(
i).GetIndex(); }
99 void AddIndex(
int index) { AddLink(FairLink(
"GEMDigi", index)); }
100 void AddIndex(std::vector<Int_t> index) { SetLinks(FairMultiLinkedData(
"GEMDigi", index)); }
102 virtual bool equal(FairTimeStamp *data)
105 if (myCluster !=
nullptr) {
153 Double_t fClusterCharge;
154 Double_t fClusterCor;
Int_t GetSensorNr() const
Int_t GetDetectorId() const
void SetCharge(Double_t iCharge)
virtual bool equal(FairTimeStamp *data)
Int_t GetClusterBeg() const
void AddIndex(std::vector< Int_t > index)
virtual bool operator>(const PndGemCluster &myCluster) const
Int_t GetSystemId() const
void SetClusterBeg(Int_t bChan)
Int_t GetIndex(int i=0) const
Int_t GetClusterEnd() const
std::vector< Int_t > GetIndices() const
Int_t GetStationNr() const
friend std::ostream & operator<<(std::ostream &out, PndGemCluster &cluster)
void SetCor(Double_t iCor)
void AddCharge(Double_t iCharge)
Double_t GetCharge() const
virtual bool operator==(const PndGemCluster &myCluster) const
Double_t GetChannelNr() const
virtual bool operator<(const PndGemCluster &myCluster) const
void SetClusterEnd(Int_t eChan)