All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
icarus::ICARUSChannelMapAlg Class Reference

Channel mapping for ICARUS detector with split wires. More...

#include <ICARUSChannelMapAlg.h>

Inheritance diagram for icarus::ICARUSChannelMapAlg:
geo::ChannelMapAlg

Classes

struct  Config
 
struct  PlaneInfo_t
 Collection of information on one plane. More...
 
struct  ReadoutMappingInfo_t
 Collected information about TPC sets and readout planes in the geometry. More...
 

Public Types

using Parameters = fhicl::Table< Config >
 Type of FHiCL configuration table for this object. More...
 

Public Member Functions

 ICARUSChannelMapAlg (Config const &config)
 Constructor: taked a configuration object. More...
 
 ICARUSChannelMapAlg (Parameters const &config)
 Constructor: takes a FHiCL table object. More...
 
virtual void Initialize (geo::GeometryData_t const &geodata) override
 Prepares the algorithm extracting information from the geometry. More...
 
virtual void Uninitialize () override
 Frees the resources of this algorithm. More...
 
virtual std::set< geo::PlaneID >
const & 
PlaneIDs () const override
 Returns a list of the plane IDs in the whole detector. More...
 
virtual geo::GeoObjectSorter
const & 
Sorter () const override
 Return the sorter. More...
 
Channel mapping
virtual std::vector< geo::WireIDChannelToWire (raw::ChannelID_t channel) const override
 Returns a collection of ID of wires connected to the channel. More...
 
