LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ChannelMapStandardAlg.cxx
Go to the documentation of this file.
1 
15 
16 #include "cetlib_except/exception.h"
18 
19 namespace geo {
20 
21  //----------------------------------------------------------------------------
23  : fSorter(GeoObjectSorterStandard(p))
24  {}
25 
26  //----------------------------------------------------------------------------
28  {
29  // start over:
30  Uninitialize();
31 
32  std::vector<CryostatGeo> const& cgeo = geodata.cryostats;
33 
34  fNcryostat = cgeo.size();
35 
36  mf::LogInfo("ChannelMapStandardAlg") << "Initializing Standard ChannelMap...";
37 
38  fNTPC.resize(fNcryostat);
39  fWireCounts.resize(fNcryostat);
40  fNPlanes.resize(fNcryostat);
41  fFirstWireProj.resize(fNcryostat);
42  fOrthVectorsY.resize(fNcryostat);
43  fOrthVectorsZ.resize(fNcryostat);
45  fWiresPerPlane.resize(fNcryostat);
48  fPlaneIDs.clear();
49  fTopChannel = 0;
50 
51  int RunningTotal = 0;
52 
53  for (unsigned int cs = 0; cs != fNcryostat; ++cs) {
54  CryostatGeo const& cryo = cgeo[cs];
55  fNTPC[cs] = cryo.NTPC();
56 
57  // Size up all the vectors
58  fWireCounts[cs].resize(fNTPC[cs]);
59  fFirstWireProj[cs].resize(fNTPC[cs]);
60  fOrthVectorsY[cs].resize(fNTPC[cs]);
61  fOrthVectorsZ[cs].resize(fNTPC[cs]);
62  fPlaneBaselines[cs].resize(fNTPC[cs]);
63  fWiresPerPlane[cs].resize(fNTPC[cs]);
64  fNPlanes[cs].resize(fNTPC[cs]);
65  fFirstChannelInThisPlane[cs].resize(fNTPC[cs]);
66  fFirstChannelInNextPlane[cs].resize(fNTPC[cs]);
67 
68  for (unsigned int TPCCount = 0; TPCCount != fNTPC[cs]; ++TPCCount) {
69  TPCGeo const& TPC = cryo.TPC(TPCCount);
70  unsigned int PlanesThisTPC = TPC.Nplanes();
71  fWireCounts[cs][TPCCount].resize(PlanesThisTPC);
72  fFirstWireProj[cs][TPCCount].resize(PlanesThisTPC);
73  fOrthVectorsY[cs][TPCCount].resize(PlanesThisTPC);
74  fOrthVectorsZ[cs][TPCCount].resize(PlanesThisTPC);
75  fNPlanes[cs][TPCCount] = PlanesThisTPC;
76  for (unsigned int PlaneCount = 0; PlaneCount != PlanesThisTPC; ++PlaneCount) {
77  PlaneGeo const& plane = TPC.Plane(PlaneCount);
78 
79  fPlaneIDs.emplace(PlaneID(cs, TPCCount, PlaneCount));
80  double ThisWirePitch = TPC.WirePitch(PlaneCount);
81  fWireCounts[cs][TPCCount][PlaneCount] = plane.Nwires();
82 
83  const WireGeo& firstWire = plane.Wire(0);
84  const double sth = firstWire.SinThetaZ(), cth = firstWire.CosThetaZ();
85 
86  auto WireCenter1 = firstWire.GetCenter();
87  auto WireCenter2 = plane.Wire(1).GetCenter();
88 
89  // figure out if we need to flip the orthogonal vector
90  // (should point from wire n -> n+1)
91  double OrthY = cth, OrthZ = -sth;
92  if (((WireCenter2.Y() - WireCenter1.Y()) * OrthY +
93  (WireCenter2.Z() - WireCenter1.Z()) * OrthZ) < 0) {
94  OrthZ *= -1;
95  OrthY *= -1;
96  }
97 
98  // Overall we are trying to build an expression that looks like
99  // int NearestWireNumber = round((worldPos.OrthVector - FirstWire.OrthVector)/WirePitch);
100  // That runs as fast as humanly possible.
101  // We predivide everything by the wire pitch so we don't do this in the loop.
102  //
103  // Putting this together into the useful constants we will use later per plane and tpc:
104  fOrthVectorsY[cs][TPCCount][PlaneCount] = OrthY / ThisWirePitch;
105  fOrthVectorsZ[cs][TPCCount][PlaneCount] = OrthZ / ThisWirePitch;
106 
107  fFirstWireProj[cs][TPCCount][PlaneCount] =
108  WireCenter1.Y() * OrthY + WireCenter1.Z() * OrthZ;
109  fFirstWireProj[cs][TPCCount][PlaneCount] /= ThisWirePitch;
110 
111  // now to count up wires in each plane and get first channel in each plane
112  int WiresThisPlane = plane.Nwires();
113  fWiresPerPlane[cs].at(TPCCount).push_back(WiresThisPlane);
114  fPlaneBaselines[cs].at(TPCCount).push_back(RunningTotal);
115 
116  RunningTotal += WiresThisPlane;
117 
118  fFirstChannelInThisPlane[cs].at(TPCCount).push_back(fTopChannel);
119  fTopChannel += WiresThisPlane;
120  fFirstChannelInNextPlane[cs].at(TPCCount).push_back(fTopChannel);
121 
122  } // end loop over planes
123  } // end loop over TPCs
124  } // end loop over cryostats
125 
126  // calculate the total number of channels in the detector
128 
129  MF_LOG_DEBUG("ChannelMapStandard") << "# of channels is " << fNchannels;
130  }
131 
132  //----------------------------------------------------------------------------
134 
135  //----------------------------------------------------------------------------
136  std::vector<WireID> ChannelMapStandardAlg::ChannelToWire(raw::ChannelID_t channel) const
137  {
138  std::vector<WireID> AllSegments;
139  unsigned int cstat = 0;
140  unsigned int tpc = 0;
141  unsigned int plane = 0;
142  unsigned int wire = 0;
143 
144  // first check if this channel ID is legal
145  if (channel > fTopChannel)
146  throw cet::exception("Geometry") << "ILLEGAL CHANNEL ID for channel " << channel << "\n";
147 
148  // then go find which plane, tpc and cryostat it is in from the information we stored earlier
149  bool foundWid(false);
150  for (unsigned int csloop = 0; csloop != fNcryostat; ++csloop) {
151  for (unsigned int tpcloop = 0; tpcloop != fNTPC[csloop]; ++tpcloop) {
152  for (unsigned int planeloop = 0;
153  planeloop != fFirstChannelInNextPlane[csloop][tpcloop].size();
154  ++planeloop) {
155  if (channel < fFirstChannelInNextPlane[csloop][tpcloop][planeloop]) {
156  cstat = csloop;
157  tpc = tpcloop;
158  plane = planeloop;
159  wire = channel - fFirstChannelInThisPlane[cstat][tpcloop][planeloop];
160  foundWid = true;
161  break;
162  }
163  if (foundWid) break;
164  } // end plane loop
165  if (foundWid) break;
166  } // end tpc loop
167  if (foundWid) break;
168  } // end cryostat loop
169 
170  WireID CodeWire(cstat, tpc, plane, wire);
171 
172  AllSegments.push_back(CodeWire);
173 
174  return AllSegments;
175  }
176 
177  //----------------------------------------------------------------------------
179  {
180  return fNchannels;
181  }
182 
183  //----------------------------------------------------------------------------
184  unsigned int ChannelMapStandardAlg::Nchannels(readout::ROPID const& ropid) const
185  {
186  if (!HasROP(ropid)) return 0;
187  // The number of channels matches the number of wires. Life is easy.
188  return WireCount(FirstWirePlaneInROP(ropid));
189  }
190 
191  //----------------------------------------------------------------------------
193  double ZPos,
194  PlaneID const& planeID) const
195  {
196  return YPos * AccessElement(fOrthVectorsY, planeID) +
197  ZPos * AccessElement(fOrthVectorsZ, planeID) - AccessElement(fFirstWireProj, planeID);
198  }
199 
200  //----------------------------------------------------------------------------
201  WireID ChannelMapStandardAlg::NearestWireID(Point_t const& worldPos, PlaneID const& planeID) const
202  {
203 
204  // This part is the actual calculation of the nearest wire number, where we assume
205  // uniform wire pitch and angle within a wireplane
206 
207  // add 0.5 to have the correct rounding
208  int NearestWireNumber = int(0.5 + WireCoordinate(worldPos.Y(), worldPos.Z(), planeID));
209 
210  // If we are outside of the wireplane range, throw an exception
211  // (this response maintains consistency with the previous
212  // implementation based on geometry lookup)
213  if (NearestWireNumber < 0 || (unsigned int)NearestWireNumber >= WireCount(planeID)) {
214  int wireNumber = NearestWireNumber; // save for the output
215 
216  if (NearestWireNumber < 0)
217  NearestWireNumber = 0;
218  else
219  NearestWireNumber = WireCount(planeID) - 1;
220 
221  throw InvalidWireError("Geometry", planeID, wireNumber, NearestWireNumber)
222  << "Can't Find Nearest Wire for position (" << worldPos.X() << "," << worldPos.Y() << ","
223  << worldPos.Z() << ")"
224  << " in plane " << std::string(planeID) << " approx wire number # " << wireNumber
225  << " (capped from " << NearestWireNumber << ")\n";
226  }
227 
228  return WireID(planeID, (WireID::WireID_t)NearestWireNumber);
229  }
230 
231  //----------------------------------------------------------------------------
232  // This method returns the channel number, assuming the numbering scheme
233  // is heirachical - that is, channel numbers run in order, for example:
234  // (Ben J Oct 2011)
235  // Wire1 | 0
236  // Plane1 { Wire2 | 1
237  // TPC1 { Wire3 | 2
238  // Plane2 { Wire1 | 3 increasing channel number
239  // Wire2 | 4 (with no gaps)
240  // TPC2 { Plane1 { Wire1 | 5
241  // Plane2 { Wire1 | 6
242  // Wire2 v 7
243  //
245  {
246  unsigned int const* pBaseLine = GetElementPtr(fPlaneBaselines, wireID);
247  // This is the actual lookup part - first make sure coordinates are legal
248  if (pBaseLine) {
249  // if the channel has legal coordinates, its ID is given by the wire
250  // number above the number of wires in lower planes, tpcs and cryostats
251  return *pBaseLine + wireID.Wire;
252  }
253  else {
254  // if the coordinates were bad, throw an exception
255  throw cet::exception("ChannelMapStandardAlg")
256  << "NO CHANNEL FOUND for " << std::string(wireID);
257  }
258 
259  // made it here, that shouldn't happen, return raw::InvalidChannelID
260  mf::LogWarning("ChannelMapStandardAlg")
261  << "should not be at the point in the function, returning "
262  << "invalid channel";
263  return raw::InvalidChannelID;
264  }
265 
266  //----------------------------------------------------------------------------
268  {
269 
270  // still assume one cryostat for now -- faster
271  unsigned int nChanPerTPC = fNchannels / fNTPC[0];
272  // casting wil trunc towards 0 -- faster than floor
273  unsigned int tpc = channel / nChanPerTPC;
274  //need number of planes to know Collection
275  unsigned int PlanesThisTPC = fNPlanes[0][tpc];
276 
277  SigType_t sigt = kMysteryType;
278  if ((channel >= fFirstChannelInThisPlane[0][tpc][0]) &&
279  (channel < fFirstChannelInNextPlane[0][tpc][PlanesThisTPC - 2])) {
280  sigt = kInduction;
281  }
282  else if ((channel >= fFirstChannelInThisPlane[0][tpc][PlanesThisTPC - 1]) &&
283  (channel < fFirstChannelInNextPlane[0][tpc][PlanesThisTPC - 1])) {
284  sigt = kCollection;
285  }
286  else
287  mf::LogWarning("BadChannelSignalType")
288  << "Channel " << channel << " not given signal type." << std::endl;
289 
290  return sigt;
291  }
292 
293  //----------------------------------------------------------------------------
294  std::set<PlaneID> const& ChannelMapStandardAlg::PlaneIDs() const
295  {
296  return fPlaneIDs;
297  }
298 
299  //----------------------------------------------------------------------------
300  unsigned int ChannelMapStandardAlg::NTPCsets(readout::CryostatID const& cryoid) const
301  {
302  // return the same number as the number of TPCs
303  return (cryoid.isValid && cryoid.Cryostat < fNTPC.size()) ? fNTPC[cryoid.Cryostat] : 0;
304  }
305 
306  //----------------------------------------------------------------------------
308  {
309  return MaxTPCs();
310  }
311 
312  //----------------------------------------------------------------------------
314  {
315  return tpcsetid.TPCset < NTPCsets(tpcsetid);
316  }
317 
318  //----------------------------------------------------------------------------
320  {
321  return ConvertTPCtoTPCset(tpcid);
322  }
323 
324  //----------------------------------------------------------------------------
325  std::vector<TPCID> ChannelMapStandardAlg::TPCsetToTPCs(readout::TPCsetID const& tpcsetid) const
326  {
327  std::vector<TPCID> IDs;
328  if (tpcsetid.isValid) IDs.emplace_back(ConvertTPCsetToTPC(tpcsetid));
329  return IDs;
330  }
331 
332  //----------------------------------------------------------------------------
334  {
335  return ConvertTPCsetToTPC(tpcsetid);
336  }
337 
338  //----------------------------------------------------------------------------
339  unsigned int ChannelMapStandardAlg::MaxTPCs() const
340  {
341  unsigned int max = 0;
342  for (unsigned int nTPCs : fNTPC)
343  if (nTPCs > max) max = nTPCs;
344  return max;
345  }
346 
347  //----------------------------------------------------------------------------
348  unsigned int ChannelMapStandardAlg::NROPs(readout::TPCsetID const& tpcsetid) const
349  {
350  if (!HasTPCset(tpcsetid)) return 0;
351  return AccessElement(fNPlanes, FirstTPCinTPCset(tpcsetid));
352  }
353 
354  //----------------------------------------------------------------------------
355  unsigned int ChannelMapStandardAlg::MaxROPs() const
356  {
357  unsigned int max = 0;
358  for (auto const& cryo_tpc : fNPlanes)
359  for (unsigned int nPlanes : cryo_tpc)
360  if (nPlanes > max) max = nPlanes;
361  return max;
362  }
363 
364  //----------------------------------------------------------------------------
366  {
367  return ropid.ROP < NROPs(ropid);
368  }
369 
370  //----------------------------------------------------------------------------
372  {
373  return ConvertWirePlaneToROP(planeid);
374  }
375 
376  //----------------------------------------------------------------------------
377  std::vector<PlaneID> ChannelMapStandardAlg::ROPtoWirePlanes(readout::ROPID const& ropid) const
378  {
379  std::vector<PlaneID> IDs;
380  if (ropid.isValid) IDs.emplace_back(FirstWirePlaneInROP(ropid));
381  return IDs;
382  }
383 
384  //----------------------------------------------------------------------------
385  std::vector<TPCID> ChannelMapStandardAlg::ROPtoTPCs(readout::ROPID const& ropid) const
386  {
387  std::vector<TPCID> IDs;
388  // we take the TPC set of the ROP and convert it straight into a TPC ID
389  if (ropid.isValid) IDs.emplace_back(ConvertTPCsetToTPC(ropid.asTPCsetID()));
390  return IDs;
391  }
392 
393  //----------------------------------------------------------------------------
395  {
396  if (!raw::isValidChannelID(channel)) return {}; // invalid ROP returned
397 
398  // which wires does the channel cover?
399  std::vector<WireID> wires = ChannelToWire(channel);
400 
401  // - none:
402  if (wires.empty()) return {}; // invalid ROP returned
403 
404  // - one: maps its plane ID into a ROP ID
405  return WirePlaneToROP(wires[0]);
406  }
407 
408  //----------------------------------------------------------------------------
410  {
411  if (!ropid.isValid) return raw::InvalidChannelID;
413  }
414 
415  //----------------------------------------------------------------------------
417  {
418  return ConvertROPtoWirePlane(ropid);
419  }
420 
421  //----------------------------------------------------------------------------
423  {
424  if (!tpcid.isValid) return {}; // invalid ID, default-constructed
427  }
428 
429  //----------------------------------------------------------------------------
431  {
432  if (!tpcsetid.isValid) return {};
433  return {(CryostatID::CryostatID_t)tpcsetid.Cryostat, (TPCID::TPCID_t)tpcsetid.TPCset};
434  }
435 
436  //----------------------------------------------------------------------------
438  {
439  if (!planeid.isValid) return {}; // invalid ID, default-constructed
442  (readout::ROPID::ROPID_t)planeid.Plane};
443  }
444 
445  //----------------------------------------------------------------------------
447  {
448  if (!ropid.isValid) return {};
449  return {(CryostatID::CryostatID_t)ropid.Cryostat,
450  (TPCID::TPCID_t)ropid.TPCset,
451  (PlaneID::PlaneID_t)ropid.ROP};
452  }
453 
454 } // namespace
void Initialize(GeometryData_t const &geodata) override
Geometry initialisation.
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:114
std::vector< TPCID > TPCsetToTPCs(readout::TPCsetID const &tpcsetid) const override
Returns a list of ID of TPCs belonging to the specified TPC set.
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Definition: WireGeo.h:221
WireID NearestWireID(Point_t const &worldPos, PlaneID const &planeID) const override
Returns the ID of the wire nearest to the specified position.
TPCInfoMap_t< unsigned int > fNPlanes
PlaneInfoMap_t< float > fWireCounts
Who knows?
Definition: geo_types.h:153
raw::ChannelID_t PlaneWireToChannel(WireID const &wireID) const override
Returns the channel ID a wire is connected to.
Encapsulate the construction of a single cyostat.
TPCID FirstTPCinTPCset(readout::TPCsetID const &tpcsetid) const override
Returns the ID of the first TPC belonging to the specified TPC set.
static TPCID ConvertTPCsetToTPC(readout::TPCsetID const &tpcsetid)
Converts a TPC set ID into a TPC ID using the same numerical indices.
double WireCoordinate(double YPos, double ZPos, PlaneID const &planeID) const override
Returns the index of the wire nearest to the specified position.
WireGeo const & Wire(unsigned int iwire) const
Definition: PlaneGeo.cxx:465
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
unsigned int Nplanes() const
Number of planes in this tpc.
Definition: TPCGeo.h:137
unsigned int ROPID_t
Type for the ID number.
T const & AccessElement(TPCInfoMap_t< T > const &map, TPCID const &id) const
Returns the specified element of the TPC map.
SigType_t SignalTypeForChannelImpl(raw::ChannelID_t const channel) const override
Return the signal type of the specified channel.
unsigned short TPCsetID_t
Type for the ID number.
Definition: readout_types.h:73
unsigned int PlaneID_t
Type for the ID number.
Definition: geo_types.h:464
double SinThetaZ() const
Returns trigonometric operations on ThetaZ()
Definition: WireGeo.h:263
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:210
Geometry information for a single TPC.
Definition: TPCGeo.h:36
Class identifying a set of TPC sharing readout channels.
Definition: readout_types.h:72
std::vector< PlaneID > ROPtoWirePlanes(readout::ROPID const &ropid) const override
Returns a list of ID of wire planes belonging to the specified ROP.
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:211
unsigned int MaxTPCsets() const override
Returns the largest number of TPC sets any cryostat in the detector has.
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:563
CryostatList_t cryostats
The detector cryostats.
Definition: GeometryData.h:37
PlaneID FirstWirePlaneInROP(readout::ROPID const &ropid) const override
Returns the ID of the first plane belonging to the specified ROP.
Geometry information for a single cryostat.
Definition: CryostatGeo.h:43
PlaneInfoMap_t< raw::ChannelID_t > fFirstChannelInThisPlane
PlaneInfoMap_t< float > fOrthVectorsZ
readout::ROPID WirePlaneToROP(PlaneID const &planeid) const override
Returns the ID of the ROP planeid belongs to, or invalid if none.
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
Access the description of detector geometry.
readout::ROPID ChannelToROP(raw::ChannelID_t channel) const override
Returns the ID of the ROP the channel belongs to (invalid if none)
Collection of exceptions for Geometry system.
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:31
unsigned int MaxTPCs() const
Returns the largest number of TPCs in a single cryostat.
ROPID_t ROP
Index of the readout plane within its TPC set.
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
Signal from induction planes.
Definition: geo_types.h:151
bool HasROP(readout::ROPID const &ropid) const override
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
unsigned int fNcryostat
number of cryostats in the detector
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:78
PlaneInfoMap_t< unsigned int > fPlaneBaselines
constexpr bool isValidChannelID(raw::ChannelID_t channel)
Definition: RawTypes.h:35
unsigned int NTPC() const
Number of TPCs in this cryostat.
Definition: CryostatGeo.h:175
PlaneInfoMap_t< unsigned int > fWiresPerPlane
double WirePitch(unsigned plane=0) const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.cxx:368
unsigned int MaxROPs() const override
Returns the largest number of ROPs a TPC set in the detector has.
PlaneInfoMap_t< float > fFirstWireProj
bool HasTPCset(readout::TPCsetID const &tpcsetid) const override
std::set< PlaneID > const & PlaneIDs() const override
Returns a list of the plane IDs in the whole detector.
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
std::set< PlaneID > fPlaneIDs
vector of the PlaneIDs present in the detector
unsigned int Nchannels() const override
Returns the total number of channels present (not necessarily contiguous)
Class identifying a set of planes sharing readout channels.
unsigned int fNchannels
number of channels in the detector
static PlaneID ConvertROPtoWirePlane(readout::ROPID const &ropid)
Converts a wire plane ID into a ROP ID using the same numerical indices.
TPCsetID_t TPCset
Index of the TPC set within its cryostat.
Definition: readout_types.h:90
Encapsulate the geometry of a wire.
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
unsigned int CryostatID_t
Type for the ID number.
Definition: geo_types.h:193
unsigned int WireCount(PlaneID const &id) const
Retrieved the wire cound for the specified plane ID.
ChannelMapStandardAlg(fhicl::ParameterSet const &p)
unsigned int TPCID_t
Type for the ID number.
Definition: geo_types.h:382
std::vector< TPCID > ROPtoTPCs(readout::ROPID const &ropid) const override
Returns a list of ID of TPCs the specified ROP spans.
Interface to algorithm class for a specific detector channel mapping.
Encapsulate the construction of a single detector plane.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
Definition: CryostatGeo.cxx:84
static readout::TPCsetID ConvertTPCtoTPCset(TPCID const &tpcid)
Converts a TPC ID into a TPC set ID using the same numerical indices.
unsigned int NTPCsets(readout::CryostatID const &cryoid) const override
Returns the total number of TPC sets in the specified cryostat.
void Uninitialize() override
Deconfiguration: prepare for a following call of Initialize()
unsigned int Nwires() const
Number of wires in this plane.
Definition: PlaneGeo.h:242
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::vector< WireID > ChannelToWire(raw::ChannelID_t channel) const override
#define MF_LOG_DEBUG(id)
PlaneInfoMap_t< float > fOrthVectorsY
Unit vectors orthogonal to wires in.
Exception thrown on invalid wire number.
Definition: Exceptions.h:39
raw::ChannelID_t fTopChannel
book keeping highest channel #
unsigned int WireID_t
Type for the ID number.
Definition: geo_types.h:546
raw::ChannelID_t FirstChannelInROP(readout::ROPID const &ropid) const override
Returns the ID of the first channel in the specified readout plane.
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:252
Data in the geometry description.
Definition: GeometryData.h:30
double CosThetaZ() const
Returns trigonometric operations on ThetaZ()
Definition: WireGeo.h:262
PlaneInfoMap_t< raw::ChannelID_t > fFirstChannelInNextPlane
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:399
static readout::ROPID ConvertWirePlaneToROP(PlaneID const &planeid)
Converts a ROP ID into a wire plane ID using the same numerical indices.
unsigned int NROPs(readout::TPCsetID const &tpcsetid) const override
Returns the total number of ROPs in the specified TPC set.
Namespace collecting geometry-related classes utilities.
T const * GetElementPtr(PlaneInfoMap_t< T > const &map, PlaneID const &id) const
Returns a pointer to the specified element, or nullptr if invalid.
readout::TPCsetID TPCtoTPCset(TPCID const &tpcid) const override
Returns the ID of the TPC set the specified TPC belongs to.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::vector< unsigned int > fNTPC
number of TPCs in each cryostat
constexpr TPCsetID const & asTPCsetID() const
Conversion to TPCsetID (for convenience of notation).
Encapsulate the construction of a single detector plane.
The data type to uniquely identify a cryostat.
Definition: geo_types.h:192
Signal from collection planes.
Definition: geo_types.h:152