LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
WireReadoutStandardGeom.h
Go to the documentation of this file.
1 
6 #ifndef LARCOREALG_GEOMETRY_WIREREADOUTSTANDARDGEOM_H
7 #define LARCOREALG_GEOMETRY_WIREREADOUTSTANDARDGEOM_H
8 
12 #include "larcoreobj/SimpleTypesAndConstants/readout_types.h" // readout::TPCsetID, ...
13 
14 #include "fhiclcpp/fwd.h"
15 
16 #include <set>
17 #include <vector>
18 
19 namespace geo {
20 
22  public:
24  GeometryCore const* geom,
25  std::unique_ptr<WireReadoutSorter> sorter);
26 
27  std::vector<WireID> ChannelToWire(raw::ChannelID_t channel) const override;
28  unsigned int Nchannels() const override;
29 
32  unsigned int Nchannels(readout::ROPID const& ropid) const override;
33 
35  double WireCoordinate(double YPos, double ZPos, PlaneID const& planeID) const override;
37 
39  WireID NearestWireID(Point_t const& worldPos, PlaneID const& planeID) const override;
41 
43  raw::ChannelID_t PlaneWireToChannel(WireID const& wireID) const override;
45 
46  std::set<PlaneID> const& PlaneIDs() const override;
47 
48  //
49  // TPC set interface
50  //
53 
61  unsigned int NTPCsets(readout::CryostatID const& cryoid) const override;
62 
64  unsigned int MaxTPCsets() const override;
65 
68  bool HasTPCset(readout::TPCsetID const& tpcsetid) const override;
69 
81  readout::TPCsetID TPCtoTPCset(TPCID const& tpcid) const override;
82 
95  std::vector<TPCID> TPCsetToTPCs(readout::TPCsetID const& tpcsetid) const override;
96 
98  TPCID FirstTPCinTPCset(readout::TPCsetID const& tpcsetid) const override;
99 
101 
102  //
103  // Readout plane interface
104  //
107 
118  unsigned int NROPs(readout::TPCsetID const& tpcsetid) const override;
119 
121  unsigned int MaxROPs() const override;
122 
125  bool HasROP(readout::ROPID const& ropid) const override;
126 
138  readout::ROPID WirePlaneToROP(PlaneID const& planeid) const override;
139 
151  std::vector<PlaneID> ROPtoWirePlanes(readout::ROPID const& ropid) const override;
152 
165  std::vector<TPCID> ROPtoTPCs(readout::ROPID const& ropid) const override;
166 
168  readout::ROPID ChannelToROP(raw::ChannelID_t channel) const override;
169 
180  raw::ChannelID_t FirstChannelInROP(readout::ROPID const& ropid) const override;
181 
183  PlaneID FirstWirePlaneInROP(readout::ROPID const& ropid) const override;
184 
186 
187  private:
188  unsigned int fNcryostat;
189  unsigned int fNchannels;
191  std::vector<unsigned int> fNTPC;
192  std::set<View_t> fViews;
193  std::set<PlaneID> fPlaneIDs;
208 
210  SigType_t SignalTypeForChannelImpl(raw::ChannelID_t const channel) const override;
211 
213  unsigned int WireCount(PlaneID const& id) const { return AccessElement(fWireCounts, id); }
214 
216  unsigned int MaxTPCs() const;
217  };
218 
219 }
220 #endif // LARCOREALG_GEOMETRY_WIREREADOUTSTANDARDGEOM_H
PlaneInfoMap_t< float > fOrthVectorsZ
std::set< View_t > fViews
vector of the views present in the detector
WireReadoutStandardGeom(fhicl::ParameterSet const &pset, GeometryCore const *geom, std::unique_ptr< WireReadoutSorter > sorter)
Classes identifying readout-related concepts.
unsigned int MaxROPs() const override
Returns the largest number of ROPs a TPC set in the detector has.
The data type to uniquely identify a Plane.
Definition: geo_types.h:364
SigType_t SignalTypeForChannelImpl(raw::ChannelID_t const channel) const override
Return the signal type of the specified channel.
Class identifying a set of TPC sharing readout channels.
Definition: readout_types.h:54
TPCID FirstTPCinTPCset(readout::TPCsetID const &tpcsetid) const override
Returns the ID of the first TPC belonging to the specified TPC set.
WireID NearestWireID(Point_t const &worldPos, PlaneID const &planeID) const override
Returns the ID of the wire nearest to the specified position.
unsigned int WireCount(PlaneID const &id) const
Retrieved the wire cound for the specified plane ID.
unsigned int MaxTPCsets() const override
Returns the largest number of TPC sets any cryostat in the detector has.
unsigned int fNcryostat
number of cryostats in the detector
PlaneInfoMap_t< unsigned int > fWiresPerPlane
bool HasTPCset(readout::TPCsetID const &tpcsetid) const override
std::vector< TPCID > ROPtoTPCs(readout::ROPID const &ropid) const override
Returns a list of ID of TPCs the specified ROP spans.
readout::ROPID ChannelToROP(raw::ChannelID_t channel) const override
Returns the ID of the ROP the channel belongs to (invalid if none)
std::vector< TPCID > TPCsetToTPCs(readout::TPCsetID const &tpcsetid) const override
Returns a list of ID of TPCs belonging to the specified TPC set.
double WireCoordinate(double YPos, double ZPos, PlaneID const &planeID) const override
Returns the index of the wire nearest to the specified position.
std::set< PlaneID > fPlaneIDs
vector of the PlaneIDs present in the detector
PlaneInfoMap_t< float > fWireCounts
std::set< PlaneID > const & PlaneIDs() const override
Returns a list of the plane IDs in the whole detector.
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
Interface for a class providing readout channel mapping to geometry.
unsigned int NROPs(readout::TPCsetID const &tpcsetid) const override
Returns the total number of ROPs in the specified TPC set.
unsigned int fNchannels
number of channels in the detector
raw::ChannelID_t FirstChannelInROP(readout::ROPID const &ropid) const override
Returns the ID of the first channel in the specified readout plane.
std::vector< std::vector< T >> TPCInfoMap_t
Data type for per-TPC information.
PlaneInfoMap_t< unsigned int > fPlaneBaselines
The data type to uniquely identify a TPC.
Definition: geo_types.h:306
Description of the physical geometry of one entire detector.
Definition: GeometryCore.h:91
Definition of data types for geometry description.
TPCInfoMap_t< unsigned int > fNPlanes
Class identifying a set of planes sharing readout channels.
PlaneInfoMap_t< float > fOrthVectorsY
Unit vectors orthogonal to wires in.
unsigned int NTPCsets(readout::CryostatID const &cryoid) const override
Returns the total number of TPC sets in the specified cryostat.
PlaneInfoMap_t< float > fFirstWireProj
raw::ChannelID_t fTopChannel
book keeping highest channel #
unsigned int Nchannels() const override
Returns the total number of channels present (not necessarily contiguous)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:180
TPCInfoMap_t< std::vector< T >> PlaneInfoMap_t
Data type for per-plane information.
readout::ROPID WirePlaneToROP(PlaneID const &planeid) const override
Returns the ID of the ROP planeid belongs to, or invalid if none.
PlaneID FirstWirePlaneInROP(readout::ROPID const &ropid) const override
Returns the ID of the first plane belonging to the specified ROP.
T const & AccessElement(TPCInfoMap_t< T > const &map, TPCID const &id) const
Returns the specified element of the TPC map.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
raw::ChannelID_t PlaneWireToChannel(WireID const &wireID) const override
Returns the channel ID a wire is connected to.
bool HasROP(readout::ROPID const &ropid) const override
ROOT libraries.
std::vector< PlaneID > ROPtoWirePlanes(readout::ROPID const &ropid) const override
Returns a list of ID of wire planes belonging to the specified ROP.
unsigned int MaxTPCs() const
Returns the largest number of TPCs in a single cryostat.
Interface to geometry for wire readouts .
std::vector< WireID > ChannelToWire(raw::ChannelID_t channel) const override
readout::TPCsetID TPCtoTPCset(TPCID const &tpcid) const override
Returns the ID of the TPC set the specified TPC belongs to.
The data type to uniquely identify a cryostat.
Definition: geo_types.h:187
std::vector< unsigned int > fNTPC
number of TPCs in each cryostat