virtual unsigned int Nchannels () const override
 Returns the number of readout channels (ID's go 0 to Nchannels()). More...
 
virtual unsigned int Nchannels (readout::ROPID const &ropid) const override
 Returns the number of channels in the specified ROP. More...
 
virtual raw::ChannelID_t PlaneWireToChannel (geo::WireID const &wireID) const override
 Returns the channel ID a wire is connected to. More...
 
virtual raw::ChannelID_t PlaneWireToChannel (unsigned int plane, unsigned int wire, unsigned int tpc, unsigned int cstat) const override
 Returns the channel ID a wire is connected to. More...
 
Deprecated functions.

These methods are legacy and might be replaced by geo::GeometryCore calls.

virtual double WireCoordinate (double YPos, double ZPos, geo::PlaneID const &planeID) const override
 Returns the index of the wire nearest to the specified position. More...
 
virtual double WireCoordinate (double YPos, double ZPos, unsigned int PlaneNo, unsigned int TPCNo, unsigned int cstat) const override
 Returns the index of the wire nearest to the specified position. More...
 
virtual geo::WireID NearestWireID (const TVector3 &worldPos, geo::PlaneID const &planeID) const override
 Returns the ID of the wire nearest to the specified position. More...
 
virtual geo::WireID NearestWireID (const TVector3 &worldPos, unsigned int PlaneNo, unsigned int TPCNo, unsigned int cstat) const override
 Returns the ID of the wire nearest to the specified position. More...
 
TPC set mapping
virtual unsigned int NTPCsets (readout::CryostatID const &cryoid) const override
 Returns the total number of TPC sets in the specified cryostat. More...
 
virtual unsigned int MaxTPCsets () const override
 Returns the largest number of TPC sets any cryostat in the detector has. More...
 
virtual bool HasTPCset (readout::TPCsetID const &tpcsetid) const override
 
virtual readout::TPCsetID TPCtoTPCset (geo::TPCID const &tpcid) const override
 Returns the ID of the TPC set the specified TPC belongs to. More...
 
virtual std::vector< geo::TPCIDTPCsetToTPCs (readout::TPCsetID const &tpcsetid) const override
 Returns a list of ID of TPCs belonging to the specified TPC set. More...
 
virtual geo::TPCID FirstTPCinTPCset (readout::TPCsetID const &tpcsetid) const override
 Returns the ID of the first TPC belonging to the specified TPC set. More...
 
Readout plane mapping
virtual unsigned int NROPs (readout::TPCsetID const &tpcsetid) const override
 Returns the total number of readout planes in the specified TPC set. More...
 
virtual unsigned int MaxROPs () const override
 Returns the largest number of ROPs a TPC set in the detector has. More...
 
virtual bool HasROP (readout::ROPID const &ropid) const override
 
virtual readout::ROPID WirePlaneToROP (geo::PlaneID const &planeid) const override
 Returns the ID of the ROP planeid belongs to, or invalid if none. More...
 
virtual std::vector< geo::PlaneIDROPtoWirePlanes (readout::ROPID const &ropid) const override
 Returns a list of ID of wire planes belonging to the specified ROP. More...
 
virtual std::vector< geo::TPCIDROPtoTPCs (readout::ROPID const &ropid) const override
 Returns a list of ID of TPCs the specified ROP spans. More...
 
virtual readout::ROPID ChannelToROP (raw::ChannelID_t channel) const override
 Returns the ID of the ROP the channel belongs to (invalid if none). More...
 
virtual raw::ChannelID_t FirstChannelInROP (readout::ROPID const &ropid) const override
 Returns the ID of the first channel in the specified readout plane. More...
 
virtual geo::PlaneID FirstWirePlaneInROP (readout::ROPID const &ropid) const override
 Returns the ID of the first plane belonging to the specified ROP. More...
 
- Public Member Functions inherited from geo::ChannelMapAlg
virtual ~ChannelMapAlg ()=default
 Virtual destructor. More...
 
virtual unsigned int NOpChannels (unsigned int NOpDets) const
 Returns the number of optical channels contained in some detectors. More...
 
virtual unsigned int MaxOpChannel (unsigned int NOpDets) const
 Returns the number of optical channels contained in some detectors. More...
 
virtual unsigned int NOpHardwareChannels (unsigned int opDet) const
 Returns the number of channels in the specified optical detectors. More...
 
virtual bool IsValidOpChannel (unsigned int opChannel, unsigned int NOpDets) const
 Returns whether the ID identifies a valid optical detector channel. More...
 
virtual unsigned int OpChannel (unsigned int detNum, unsigned int hwchannel=0) const
 Returns the channel ID of the specified hardware channel. More...
 
virtual unsigned int OpDetFromOpChannel (unsigned int opChannel) const
 Returns the optical detector the specified optical channel belongs. More...
 
virtual unsigned int HardwareChannelFromOpChannel (unsigned int opChannel) const
 Returns the hardware channel number of specified optical channel. More...
 
unsigned int NearestWire (const TVector3 &worldPos, geo::PlaneID const &planeID) const
 Returns the index of the wire nearest to the specified position. More...
 
unsigned int NearestWire (const TVector3 &worldPos, unsigned int PlaneNo, unsigned int TPCNo, unsigned int cstat) const
 Returns the index of the wire nearest to the specified position. More...
 
virtual size_t NearestAuxDet (const double *point, std::vector< geo::AuxDetGeo > const &auxDets, double tolerance=0) const
 Returns the auxiliary detector closest to the specified point. More...
 
virtual size_t NearestSensitiveAuxDet (const double *point, std::vector< geo::AuxDetGeo > const &auxDets, double tolerance=0) const
 Returns sensitive auxiliary detector closest to specified point. More...
 
virtual size_t ChannelToAuxDet (std::vector< geo::AuxDetGeo > const &auxDets, std::string const &detName, uint32_t const &channel) const
 Returns the index of the detector containing the specified channel. More...
 
virtual std::pair< size_t, size_t > ChannelToSensitiveAuxDet (std::vector< geo::AuxDetGeo > const &auxDets, std::string const &detName, uint32_t const &channel) const
 Returns the index of the sensitive detector containing the channel. More...
 
const std::vector< std::vector
< std::vector
< raw::ChannelID_t > > > 
FirstChannelInNextPlane () const
 Retrieve the private fFirstChannelInNextPlane vector for testing. More...
 
const std::vector< std::vector
< std::vector
< raw::ChannelID_t > > > 
FirstChannelInThisPlane () const
 Retrieve the private fFirstChannelInThisPlane vector for testing. More...
 
virtual bool HasChannel (raw::ChannelID_t channel) const
 Returns whether the specified channel is valid This default implementation assumes all channels up to Nchannels() valid. More...
 
geo::SigType_t SignalTypeForChannel (raw::ChannelID_t const channel) const
 Return the signal type of the specified channel. More...
 
geo::SigType_t SignalTypeForROPID (readout::ROPID const &ropid) const
 Return the signal type on the specified readout plane. More...
 

Private Types

using TPCColl_t = icarus::details::TPCColl_t
 
using PlaneColl_t = icarus::details::PlaneColl_t
 
using WirelessChannelCounts_t = std::array< std::array< std::pair< unsigned int, unsigned int >, 3U >, 2U >
 
using PlaneType_t = std::size_t
 Type for plane type identifier. More...
 

Private Member Functions

bool HasCryostat (readout::CryostatID const &cryoid) const
 Returns whether the specified cryostat is known to the mapping. More...
 
void fillChannelToWireMap (geo::GeometryData_t::CryostatList_t const &Cryostats)
 Fills the information about readout channel mapping. More...
 
void buildReadoutPlanes (geo::GeometryData_t::CryostatList_t const &Cryostats)
 Fills information about the TPC set and readout plane structure. More...
 
PlaneType_t findPlaneType (readout::ROPID const &ropid) const
 Returns the "type" of readout plane. More...
 
virtual geo::SigType_t SignalTypeForChannelImpl (raw::ChannelID_t const channel) const override
 Returns the type of signal on the specified channel. More...
 
Readout element information access
std::vector< unsigned int > const & TPCsetCount () const
 Returns the number of TPC sets in each cryostat. More...
 
unsigned int TPCsetCount (readout::CryostatID const &cid) const
 Returns the number of TPC sets in the specified cryostat cid. More...
 
readout::TPCsetDataContainer
< TPCColl_t > const & 
TPCsetTPCs () const
 All geo::TPCGeo objects in each TPC set, sorted by increasing z. More...
 
TPCColl_t const & TPCsetTPCs (readout::TPCsetID const &sid) const
 All geo::TPCGeo objects in the specified TPC set sid. More...
 
readout::TPCsetDataContainer
< unsigned int > const & 
ROPcount () const
 Number of readout planes in each TPC set. More...
 
unsigned int ROPcount (readout::TPCsetID const &sid) const
 Number of readout planes in the specified TPC set sid. More...
 
readout::ROPDataContainer
< PlaneColl_t > const & 
ROPplanes () const
 All geo::PlaneGeo objects in each readout plane, sorted by z. More...
 
PlaneColl_t const & ROPplanes (readout::ROPID const &rid) const
 All geo::PlaneGeo objects in the specified readout plane rid. More...
 
geo::TPCDataContainer
< readout::TPCsetID > const & 
TPCtoTPCset () const
 The TPC set including each TPC. More...
 
geo::PlaneDataContainer
< readout::ROPID > const & 
PlaneToROP () const
 The readout plane including each wire plane. More...
 
readout::ROPID const & PlaneToROP (geo::PlaneID const &pid) const
 The readout plane the specified wire plane pid belongs to. More...
 

Static Private Member Functions

static WirelessChannelCounts_t extractWirelessChannelParams (Config::WirelessChannelStruct const &params)
 
static std::string PlaneTypeName (PlaneType_t planeType)
 Returns the name of the specified plane type. More...
 

Private Attributes

WirelessChannelCounts_t const fWirelessChannelCounts
 Count of wireless channels on each plane. More...
 
icarus::GeoObjectSorterPMTasTPC fSorter
 Algorithms to sort geometry elements. More...
 

Static Private Attributes

static constexpr PlaneType_t kFirstInductionType = 0U
 Identifier for first induction plane type. More...
 
static constexpr PlaneType_t kSecondInductionType = 1U
 Identifier for second induction plane type. More...
 
static constexpr PlaneType_t kCollectionType = 2U
 Identifier for collection plane type. More...
 
static constexpr PlaneType_t kUnknownType = std::numeric_limits<PlaneType_t>::max()
 Identifier for unknown plane type. More...
 

Readout element information

The geometry and readout data containers have currently no support for resizing and their size is assigned on construction.

Access should happen via the corresponding member functions.

using ChannelRange_t = icarus::details::ChannelRange_t
 
ReadoutMappingInfo_t fReadoutMapInfo
 Information about TPC sets and readout planes in the geometry. More...
 
icarus::details::ChannelToWireMap fChannelToWireMap
 Mapping of channels to wire planes and ROP's. More...
 
geo::PlaneDataContainer
< PlaneInfo_t
fPlaneInfo
 Range of channels covered by each of the wire planes. More...
 

Additional Inherited Members

- Protected Types inherited from geo::ChannelMapAlg
template<typename T >
using TPCInfoMap_t = std::vector< std::vector< T >>
 Data type for per-TPC information. More...
 
template<typename T >
using PlaneInfoMap_t = TPCInfoMap_t< std::vector< T >>
 Data type for per-plane information. More...
 
- Protected Member Functions inherited from geo::ChannelMapAlg
template<typename T >
T const & AccessElement (PlaneInfoMap_t< T > const &map, geo::PlaneID const &id) const
 Returns the specified element of the plane map. More...
 
template<typename T >
size_t AccessElementSize (PlaneInfoMap_t< T > const &map, geo::TPCID const &id) const
 Returns the number of elements in the specified TPC of the plane map. More...
 
template<typename T >
T const * GetElementPtr (PlaneInfoMap_t< T > const &map, geo::PlaneID const &id) const
 Returns a pointer to the specified element, or nullptr if invalid. More...
 
template<typename T >
T const & AccessElement (TPCInfoMap_t< T > const &map, geo::TPCID const &id) const
 Returns the specified element of the TPC map. More...
 
template<typename T >
size_t AccessElementSize (TPCInfoMap_t< T > const &map, geo::CryostatID const &id) const
 Returns the number of elements in the specified cryostat of the TPC map. More...
 
template<typename T >
bool isValidElement (TPCInfoMap_t< T > const &map, geo::CryostatID const &id) const
 Returns whether the ID specifies a valid entry. More...
 
template<typename T >
bool isValidElement (TPCInfoMap_t< T > const &map, geo::TPCID const &id) const
 
template<typename T >
bool isValidElement (PlaneInfoMap_t< T > const &map, geo::CryostatID const &id) const
 Returns whether the ID specifies a valid entry. More...
 
template<typename T >
bool isValidElement (PlaneInfoMap_t< T > const &map, geo::TPCID const &id) const
 
template<typename T >
bool isValidElement (PlaneInfoMap_t< T > const &map, geo::PlaneID const &id) const
 
virtual geo::SigType_t SignalTypeForROPIDImpl (readout::ROPID const &ropid) const
 Return the signal type on the specified readout plane. More...
 
- Protected Attributes inherited from geo::ChannelMapAlg
PlaneInfoMap_t< raw::ChannelID_tfFirstChannelInThisPlane
 
PlaneInfoMap_t< raw::ChannelID_tfFirstChannelInNextPlane
 
std::map< std::string, size_t > fADNameToGeo
 map the names of the dets to the AuxDetGeo objects More...
 
std::map< size_t, std::vector
< size_t > > 
fADChannelToSensitiveGeo
 

Detailed Description

Channel mapping for ICARUS detector with split wires.

This channel mapping is designed for a detector description including two TPC volumes in each drift volume.

Each of the four drift volumes in the ICARUS detector (one on each of the two side of the cathode, on each of the two cryostats/modules) is described by two "logical" TPC volumes. The division of the drift volume in two TPCs is not physical, but it is a convenient description to accommodate the fact that the first induction plane wires are split in two 9-meter halves which are read independently.

In this scheme, the physical wires from the second induction and the collection planes may be described by two geo::WireGeo objects associated to the same readout channel, with the two geo::WireGeo belonging to a different geo::TPCGeo and geo::PlaneGeo (but the planes are of the same type and on the same view). Therefore, physical wires on the second induction and collection planes are associated with a single geo::WireGeo unless they cross the virtual border between TPCs half way on the beam direction, in which case they are associated with two geo::WireGeo. The first induction wires are always associated with a single geo::WireGeo. Each physical wire is associated and identified with a single TPC readout channel.

The numbering of channels is as follows:

This implies that the first wire plane being enumerated is C:0 T:0 P:0, and then C:0 T:1 P:0, that cover the first induction plane of the first drift volume, then the C:0 T:0 P:1 and C:0 T:1 P:1 are grouped together for the second induction plane, and finally C:0 T:0 P:2 and C:0 T:1 P:2 for the collection. Thereafter, the enumeration proceeds through C:0 T:2 and C:0 T:3 starting with C:0 T:2 P:0, and then with the other cryostat in the same TPC and plane order.

Wireless channels

It is possible to specify that some channels at the beginning and at the end of a readout plane are not connected to wires.

When a readout plane is extended to include "wireless" channels, additional channel IDs are included in the sequence of channels. Channel mapping does not distinguish between wireless channels (which have readout, cable but no wire), ghost channels (which have no bable either) and virtual channels (which do not have even readout): the count of wireless channels includes all of these categories, i.e. all the categories that have a readout channel ID but no physical wire.

The range of channels belonging to the readout plane (intended in LArSoft fashion as readout::ROPID) is extended to include these wireless channels, but each of the wire planes does not include them: they are orphaned of wire planes (no geo::PlaneID). The total number of channels reported by the mapping (and by the geometry service) includes these wireless channels as well: they are "valid" readout channels. Nevertheless, mapping them to a wire list will return an empty list. The ChannelStatus services should be utilized to find out the actual category of the channels when needed.

Configuration

These channels are assigned to each logical readout plane: in the standard ICARUS geometry, for example, in each TPC set (i.e. drift volume) there are two first induction readout planes with 1056 wires each, and one second induction and one collection readout planes with 5600 wires each, and each spanning two logical wire planes. Assigning pre- or post-channels to the first induction planes will increase each of them from 1056 channels to whatever is requested. Assigning pre- or post-channels to the second induction or collection planes will increase them from 5600 channels to whatever is requested.

The channel mapping configuration of the "standard" ICARUS detector should include:

WirelessChannels: {

  FirstInductionPreChannels:        0
  FirstInductionPostChannels:      96 # 32 ghost, then 64 virtual

  # C:x S:0 (east TPC)
  SecondInductionEvenPreChannels:  96 # 32 ghost, then 64 wireless
  SecondInductionEvenPostChannels: 64 # 64 wireless
  CollectionEvenPreChannels:       64 # 64 wireless
  CollectionEvenPostChannels:      96 # 64 wireless, then 32 ghost

  # C:x S:1 (west TPC)
  SecondInductionOddPreChannels:   64 # 64 wireless
  SecondInductionOddPostChannels:  96 # 64 wireless, then 32 ghost
  CollectionOddPreChannels:        96 # 32 ghost, then 64 wireless
  CollectionOddPostChannels:       64 # 64 wireless

} # WirelessChannels

The configuration parameters must be specified in the WirelessChannels configuration table, as FirstInductionPreChannels, FirstInductionPostChannels, SecondInductionEvenPreChannels, SecondInductionEvenPostChannels, CollectionEvenPreChannels, CollectionEvenPostChannels, SecondInductionOddPreChannels, SecondInductionOddPostChannels, CollectionOddPreChannels and CollectionOddPostChannels. They are all 0 by default.

Definition at line 166 of file ICARUSChannelMapAlg.h.

Member Typedef Documentation

Definition at line 530 of file ICARUSChannelMapAlg.h.

Type of FHiCL configuration table for this object.

Definition at line 267 of file ICARUSChannelMapAlg.h.

Definition at line 170 of file ICARUSChannelMapAlg.h.

using icarus::ICARUSChannelMapAlg::PlaneType_t = std::size_t
private

Type for plane type identifier.

Definition at line 658 of file ICARUSChannelMapAlg.h.

Definition at line 169 of file ICARUSChannelMapAlg.h.

using icarus::ICARUSChannelMapAlg::WirelessChannelCounts_t = std::array<std::array<std::pair<unsigned int, unsigned int>, 3U>, 2U>
private

Type for counts of wireless channels: per TPC set (even/odd), then per plane starting from the closest to the cathode; first is the number of wireless channels before the regular ones, second is the one after them.

Definition at line 514 of file ICARUSChannelMapAlg.h.

Constructor & Destructor Documentation

icarus::ICARUSChannelMapAlg::ICARUSChannelMapAlg ( Config const &  config)

Constructor: taked a configuration object.

Definition at line 78 of file ICARUSChannelMapAlg.cxx.

80  (extractWirelessChannelParams(config.WirelessChannels()))
81  , fSorter(getOptionalParameterSet(config.Sorter))
82  {}
icarus::GeoObjectSorterPMTasTPC fSorter
Algorithms to sort geometry elements.
static WirelessChannelCounts_t extractWirelessChannelParams(Config::WirelessChannelStruct const &params)
WirelessChannelCounts_t const fWirelessChannelCounts
Count of wireless channels on each plane.
icarus::ICARUSChannelMapAlg::ICARUSChannelMapAlg ( Parameters const &  config)
inline

Constructor: takes a FHiCL table object.

Definition at line 273 of file ICARUSChannelMapAlg.h.

274  : ICARUSChannelMapAlg(config()) {}
ICARUSChannelMapAlg(Config const &config)
Constructor: taked a configuration object.

Member Function Documentation

void icarus::ICARUSChannelMapAlg::buildReadoutPlanes ( geo::GeometryData_t::CryostatList_t const &  Cryostats)
private

Fills information about the TPC set and readout plane structure.

Parameters
Cryostatsthe sorted list of cryostats in the detector

This method extracts and fills the following information:

  • the number of TPC sets in each cryostat (fTPCsetCount);
  • all geo::TPCGeo objects in each TPC set, sorted by increasing z (fTPCsetTPCs);
  • the number of readout planes in each TPC set (fROPcount);
  • all geo::PlaneGeo objects in each readout plane, sorted by increasing z (fROPplanes).

Cryostats and its components are expected to be already in the final order and with all their ID's set.

Definition at line 577 of file ICARUSChannelMapAlg.cxx.

578 {
579  // the algorithm is delegated:
580  icarus::details::ROPandTPCsetBuildingAlg builder("ICARUSChannelMapAlg");
581 
582  auto results = builder.run(Cryostats);
583 
585  std::move(results).TPCsetCount(), std::move(results).TPCsetTPCs(),
586  std::move(results).ROPcount(), std::move(results).ROPplanes(),
587  std::move(results).TPCtoTPCset(), std::move(results).PlaneToROP()
588  );
589 
590 } // icarus::ICARUSChannelMapAlg::buildReadoutPlanes()
geo::TPCDataContainer< readout::TPCsetID > const & TPCtoTPCset() const
The TPC set including each TPC.
geo::PlaneDataContainer< readout::ROPID > const & PlaneToROP() const
The readout plane including each wire plane.
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
void set(std::vector< unsigned int > &&TPCsetCount, readout::TPCsetDataContainer< TPCColl_t > &&TPCsetTPCs, readout::TPCsetDataContainer< unsigned int > &&ROPcount, readout::ROPDataContainer< PlaneColl_t > &&ROPplanes, geo::TPCDataContainer< readout::TPCsetID > &&TPCtoTPCset, geo::PlaneDataContainer< readout::ROPID > &&PlaneToROP)
readout::TPCsetDataContainer< unsigned int > const & ROPcount() const
Number of readout planes in each TPC set.
Extracts TPC sets and readout planes from a list of cryostats.
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
readout::TPCsetDataContainer< TPCColl_t > const & TPCsetTPCs() const
All geo::TPCGeo objects in each TPC set, sorted by increasing z.
std::vector< unsigned int > const & TPCsetCount() const
Returns the number of TPC sets in each cryostat.
readout::ROPID icarus::ICARUSChannelMapAlg::ChannelToROP ( raw::ChannelID_t  channel) const
overridevirtual

