LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
APAGeometryAlg.cxx
Go to the documentation of this file.
1 //
3 // \fileAPAGeometryAlg.cxx
4 //
5 // tylerdalion@gmail.com
6 //
7 // Geometry interface to smooth over the awkwardness of fitting an
8 // APA into LArSoft. It is geared towards making reconstruction simpler
9 //
11 
12 //Framework includes:
14 
21 
22 #include <algorithm>
23 #include <cmath>
24 #include <cstdlib>
25 #include <iostream>
26 
27 namespace apa {
28 
30  {
31  this->reconfigure(pset);
32  this->Init();
33  }
34 
35  //----------------------------------------------------------
37  {
38  this->Init();
39  }
40 
41  //----------------------------------------------------------
43 
44  //----------------------------------------------------------
46  {
47 
48  // find the number of channels per APA
49  uint32_t channel = 0;
50 
51  // old logic -- segfaults if there is just one APA
52  //while( fGeom->ChannelToWire(channel+1)[0].TPC < 2 ) channel++;
53  //fChannelsPerAPA = channel + 1;
54 
56  for (channel = 0; channel < fGeom->Nchannels(); ++channel) {
57  if (fGeom->ChannelToWire(channel)[0].TPC > 1) {
58  fChannelsPerAPA = channel;
59  break;
60  }
61  }
62 
63  // Step through channel c and find the view boundaries, until
64  // outside of first APA - these help optimize ChannelToAPAView
65  // (very dependent on the conventions implimented in the channel map)
66  fFirstU = 0;
67  uint32_t c = 1;
68  geo::WireID wid = (fGeom->ChannelToWire(c))[0];
69  geo::WireID lastwid;
70  while (wid.TPC < 2) {
71 
72  if (fGeom->View(c) == geo::kV && fGeom->View(c - 1) == geo::kU) {
73  fLastU = c - 1;
74  fFirstV = c;
75  }
76 
77  if (fGeom->View(c) == geo::kZ && fGeom->View(c - 1) == geo::kV) {
78  fLastV = c - 1;
79  fFirstZ0 = c;
80  }
81 
82  if (wid.TPC == lastwid.TPC + 1) {
83  fLastZ0 = c - 1;
84  fFirstZ1 = c;
85  }
86 
87  lastwid = wid;
88  c++;
89  if (c >= fGeom->Nchannels()) break;
90  wid = (fGeom->ChannelToWire(c))[0]; // for the while condition
91  }
92 
93  fLastZ1 = c - 1;
94 
95  if (fLastZ1 + 1 != fChannelsPerAPA)
96  throw cet::exception("APAGeometryAlg") << "Channel boundaries are inconsistent.\n";
97 
98  // some other things that will be needed
99  fAPAsPerCryo = fGeom->NTPC() / 2;
102  }
103 
104  //----------------------------------------------------------
105  void APAGeometryAlg::ChannelToAPA(uint32_t chan, unsigned int& apa, unsigned int& cryo) const
106  {
107 
108  cryo = chan / (fAPAsPerCryo * fChannelsPerAPA);
109 
110  // Number apa uniquely across cryostats so that
111  // apa to recob::Object maps are easy to work with.
112  // If we decide to reset APA number per cryo, uncomment:
113  //chan -= cryo*fAPAsPerCryo*fChannelsPerAPA;
114  apa = chan / fChannelsPerAPA;
115 
116  return;
117  }
118 
119  //----------------------------------------------------------
120  unsigned int APAGeometryAlg::ChannelToAPA(uint32_t chan) const
121  {
122  return chan / fChannelsPerAPA;
123  }
124 
125  //----------------------------------------------------------
126  unsigned int APAGeometryAlg::ChannelsInView(geo::View_t geoview) const
127  {
128 
129  switch (geoview) {
130  default: return 0;
131  case geo::kU: return ChannelsInAPAView(kU);
132  case geo::kV: return ChannelsInAPAView(kV);
133  case geo::kZ:
135  return ChannelsInAPAView(kZ0);
136  else
137  throw cet::exception("ChannelsInView")
138  << "Both Z sides should have the same amount of channels\n";
139  }
140  }
141 
142  //----------------------------------------------------------
143  unsigned int APAGeometryAlg::ChannelsInAPAView(APAView_t apaview) const
144  {
145 
146  switch (apaview) {
147  default: return 0;
148  case kU: return fFirstV - fFirstU;
149  case kV: return fFirstZ0 - fFirstV;
150  case kZ0: return fFirstZ1 - fFirstZ0;
151  case kZ1: return fLastZ1 - fFirstZ1 + 1;
152  }
153  }
154 
155  //----------------------------------------------------------
157  unsigned int apa,
158  unsigned int cryo) const
159  {
160 
161  switch (geoview) {
162  default: return 0 + (uint32_t)(apa + cryo * fAPAsPerCryo) * fChannelsPerAPA;
163  case geo::kU: return fFirstU + (uint32_t)(apa + cryo * fAPAsPerCryo) * fChannelsPerAPA;
164  case geo::kV: return fFirstV + (uint32_t)(apa + cryo * fAPAsPerCryo) * fChannelsPerAPA;
165  case geo::kZ:
166  //TODO: would need tpc number for the rest of this
167  return fFirstZ0 + (uint32_t)(apa + cryo * fAPAsPerCryo) * fChannelsPerAPA;
168  }
169  }
170 
171  //----------------------------------------------------------
172  uint32_t APAGeometryAlg::FirstChannelInView(uint32_t chan) const
173  {
174 
175  geo::View_t geoview = fGeom->View(chan);
176  unsigned int apa, cryo;
177  this->ChannelToAPA(chan, apa, cryo);
178  return this->FirstChannelInView(geoview, chan);
179  }
180 
181  //----------------------------------------------------------
182  uint32_t APAGeometryAlg::FirstChannelInView(geo::View_t geoview, uint32_t chan) const
183  {
184 
185  unsigned int apa, cryo;
186  this->ChannelToAPA(chan, apa, cryo);
187  return this->FirstChannelInView(geoview, apa, cryo);
188  }
189 
190  //----------------------------------------------------------
191  APAView_t APAGeometryAlg::APAView(uint32_t chan) const
192  {
193 
194  // it seems trivial to do this for U and V, but this gives a side to
195  // geo::kZ, unlike Geometry::View(c), as is often needed in disambiguation
196 
197  geo::View_t view = fGeom->View(chan);
198  switch (view) {
199  default: break;
200  case geo::kU: return kU;
201  case geo::kV: return kV;
202  case geo::kZ:
203  unsigned int modchan = chan % fChannelsPerAPA;
204  // Channel mapping number in the order of U, V, Z0, then Z1
205  if (modchan > fLastV && modchan < fFirstZ1) return kZ0;
206  if (modchan > fLastZ0) return kZ1;
207  }
208 
209  return kUnknown;
210  }
211 
212  //----------------------------------------------------------
213  std::vector<geo::WireID> APAGeometryAlg::ChanSegsPerSide(uint32_t chan, unsigned int side) const
214  {
215 
216  std::vector<geo::WireID> wids = fGeom->ChannelToWire(chan);
217  return this->ChanSegsPerSide(wids, side);
218  }
219 
220  //----------------------------------------------------------
221  std::vector<geo::WireID> APAGeometryAlg::ChanSegsPerSide(std::vector<geo::WireID> wids,
222  unsigned int side) const
223  {
224  // Given a vector of wireIDs and an APA side, return
225  // the wireIDs the the tpc side where tpc%2 = side
226 
227  std::vector<geo::WireID> thisSide;
228 
229  for (size_t i = 0; i < wids.size(); i++)
230  if (wids[i].TPC % 2 == side) thisSide.push_back(wids[i]);
231 
232  return thisSide;
233  }
234 
235  //----------------------------------------------------------
237  uint32_t chan,
238  unsigned int const plane,
239  unsigned int const tpc,
240  unsigned int const cstat) const
241  {
242 
243  std::vector<geo::WireID> cWids = fGeom->ChannelToWire(chan);
244 
245  if (cWids[0].Cryostat != cstat)
246  throw cet::exception("APAGeometryAlg")
247  << "Channel " << chan << "not in cryostat " << cstat << "\n";
248  if (std::floor(cWids[0].TPC / 2) != std::floor(tpc / 2))
249  throw cet::exception("APAGeometryAlg")
250  << "Channel " << chan << "not in APA " << std::floor(tpc / 2) << "\n";
251 
252  // special case for vertical wires
253  if (fGeom->View(chan) == geo::kZ) return fGeom->ChannelToWire(chan)[0];
254 
255  unsigned int xyzWire = fGeom
256  ->NearestWireID(geo::Point_t{WorldLoc[0], WorldLoc[1], WorldLoc[2]},
257  geo::PlaneID{cstat, tpc, plane})
258  .Wire;
259 
260  // The desired wire ID will be the only channel
261  // segment within half the channel range.
262  geo::WireID wid;
263  for (size_t i = 0; i < cWids.size(); i++) {
264  if (cWids[i].TPC != tpc) continue;
265  if (std::abs((int)cWids[i].Wire - (int)xyzWire) < fChannelRange[plane] / 2) wid = cWids[i];
266  }
267 
268  return wid;
269  }
270 
271  //----------------------------------------------------------
272  bool APAGeometryAlg::LineSegChanIntersect(TVector3 xyzStart,
273  TVector3 xyzEnd,
274  uint32_t chan,
275  std::vector<geo::WireID>& widsCrossed,
276  bool ExtendLine = true) const
277  {
278  // This assumes a smooth wire numbering, and that the line seg is contained in a tpc.
279  // Meant for use with the approximate line calculated
280  // by matching cluster endpoints in disambiguation.
281 
282  // Find tpc, use midpoint in case start/end is on a boundary
283  geo::Point_t const xyzMid{
284  (xyzStart[0] + xyzEnd[0]) / 2, (xyzStart[1] + xyzEnd[1]) / 2, (xyzStart[2] + xyzEnd[2]) / 2};
285  auto const& tpcid = fGeom->PositionToTPCID(xyzMid);
286 
287  // Find the nearest wire number to the line segment endpoints
288  std::vector<geo::WireID> wids = fGeom->ChannelToWire(chan);
289  geo::PlaneID const planeID{tpcid, wids[0].Plane};
290  using geo::vect::toPoint;
291  unsigned int startW = fGeom->NearestWireID(toPoint(xyzStart), planeID).Wire;
292  unsigned int endW = fGeom->NearestWireID(toPoint(xyzEnd), planeID).Wire;
293 
294  if (startW > endW) std::swap(startW, endW);
295 
296  // Loop through wireIDs and check for intersection, if in the right TPC
297  for (size_t w = 0; w < wids.size(); w++) {
298  if (wids[w].TPC != tpcid.TPC) continue;
299  if (wids[w].Cryostat != tpcid.Cryostat)
300  throw cet::exception("LineSegChanIntersect")
301  << "Channel and line not in the same crostat.\n";
302 
303  // If the current wire id wire number is inbetween the start/end
304  // point wires, the line segment intersects the wireID at some point.
305 
306  // TODO: for now, extend range, but that is application specific. fix asap
307  // The longer we make the range, the more conservative it is, so it is safe
308  // to extend the range a bit to get hits at the ends of the line
309  unsigned int ext = 0;
310  if (ExtendLine) ext = 10;
311 
312  if (lar::util::ValueInRange(wids[w].Wire * 1., (startW - ext) * 1., (endW + ext) * 1.))
313  widsCrossed.push_back(wids[w]);
314  }
315 
316  return widsCrossed.size() > 0;
317  }
318 
319  //----------------------------------------------------------
320  std::vector<double> APAGeometryAlg::ThreeChanPos(uint32_t u, uint32_t v, uint32_t z) const
321  {
322 
323  // Say we've associated a U, V, and Z channel -- perhaps by associating hits
324  // or cluster endpoints -- these don't necessarily all intersect, but they
325  // are hopefully pretty close. Find the center of the 3 intersections.
326 
327  // get data needed along the way
328  std::vector<geo::WireIDIntersection> UVIntersects;
329  this->APAChannelsIntersect(u, v, UVIntersects);
330  std::vector<double> UVzToZ(UVIntersects.size());
331  geo::WireID Zwid = fGeom->ChannelToWire(z)[0];
332  unsigned int cryo = Zwid.Cryostat;
333  unsigned int tpc = Zwid.TPC;
334  std::vector<geo::WireID> Uwids = fGeom->ChannelToWire(u);
335  std::vector<geo::WireID> Vwids = fGeom->ChannelToWire(v);
336  std::vector<geo::WireID> UwidsInTPC, VwidsInTPC;
337  for (size_t i = 0; i < Uwids.size(); i++)
338  if (Uwids[i].TPC == tpc) UwidsInTPC.push_back(Uwids[i]);
339  for (size_t i = 0; i < Vwids.size(); i++)
340  if (Vwids[i].TPC == tpc) VwidsInTPC.push_back(Vwids[i]);
341  auto const Zcent = fGeom->WireIDToWireGeo(Zwid).GetCenter();
342 
343  std::cout << "Zcent = " << Zcent.Z() << ", UVintersects zpos = ";
344  for (size_t uv = 0; uv < UVIntersects.size(); uv++) {
345  std::cout << UVIntersects[uv].z << ", ";
346  }
347  std::cout << "\n";
348 
351 
352  //std::cout << "U = " << u << " V = " << v << ", " << UVIntersects.size() << std::endl;
353 
354  if (UVIntersects.size() == 0) {
355  if (UwidsInTPC.size() > 1 || VwidsInTPC.size() > 1)
356  throw cet::exception("ThreeChanPos") << "U/V channels don't intersect, bad return.\n";
357 
358  // Now assume there are only one of each u and v wireIDs on in this TPC
359  mf::LogWarning("ThreeChanPos")
360  << "No U/V intersect, exceptional channels. See if U or V intersects Z\n";
361  std::vector<double> yzCenter(2, 0.);
362  geo::WireID Uwid = UwidsInTPC[0];
363  geo::WireID Vwid = VwidsInTPC[0];
364  geo::WireIDIntersection UZInt, VZInt;
365  bool checkUZ = fGeom->WireIDsIntersect(Uwid, Zwid, UZInt);
366  bool checkVZ = fGeom->WireIDsIntersect(Vwid, Zwid, VZInt);
367  if (!checkUZ && !checkVZ)
368  throw cet::exception("NoChanIntersect") << "No channels intersect, bad return.\n";
369  if (checkUZ && !checkVZ) {
370  yzCenter[0] = UZInt.y;
371  yzCenter[1] = UZInt.z;
372  }
373  if (checkVZ && !checkUZ) {
374  yzCenter[0] = VZInt.y;
375  yzCenter[1] = VZInt.z;
376  }
377  if (checkUZ && checkVZ) {
378  yzCenter[0] = (VZInt.y + UZInt.y) / 2;
379  yzCenter[1] = (VZInt.z + UZInt.z) / 2;
380  }
381  return yzCenter;
382  }
383 
386 
387  // In case the uv channels intersect twice on the same side, choose the best case.
388  // Note: this will not happen for APAs with UV angle at about 36, but will for 45
389  std::cout << "UVzToZ = ";
390  for (size_t widI = 0; widI < UVIntersects.size(); widI++) {
391  UVzToZ[widI] = std::abs(UVIntersects[widI].z - Zcent.Z());
392  std::cout << UVzToZ[widI] << ", ";
393  }
394  std::cout << "\n";
395 
396  unsigned int bestWidI = 0;
397  double minZdiff = fGeom->TPC(Zwid).Length(); // start it out at maximum z
398  for (unsigned int widI = 0; widI < UVIntersects.size(); widI++) {
399 
400  //std::cout << "widI = " << widI << std::endl;
401 
402  if (UVIntersects[widI].TPC == tpc && UVzToZ[widI] < minZdiff) {
403  minZdiff = UVzToZ[widI];
404  bestWidI = widI;
405  //std::cout << "bestWidI = " << bestWidI << std::endl;
406  }
407  }
408  geo::WireIDIntersection ChosenUVInt = UVIntersects[bestWidI];
409 
410  // Now having the UV intersection, get the UZ and VZ
411  double UVInt[3] = {0.};
412  UVInt[1] = ChosenUVInt.y;
413  UVInt[2] = ChosenUVInt.z;
414  geo::WireID Uwid = this->NearestWireIDOnChan(UVInt, u, 0, tpc, cryo);
415  geo::WireID Vwid = this->NearestWireIDOnChan(UVInt, v, 1, tpc, cryo);
416  geo::WireIDIntersection UZInt, VZInt;
417  bool checkUZ = fGeom->WireIDsIntersect(Uwid, Zwid, UZInt);
418  bool checkVZ = fGeom->WireIDsIntersect(Vwid, Zwid, VZInt);
419 
420  std::cout << "UZint.z = " << UZInt.z << " (" << checkUZ << "), VZint.z = " << VZInt.z << " ("
421  << checkVZ << ")\n";
422 
423  // find the center
424  std::vector<double> yzCenter(2, 0.);
425 
426  if (!checkUZ || !checkVZ) {
427  //throw cet::exception("ThreeChanPos") << "WireIDs were expected to intersect.\n";
428 
429  std::cout << "ChosenUVint.y = " << ChosenUVInt.y << "ChosenUVint.z = " << ChosenUVInt.z
430  << std::endl;
431 
432  //temporary case
433  yzCenter[0] = ChosenUVInt.y;
434  yzCenter[1] = ChosenUVInt.z;
435  }
436  else {
437 
438  yzCenter[0] = (ChosenUVInt.y + UZInt.y + VZInt.y) / 3;
439  yzCenter[1] = (ChosenUVInt.z + UZInt.z + VZInt.z) / 3;
440  }
441 
442  return yzCenter;
443  }
444 
445  //----------------------------------------------------------
447  uint32_t chan1,
448  uint32_t chan2,
449  std::vector<geo::WireIDIntersection>& IntersectVector) const
450  {
451 
452  // Get the WireIDs and view for each channel, make sure views are different
453  geo::WireIDIntersection widIntersect;
454  std::vector<geo::WireID> wids1 = fGeom->ChannelToWire(chan1);
455  std::vector<geo::WireID> wids2 = fGeom->ChannelToWire(chan2);
456  geo::View_t view1 = fGeom->View(chan1);
457  geo::View_t view2 = fGeom->View(chan2);
458  if (view1 == view2) {
459  mf::LogWarning("APAChannelsIntersect")
460  << "Comparing two channels in the same view, return false";
461  return false;
462  }
463  if (wids1[0].Cryostat != wids2[0].Cryostat ||
464  this->ChannelToAPA(chan1) != this->ChannelToAPA(chan2)) {
465  throw cet::exception("APAChannelsIntersect")
466  << "Comparing two channels in in different APAs: "
467  << "channel " << chan1 << " in Cryo " << wids1[0].Cryostat << ", APA "
468  << this->ChannelToAPA(chan1) << ", and channel " << chan2 << " in Cryo "
469  << wids2[0].Cryostat << ", APA " << this->ChannelToAPA(chan2) << "\n";
470  return false;
471  }
472 
473  // Loop through wids1 and see if wids2 has any intersecting wires,
474  // given that the WireIDs are in the same TPC
475  for (unsigned int i1 = 0; i1 < wids1.size(); i1++) {
476  for (unsigned int i2 = 0; i2 < wids2.size(); i2++) {
477 
478  // make sure it is reasonable to intersect
479  if (wids1[i1].Plane == wids2[i2].Plane ||
480  wids1[i1].TPC != wids2[i2].TPC || // not reasonable for a *WireID*
481  wids1[i1].Cryostat != wids2[i2].Cryostat)
482  continue;
483 
484  // std::cout << "Checking: \n WireID 1 = ("
485  // << wids1[i1].Cryostat << "," << wids1[i1].TPC << ","
486  // << wids1[i1].Plane << "," << wids1[i1].Wire
487  // << ") \n WireID 2 = ("
488  // << wids2[i2].Cryostat << "," << wids2[i2].TPC << ","
489  // << wids2[i2].Plane << "," << wids2[i2].Wire << ")" << std::endl;
490 
491  // Check if they even intersect; if they do, push back
492  if (fGeom->WireIDsIntersect(wids1[i1], wids2[i2], widIntersect)) {
493 
494  // std::cout << "we have an intersect" << std::endl;
495 
496  IntersectVector.push_back(widIntersect);
497  }
498  }
499  }
500 
501  // Of all considered configurations, there are never more than
502  // 4 intersections per channel pair
503  if (IntersectVector.size() > 4) {
504  mf::LogWarning("APAChannelsIntersect")
505  << "Got " << IntersectVector.size() << " intersections for channels " << chan1 << " and "
506  << chan2 << " - never expect more than 4, so far";
507  }
508 
509  // With increasing IntersectVector index, the WireID
510  // vector indices of the intersecting wireIDs increase.
511  // This matches the direction in which ChannelToWire
512  // builds its output WireID vector in the APA/35t Alg
513  std::sort(IntersectVector.begin(), IntersectVector.end());
514 
515  // return true if any intersection points were found
516  if (IntersectVector.size() == 0)
517  return false;
518  else
519  return true;
520  }
521 
522 } //end namespace apa
unsigned int NTPC(CryostatID const &cryoid=cryostat_zero) const
Returns the total number of TPCs in the specified cryostat.
Definition: GeometryCore.h:686
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Definition: WireGeo.h:221
double z
z position of intersection
Definition: geo_types.h:792
Functions to help with numbers.
WireGeo const & WireIDToWireGeo(WireID const &wireid) const
Returns the specified wire.
std::vector< WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
Encapsulate the construction of a single cyostat.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Planes which measure V.
Definition: geo_types.h:136
bool LineSegChanIntersect(TVector3 xyzStart, TVector3 xyzEnd, uint32_t chan, std::vector< geo::WireID > &widsCrossed, bool ExtendLine) const
If a line given by start/end points intersects a channel.
void Init()
Initialize some chanel numbers to speed up other methods.
Double_t z
Definition: plot.C:276
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
bool WireIDsIntersect(WireID const &wid1, WireID const &wid2, Point_t &intersection) const
Computes the intersection between two wires.
unsigned int ChannelsInAPAView(APAView_t apaview) const
uint32_t FirstChannelInView(geo::View_t geoview, unsigned int apa, unsigned int cryo) const
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
constexpr auto abs(T v)
Returns the absolute value of the argument.
Planes which measure Z direction.
Definition: geo_types.h:138
U view on both sides of the APA.
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:563
unsigned int fAPAsPerCryo
V view on both sides of the APA.
bool APAChannelsIntersect(uint32_t chan1, uint32_t chan2, std::vector< geo::WireIDIntersection > &IntersectVector) const
If the channels intersect, get all intersections.
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
double Length() const
Length is associated with z coordinate [cm].
Definition: TPCGeo.h:104
TPCGeo const & TPC(TPCID const &tpcid=tpc_zero) const
Returns the specified TPC.
Definition: GeometryCore.h:722
Z view on the larger-x side of the APA.
enum apa::_apa_plane_proj APAView_t
APAView_t APAView(uint32_t chan) const
Get which of the 4 APA views the channel is in.
Planes which measure U.
Definition: geo_types.h:135
unsigned int ChannelToAPA(uint32_t chan) const
Get number of the APA containing the given channel.
unsigned int ChannelsInView(geo::View_t geoview) const
unsigned int fChannelsPerAPA
All APAs have this same number of channels.
Definition of data types for geometry description.
Z view on the smaller-x side of the APA.
Encapsulate the geometry of a wire.
bool ValueInRange(double value, double min, double max)
Returns whether a value is within the specified range.
Definition: NumericUtils.cxx:7
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:180
art::ServiceHandle< geo::Geometry const > fGeom
WireID NearestWireID(Point_t const &point, PlaneID const &planeid) const
Returns the ID of wire closest to position in the specified TPC.
geo::WireID NearestWireIDOnChan(const double WorldLoc[3], uint32_t chan, unsigned int const plane, unsigned int const tpc=0, unsigned int const cstat=0) const
double y
y position of intersection
Definition: geo_types.h:791
View_t View(PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::vector< geo::WireID > ChanSegsPerSide(uint32_t chan, unsigned int side) const
void reconfigure(fhicl::ParameterSet const &p)
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:399
std::vector< double > ThreeChanPos(uint32_t u, uint32_t v, uint32_t z) const
Find the center of the 3 intersections, choose best if multiple.
recob::tracking::Plane Plane
Definition: TrackState.h:17
Float_t w
Definition: plot.C:20
Length_t WirePitch(PlaneID const &planeid=plane_zero) const
Returns the distance between two consecutive wires.
TPCID PositionToTPCID(Point_t const &point) const
Returns the ID of the TPC at specified location.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
Encapsulate the construction of a single detector plane.