All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
voxel.cc
Go to the documentation of this file.
1 
2 
3 #include <iostream>
4 #include "voxel.h"
5 
6 using namespace std;
7 
9 }
10 Voxel_tpc::Voxel_tpc(int row, int phi, int z, double pos[3], double posRPhi[2], double edep, double RPhiRes, double ZRes)
11 {
12  _row_index = row;
13  _phi_index = phi;
14  _z_index = z;
15  _coord.setX(pos[0]);
16  _coord.setY(pos[1]);
17  _coord.setZ(pos[2]);
18  _edep = edep;
19  _rPhiRes = RPhiRes;
20  _zRes = ZRes;
21  _isMerged = false;
22  _isClusterHit = false;
23 }
24 
25 Voxel_tpc::Voxel_tpc(int row, int phi, int z, CLHEP::Hep3Vector coord, double edep, double RPhiRes, double ZRes)
26 {
27  _row_index = row;
28  _phi_index = phi;
29  _z_index = z;
30  _coord=coord;
31  _edep = edep;
32  _rPhiRes = RPhiRes;
33  _zRes = ZRes;
34  _isMerged = false;
35  _isClusterHit = false;
36 }
37 
39 {
40 }
41 
42 //bool Voxel_tpc::compare_phi( Voxel_tpc * & a, Voxel_tpc * & b){
43 
44 // return ( a->getPhiIndex() < b->getPhiIndex());
45 
46 //}
47 
48 int Voxel_tpc::clusterFind(vector <Voxel_tpc*>* hitList){
49 
50  if(!this->IsClusterHit()){
51  hitList->push_back(this);
52  this->setIsClusterHit();
53  for(int i=0; i<this->getNumberOfAdjacent();++i){
54  getAdjacent(i)->clusterFind(hitList);
55  }
56  }
57 
58  return hitList->size();
59 }
60 
~Voxel_tpc()
Definition: voxel.cc:38
int clusterFind(vector< Voxel_tpc * > *hitList)
Definition: voxel.cc:48
Voxel_tpc()
Definition: voxel.cc:8