Returns the ID of the ROP the channel belongs to (invalid if none).

Implements geo::ChannelMapAlg.

Definition at line 398 of file ICARUSChannelMapAlg.cxx.

399 {
400  if (!raw::isValidChannelID(channel)) return {};
402  = fChannelToWireMap.find(channel);
403  return info? info->ropid: readout::ROPID{};
404 } // icarus::ICARUSChannelMapAlg::ChannelToROP()
readout::ROPID ropid
ID of the ROP we cover.
ChannelsInROPStruct const * find(raw::ChannelID_t channel) const
Returns data of the ROP including channel, nullptr if none.
constexpr bool isValidChannelID(raw::ChannelID_t channel)
Definition: RawTypes.h:37
Class identifying a set of planes sharing readout channels.
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
std::vector< geo::WireID > icarus::ICARUSChannelMapAlg::ChannelToWire ( raw::ChannelID_t  channel) const
overridevirtual

Returns a collection of ID of wires connected to the channel.

Parameters
channelTPC readout channel number
Returns
collection of the wire IDs associated with channel
Exceptions
cet::exception(category: "Geometry") if non-existent channel

If the TPC readout channel is invalid or non-existing, an exception is thrown. In ICARUS valid channels are expected to be associated with at least one wire.

Implements geo::ChannelMapAlg.

Definition at line 118 of file ICARUSChannelMapAlg.cxx.

