"MarlinReco"  1.32.0
voxel.h
1 #ifndef _voxel_included_
2 #define _voxel_included_
3 
4 // A header file which defines a voxel class for the TPC
5 #include <vector>
6 //#include "ThreeVector.h"
7 #include <CLHEP/Vector/ThreeVector.h>
8 
9 using namespace std;
10 
11 class Voxel_tpc{
12 
13  public:
14  Voxel_tpc();
15  // the intialation in the constructor here would be preferable though I don't know how to intialise
16  // the array xyz[3] here with pos[3], for the mean time the constructor will be put in the .cc file
17  // Voxel_tpc(int row, int phi, int z, double pos[3]) : row_index(row), phi_index(phi), z_index(z){}
18  Voxel_tpc(int row, int phi, int z, double pos[3], double posRPhi[2], double edep, double rPhiRes, double zRes);
19  Voxel_tpc(int row, int phi, int z, CLHEP::Hep3Vector coord, double edep, double rPhiRes, double zRes);
20  ~Voxel_tpc();
21 
22  void setAdjacent(Voxel_tpc * p_voxel) { _adjacent_voxels.push_back(p_voxel);};
23  void setIsClusterHit() { _isClusterHit = true;};
24  void setIsMerged() { _isMerged = true;};
25  bool IsClusterHit() { return _isClusterHit;};
26  bool IsMerged() { return _isMerged;};
27  int clusterFind(vector <Voxel_tpc*>* hitList);
28 
29 
30  int getRowIndex() {return _row_index;};
31  int getPhiIndex() {return _phi_index;};
32  int getZIndex() {return _z_index;};
33  Voxel_tpc * getFirstAdjacent() {return *(_adjacent_voxels.begin());};
34  Voxel_tpc * getAdjacent(int i) {return _adjacent_voxels[i];};
35  int getNumberOfAdjacent() {return _adjacent_voxels.size();};
36  double getX() {return _coord.x();};
37  double getY() {return _coord.y();};
38  double getZ() {return _coord.z();};
39  double getR() {return _coord.perp();};
40  double getPhi() {return _coord.phi();};
41  double getEDep() {return _edep;};
42  double getRPhiRes() {return _rPhiRes;};
43  double getZRes() {return _zRes;};
44  const CLHEP::Hep3Vector getHep3Vector() {return _coord;};
45  // bool compare_phi( Voxel_tpc * & a, Voxel_tpc * & b);
46 
47 
48 
49  private:
50  int _row_index{};
51  int _phi_index{};
52  int _z_index{};
53  vector <Voxel_tpc *> _adjacent_voxels{};
54  CLHEP::Hep3Vector _coord{};
55  double _edep{};
56  double _rPhiRes{};
57  double _zRes{};
58  bool _isMerged{};
59  bool _isClusterHit{};
60 };
61 #endif
Definition: voxel.h:11