-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCCluster3D.hxx
74 lines (51 loc) · 1.25 KB
/
CCluster3D.hxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef CCluster3D_hxx_seen
#define CCluster3D_hxx_seen
#include "TROOT.h"
#include "TObject.h"
#include "TMath.h"
#include <iostream>
#include <vector>
#include "TVector3.h"
#include "CHit3D.hxx"
#include "CBond3D.hxx"
/// The base class for a clustered hits
class CCluster3D : public TObject {
public:
CCluster3D() {}
virtual ~CCluster3D() {}
void SetId(int id){fID=id;}
void AddConstituent(int hit){
fConstituents.push_back(hit);
}
void SetStartPoint(int hit){
fStart = hit;
}
void SetEndPoint(int hit){
fEnd = hit;
}
void AddBond(int bond){
fBonds.push_back(bond);
}
int GetId() const{return fID;}
std::vector<int> GetConstituents() const{
return fConstituents;
}
int GetStartPoint() const{
return fStart;
}
int GetEndPoint() const{
return fEnd;
}
std::vector<int> GetBonds() const{
return fBonds;
}
bool operator==(const CCluster3D& rhs) const { return this->GetId() == rhs.GetId();}
private:
int fID;
std::vector<int> fConstituents;
int fStart;
int fEnd;
std::vector<int> fBonds;
ClassDef(CCluster3D,1);
};
#endif