119 {
120  //
121  // input check
122  //
123  assert(!fPlaneInfo.empty());
124 
125  //
126  // output
127  //
128  std::vector<geo::WireID> AllSegments;
129 
130  //
131  // find the ROP with that channel
132  //
134  = fChannelToWireMap.find(channel);
135  if (!channelInfo) {
136  throw cet::exception("Geometry")
137  << "icarus::ICARUSChannelMapAlg::ChannelToWire(" << channel
138  << "): invalid channel requested (must be lower than "
139  << Nchannels() << ")\n";
140  }
141 
142  //
143  // find the wire planes in that ROP
144  //
145  PlaneColl_t const& planes = ROPplanes(channelInfo->ropid);
146 
147  //
148  // associate one wire for each of those wire planes to the channel
149  //
150  AllSegments.reserve(planes.size()); // this is sometimes (often?) too much
151  for (geo::PlaneGeo const* plane: planes) {
152 
153  geo::PlaneID const& pid = plane->ID();
154  ChannelRange_t const& channelRange = fPlaneInfo[pid].channelRange();
155 
156  if (!channelRange.contains(channel)) continue;
157  AllSegments.emplace_back
158  (pid, static_cast<geo::WireID::WireID_t>(channel - channelRange.begin()));
159 
160  } // for planes in ROP
161 
162  return AllSegments;
163 
164 } // icarus::ICARUSChannelMapAlg::ChannelToWire()
readout::ROPID ropid
ID of the ROP we cover.
icarus::details::ChannelRange_t ChannelRange_t
geo::PlaneDataContainer< PlaneInfo_t > fPlaneInfo
Range of channels covered by each of the wire planes.
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
ChannelsInROPStruct const * find(raw::ChannelID_t channel) const
Returns data of the ROP including channel, nullptr if none.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
BEGIN_PROLOG Z planes
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
icarus::details::PlaneColl_t PlaneColl_t
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
virtual unsigned int Nchannels() const override
Returns the number of readout channels (ID&#39;s go 0 to Nchannels()).
auto icarus::ICARUSChannelMapAlg::extractWirelessChannelParams ( Config::WirelessChannelStruct const &  params)
staticprivate

Definition at line 647 of file ICARUSChannelMapAlg.cxx.

648 {
649  return {
650  // even TPC sets (e.g. C:0 S:0)
651  std::array{
652  std::make_pair(
653  params.FirstInductionPreChannels(),
654  params.FirstInductionPostChannels()
655  ),
656  std::make_pair(
657  params.SecondInductionEvenPreChannels(),
658  params.SecondInductionEvenPostChannels()
659  ),
660  std::make_pair(
661  params.CollectionEvenPreChannels(),
662  params.CollectionEvenPostChannels()
663  )
664  },
665  // odd TPC sets (e.g. C:0 S:1)
666  std::array{
667  std::make_pair(
668  params.FirstInductionPreChannels(),
669  params.FirstInductionPostChannels()
670  ),
671  std::make_pair(
672  params.SecondInductionOddPreChannels(),
673  params.SecondInductionOddPostChannels()
674  ),
675  std::make_pair(
676  params.CollectionOddPreChannels(),
677  params.CollectionOddPostChannels()
678  )
679  }
680  };
681 
682 } // icarus::ICARUSChannelMapAlg::extractWirelessChannelParams()
then echo ***************************************echo array
Definition: find_fhicl.sh:28
void icarus::ICARUSChannelMapAlg::fillChannelToWireMap ( geo::GeometryData_t::CryostatList_t const &  Cryostats)
private

Fills the information about readout channel mapping.

Parameters
Cryostatsthe sorted list of cryostats in the detector

The readout information must have been already filled (buildReadoutPlanes()).

Definition at line 439 of file ICARUSChannelMapAlg.cxx.

440 {
441 
442  //
443  // input check
444  //
445  assert(fReadoutMapInfo);
446  assert(!Cryostats.empty());
447 
448  //
449  // output setup
450  //
451  assert(fPlaneInfo.empty());
452  std::array<unsigned int, 3U> maxSizes
453  = geo::details::extractMaxGeometryElements<3U>(Cryostats);
454 
455  fPlaneInfo.resize(maxSizes[0U], maxSizes[1U], maxSizes[2U]);
456 
457 
458  raw::ChannelID_t nextChannel = 0; // next available channel
459 
460  // once again we do not have iteration facilities from `geo::GeometryCore`
461  // available yet, so we go the nested loop way and bite it
462  for (geo::CryostatGeo const& cryo: Cryostats) {
463 
464  readout::CryostatID const cid { cryo.ID() };
465 
466  auto const nTPCsets
467  = static_cast<readout::TPCsetID::TPCsetID_t>(TPCsetCount(cid));
468 
470 
471  readout::TPCsetID const sid { cid, s };
472 
473  // select the channel count according to whether the TPC set is even or
474  // odd; the selected structure is an array with one element for wire
475  // plane signal type (first induction, second induction and collection):
476  auto const& TPCsetChannelCounts
477  = fWirelessChannelCounts.at(sid.TPCset & 1);
478 
479  auto const nROPs = static_cast<readout::ROPID::ROPID_t>(ROPcount(sid));
480 
481  for (readout::ROPID::ROPID_t r: util::counter(nROPs)) {
482 
483  mf::LogTrace log("ICARUSChannelMapAlg");
484 
485  readout::ROPID const rid { sid, r };
486  auto const planeType = findPlaneType(rid);
487  log << "ROP: " << rid
488  << " (plane type: " << PlaneTypeName(planeType) << ")";
489 
490  auto const& WirelessChannelCounts
491  = TPCsetChannelCounts.at(planeType);
492 
493  PlaneColl_t const& planes = ROPplanes(rid);
494  log << " (" << planes.size() << " planes):";
495  assert(!planes.empty());
496 
497  raw::ChannelID_t const firstROPchannel = nextChannel;
498 
499  auto iPlane = util::begin(planes);
500  auto const pend = util::end(planes);
501 
502  // assign available channels to all wires of the first plane
503  nextChannel += WirelessChannelCounts.first + (*iPlane)->Nwires();
504  fPlaneInfo[(*iPlane)->ID()] = {
506  { firstROPchannel + WirelessChannelCounts.first, nextChannel },
507  rid
508  };
509  log << " [" << (*iPlane)->ID() << "] "
510  << fPlaneInfo[(*iPlane)->ID()].firstChannel()
511  << " -- " << fPlaneInfo[(*iPlane)->ID()].lastChannel() << ";";
512 
513  geo::Point_t lastWirePos = (*iPlane)->LastWire().GetCenter<geo::Point_t>();
514 
515  while (++iPlane != pend) {
516 
517  geo::PlaneGeo const& plane = **iPlane;
518 
519  // find out which wire matches the last wire from the previous plane;
520  // if there is no such wire, an exception will be thrown,
521  // which is ok to us since we believe it should not happen.
522  geo::WireID const lastMatchedWireID
523  = plane.NearestWireID(lastWirePos);
524 
525  /*
526  mf::LogTrace("ICARUSChannelMapAlg")
527  << (*std::prev(iPlane))->ID() << " W:" << ((*std::prev(iPlane))->Nwires() - 1)
528  << " ending at " << (*std::prev(iPlane))->LastWire().GetEnd<geo::Point_t>()
529  << " matched " << lastMatchedWireID
530  << " which starts at " << plane.Wire(lastMatchedWireID).GetStart<geo::Point_t>()
531  ;
532  */
533 
534  //
535  // the first channel in this plane (`iPlane`) is the one associated
536  // to the first wire in the plane, which has local wire number `0`;
537  // the last channel from the previous plane (`nextChannel - 1`)
538  // is associated to the matched wire (`lastMatchedWireID`),
539  // which has some wire number (`lastMatchedWireID.Wire`).
540  //
541  auto const nWires = plane.Nwires();
542  raw::ChannelID_t const firstChannel
543  = (nextChannel - 1) - lastMatchedWireID.Wire;
544  nextChannel = firstChannel + nWires;
545 
546  fPlaneInfo[plane.ID()] = { { firstChannel, nextChannel }, rid };
547  log << " [" << plane.ID() << "] "
548  << fPlaneInfo[plane.ID()].firstChannel() << " -- "
549  << fPlaneInfo[plane.ID()].lastChannel() << ";";
550 
551  // update for the next iteration
552  lastWirePos = plane.LastWire().GetCenter<geo::Point_t>();
553 
554  } // while
555 
556  nextChannel += WirelessChannelCounts.second;
557  unsigned int const nChannels = nextChannel - firstROPchannel;
558  fChannelToWireMap.addROP(rid, firstROPchannel, nChannels);
559  log
560  << " => " << nChannels << " channels starting at " << firstROPchannel;
561 
562  } // for readout plane
563 
564  } // for TPC set
565 
566  } // for cryostat
567 
568  fChannelToWireMap.setEndChannel(nextChannel);
569  mf::LogTrace("ICARUSChannelMapAlg")
570  << "Counted " << fChannelToWireMap.nChannels() << " channels.";
571 
572 } // icarus::ICARUSChannelMapAlg::fillChannelToWireMap()
void setEndChannel(raw::ChannelID_t channel)
Sets the ID of the channels after the last valid one.
PlaneType_t findPlaneType(readout::ROPID const &ropid) const
Returns the &quot;type&quot; of readout plane.
icarus::details::ChannelRange_t ChannelRange_t
unsigned int ROPID_t
Type for the ID number.
geo::PlaneDataContainer< PlaneInfo_t > fPlaneInfo
Range of channels covered by each of the wire planes.
unsigned short TPCsetID_t
Type for the ID number.
Definition: readout_types.h:71
Class identifying a set of TPC sharing readout channels.
Definition: readout_types.h:70
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:580
Geometry information for a single cryostat.
Definition: CryostatGeo.h:43
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Definition: counter.h:285
geo::WireID NearestWireID(geo::Point_t const &pos) const
Returns the ID of wire closest to the specified position.
Definition: PlaneGeo.cxx:649
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
Class identifying a set of planes sharing readout channels.
readout::TPCsetDataContainer< unsigned int > const & ROPcount() const
Number of readout planes in each TPC set.
WirelessChannelCounts_t const fWirelessChannelCounts
Count of wireless channels on each plane.
BEGIN_PROLOG Z planes
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
geo::PlaneID const & ID() const
Returns the identifier of this plane.
Definition: PlaneGeo.h:203
unsigned int nChannels() const
Returns the number of mapped channels.
unsigned int Nwires() const
Number of wires in this plane.
Definition: PlaneGeo.h:269
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
Definition: WireGeo.cxx:73
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
const WireGeo & LastWire() const
Return the last wire in the plane.
Definition: PlaneGeo.h:350
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:184
icarus::details::PlaneColl_t PlaneColl_t
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
esac echo uname r
static std::string PlaneTypeName(PlaneType_t planeType)
Returns the name of the specified plane type.
void addROP(readout::ROPID const &rid, raw::ChannelID_t firstROPchannel, unsigned int nChannels)
The data type to uniquely identify a cryostat.
Definition: geo_types.h:190
std::vector< unsigned int > const & TPCsetCount() const
Returns the number of TPC sets in each cryostat.
auto icarus::ICARUSChannelMapAlg::findPlaneType ( readout::ROPID const &  ropid) const
private

Returns the "type" of readout plane.

Parameters
ropidID of the readout plane to query

Here the "type" refers to the position of the plane in the TPC and as a consequence to its signal type. The type of the readout plane is deduced from the type of the planes it contains.

The returned value is kFirstInductionType, kSecondInductionType, kCollectionType or kUnknownType.

Definition at line 594 of file ICARUSChannelMapAlg.cxx.

