LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ICARUS.h
Go to the documentation of this file.
1 
10 
12 
13 #include <cmath>
14 
15 namespace lar_pandora {
16 
20  class ICARUS : public VintageLArTPCThreeView {
21  public:
23  const geo::CryostatID::CryostatID_t cstat) const override;
24 
26  const geo::CryostatID::CryostatID_t cstat) const override;
27 
29  const geo::CryostatID::CryostatID_t cstat) const override;
30 
31  float WireAngleW(const geo::TPCID::TPCID_t tpc,
32  const geo::CryostatID::CryostatID_t cstat) const override;
33  };
34 
36  const geo::CryostatID::CryostatID_t cstat) const
37  {
38  geo::TPCID const tpcID{cstat, tpc};
39  return (this->GetLArSoftGeometry()->TPC(tpcID).DriftDirection() == geo::kPosX ?
40  this->GetLArSoftGeometry()->View(geo::PlaneID(tpcID, 1)) :
41  this->GetLArSoftGeometry()->View(geo::PlaneID(tpcID, 2)));
42  }
43 
44  //------------------------------------------------------------------------------------------------------------------------------------------
45 
47  const geo::CryostatID::CryostatID_t cstat) const
48  {
49  geo::TPCID const tpcID{cstat, tpc};
50  return (this->GetLArSoftGeometry()->TPC(tpcID).DriftDirection() == geo::kPosX ?
51  this->GetLArSoftGeometry()->View(geo::PlaneID(tpcID, 2)) :
52  this->GetLArSoftGeometry()->View(geo::PlaneID(tpcID, 1)));
53  }
54 
55  //------------------------------------------------------------------------------------------------------------------------------------------
56 
58  const geo::CryostatID::CryostatID_t cstat) const
59  {
60  return this->GetLArSoftGeometry()->View(geo::PlaneID(cstat, tpc, 0));
61  }
62 
63  //------------------------------------------------------------------------------------------------------------------------------------------
64 
65  inline float ICARUS::WireAngleW(const geo::TPCID::TPCID_t tpc,
66  const geo::CryostatID::CryostatID_t cstat) const
67  {
69  this->TargetViewW(tpc, cstat), tpc, cstat, this->GetLArSoftGeometry()));
70  }
71 
72 } // namespace lar_pandora
Detector interface for an older-style 3view, horizontal drift, single-phase LArTPC (e...
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
geo::View_t TargetViewW(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s W view.
Definition: ICARUS.h:57
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
constexpr auto abs(T v)
Returns the absolute value of the argument.
Detector interface for ICARUS.
Definition: ICARUS.h:20
geo::View_t TargetViewU(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s U view.
Definition: ICARUS.h:35
Detector interface for a 3view, horizontal drift, single-phase LArTPC.
const art::ServiceHandle< geo::Geometry > & GetLArSoftGeometry() const
Loan the LArSoft geometry handle owned by this class.
The data type to uniquely identify a TPC.
Definition: geo_types.h:381
unsigned int CryostatID_t
Type for the ID number.
Definition: geo_types.h:193
float WireAngle(const geo::View_t view, const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat, const art::ServiceHandle< geo::Geometry > &larsoftGeometry)
Calculate the wire angle of a LArTPC view in a given TPC/cryostat.
unsigned int TPCID_t
Type for the ID number.
Definition: geo_types.h:382
Drift towards positive X values.
Definition: geo_types.h:166
geo::View_t TargetViewV(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora&#39;s V view.
Definition: ICARUS.h:46
View_t View(PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
float WireAngleW(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
The angle of the wires in the mapped V view.
Definition: ICARUS.h:65
art framework interface to geometry description