21 int&
plane,
int&
cell,
int& cellOtherView,
31 if(plane < 0 || plane >=
int(geom->
NPlanes())) plane = 0;
42 for(
int trial = 0; trial < 4; ++trial){
46 double offsetX = 0, offsetY = 0;
47 if(trial == 1) offsetX = -2;
48 if(trial == 2) offsetY = -2;
49 if(trial == 3) offsetX = offsetY = -2;
61 int&
plane,
int&
cell,
int& cellOtherView,
85 if(cellOtherView >= ncells)
86 cellOtherView = ncells-1;
91 double zOther = xyz[2];
103 geom->
IdToCell(idOther, &checkPlane, &cellOtherView);
105 if(checkPlane == nextPlane)
return;
107 if(checkPlane < nextPlane) zOther += 1;
108 if(checkPlane > nextPlane) zOther -= 1;
::xsd::cxx::tree::id< char, ncname > id
void GetCenter(double *xyz, double localz=0.0) const
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
void VertexToPlaneAndCell(const TVector3 vtx, const rb::Cluster &slice, int &plane, int &cell, int &cellOtherView, bool reverse)
const CellGeo * Cell(int icell) const
unsigned int Ncells() const
Number of cells in this plane.
A collection of associated CellHits.
unsigned int MaxCell(geo::View_t view) const
const PlaneGeo * Plane(unsigned int i) const
void DefaultVertex(const rb::Cluster &slice, int &plane, int &cell, int &cellOtherView, bool reverse)
View_t View() const
Which coordinate does this plane measure.
const CellUniqueId CellId(const double &x, const double &y, const double &z, double dxds=0., double dyds=0., double dzds=1., double step=0.01) const
int MeanCell(geo::View_t view, const rb::Cluster &slice)
geo::CellUniqueId FindCellRobust(double x, double y, double z)
Steps around a bit. Can still return zero for total failure.
unsigned int MinPlane(geo::View_t view=geo::kXorY) const
unsigned long long int CellUniqueId
unsigned int MinCell(geo::View_t view) const
unsigned int MaxPlane(geo::View_t view=geo::kXorY) const
unsigned int NPlanes() const
const CellGeo * IdToCell(const CellUniqueId &id, int *iplane, int *icell) const
Encapsulate the geometry of one entire detector (near, far, ndos)
const unsigned int NextPlaneOtherView(unsigned int p, int d=+1) const