596 {
597  /*
598  * This implementation is very fragile, relying on the fact that the first
599  * induction plane numbers are `kFirstInductionType`, the second induction
600  * plane numbers are `kSecondInductionType` and the collection plane numbers
601  * are `kCollectionType`. This assumption is not checked anywhere.
602  *
603  */
604  constexpr std::array PlaneTypes = { // let's C++ figure out type and size
605  kFirstInductionType, // P:0
606  kSecondInductionType, // P:1
607  kCollectionType // P:2
608  };
609 
610  PlaneColl_t const& planes = ROPplanes(rid);
611  if (planes.empty()) return kUnknownType;
612  if (auto const planeNo = planes.front()->ID().Plane; planeNo < PlaneTypes.size())
613  return PlaneTypes[planeNo];
614  else return kUnknownType;
615 
616 } // icarus::ICARUSChannelMapAlg::findPlaneType()
static constexpr PlaneType_t kFirstInductionType
Identifier for first induction plane type.
static constexpr PlaneType_t kSecondInductionType
Identifier for second induction plane type.
then echo ***************************************echo array
Definition: find_fhicl.sh:28
static constexpr PlaneType_t kCollectionType
Identifier for collection plane type.
BEGIN_PROLOG Z planes
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
icarus::details::PlaneColl_t PlaneColl_t
static constexpr PlaneType_t kUnknownType
Identifier for unknown plane type.
raw::ChannelID_t icarus::ICARUSChannelMapAlg::FirstChannelInROP ( readout::ROPID const &  ropid) const
overridevirtual

Returns the ID of the first channel in the specified readout plane.

Parameters
ropidID of the readout plane
Returns
ID of first channel, or raw::InvalidChannelID if ID is invalid

Note that this check is performed on the validity of the readout plane ID, that does not necessarily imply that the readout plane specified by the ID actually exists. Check if the ROP exists with HasROP(). The behaviour for non-existing readout planes is undefined.

Implements geo::ChannelMapAlg.

Definition at line 409 of file ICARUSChannelMapAlg.cxx.

410 {
411  if (!ropid) return raw::InvalidChannelID;
413  = fChannelToWireMap.find(ropid);
414  return info? info->firstChannel: raw::InvalidChannelID;
415 } // icarus::ICARUSChannelMapAlg::FirstChannelInROP()
ChannelsInROPStruct const * find(raw::ChannelID_t channel) const
Returns data of the ROP including channel, nullptr if none.
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:32
raw::ChannelID_t firstChannel
First channel in ROP.
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
geo::TPCID icarus::ICARUSChannelMapAlg::FirstTPCinTPCset ( readout::TPCsetID const &  tpcsetid) const
overridevirtual

Returns the ID of the first TPC belonging to the specified TPC set.

Implements geo::ChannelMapAlg.

Definition at line 303 of file ICARUSChannelMapAlg.cxx.

304 {
305  if (!tpcsetid) return {};
306 
307  auto const& TPClist = TPCsetTPCs(tpcsetid);
308  return TPClist.empty()? geo::TPCID{}: TPClist.front()->ID();
309 
310 } // icarus::ICARUSChannelMapAlg::FirstTPCinTPCset()
The data type to uniquely identify a TPC.
Definition: geo_types.h:386
readout::TPCsetDataContainer< TPCColl_t > const & TPCsetTPCs() const
All geo::TPCGeo objects in each TPC set, sorted by increasing z.
geo::PlaneID icarus::ICARUSChannelMapAlg::FirstWirePlaneInROP ( readout::ROPID const &  ropid) const
overridevirtual

Returns the ID of the first plane belonging to the specified ROP.

The wire planes within a readout plane are supposed to be sorted by beam (z) coordinate, so that the first one should be the closest to the beam entrance point.

Implements geo::ChannelMapAlg.

Definition at line 420 of file ICARUSChannelMapAlg.cxx.

421 {
422  if (!ropid) return {};
423  PlaneColl_t const& planes = ROPplanes(ropid);
424  return planes.empty()? geo::PlaneID{}: planes.front()->ID();
425 } // icarus::ICARUSChannelMapAlg::FirstWirePlaneInROP()
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
BEGIN_PROLOG Z planes
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
icarus::details::PlaneColl_t PlaneColl_t
bool icarus::ICARUSChannelMapAlg::HasCryostat ( readout::CryostatID const &  cryoid) const
private

Returns whether the specified cryostat is known to the mapping.

Definition at line 430 of file ICARUSChannelMapAlg.cxx.

431 {
432  assert(fReadoutMapInfo);
433  return cryoid.Cryostat < fReadoutMapInfo.NCryostats();
434 } // icarus::ICARUSChannelMapAlg::HasCryostat()
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
bool icarus::ICARUSChannelMapAlg::HasROP ( readout::ROPID const &  ropid) const
overridevirtual

Returns whether we have the specified ROP

Returns
whether the readout plane is valid and exists

Implements geo::ChannelMapAlg.

Definition at line 328 of file ICARUSChannelMapAlg.cxx.

328  {
329  return HasTPCset(ropid)? (ropid.ROP < ROPcount(ropid)): false;
330 } // icarus::ICARUSChannelMapAlg::HasROP()
virtual bool HasTPCset(readout::TPCsetID const &tpcsetid) const override
readout::TPCsetDataContainer< unsigned int > const & ROPcount() const
Number of readout planes in each TPC set.
bool icarus::ICARUSChannelMapAlg::HasTPCset ( readout::TPCsetID const &  tpcsetid) const
overridevirtual

Returns whether we have the specified TPC set.

Returns
whether the TPC set is valid and exists

Returns whether we have the specified TPC set

Returns
whether the TPC set is valid and exists

Implements geo::ChannelMapAlg.

Definition at line 270 of file ICARUSChannelMapAlg.cxx.

271 {
272  return
273  HasCryostat(tpcsetid)? (tpcsetid.TPCset < TPCsetCount(tpcsetid)): false;
274 } // icarus::ICARUSChannelMapAlg::HasTPCset()
bool HasCryostat(readout::CryostatID const &cryoid) const
Returns whether the specified cryostat is known to the mapping.
std::vector< unsigned int > const & TPCsetCount() const
Returns the number of TPC sets in each cryostat.
void icarus::ICARUSChannelMapAlg::Initialize ( geo::GeometryData_t const &  geodata)
overridevirtual

Prepares the algorithm extracting information from the geometry.

Implements geo::ChannelMapAlg.

Definition at line 86 of file ICARUSChannelMapAlg.cxx.

87 {
88  // This is the only INFO level message we want this object to produce;
89  // given the dynamic nature of the channel mapping choice,
90  // it's better for the log to have some indication of chosen channel mapping.
91  mf::LogInfo("ICARUSChannelMapAlg")
92  << "Initializing ICARUSChannelMapAlg channel mapping algorithm.";
93 
94  buildReadoutPlanes(geodata.cryostats);
95 
96  fillChannelToWireMap(geodata.cryostats);
97 
98  MF_LOG_TRACE("ICARUSChannelMapAlg")
99  << "ICARUSChannelMapAlg::Initialize() completed.";
100 
101 } // icarus::ICARUSChannelMapAlg::Initialize()
void buildReadoutPlanes(geo::GeometryData_t::CryostatList_t const &Cryostats)
Fills information about the TPC set and readout plane structure.
void fillChannelToWireMap(geo::GeometryData_t::CryostatList_t const &Cryostats)
Fills the information about readout channel mapping.
unsigned int icarus::ICARUSChannelMapAlg::MaxROPs ( ) const
overridevirtual

Returns the largest number of ROPs a TPC set in the detector has.

Implements geo::ChannelMapAlg.

Definition at line 322 of file ICARUSChannelMapAlg.cxx.

322  {
323  assert(fReadoutMapInfo);
324  return fReadoutMapInfo.MaxROPs();
325 } // icarus::ICARUSChannelMapAlg::MaxROPs()
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
unsigned int icarus::ICARUSChannelMapAlg::MaxTPCsets ( ) const
overridevirtual

Returns the largest number of TPC sets any cryostat in the detector has.

Implements geo::ChannelMapAlg.

Definition at line 260 of file ICARUSChannelMapAlg.cxx.

260  {
261  assert(fReadoutMapInfo);
262  return fReadoutMapInfo.MaxTPCsets();
263 } // icarus::ICARUSChannelMapAlg::MaxTPCsets()
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
unsigned int icarus::ICARUSChannelMapAlg::Nchannels ( ) const
overridevirtual

