#include <Cluster.h>
Public Member Functions | |
Cluster () | |
Cluster (vector< const recobase::CellHit * > &cellvec) | |
~Cluster () | |
bool | Add (const recobase::CellHit *cell) |
int | NPlane () const |
int | NXPlane () const |
int | NYPlane () const |
int | Plane (int i) const |
int | XPlane (int i) const |
int | YPlane (int i) const |
int | NCell () const |
int | NXCell () const |
int | NYCell () const |
bool | Is3D () const |
const recobase::CellHit * | XCell (int i) const |
const recobase::CellHit * | YCell (int i) const |
const recobase::CellHit * | XCell (int icell, int iplane) const |
const recobase::CellHit * | YCell (int icell, int iplane) const |
const double * | XYZT () const |
double | Z () const |
double | dZ () const |
double | T () const |
double | dT () const |
double | X () const |
double | dX () const |
double | Y () const |
double | dY () const |
double | Q () const |
double | dQ () const |
void | SetQ (double q) |
void | SetdQ (double dq) |
void | SetXYZT (double x[]) |
void | SetdXYZT (double dx[]) |
Private Attributes | |
TRefArray | fXCell |
TRefArray | fYCell |
vector< int > | fXPlane |
sorted vector of x-planes | |
vector< int > | fYPlane |
sorted vector of y-planes | |
vector< int > | fPlane |
sorted vector of planes | |
short | fStatus |
double | f4Vec [4] |
double | fd4Vec [4] |
double | fQ |
double | fdQ |
|
Definition at line 25 of file Cluster.cxx. 00025 : 00026 fXPlane(0), fYPlane(0), fPlane(0), fStatus(0), 00027 fQ(0), fdQ(0) 00028 { 00029 for (int i=0; i<4; ++i) { 00030 f4Vec[i] = -1.e9; 00031 fd4Vec[i] = 0.; 00032 } 00033 }
|
|
Definition at line 39 of file Cluster.cxx. References f4Vec, fd4Vec, fPlane, fXCell, fXPlane, fYCell, fYPlane, and Plane(). 00039 : 00040 fXPlane(0), fYPlane(0), fPlane(0), fStatus(0), 00041 fQ(0), fdQ(0) 00042 { 00043 for (int i=0; i<4; ++i) { 00044 f4Vec[i] = -1.e9; 00045 fd4Vec[i] = 0.; 00046 } 00047 00048 for (unsigned int i=0; i<cell.size(); ++i) { 00049 if (cell[i]->View() == geo::kX) { // cell is in a x-plane 00050 fXCell.Add((CellHit*)cell[i]); 00051 if (find(fXPlane.begin(),fXPlane.end(),cell[i]->Plane()) == 00052 fXPlane.end()) fXPlane.push_back(cell[i]->Plane()); 00053 } 00054 else { // cell is in a y-plane 00055 fYCell.Add((CellHit*)cell[i]); 00056 if (find(fYPlane.begin(),fYPlane.end(),cell[i]->Plane()) == 00057 fYPlane.end()) fYPlane.push_back(cell[i]->Plane()); 00058 } 00059 00060 if (find(fPlane.begin(),fPlane.end(),cell[i]->Plane()) == 00061 fPlane.end()) fPlane.push_back(cell[i]->Plane()); 00062 } 00063 00064 // sort planes 00065 sort(fXPlane.begin(),fXPlane.end()); 00066 sort(fYPlane.begin(),fYPlane.end()); 00067 sort(fPlane.begin(),fPlane.end()); 00068 00069 }
|
|
Definition at line 74 of file Cluster.cxx. 00075 { 00076 00077 }
|
|
Definition at line 186 of file Cluster.cxx. References recobase::CellHit::Cell(), fXCell, fYCell, NXCell(), NYCell(), recobase::CellHit::Plane(), recobase::CellHit::View(), XCell(), and YCell(). Referenced by recobase::Prong::Add(). 00187 { 00188 bool foundDup = false; 00189 00190 if (cell->View() == geo::kX) { 00191 for (int i=0; i<this->NXCell(); ++i) { 00192 const CellHit* c2 = this->XCell(i); 00193 if (c2->Plane() == cell->Plane() && c2->Cell() == cell->Cell()) { 00194 foundDup = true; 00195 break; 00196 } 00197 } 00198 if (!foundDup) fXCell.Add((CellHit*)cell); 00199 } 00200 else { 00201 for (int i=0; i<this->NYCell(); ++i) { 00202 const CellHit* c2 = this->YCell(i); 00203 if (c2->Plane() == cell->Plane() && c2->Cell() == cell->Cell()) { 00204 foundDup = true; 00205 break; 00206 } 00207 } 00208 if (!foundDup) fYCell.Add((CellHit*)cell); 00209 } 00210 00211 return !foundDup; 00212 }
|
|
Definition at line 62 of file Cluster.h. 00062 {return fdQ;}
|
|
Definition at line 56 of file Cluster.h. 00056 {return fd4Vec[3];}
|
|
Definition at line 58 of file Cluster.h. 00058 {return fd4Vec[0];}
|
|
Definition at line 60 of file Cluster.h. 00060 {return fd4Vec[1];}
|
|
Definition at line 54 of file Cluster.h. 00054 {return fd4Vec[2];}
|
|
Definition at line 43 of file Cluster.h.
|
|
Definition at line 129 of file Cluster.cxx. References NXCell(), and NYCell().
|
|
Definition at line 31 of file Cluster.h.
|
|
Definition at line 115 of file Cluster.cxx. References fXCell. Referenced by Add(), evd::PlaneView::DrawTrackCandidates(), NCell(), and XCell(). 00116 { 00117 return fXCell.GetLast() + 1; 00118 }
|
|
Definition at line 32 of file Cluster.h. 00032 {return fXPlane.size(); }
|
|
Definition at line 122 of file Cluster.cxx. References fYCell. Referenced by Add(), evd::PlaneView::DrawTrackCandidates(), NCell(), and YCell(). 00123 { 00124 return fYCell.GetLast() + 1; 00125 }
|
|
Definition at line 33 of file Cluster.h. 00033 {return fYPlane.size(); }
|
|
Definition at line 101 of file Cluster.cxx. References assert_jobc, fPlane, fXPlane, fYPlane, XPlane(), and YPlane(). Referenced by Cluster(). 00102 { 00103 unsigned int j = i; 00104 assert_jobc((i >= 0 && j < (fPlane.size())), 00105 "Cluster::Plane(): out of bounds exception!"); 00106 00107 if (fYPlane.empty()) return this->XPlane(i); 00108 if (fXPlane.empty()) return this->YPlane(i); 00109 00110 return fPlane[j]; 00111 }
|
|
Definition at line 61 of file Cluster.h. 00061 {return fQ;}
|
|
Definition at line 65 of file Cluster.h. 00065 { fdQ = dq; }
|
|
Definition at line 67 of file Cluster.h. 00067 { for (int i=0; i<4; ++i) fd4Vec[i] = dx[i]; }
|
|
Definition at line 64 of file Cluster.h. 00064 { fQ = q; }
|
|
Definition at line 66 of file Cluster.h. 00066 { for (int i=0; i<4; ++i) f4Vec[i] = x[i]; }
|
|
Definition at line 55 of file Cluster.h. 00055 {return f4Vec[3];}
|
|
Definition at line 57 of file Cluster.h. 00057 {return f4Vec[0];}
|
|
Definition at line 147 of file Cluster.cxx. References recobase::CellHit::Cell(), NXCell(), recobase::CellHit::Plane(), and XCell(). 00148 { 00149 for (int i=0; i<this->NXCell(); ++i) { 00150 const CellHit* c2 = this->XCell(i); 00151 if (c2->Plane() == iplane && 00152 c2->Cell() == icell) 00153 return c2; 00154 } 00155 00156 return 0; 00157 }
|
|
Definition at line 136 of file Cluster.cxx. References assert_jobc, fXCell, and NXCell(). Referenced by Add(), evd::PlaneView::DrawTrackCandidates(), and XCell(). 00137 { 00138 assert_jobc((i >= 0) && (i < this->NXCell()), 00139 "Cluster::XCell(): out of bounds exception!"); 00140 00141 CellHit* cell = dynamic_cast<CellHit*>(fXCell.At(i)); 00142 return cell; 00143 }
|
|
Definition at line 81 of file Cluster.cxx. References assert_jobc, and fXPlane. Referenced by Plane(). 00082 { 00083 unsigned int j = i; 00084 assert_jobc((i >= 0 && j < fXPlane.size()), 00085 "Cluster::XPlane(): out of bounds exception!"); 00086 return fXPlane[j]; 00087 }
|
|
Definition at line 52 of file Cluster.h. 00052 { return f4Vec; }
|
|
Definition at line 59 of file Cluster.h. 00059 {return f4Vec[1];}
|
|
Definition at line 172 of file Cluster.cxx. References recobase::CellHit::Cell(), NYCell(), recobase::CellHit::Plane(), and YCell(). 00173 { 00174 for (int i=0; i<this->NYCell(); ++i) { 00175 const CellHit* c2 = this->YCell(i); 00176 if (c2->Plane() == iplane && 00177 c2->Cell() == icell) 00178 return c2; 00179 } 00180 00181 return 0; 00182 }
|
|
Definition at line 161 of file Cluster.cxx. References assert_jobc, fYCell, and NYCell(). Referenced by Add(), evd::PlaneView::DrawTrackCandidates(), and YCell(). 00162 { 00163 assert_jobc((i >= 0) && (i < this->NYCell()), 00164 "Cluster::YCell(): out of bounds exception!"); 00165 00166 CellHit* cell = dynamic_cast<CellHit*>(fYCell.At(i)); 00167 return cell; 00168 }
|
|
Definition at line 91 of file Cluster.cxx. References assert_jobc, and fYPlane. Referenced by Plane(). 00092 { 00093 unsigned int j = i; 00094 assert_jobc((i >= 0 && j < fYPlane.size()), 00095 "Cluster::YPlane(): out of bounds exception!"); 00096 return fYPlane[j]; 00097 }
|
|
Definition at line 53 of file Cluster.h. Referenced by evd::PlaneView::DrawTrackCandidates(), and zSort(). 00053 {return f4Vec[2];}
|
|
Definition at line 78 of file Cluster.h. Referenced by Cluster(). |
|
Definition at line 79 of file Cluster.h. Referenced by Cluster(). |
|
|
|
sorted vector of planes
|
|
|
|
|
|
|
|
sorted vector of x-planes
|
|
|
|
sorted vector of y-planes
|