hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HodoCluster.h
Go to the documentation of this file.
1
7#ifndef _HODO_CLUSTER_H__
8#define _HODO_CLUSTER_H__
9
10//----------------//
11// C++ StdLib //
12//----------------//
13#include <vector>
14
15//----------//
16// ROOT //
17//----------//
18#include <TClonesArray.h>
19#include <TObject.h>
20#include <TRefArray.h>
21#include <TRef.h>
22
23class HodoCluster : public TObject {
24
25public:
26
29 HodoCluster(int ix,int iy, int layer, double energy, double time):
30 index_x_{ix},index_y_{iy},layer_{layer},energy_{energy},time_{time} {};
31
34
36 void Clear(Option_t *option="");
37
43 void addHit(TObject* hit);
44
49 TRefArray* getHits() const { return hits_; }
50
56 void setEnergy(const double energy) { energy_ = energy; };
57
59 double getEnergy() const { return energy_; };
60
66 void setLayer(const int layer) { layer_ = layer; };
67
69 double getLayer() const { return layer_; };
70
71
77 void setTime(const double time) { time_ = time; };
78
80 double getTime() const { return time_; };
81
88 void setIndices(int index_x, int index_y){
89 index_x_ = index_x;
90 index_y_ = index_y;
91 };
92
94 std::vector<int> getIndices() const { return { index_x_, index_y_ }; }
95
96
98
99 // private:
100
102 TRefArray* hits_{new TRefArray{}};
103
105 int n_hits_{0};
106
108 int index_x_{-9999};
109
111 int index_y_{-9999};
112
114 int layer_{-9999};
115
117 double energy_{-9999};
118
120 double time_{-9999};
121
122};
123
124#endif // _HODO_CLUSTER_H_
double energy_
void setLayer(const int layer)
Definition HodoCluster.h:66
void setIndices(int index_x, int index_y)
Definition HodoCluster.h:88
double getEnergy() const
Definition HodoCluster.h:59
double getLayer() const
Definition HodoCluster.h:69
void Clear(Option_t *option="")
std::vector< int > getIndices() const
Definition HodoCluster.h:94
TRefArray * hits_
void setEnergy(const double energy)
Definition HodoCluster.h:56
TRefArray * getHits() const
Definition HodoCluster.h:49
void setTime(const double time)
Definition HodoCluster.h:77
void addHit(TObject *hit)
ClassDef(HodoCluster, 1)
HodoCluster(int ix, int iy, int layer, double energy, double time)
Definition HodoCluster.h:29
double getTime() const
Definition HodoCluster.h:80