Returns the number of readout channels (ID's go 0 to Nchannels()).

Implements geo::ChannelMapAlg.

Definition at line 168 of file ICARUSChannelMapAlg.cxx.

168  {
169 
170  return fChannelToWireMap.nChannels();
171 
172 } // icarus::ICARUSChannelMapAlg::Nchannels()
unsigned int nChannels() const
Returns the number of mapped channels.
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
unsigned int icarus::ICARUSChannelMapAlg::Nchannels ( readout::ROPID const &  ropid) const
overridevirtual

Returns the number of channels in the specified ROP.

Returns
number of channels in the specified ROP, 0 if non-existent

Implements geo::ChannelMapAlg.

Definition at line 177 of file ICARUSChannelMapAlg.cxx.

178 {
180  = fChannelToWireMap.find(ropid);
181  return ROPinfo? ROPinfo->nChannels: 0U;
182 } // icarus::ICARUSChannelMapAlg::Nchannels(ROPID)
ChannelsInROPStruct const * find(raw::ChannelID_t channel) const
Returns data of the ROP including channel, nullptr if none.
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
geo::WireID icarus::ICARUSChannelMapAlg::NearestWireID ( const TVector3 &  worldPos,
geo::PlaneID const &  planeID 
) const
overridevirtual

Returns the ID of the wire nearest to the specified position.

Parameters
worldPosposition to be tested
planeIDplane containing the wire
Returns
the ID of the wire closest to worldPos in the specified plane
Exceptions
InvalidWireIDErrorthe ID found is not present in the detector
See Also
WireCoordinate(double, double, geo::PlaneID const&)

The plane is required to be valid and exist in the detector. Otherwise, the behaviour is undefined. An exception is thrown if the wire that would be the closest is actually not present; but no check is performed whether the specified position is outside the wire plane: wires are extrapolated to be infinitely long. In other words, the result can be trusted only as long as the position is within the specified wire plane.

Reimplemented from geo::ChannelMapAlg.

Definition at line 206 of file ICARUSChannelMapAlg.cxx.

207 {
208  /*
209  * this should NOT be called... it shouldn't be here at all!
210  */
211 
212  cet::exception e("ICARUSChannelMapAlg");
213  e << "ICARUSChannelMapAlg does not support `NearestWireID()` call."
214  "\nPlease update calling software to use geo::PlaneGeo::NearestWireID()`:"
215  "\n";
216 
218 
219  throw e;
220 } // icarus::ICARUSChannelMapAlg::NearestWireID()
do i e
void printBacktrace(Stream &&out, BacktracePrintOptions options)
Prints the full backtrace into a stream.
Definition: DebugUtils.h:403
virtual geo::WireID icarus::ICARUSChannelMapAlg::NearestWireID ( const TVector3 &  worldPos,
unsigned int  PlaneNo,
unsigned int  TPCNo,
unsigned int  cstat 
) const
inlineoverridevirtual

Returns the ID of the wire nearest to the specified position.

Parameters
worldPosposition to be tested
PlaneNonumber of plane containing the wire
TPCNonumber of TPC containing the wire
cstatnumber of cryostat containing the wire
Returns
the ID of the wire closest to worldPos in the specified plane
See Also
NearestWireID(const TVector3&, geo::PlaneID const&)
Deprecated:
Use the version with geo::PlaneID instead

Implements geo::ChannelMapAlg.

Definition at line 343 of file ICARUSChannelMapAlg.h.

347  { return NearestWireID(worldPos, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
virtual geo::WireID NearestWireID(const TVector3 &worldPos, geo::PlaneID const &planeID) const override
Returns the ID of the wire nearest to the specified position.
unsigned int icarus::ICARUSChannelMapAlg::NROPs ( readout::TPCsetID const &  tpcsetid) const
overridevirtual

Returns the total number of readout planes in the specified TPC set.

Parameters
tpcsetidTPC set ID
Returns
number of readout planes in the TPC sets, or 0 if ID is invalid

The validity of the requested TPC set is performed like in HasTPCset().

Implements geo::ChannelMapAlg.

Definition at line 315 of file ICARUSChannelMapAlg.cxx.

316 {
317  return HasTPCset(tpcsetid)? ROPcount(tpcsetid): 0U;
318 } // icarus::ICARUSChannelMapAlg::NROPs()
virtual bool HasTPCset(readout::TPCsetID const &tpcsetid) const override
readout::TPCsetDataContainer< unsigned int > const & ROPcount() const
Number of readout planes in each TPC set.
unsigned int icarus::ICARUSChannelMapAlg::NTPCsets ( readout::CryostatID const &  cryoid) const
overridevirtual

Returns the total number of TPC sets in the specified cryostat.

Parameters
cryoidcryostat ID
Returns
number of TPC sets in the cryostat, or 0 if no cryostat found

Implements geo::ChannelMapAlg.

Definition at line 252 of file ICARUSChannelMapAlg.cxx.

253 {
254  return HasCryostat(cryoid)? TPCsetCount(cryoid): 0U;
255 } // icarus::ICARUSChannelMapAlg::NTPCsets()
bool HasCryostat(readout::CryostatID const &cryoid) const
Returns whether the specified cryostat is known to the mapping.
std::vector< unsigned int > const & TPCsetCount() const
Returns the number of TPC sets in each cryostat.
std::set< geo::PlaneID > const & icarus::ICARUSChannelMapAlg::PlaneIDs ( ) const
overridevirtual

Returns a list of the plane IDs in the whole detector.

Implements geo::ChannelMapAlg.

Definition at line 232 of file ICARUSChannelMapAlg.cxx.

232  {
233 
234  /*
235  * this should NOT be called... it shouldn't be here at all!
236  */
237 
238  cet::exception e("ICARUSChannelMapAlg");
239  e << "ICARUSChannelMapAlg does not support `PlaneIDs()` call."
240  "\nPlease update calling software to use geo::GeometryCore::IteratePlanes()`"
241  "\n";
242 
244 
245  throw e;
246 
247 } // icarus::ICARUSChannelMapAlg::PlaneIDs()
do i e
void printBacktrace(Stream &&out, BacktracePrintOptions options)
Prints the full backtrace into a stream.
Definition: DebugUtils.h:403
geo::PlaneDataContainer<readout::ROPID> const& icarus::ICARUSChannelMapAlg::PlaneToROP ( ) const
inlineprivate

The readout plane including each wire plane.

Definition at line 718 of file ICARUSChannelMapAlg.h.

719  { assert(fReadoutMapInfo); return fReadoutMapInfo.fPlaneToROP; }
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
geo::PlaneDataContainer< readout::ROPID > fPlaneToROP
The ROP each wire plane belongs to.
readout::ROPID const& icarus::ICARUSChannelMapAlg::PlaneToROP ( geo::PlaneID const &  pid) const
inlineprivate

The readout plane the specified wire plane pid belongs to.

Definition at line 722 of file ICARUSChannelMapAlg.h.

723  { return PlaneToROP()[pid]; }
geo::PlaneDataContainer< readout::ROPID > const & PlaneToROP() const
The readout plane including each wire plane.
std::string icarus::ICARUSChannelMapAlg::PlaneTypeName ( PlaneType_t  planeType)
staticprivate

Returns the name of the specified plane type.

Definition at line 686 of file ICARUSChannelMapAlg.cxx.

686  {
687 
688  using namespace std::string_literals;
689  switch (planeType) {
690  case kFirstInductionType: return "first induction"s;
691  case kSecondInductionType: return "second induction"s;
692  case kCollectionType: return "collection induction"s;
693  case kUnknownType: return "unknown"s;
694  default:
695  return "unsupported ("s + std::to_string(planeType) + ")"s;
696  } // switch
697 
698 } // icarus::ICARUSChannelMapAlg::PlaneTypeName()
static constexpr PlaneType_t kFirstInductionType
Identifier for first induction plane type.
static constexpr PlaneType_t kSecondInductionType
Identifier for second induction plane type.
static constexpr PlaneType_t kCollectionType
Identifier for collection plane type.
std::string to_string(WindowPattern const &pattern)
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
static constexpr PlaneType_t kUnknownType
Identifier for unknown plane type.
raw::ChannelID_t icarus::ICARUSChannelMapAlg::PlaneWireToChannel ( geo::WireID const &  wireID) const
overridevirtual

Returns the channel ID a wire is connected to.

Parameters
wireIDID of the wire
Returns
the ID of the channel
See Also
PlaneWireToChannel(geo::WireID const&)

Behaviour on an invalid or not present wires is undefined.

Deprecated:
Use the version with geo::WireID

Reimplemented from geo::ChannelMapAlg.

Definition at line 225 of file ICARUSChannelMapAlg.cxx.

226 {
227  return fPlaneInfo[wireID].firstChannel() + wireID.Wire;
228 } // icarus::ICARUSChannelMapAlg::PlaneWireToChannel()
geo::PlaneDataContainer< PlaneInfo_t > fPlaneInfo
Range of channels covered by each of the wire planes.
virtual raw::ChannelID_t icarus::ICARUSChannelMapAlg::PlaneWireToChannel ( unsigned int  plane,
unsigned int  wire,
unsigned int  tpc,
unsigned int  cstat 
) const
inlineoverridevirtual

Returns the channel ID a wire is connected to.

Parameters
planenumber of plane
wirenumber of wire
tpcnumber of TPC
cstatnumber of cryostat
Returns
the ID of the channel
See Also
PlaneWireToChannel(geo::WireID const&)
Deprecated:
Use the version with geo::WireID

Implements geo::ChannelMapAlg.

Definition at line 312 of file ICARUSChannelMapAlg.h.

316  { return PlaneWireToChannel(geo::WireID(cstat, tpc, plane, wire)); }
virtual raw::ChannelID_t PlaneWireToChannel(geo::WireID const &wireID) const override
Returns the channel ID a wire is connected to.
readout::TPCsetDataContainer<unsigned int> const& icarus::ICARUSChannelMapAlg::ROPcount ( ) const
inlineprivate

Number of readout planes in each TPC set.

Definition at line 692 of file ICARUSChannelMapAlg.h.

693  { assert(fReadoutMapInfo); return fReadoutMapInfo.fROPcount; }
readout::TPCsetDataContainer< unsigned int > fROPcount
Number of readout planes in each TPC set.
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
unsigned int icarus::ICARUSChannelMapAlg::ROPcount ( readout::TPCsetID const &  sid) const
inlineprivate

Number of readout planes in the specified TPC set sid.

Definition at line 696 of file ICARUSChannelMapAlg.h.

697  { return ROPcount()[sid]; }
readout::TPCsetDataContainer< unsigned int > const & ROPcount() const
Number of readout planes in each TPC set.
readout::ROPDataContainer<PlaneColl_t> const& icarus::ICARUSChannelMapAlg::ROPplanes ( ) const
inlineprivate

All geo::PlaneGeo objects in each readout plane, sorted by z.

Definition at line 700 of file ICARUSChannelMapAlg.h.

701  { assert(fReadoutMapInfo); return fReadoutMapInfo.fROPplanes; }
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
readout::ROPDataContainer< PlaneColl_t > fROPplanes
All geo::PlaneGeo objects in each readout plane, sorted by z.
PlaneColl_t const& icarus::ICARUSChannelMapAlg::ROPplanes ( readout::ROPID const &  rid) const
inlineprivate

All geo::PlaneGeo objects in the specified readout plane rid.

Definition at line 704 of file ICARUSChannelMapAlg.h.

705  { return ROPplanes()[rid]; }
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
std::vector< geo::TPCID > icarus::ICARUSChannelMapAlg::ROPtoTPCs ( readout::ROPID const &  ropid) const
overridevirtual

Returns a list of ID of TPCs the specified ROP spans.

Parameters
ropidID of the readout plane
Returns
the list of TPC IDs, empty if readout plane ID is invalid

In this mapping, readout planes and wire planes are mapped one-to-one. The returned list contains always one entry, unless the specified readout plane ID is invalid, in which case the list is empty. Note that this check is performed on the validity of the readout plane ID, that does not necessarily imply that the readout plane specified by the ID actually exists. Check if the ROP exists with HasROP(). The behaviour on non-existing readout planes is undefined.

Implements geo::ChannelMapAlg.

Definition at line 371 of file ICARUSChannelMapAlg.cxx.

372 {
373  std::vector<geo::TPCID> TPCs;
374  if (!ropid) return TPCs;
375 
376  /*
377  * We use the same algorithm as for extracting the plane IDs
378  * (they implicitly convert to TPC ID... kind of them).
379  * The algorithm does not test for duplication, i.e. in theory it could
380  * produce lists with the same TPC ID being present multiple times
381  * from different planes.
382  * But this is not expected in this mapping, where each TPC holds at most
383  * one wire plane for each view, and the planes in a ROP are all on the same
384  * view. It might be matter of an assertion, but it's too complex to fit in an
385  * `assert()` call.
386  */
387  auto const& PlaneList = ROPplanes(ropid);
388  TPCs.reserve(PlaneList.size());
389  std::transform(PlaneList.begin(), PlaneList.end(), std::back_inserter(TPCs),
390  std::mem_fn(&geo::PlaneGeo::ID)
391  );
392  return TPCs;
393 } // icarus::ICARUSChannelMapAlg::ROPtoTPCs()
static constexpr Sample_t transform(Sample_t sample)
BEGIN_PROLOG opflashtpc1 TPCs
geo::PlaneID const & ID() const
Returns the identifier of this plane.
Definition: PlaneGeo.h:203
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
std::vector< geo::PlaneID > icarus::ICARUSChannelMapAlg::ROPtoWirePlanes ( readout::ROPID const &  ropid) const
overridevirtual

Returns a list of ID of wire planes belonging to the specified ROP.

Parameters
ropidID of the readout plane to convert into wire planes
Returns
the list of wire plane IDs, empty if readout plane ID is invalid

Note that this check is performed on the validity of the readout plane ID, that does not necessarily imply that the readout plane specified by the ID actually exists.

In this mapping, readout planes contain one or two wire planes each, depending on the view.

Implements geo::ChannelMapAlg.

Definition at line 355 of file ICARUSChannelMapAlg.cxx.

356 {
357  std::vector<geo::PlaneID> Planes;
358  if (!ropid) return Planes;
359 
360  auto const& PlaneList = ROPplanes(ropid);
361  Planes.reserve(PlaneList.size());
362  std::transform(PlaneList.begin(), PlaneList.end(), std::back_inserter(Planes),
363  std::mem_fn(&geo::PlaneGeo::ID)
364  );
365  return Planes;
366 } // icarus::ICARUSChannelMapAlg::ROPtoWirePlanes()
static constexpr Sample_t transform(Sample_t sample)
geo::PlaneID const & ID() const
Returns the identifier of this plane.
Definition: PlaneGeo.h:203
readout::ROPDataContainer< PlaneColl_t > const & ROPplanes() const
All geo::PlaneGeo objects in each readout plane, sorted by z.
geo::SigType_t icarus::ICARUSChannelMapAlg::SignalTypeForChannelImpl ( raw::ChannelID_t const  channel) const
overrideprivatevirtual

Returns the type of signal on the specified channel.

Implements geo::ChannelMapAlg.

Definition at line 621 of file ICARUSChannelMapAlg.cxx.

622 {
623  /*
624  * We rely on the accuracy of `findPlaneType()` (which is admittedly less than
625  * great) to assign signal type accordingly.
626  */
627 
629  = fChannelToWireMap.find(channel);
630  if (!channelInfo) return geo::kMysteryType;
631 
632  switch (findPlaneType(channelInfo->ropid)) {
633  case kFirstInductionType:
635  return geo::kInduction;
636  case kCollectionType:
637  return geo::kCollection;
638  default:
639  return geo::kMysteryType;
640  } // switch
641 
642 } // icarus::ICARUSChannelMapAlg::SignalTypeForChannelImpl()
PlaneType_t findPlaneType(readout::ROPID const &ropid) const
Returns the &quot;type&quot; of readout plane.
readout::ROPID ropid
ID of the ROP we cover.
Who knows?
Definition: geo_types.h:147
static constexpr PlaneType_t kFirstInductionType
Identifier for first induction plane type.
static constexpr PlaneType_t kSecondInductionType
Identifier for second induction plane type.
ChannelsInROPStruct const * find(raw::ChannelID_t channel) const
Returns data of the ROP including channel, nullptr if none.
static constexpr PlaneType_t kCollectionType
Identifier for collection plane type.
Signal from induction planes.
Definition: geo_types.h:145
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
Signal from collection planes.
Definition: geo_types.h:146
virtual geo::GeoObjectSorter const& icarus::ICARUSChannelMapAlg::Sorter ( ) const
inlineoverridevirtual

Return the sorter.

Implements geo::ChannelMapAlg.

Definition at line 505 of file ICARUSChannelMapAlg.h.

506  { return fSorter; }
icarus::GeoObjectSorterPMTasTPC fSorter
Algorithms to sort geometry elements.
std::vector<unsigned int> const& icarus::ICARUSChannelMapAlg::TPCsetCount ( ) const
inlineprivate

Returns the number of TPC sets in each cryostat.

Definition at line 676 of file ICARUSChannelMapAlg.h.

677  { assert(fReadoutMapInfo); return fReadoutMapInfo.fTPCsetCount; }
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
std::vector< unsigned int > fTPCsetCount
Number of TPC sets in each cryostat.
unsigned int icarus::ICARUSChannelMapAlg::TPCsetCount ( readout::CryostatID const &  cid) const
inlineprivate

Returns the number of TPC sets in the specified cryostat cid.

Definition at line 680 of file ICARUSChannelMapAlg.h.

681  { return TPCsetCount()[cid.Cryostat]; }
std::vector< unsigned int > const & TPCsetCount() const
Returns the number of TPC sets in each cryostat.
std::vector< geo::TPCID > icarus::ICARUSChannelMapAlg::TPCsetToTPCs ( readout::TPCsetID const &  tpcsetid) const
overridevirtual

Returns a list of ID of TPCs belonging to the specified TPC set.

Parameters
tpcsetidID of the TPC set to convert into TPC IDs
Returns
the list of TPCs, empty if TPC set is invalid

Each TPC set contains one TPC if on first induction plane, where wires are split, or two in the second induction and collection planes, which have shared channels.

Implements geo::ChannelMapAlg.

Definition at line 287 of file ICARUSChannelMapAlg.cxx.

288 {
289  std::vector<geo::TPCID> TPCs;
290  if (!tpcsetid) return TPCs;
291 
292  auto const& TPClist = TPCsetTPCs(tpcsetid);
293  TPCs.reserve(TPClist.size());
294  std::transform(TPClist.begin(), TPClist.end(), std::back_inserter(TPCs),
295  std::mem_fn(&geo::TPCGeo::ID)
296  );
297  return TPCs;
298 } // icarus::ICARUSChannelMapAlg::TPCsetToTPCs()
geo::TPCID const & ID() const
Returns the identifier of this TPC.
Definition: TPCGeo.h:333
static constexpr Sample_t transform(Sample_t sample)
BEGIN_PROLOG opflashtpc1 TPCs
readout::TPCsetDataContainer< TPCColl_t > const & TPCsetTPCs() const
All geo::TPCGeo objects in each TPC set, sorted by increasing z.
readout::TPCsetDataContainer<TPCColl_t> const& icarus::ICARUSChannelMapAlg::TPCsetTPCs ( ) const
inlineprivate

All geo::TPCGeo objects in each TPC set, sorted by increasing z.

Definition at line 684 of file ICARUSChannelMapAlg.h.

685  { assert(fReadoutMapInfo); return fReadoutMapInfo.fTPCsetTPCs; }
readout::TPCsetDataContainer< TPCColl_t > fTPCsetTPCs
All geo::TPCGeo objects in each TPC set, sorted by increasing z.
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
TPCColl_t const& icarus::ICARUSChannelMapAlg::TPCsetTPCs ( readout::TPCsetID const &  sid) const
inlineprivate

All geo::TPCGeo objects in the specified TPC set sid.

Definition at line 688 of file ICARUSChannelMapAlg.h.

689  { return TPCsetTPCs()[sid]; }
readout::TPCsetDataContainer< TPCColl_t > const & TPCsetTPCs() const
All geo::TPCGeo objects in each TPC set, sorted by increasing z.
readout::TPCsetID icarus::ICARUSChannelMapAlg::TPCtoTPCset ( geo::TPCID const &  tpcid) const
overridevirtual

Returns the ID of the TPC set the specified TPC belongs to.

Parameters
tpcidID of the TPC
Returns
the ID of the corresponding TPC set, or invalid ID when tpcid is

If the TPC ID is not valid, an invalid TPC set ID is returned. Note that this check is performed on the validity of the TPC ID, that does not necessarily imply that the TPC specified by the ID actually exists.

Implements geo::ChannelMapAlg.

Definition at line 279 of file ICARUSChannelMapAlg.cxx.

280 {
281  return tpcid? TPCtoTPCset()[tpcid]: readout::TPCsetID{};
282 } // icarus::ICARUSChannelMapAlg::TPCtoTPCset()
geo::TPCDataContainer< readout::TPCsetID > const & TPCtoTPCset() const
The TPC set including each TPC.
Class identifying a set of TPC sharing readout channels.
Definition: readout_types.h:70
geo::TPCDataContainer<readout::TPCsetID> const& icarus::ICARUSChannelMapAlg::TPCtoTPCset ( ) const
inlineprivate

The TPC set including each TPC.

Definition at line 708 of file ICARUSChannelMapAlg.h.

709  { assert(fReadoutMapInfo); return fReadoutMapInfo.fTPCtoTPCset; }
geo::TPCDataContainer< readout::TPCsetID > fTPCtoTPCset
The TPC set each TPC belongs to.
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
void icarus::ICARUSChannelMapAlg::Uninitialize ( )
overridevirtual

Frees the resources of this algorithm.

Implements geo::ChannelMapAlg.

Definition at line 105 of file ICARUSChannelMapAlg.cxx.

105  {
106 
108 
110 
111  fPlaneInfo.clear();
112 
113 } // icarus::ICARUSChannelMapAlg::Uninitialize()
geo::PlaneDataContainer< PlaneInfo_t > fPlaneInfo
Range of channels covered by each of the wire planes.
void clear()
Frees the memory and leaves the object unusable until next set().
void clear()
Resets the data of the map to like just constructed.
ReadoutMappingInfo_t fReadoutMapInfo
Information about TPC sets and readout planes in the geometry.
icarus::details::ChannelToWireMap fChannelToWireMap
Mapping of channels to wire planes and ROP&#39;s.
double icarus::ICARUSChannelMapAlg::WireCoordinate ( double  YPos,
double  ZPos,
geo::PlaneID const &  planeID 
) const
overridevirtual

Returns the index of the wire nearest to the specified position.

Parameters
YPosy coordinate on the wire plane
ZPosz coordinate on the wire plane
planeIDID of the plane
Returns
an index interpolation between the two nearest wires
See Also
NearestWireID()

Respect to NearestWireID(), this method returns a real number, representing a continuous coordinate in the wire axis, with the round values corresponding to the actual wires.

The plane is required to be valid and exist in the detector. Otherwise, the behaviour is undefined.

Reimplemented from geo::ChannelMapAlg.

Definition at line 187 of file ICARUSChannelMapAlg.cxx.

188 {
189  /*
190  * this should NOT be called... it shouldn't be here at all!
191  */
192 
193  cet::exception e("ICARUSChannelMapAlg");
194  e << "ICARUSChannelMapAlg does not support `WireCoordinate()` call."
195  "\nPlease update calling software to use geo::PlaneGeo::WireCoordinate()`:"
196  "\n";
197 
199 
200  throw e;
201 } // icarus::ICARUSChannelMapAlg::WireCoordinate()
do i e
void printBacktrace(Stream &&out, BacktracePrintOptions options)
Prints the full backtrace into a stream.
Definition: DebugUtils.h:403
virtual double icarus::ICARUSChannelMapAlg::WireCoordinate ( double  YPos,
double  ZPos,
unsigned int  PlaneNo,
unsigned int  TPCNo,
unsigned int  cstat 
) const
inlineoverridevirtual

Returns the index of the wire nearest to the specified position.

Parameters
YPosy coordinate on the wire plane
ZPosz coordinate on the wire plane
PlaneNonumber of plane
TPCNonumber of TPC
cstatnumber of cryostat
Returns
an index interpolation between the two nearest wires
See Also
WireCoordinate(double, double, geo::PlaneID const&)
Deprecated:
Use the version with geo::PlaneID instead

Implements geo::ChannelMapAlg.

Definition at line 333 of file ICARUSChannelMapAlg.h.

337  { return WireCoordinate(YPos, ZPos, geo::PlaneID(cstat, TPCNo, PlaneNo)); }
virtual double WireCoordinate(double YPos, double ZPos, geo::PlaneID const &planeID) const override
Returns the index of the wire nearest to the specified position.
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
readout::ROPID icarus::ICARUSChannelMapAlg::WirePlaneToROP ( geo::PlaneID const &  planeid) const
overridevirtual

Returns the ID of the ROP planeid belongs to, or invalid if none.

Parameters
planeidID of the plane
Returns
the ID of the corresponding ROP, or invalid ID when planeid is

If the plane ID is not valid, an invalid readout plane ID is returned. Note that this check is performed on the validity of the plane ID, that does not necessarily imply that the plane specified by the ID actually exists.

Parameters
planeidID of the plane
Returns
the ID of the corresponding ROP, or invalid ID when planeid is

In this mapping, readout planes and wire planes are mapped one-to-one. The returned value mirrors the plane ID in the readout space. If the plane ID is not valid, an invalid readout plane ID is returned. Note that this check is performed on the validity of the plane ID, that does not necessarily imply that the plane specified by the ID actually exists.

Implements geo::ChannelMapAlg.

Definition at line 347 of file ICARUSChannelMapAlg.cxx.

348 {
349  return planeid? PlaneToROP(planeid): readout::ROPID{};
350 } // icarus::ICARUSChannelMapAlg::WirePlaneToROP()
IDparameter< readout::ROPID > ROPID
Member type of validated readout::ROPID parameter.
geo::PlaneDataContainer< readout::ROPID > const & PlaneToROP() const
The readout plane including each wire plane.

Member Data Documentation

icarus::details::ChannelToWireMap icarus::ICARUSChannelMapAlg::fChannelToWireMap
private

Mapping of channels to wire planes and ROP's.

Definition at line 634 of file ICARUSChannelMapAlg.h.

geo::PlaneDataContainer<PlaneInfo_t> icarus::ICARUSChannelMapAlg::fPlaneInfo
private

Range of channels covered by each of the wire planes.

Definition at line 637 of file ICARUSChannelMapAlg.h.

ReadoutMappingInfo_t icarus::ICARUSChannelMapAlg::fReadoutMapInfo
private

Information about TPC sets and readout planes in the geometry.

Definition at line 631 of file ICARUSChannelMapAlg.h.

icarus::GeoObjectSorterPMTasTPC icarus::ICARUSChannelMapAlg::fSorter
private

Algorithms to sort geometry elements.

Definition at line 653 of file ICARUSChannelMapAlg.h.

WirelessChannelCounts_t const icarus::ICARUSChannelMapAlg::fWirelessChannelCounts
private

Count of wireless channels on each plane.

Definition at line 646 of file ICARUSChannelMapAlg.h.

constexpr PlaneType_t icarus::ICARUSChannelMapAlg::kCollectionType = 2U
staticprivate

Identifier for collection plane type.

Definition at line 665 of file ICARUSChannelMapAlg.h.

constexpr PlaneType_t icarus::ICARUSChannelMapAlg::kFirstInductionType = 0U
staticprivate

Identifier for first induction plane type.

Definition at line 661 of file ICARUSChannelMapAlg.h.

constexpr PlaneType_t icarus::ICARUSChannelMapAlg::kSecondInductionType = 1U
staticprivate

Identifier for second induction plane type.

Definition at line 663 of file ICARUSChannelMapAlg.h.

constexpr PlaneType_t icarus::ICARUSChannelMapAlg::kUnknownType = std::numeric_limits<PlaneType_t>::max()
staticprivate

Identifier for unknown plane type.

Definition at line 668 of file ICARUSChannelMapAlg.h.


The documentation for this class was generated from the following files: