LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "ChannelMapStandardAlg.h"
Public Member Functions | |
ChannelMapStandardAlg (fhicl::ParameterSet const &p) | |
void | Initialize (GeometryData_t const &geodata) override |
Geometry initialisation. More... | |
void | Uninitialize () override |
Deconfiguration: prepare for a following call of Initialize() More... | |
std::vector< WireID > | ChannelToWire (raw::ChannelID_t channel) const override |
unsigned int | Nchannels () const override |
Returns the total number of channels present (not necessarily contiguous) More... | |
unsigned int | Nchannels (readout::ROPID const &ropid) const override |
Returns the number of channels in the specified ROP. More... | |
std::set< PlaneID > const & | PlaneIDs () const override |
Returns a list of the plane IDs in the whole detector. More... | |
GeoObjectSorter const & | Sorter () const override |
Return the sorter. More... | |
double | WireCoordinate (double YPos, double ZPos, PlaneID const &planeID) const override |
Returns the index of the wire nearest to the specified position. More... | |
WireID | NearestWireID (Point_t const &worldPos, PlaneID const &planeID) const override |
Returns the ID of the wire nearest to the specified position. More... | |
raw::ChannelID_t | PlaneWireToChannel (WireID const &wireID) const override |
Returns the channel ID a wire is connected to. More... | |
TPC set mapping | |
unsigned int | NTPCsets (readout::CryostatID const &cryoid) const override |
Returns the total number of TPC sets in the specified cryostat. More... | |
unsigned int | MaxTPCsets () const override |
Returns the largest number of TPC sets any cryostat in the detector has. More... | |
bool | HasTPCset (readout::TPCsetID const &tpcsetid) const override |
readout::TPCsetID | TPCtoTPCset (TPCID const &tpcid) const override |
Returns the ID of the TPC set the specified TPC belongs to. More... | |
std::vector< TPCID > | TPCsetToTPCs (readout::TPCsetID const &tpcsetid) const override |
Returns a list of ID of TPCs belonging to the specified TPC set. More... | |
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 | |
unsigned int | NROPs (readout::TPCsetID const &tpcsetid) const override |
Returns the total number of ROPs in the specified TPC set. More... | |
unsigned int | MaxROPs () const override |
Returns the largest number of ROPs a TPC set in the detector has. More... | |
bool | HasROP (readout::ROPID const &ropid) const override |
readout::ROPID | WirePlaneToROP (PlaneID const &planeid) const override |
Returns the ID of the ROP planeid belongs to, or invalid if none. More... | |
std::vector< PlaneID > | ROPtoWirePlanes (readout::ROPID const &ropid) const override |
Returns a list of ID of wire planes belonging to the specified ROP. More... | |
std::vector< TPCID > | ROPtoTPCs (readout::ROPID const &ropid) const override |
Returns a list of ID of TPCs the specified ROP spans. More... | |
readout::ROPID | ChannelToROP (raw::ChannelID_t channel) const override |
Returns the ID of the ROP the channel belongs to (invalid if none) More... | |
raw::ChannelID_t | FirstChannelInROP (readout::ROPID const &ropid) const override |
Returns the ID of the first channel in the specified readout plane. More... | |
PlaneID | FirstWirePlaneInROP (readout::ROPID const &ropid) const override |
Returns the ID of the first plane belonging to the specified ROP. More... | |
Optical detector channel mapping | |
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... | |
Auxiliary detectors | |
virtual size_t | NearestAuxDet (Point_t const &point, std::vector< AuxDetGeo > const &auxDets, double tolerance=0) const |
Returns the auxiliary detector closest to the specified point. More... | |
virtual size_t | NearestSensitiveAuxDet (Point_t const &point, std::vector< AuxDetGeo > const &auxDets, double tolerance=0) const |
Returns sensitive auxiliary detector closest to specified point. More... | |
virtual size_t | ChannelToAuxDet (std::vector< 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< AuxDetGeo > const &auxDets, std::string const &detName, uint32_t const &channel) const |
Returns the index of the sensitive detector containing the channel. More... | |
Testing (not in the interface) | |
std::vector< std::vector< std::vector< raw::ChannelID_t > > > const & | FirstChannelInNextPlane () const |
Retrieve the private fFirstChannelInNextPlane vector for testing. More... | |
std::vector< std::vector< std::vector< raw::ChannelID_t > > > const & | FirstChannelInThisPlane () const |
Retrieve the private fFirstChannelInThisPlane vector for testing. More... | |
Protected Types | |
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 | |
template<typename T > | |
T const & | AccessElement (PlaneInfoMap_t< T > const &map, PlaneID const &id) const |
Returns the specified element of the plane map. More... | |
template<typename T > | |
size_t | AccessElementSize (PlaneInfoMap_t< T > const &map, 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, PlaneID const &id) const |
Returns a pointer to the specified element, or nullptr if invalid. More... | |
Internal structure data access | |
These functions allow access to the XxxInfoMap_t types based on geometry element IDs. They are strictly internal. | |
template<typename T > | |
T const & | AccessElement (TPCInfoMap_t< T > const &map, TPCID const &id) const |
Returns the specified element of the TPC map. More... | |
template<typename T > | |
size_t | AccessElementSize (TPCInfoMap_t< T > const &map, 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, CryostatID const &id) const |
Returns whether the ID specifies a valid entry. More... | |
template<typename T > | |
bool | isValidElement (TPCInfoMap_t< T > const &map, TPCID const &id) const |
Returns the specified element of the TPC map. More... | |
template<typename T > | |
bool | isValidElement (PlaneInfoMap_t< T > const &map, CryostatID const &id) const |
Returns whether the ID specifies a valid entry. More... | |
template<typename T > | |
bool | isValidElement (PlaneInfoMap_t< T > const &map, TPCID const &id) const |
Returns whether the ID specifies a valid entry. More... | |
template<typename T > | |
bool | isValidElement (PlaneInfoMap_t< T > const &map, PlaneID const &id) const |
Returns whether the ID specifies a valid entry. More... | |
Protected Attributes | |
PlaneInfoMap_t< raw::ChannelID_t > | fFirstChannelInThisPlane |
PlaneInfoMap_t< raw::ChannelID_t > | fFirstChannelInNextPlane |
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 |
Private Member Functions | |
SigType_t | SignalTypeForChannelImpl (raw::ChannelID_t const channel) const override |
Return the signal type of the specified channel. More... | |
unsigned int | WireCount (PlaneID const &id) const |
Retrieved the wire cound for the specified plane ID. More... | |
unsigned int | MaxTPCs () const |
Returns the largest number of TPCs in a single cryostat. More... | |
Static Private Member Functions | |
static readout::TPCsetID | ConvertTPCtoTPCset (TPCID const &tpcid) |
Converts a TPC ID into a TPC set ID using the same numerical indices. More... | |
static TPCID | ConvertTPCsetToTPC (readout::TPCsetID const &tpcsetid) |
Converts a TPC set ID into a TPC ID using the same numerical indices. More... | |
static readout::ROPID | ConvertWirePlaneToROP (PlaneID const &planeid) |
Converts a ROP ID into a wire plane ID using the same numerical indices. More... | |
static PlaneID | ConvertROPtoWirePlane (readout::ROPID const &ropid) |
Converts a wire plane ID into a ROP ID using the same numerical indices. More... | |
Private Attributes | |
unsigned int | fNcryostat |
number of cryostats in the detector More... | |
unsigned int | fNchannels |
number of channels in the detector More... | |
raw::ChannelID_t | fTopChannel |
book keeping highest channel # More... | |
std::vector< unsigned int > | fNTPC |
number of TPCs in each cryostat More... | |
std::set< View_t > | fViews |
vector of the views present in the detector More... | |
std::set< PlaneID > | fPlaneIDs |
vector of the PlaneIDs present in the detector More... | |
PlaneInfoMap_t< float > | fFirstWireProj |
PlaneInfoMap_t< float > | fOrthVectorsY |
Unit vectors orthogonal to wires in. More... | |
PlaneInfoMap_t< float > | fOrthVectorsZ |
PlaneInfoMap_t< float > | fWireCounts |
TPCInfoMap_t< unsigned int > | fNPlanes |
PlaneInfoMap_t< unsigned int > | fPlaneBaselines |
PlaneInfoMap_t< unsigned int > | fWiresPerPlane |
GeoObjectSorterStandard | fSorter |
class to sort geo objects More... | |
TPC channel mapping | |
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... | |
SigType_t | SignalTypeForChannel (raw::ChannelID_t const channel) const |
Return the signal type of the specified channel. More... | |
SigType_t | SignalTypeForROPID (readout::ROPID const &ropid) const |
Return the signal type on the specified readout plane. More... | |
virtual SigType_t | SignalTypeForROPIDImpl (readout::ROPID const &ropid) const |
Return the signal type on the specified readout plane. More... | |
Definition at line 22 of file ChannelMapStandardAlg.h.
|
protectedinherited |
Data type for per-plane information.
Definition at line 484 of file ChannelMapAlg.h.
|
protectedinherited |
Data type for per-TPC information.
Definition at line 480 of file ChannelMapAlg.h.
geo::ChannelMapStandardAlg::ChannelMapStandardAlg | ( | fhicl::ParameterSet const & | p | ) |
Definition at line 22 of file ChannelMapStandardAlg.cxx.
|
inlineprotectedinherited |
Returns the specified element of the TPC map.
Definition at line 508 of file ChannelMapAlg.h.
Referenced by FirstChannelInROP(), NROPs(), WireCoordinate(), and WireCount().
|
inlineprotectedinherited |
Returns the specified element of the plane map.
Definition at line 536 of file ChannelMapAlg.h.
|
inlineprotectedinherited |
Returns the number of elements in the specified cryostat of the TPC map.
Definition at line 515 of file ChannelMapAlg.h.
|
inlineprotectedinherited |
Returns the number of elements in the specified TPC of the plane map.
Definition at line 543 of file ChannelMapAlg.h.
|
virtualinherited |
Returns the index of the detector containing the specified channel.
auxDets | list of the auxiliary detectors |
detName | name of the auxiliary detector being investigated |
channel | number of the channel within that auxiliary detector |
auxDets
in the arguments and instead relies on a cache that is never filled by this class (derived classes can fill it though). Definition at line 137 of file ChannelMapAlg.cxx.
References geo::ChannelMapAlg::fADNameToGeo.
Referenced by geo::ChannelMapAlg::ChannelToSensitiveAuxDet(), and geo::ChannelMapAlg::HasChannel().
|
overridevirtual |
Returns the ID of the ROP the channel belongs to (invalid if none)
Implements geo::ChannelMapAlg.
Definition at line 394 of file ChannelMapStandardAlg.cxx.
References ChannelToWire(), raw::isValidChannelID(), and WirePlaneToROP().
|
virtualinherited |
Returns the index of the sensitive detector containing the channel.
auxDets | list of the sensitive auxiliary detectors |
detName | name of the auxiliary detector being investigated |
channel | number of the channel within that auxiliary detector |
Definition at line 152 of file ChannelMapAlg.cxx.
References geo::ChannelMapAlg::ChannelToAuxDet(), and geo::ChannelMapAlg::fADChannelToSensitiveGeo.
Referenced by geo::ChannelMapAlg::HasChannel().
|
overridevirtual |
Returns a list of TPC wires connected to the specified readout channel ID
cet::exception | (category: "Geometry") if non-existent channel |
Implements geo::ChannelMapAlg.
Definition at line 136 of file ChannelMapStandardAlg.cxx.
References geo::ChannelMapAlg::fFirstChannelInNextPlane, geo::ChannelMapAlg::fFirstChannelInThisPlane, fNcryostat, fNTPC, and fTopChannel.
Referenced by ChannelToROP().
|
staticprivate |
Converts a wire plane ID into a ROP ID using the same numerical indices.
Definition at line 446 of file ChannelMapStandardAlg.cxx.
References geo::CryostatID::Cryostat, geo::CryostatID::isValid, readout::ROPID::ROP, and readout::TPCsetID::TPCset.
Referenced by FirstChannelInROP(), FirstWirePlaneInROP(), and WireCount().
|
staticprivate |
Converts a TPC set ID into a TPC ID using the same numerical indices.
Definition at line 430 of file ChannelMapStandardAlg.cxx.
References geo::CryostatID::Cryostat, geo::CryostatID::isValid, and readout::TPCsetID::TPCset.
Referenced by FirstTPCinTPCset(), ROPtoTPCs(), TPCsetToTPCs(), and WireCount().
|
staticprivate |
Converts a TPC ID into a TPC set ID using the same numerical indices.
Definition at line 422 of file ChannelMapStandardAlg.cxx.
References geo::CryostatID::Cryostat, geo::CryostatID::isValid, and geo::TPCID::TPC.
Referenced by TPCtoTPCset(), and WireCount().
|
staticprivate |
Converts a ROP ID into a wire plane ID using the same numerical indices.
Definition at line 437 of file ChannelMapStandardAlg.cxx.
References geo::CryostatID::Cryostat, geo::CryostatID::isValid, geo::PlaneID::Plane, and geo::TPCID::TPC.
Referenced by WireCount(), and WirePlaneToROP().
|
inlineinherited |
Retrieve the private fFirstChannelInNextPlane vector for testing.
Definition at line 462 of file ChannelMapAlg.h.
References geo::ChannelMapAlg::fFirstChannelInThisPlane.
|
overridevirtual |
Returns the ID of the first channel in the specified readout plane.
ropid | ID of the readout plane |
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 ChannelMapStandardAlg.cxx.
References geo::ChannelMapAlg::AccessElement(), ConvertROPtoWirePlane(), fPlaneBaselines, raw::InvalidChannelID, and geo::CryostatID::isValid.
|
inlineinherited |
Retrieve the private fFirstChannelInThisPlane vector for testing.
Definition at line 468 of file ChannelMapAlg.h.
References geo::ChannelMapAlg::fFirstChannelInNextPlane.
|
overridevirtual |
Returns the ID of the first TPC belonging to the specified TPC set.
Implements geo::ChannelMapAlg.
Definition at line 333 of file ChannelMapStandardAlg.cxx.
References ConvertTPCsetToTPC().
Referenced by NROPs().
|
overridevirtual |
Returns the ID of the first plane belonging to the specified ROP.
Implements geo::ChannelMapAlg.
Definition at line 416 of file ChannelMapStandardAlg.cxx.
References ConvertROPtoWirePlane().
Referenced by Nchannels(), and ROPtoWirePlanes().
|
inlineprotectedinherited |
Returns a pointer to the specified element, or nullptr if invalid.
Definition at line 569 of file ChannelMapAlg.h.
Referenced by PlaneWireToChannel().
|
virtualinherited |
Returns the hardware channel number of specified optical channel.
opChannel | the optical detector channel being queried |
If the specified optical channel is invalid, behaviour is undefined.
Definition at line 47 of file ChannelMapAlg.cxx.
Referenced by geo::ChannelMapAlg::HasChannel(), and geo::ChannelMapAlg::IsValidOpChannel().
|
inlinevirtualinherited |
Returns whether the specified channel is valid This default implementation assumes all channels up to Nchannels() valid.
Definition at line 77 of file ChannelMapAlg.h.
References geo::ChannelMapAlg::ChannelToAuxDet(), geo::ChannelMapAlg::ChannelToROP(), geo::ChannelMapAlg::ChannelToSensitiveAuxDet(), geo::ChannelMapAlg::ChannelToWire(), geo::ChannelMapAlg::FirstChannelInROP(), geo::ChannelMapAlg::FirstTPCinTPCset(), geo::ChannelMapAlg::FirstWirePlaneInROP(), geo::ChannelMapAlg::HardwareChannelFromOpChannel(), geo::ChannelMapAlg::HasROP(), geo::ChannelMapAlg::HasTPCset(), raw::isValidChannelID(), geo::ChannelMapAlg::IsValidOpChannel(), geo::ChannelMapAlg::MaxOpChannel(), geo::ChannelMapAlg::MaxROPs(), geo::ChannelMapAlg::MaxTPCsets(), geo::ChannelMapAlg::Nchannels(), geo::ChannelMapAlg::NearestAuxDet(), geo::ChannelMapAlg::NearestSensitiveAuxDet(), geo::ChannelMapAlg::NearestWireID(), geo::ChannelMapAlg::NOpChannels(), geo::ChannelMapAlg::NOpHardwareChannels(), geo::ChannelMapAlg::NROPs(), geo::ChannelMapAlg::NTPCsets(), geo::ChannelMapAlg::OpChannel(), geo::ChannelMapAlg::OpDetFromOpChannel(), geo::ChannelMapAlg::PlaneIDs(), geo::ChannelMapAlg::PlaneWireToChannel(), geo::ChannelMapAlg::ROPtoTPCs(), geo::ChannelMapAlg::ROPtoWirePlanes(), geo::ChannelMapAlg::SignalTypeForChannel(), geo::ChannelMapAlg::SignalTypeForChannelImpl(), geo::ChannelMapAlg::SignalTypeForROPID(), geo::ChannelMapAlg::SignalTypeForROPIDImpl(), geo::ChannelMapAlg::Sorter(), geo::ChannelMapAlg::TPCsetToTPCs(), geo::ChannelMapAlg::TPCtoTPCset(), geo::ChannelMapAlg::WireCoordinate(), and geo::ChannelMapAlg::WirePlaneToROP().
|
overridevirtual |
Returns whether we have the specified ROP
Implements geo::ChannelMapAlg.
Definition at line 365 of file ChannelMapStandardAlg.cxx.
References NROPs(), and readout::ROPID::ROP.
Referenced by Nchannels().
|
overridevirtual |
Returns whether we have the specified TPC set
Implements geo::ChannelMapAlg.
Definition at line 313 of file ChannelMapStandardAlg.cxx.
References NTPCsets(), and readout::TPCsetID::TPCset.
Referenced by NROPs().
|
overridevirtual |
Geometry initialisation.
Implements geo::ChannelMapAlg.
Definition at line 27 of file ChannelMapStandardAlg.cxx.
References geo::WireGeo::CosThetaZ(), geo::GeometryData_t::cryostats, geo::ChannelMapAlg::fFirstChannelInNextPlane, geo::ChannelMapAlg::fFirstChannelInThisPlane, fFirstWireProj, fNchannels, fNcryostat, fNPlanes, fNTPC, fOrthVectorsY, fOrthVectorsZ, fPlaneBaselines, fPlaneIDs, fTopChannel, fWireCounts, fWiresPerPlane, geo::WireGeo::GetCenter(), MF_LOG_DEBUG, geo::TPCGeo::Nplanes(), geo::CryostatGeo::NTPC(), geo::PlaneGeo::Nwires(), geo::TPCGeo::Plane(), geo::WireGeo::SinThetaZ(), geo::CryostatGeo::TPC(), Uninitialize(), geo::PlaneGeo::Wire(), and geo::TPCGeo::WirePitch().
|
inlineprotectedinherited |
Returns whether the ID specifies a valid entry.
Definition at line 523 of file ChannelMapAlg.h.
Referenced by geo::ChannelMapAlg::isValidElement().
|
inlineprotectedinherited |
Returns the specified element of the TPC map.
Definition at line 528 of file ChannelMapAlg.h.
References geo::ChannelMapAlg::isValidElement().
|
inlineprotectedinherited |
Returns whether the ID specifies a valid entry.
Definition at line 551 of file ChannelMapAlg.h.
|
inlineprotectedinherited |
Returns whether the ID specifies a valid entry.
Definition at line 556 of file ChannelMapAlg.h.
References geo::ChannelMapAlg::isValidElement().
|
inlineprotectedinherited |
Returns whether the ID specifies a valid entry.
Definition at line 561 of file ChannelMapAlg.h.
References geo::ChannelMapAlg::isValidElement().
|
virtualinherited |
Returns whether the ID identifies a valid optical detector channel.
opChannel | channel number |
NOpDets | number of optical detectors in the detector |
The specification of the number of optical channels reflects the logic described in NOpChannel()
.
Definition at line 53 of file ChannelMapAlg.cxx.
References geo::ChannelMapAlg::HardwareChannelFromOpChannel(), geo::ChannelMapAlg::NOpChannels(), geo::ChannelMapAlg::NOpHardwareChannels(), and geo::ChannelMapAlg::OpDetFromOpChannel().
Referenced by geo::ChannelMapAlg::HasChannel().
|
virtualinherited |
Returns the number of optical channels contained in some detectors.
NOpDets | number of optical detectors |
This function returns the first optical channel ID larger than the last channel ID in a detector with NOpDets optical detectors (with the same logic as NOpChannels()
). For example, in a detector with 32 channels with contiguous IDs starting at 0, this function would return 32. If the channels started with ID 1, this function would instead return 33 and if there were a 16 channel gap, so that valid channels are from 0 to 15 and from 32 to 47, this function would return 48.
Definition at line 21 of file ChannelMapAlg.cxx.
References geo::ChannelMapAlg::NOpChannels().
Referenced by geo::ChannelMapAlg::HasChannel().
|
overridevirtual |
Returns the largest number of ROPs a TPC set in the detector has.
Implements geo::ChannelMapAlg.
Definition at line 355 of file ChannelMapStandardAlg.cxx.
References fNPlanes.
|
private |
Returns the largest number of TPCs in a single cryostat.
Definition at line 339 of file ChannelMapStandardAlg.cxx.
References fNTPC.
Referenced by MaxTPCsets(), and WireCount().
|
overridevirtual |
Returns the largest number of TPC sets any cryostat in the detector has.
Implements geo::ChannelMapAlg.
Definition at line 307 of file ChannelMapStandardAlg.cxx.
References MaxTPCs().
|
overridevirtual |
Returns the total number of channels present (not necessarily contiguous)
Implements geo::ChannelMapAlg.
Definition at line 178 of file ChannelMapStandardAlg.cxx.
References fNchannels.
|
overridevirtual |
Returns the number of channels in the specified ROP.
Implements geo::ChannelMapAlg.
Definition at line 184 of file ChannelMapStandardAlg.cxx.
References FirstWirePlaneInROP(), HasROP(), and WireCount().
|
virtualinherited |
Returns the auxiliary detector closest to the specified point.
point | coordinates of the position to be investigated (x, y, z) |
auxDets | list of the sought auxiliary detectors |
tolerance | tolerance for comparison. Default 0. |
Definition at line 70 of file ChannelMapAlg.cxx.
References tca::Length().
Referenced by geo::ChannelMapAlg::HasChannel(), and geo::ChannelMapAlg::NearestSensitiveAuxDet().
|
virtualinherited |
Returns sensitive auxiliary detector closest to specified point.
point | coordinates of the position to be investigated (x, y, z) |
auxDets | list of the auxiliary detectors |
tolerance | tolerance for comparison. Default 0. |
Definition at line 102 of file ChannelMapAlg.cxx.
References geo::AuxDetSensitiveGeo::HalfHeight(), geo::AuxDetSensitiveGeo::HalfWidth1(), geo::AuxDetSensitiveGeo::HalfWidth2(), geo::AuxDetSensitiveGeo::Length(), geo::ChannelMapAlg::NearestAuxDet(), geo::AuxDetGeo::NSensitiveVolume(), geo::AuxDetGeo::SensitiveVolume(), and geo::AuxDetSensitiveGeo::toLocalCoords().
Referenced by geo::ChannelMapAlg::HasChannel().
|
overridevirtual |
Returns the ID of the wire nearest to the specified position.
worldPos | position to be tested |
planeID | plane containing the wire |
InvalidWireIDError | the ID found is not present in the detector |
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.
Implements geo::ChannelMapAlg.
Definition at line 201 of file ChannelMapStandardAlg.cxx.
References WireCoordinate(), and WireCount().
|
virtualinherited |
Returns the number of optical channels contained in some detectors.
NOpDets | number of optical detectors |
This function returns how many channels can be expected to be present in a detector with NOpDets optical detectors. This is an upper limit, as not all channels have necessarily to be present.
For example: if a detector has four channels per optical detector, the returned value will be four times the argument NOpDets. If there is a single channel on each optical detector, the return value will be the value NOpDets (this is in fact the fallback implementation). If each optical detector can have anywhere between 2 and 12 channels, the returned value is 12 times NOpDets, and it will be an overestimation of the number of channels.
Definition at line 14 of file ChannelMapAlg.cxx.
Referenced by geo::ChannelMapAlg::HasChannel(), geo::ChannelMapAlg::IsValidOpChannel(), and geo::ChannelMapAlg::MaxOpChannel().
|
virtualinherited |
Returns the number of channels in the specified optical detectors.
opDet | ID of the chosen optical detector |
This function returns how many channels are actually present in the optical detector with the specified ID.
For example: if a detector has four channels per optical detector, the returned value will be four, regardless opDet, and . If there is a single channel on each optical detector, the return value will be 1, again ignoring opDet (this is in fact the fallback implementation). If each optical detector can have anywhere between 2 and 12 channels, the returned value will be 2, 12, etc., that is the exact number of channels in opDet.
Although implementations are encouraged to return 0 on invalid optical detectors, the actual return value in that case is undefined.
Definition at line 28 of file ChannelMapAlg.cxx.
Referenced by geo::ChannelMapAlg::HasChannel(), and geo::ChannelMapAlg::IsValidOpChannel().
|
overridevirtual |
Returns the total number of ROPs in the specified TPC set.
tpcsetid | TPC set ID |
Note that this methods explicitly check the existence of the TPC set.
In this mapping, planes have independent readout and there is one wire plane in each readout plane and one readout plane for each wire plane.
Implements geo::ChannelMapAlg.
Definition at line 348 of file ChannelMapStandardAlg.cxx.
References geo::ChannelMapAlg::AccessElement(), FirstTPCinTPCset(), fNPlanes, and HasTPCset().
Referenced by HasROP().
|
overridevirtual |
Returns the total number of TPC sets in the specified cryostat.
cryoid | cryostat ID |
In this mapping, TPCs have independent readout and there is one TPC in each TPC set and one TPC set for each TPC.
Implements geo::ChannelMapAlg.
Definition at line 300 of file ChannelMapStandardAlg.cxx.
References geo::CryostatID::Cryostat, fNTPC, and geo::CryostatID::isValid.
Referenced by HasTPCset().
|
virtualinherited |
Returns the channel ID of the specified hardware channel.
detNum | optical detector ID |
hwchannel | hardware channel within the specified optical detector |
If the input IDs identify a non-existing channel, the result is undefined.
Definition at line 35 of file ChannelMapAlg.cxx.
Referenced by geo::ChannelMapAlg::HasChannel().
|
virtualinherited |
Returns the optical detector the specified optical channel belongs.
opChannel | the optical detector channel being queried |
If the specified optical channel is invalid, behaviour is undefined.
Definition at line 41 of file ChannelMapAlg.cxx.
Referenced by geo::ChannelMapAlg::HasChannel(), and geo::ChannelMapAlg::IsValidOpChannel().
|
overridevirtual |
Returns a list of the plane IDs in the whole detector.
Implements geo::ChannelMapAlg.
Definition at line 294 of file ChannelMapStandardAlg.cxx.
References fPlaneIDs.
|
overridevirtual |
Returns the channel ID a wire is connected to.
wireID | ID of the wire |
Behaviour on an invalid or not present wires is undefined.
Implements geo::ChannelMapAlg.
Definition at line 244 of file ChannelMapStandardAlg.cxx.
References fPlaneBaselines, geo::ChannelMapAlg::GetElementPtr(), raw::InvalidChannelID, and geo::WireID::Wire.
|
overridevirtual |
Returns a list of ID of TPCs the specified ROP spans.
ropid | ID of the readout plane |
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 385 of file ChannelMapStandardAlg.cxx.
References readout::TPCsetID::asTPCsetID(), ConvertTPCsetToTPC(), and geo::CryostatID::isValid.
|
overridevirtual |
Returns a list of ID of wire planes belonging to the specified ROP.
ropid | ID of the readout plane to convert into wire planes |
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.
Implements geo::ChannelMapAlg.
Definition at line 377 of file ChannelMapStandardAlg.cxx.
References FirstWirePlaneInROP(), and geo::CryostatID::isValid.
|
inherited |
Return the signal type of the specified channel.
channel | ID of the channel |
On any type of error (e.g., invalid or unknown channel ID), geo::kMysteryType is returned.
Definition at line 177 of file ChannelMapAlg.cxx.
References geo::ChannelMapAlg::SignalTypeForChannelImpl().
Referenced by geo::ChannelMapAlg::HasChannel(), and geo::ChannelMapAlg::SignalTypeForROPIDImpl().
|
overrideprivatevirtual |
Return the signal type of the specified channel.
channel | ID of the channel |
On any type of error (e.g., invalid or unknown channel ID), geo::kMysteryType is returned.
Implements geo::ChannelMapAlg.
Definition at line 267 of file ChannelMapStandardAlg.cxx.
References geo::ChannelMapAlg::fFirstChannelInNextPlane, geo::ChannelMapAlg::fFirstChannelInThisPlane, fNchannels, fNPlanes, fNTPC, geo::kCollection, geo::kInduction, and geo::kMysteryType.
|
inherited |
Return the signal type on the specified readout plane.
ropid | ID of the readout plane |
If the readout plane ID is marked invalid, geo::kMysteryType is returned. If the readout plane is not marked invalid, but it does not match an existing readout plane, the result is undefined.
The default implementation uses readout plane to channel mapping. Other implementation may decide to do the opposite.
Definition at line 182 of file ChannelMapAlg.cxx.
References geo::ChannelMapAlg::SignalTypeForROPIDImpl().
Referenced by geo::ChannelMapAlg::HasChannel().
|
protectedvirtualinherited |
Return the signal type on the specified readout plane.
ropid | ID of the readout plane |
If the readout plane ID is marked invalid, geo::kMysteryType is returned. If the readout plane is not marked invalid, but it does not match an existing readout plane, the result is undefined.
The default implementation uses readout plane to channel mapping. Other implementation may decide to do the opposite.
Definition at line 187 of file ChannelMapAlg.cxx.
References geo::ChannelMapAlg::FirstChannelInROP(), and geo::ChannelMapAlg::SignalTypeForChannel().
Referenced by geo::ChannelMapAlg::HasChannel(), and geo::ChannelMapAlg::SignalTypeForROPID().
|
inlineoverridevirtual |
Return the sorter.
Implements geo::ChannelMapAlg.
Definition at line 194 of file ChannelMapStandardAlg.h.
References fSorter.
|
overridevirtual |
Returns a list of ID of TPCs belonging to the specified TPC set.
tpcsetid | ID of the TPC set to convert into TPC IDs |
In this mapping, TPC sets and TPCs are mapped one-to-one. The returned list contains always one entry, unless the specified TPC set ID is invalid, in which case the list is empty. Note that the check is performed on the validity of the TPC set ID, that does not necessarily imply that the TPC set specified by the ID actually exists. Check the existence of the TPC set first (HasTPCset()). Behaviour on valid, non-existent TPC set IDs is undefined.
Implements geo::ChannelMapAlg.
Definition at line 325 of file ChannelMapStandardAlg.cxx.
References ConvertTPCsetToTPC(), and geo::CryostatID::isValid.
|
overridevirtual |
Returns the ID of the TPC set the specified TPC belongs to.
tpcid | ID of the TPC |
In this mapping, TPC sets and TPCs are mapped one-to-one. The returned value mirrors the TPC ID in the readout space. 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 319 of file ChannelMapStandardAlg.cxx.
References ConvertTPCtoTPCset().
|
overridevirtual |
Deconfiguration: prepare for a following call of Initialize()
Implements geo::ChannelMapAlg.
Definition at line 133 of file ChannelMapStandardAlg.cxx.
Referenced by Initialize().
|
overridevirtual |
Returns the index of the wire nearest to the specified position.
YPos | y coordinate on the wire plane |
ZPos | z coordinate on the wire plane |
planeID | ID of the plane |
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.
Implements geo::ChannelMapAlg.
Definition at line 192 of file ChannelMapStandardAlg.cxx.
References geo::ChannelMapAlg::AccessElement(), fFirstWireProj, fOrthVectorsY, and fOrthVectorsZ.
Referenced by NearestWireID().
|
inlineprivate |
Retrieved the wire cound for the specified plane ID.
Definition at line 224 of file ChannelMapStandardAlg.h.
References geo::ChannelMapAlg::AccessElement(), ConvertROPtoWirePlane(), ConvertTPCsetToTPC(), ConvertTPCtoTPCset(), ConvertWirePlaneToROP(), and MaxTPCs().
Referenced by Nchannels(), and NearestWireID().
|
overridevirtual |
Returns the ID of the ROP planeid belongs to, or invalid if none.
planeid | ID of the plane |
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 371 of file ChannelMapStandardAlg.cxx.
References ConvertWirePlaneToROP().
Referenced by ChannelToROP().
|
protectedinherited |
map the AuxDetGeo index to a vector of indices corresponding to the AuxDetSensitiveGeo index
Definition at line 494 of file ChannelMapAlg.h.
Referenced by geo::ChannelMapAlg::ChannelToSensitiveAuxDet().
|
protectedinherited |
map the names of the dets to the AuxDetGeo objects
Definition at line 492 of file ChannelMapAlg.h.
Referenced by geo::ChannelMapAlg::ChannelToAuxDet().
|
protectedinherited |
Definition at line 489 of file ChannelMapAlg.h.
Referenced by ChannelToWire(), geo::ChannelMapAlg::FirstChannelInThisPlane(), Initialize(), and SignalTypeForChannelImpl().
|
protectedinherited |
Definition at line 488 of file ChannelMapAlg.h.
Referenced by ChannelToWire(), geo::ChannelMapAlg::FirstChannelInNextPlane(), Initialize(), and SignalTypeForChannelImpl().
|
private |
Distance (0,0,0) to first wire along orth vector per plane per TPC
Definition at line 203 of file ChannelMapStandardAlg.h.
Referenced by Initialize(), and WireCoordinate().
|
private |
number of channels in the detector
Definition at line 198 of file ChannelMapStandardAlg.h.
Referenced by Initialize(), Nchannels(), and SignalTypeForChannelImpl().
|
private |
number of cryostats in the detector
Definition at line 197 of file ChannelMapStandardAlg.h.
Referenced by ChannelToWire(), and Initialize().
|
private |
Number of planes in each TPC - for range checking after calculation
Definition at line 211 of file ChannelMapStandardAlg.h.
Referenced by Initialize(), MaxROPs(), NROPs(), and SignalTypeForChannelImpl().
|
private |
number of TPCs in each cryostat
Definition at line 200 of file ChannelMapStandardAlg.h.
Referenced by ChannelToWire(), Initialize(), MaxTPCs(), NTPCsets(), and SignalTypeForChannelImpl().
|
private |
Unit vectors orthogonal to wires in.
Definition at line 205 of file ChannelMapStandardAlg.h.
Referenced by Initialize(), and WireCoordinate().
|
private |
each plane - stored as 2 components to avoid having to invoke any bulky TObjects / CLHEP vectors etc
Definition at line 206 of file ChannelMapStandardAlg.h.
Referenced by Initialize(), and WireCoordinate().
|
private |
The number of wires in all the tpcs and planes up to this one in the heirachy
Definition at line 213 of file ChannelMapStandardAlg.h.
Referenced by FirstChannelInROP(), Initialize(), and PlaneWireToChannel().
|
private |
vector of the PlaneIDs present in the detector
Definition at line 202 of file ChannelMapStandardAlg.h.
Referenced by Initialize(), and PlaneIDs().
|
private |
class to sort geo objects
Definition at line 219 of file ChannelMapStandardAlg.h.
Referenced by Sorter().
|
private |
book keeping highest channel #
Definition at line 199 of file ChannelMapStandardAlg.h.
Referenced by ChannelToWire(), and Initialize().
|
private |
vector of the views present in the detector
Definition at line 201 of file ChannelMapStandardAlg.h.
|
private |
Number of wires in each plane - for range checking after calculation
Definition at line 209 of file ChannelMapStandardAlg.h.
Referenced by Initialize().
|
private |
The number of wires in this plane in the heirachy
Definition at line 216 of file ChannelMapStandardAlg.h.
Referenced by Initialize().