All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ICARUS.h
Go to the documentation of this file.
1 /**
2  * @file larpandora/LArPandoraInterface/Detectors/ICARUS.h
3  *
4  * @brief Detector interface for ICARUS
5  *
6  * $Log: $
7  */
8 
10 
12 
13 #include <cmath>
14 
15 namespace lar_pandora {
16 
17  /**
18  * @brief Detector interface for ICARUS
19  */
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 
35  inline geo::View_t
37  const geo::CryostatID::CryostatID_t cstat) const
38  {
39  return (this->GetLArSoftGeometry()->TPC(tpc, cstat).DriftDirection() == geo::kPosX ?
40  this->GetLArSoftGeometry()->View(geo::PlaneID(cstat, tpc, 1)) :
41  this->GetLArSoftGeometry()->View(geo::PlaneID(cstat, tpc, 2)));
42  }
43 
44  //------------------------------------------------------------------------------------------------------------------------------------------
45 
46  inline geo::View_t
48  const geo::CryostatID::CryostatID_t cstat) const
49  {
50  return (this->GetLArSoftGeometry()->TPC(tpc, cstat).DriftDirection() == geo::kPosX ?
51  this->GetLArSoftGeometry()->View(geo::PlaneID(cstat, tpc, 2)) :
52  this->GetLArSoftGeometry()->View(geo::PlaneID(cstat, tpc, 1)));
53  }
54 
55  //------------------------------------------------------------------------------------------------------------------------------------------
56 
57  inline geo::View_t
59  const geo::CryostatID::CryostatID_t cstat) const
60  {
61  return this->GetLArSoftGeometry()->View(geo::PlaneID(cstat, tpc, 0));
62  }
63 
64  //------------------------------------------------------------------------------------------------------------------------------------------
65 
66  inline float
68  {
70  this->TargetViewW(tpc, cstat), tpc, cstat, this->GetLArSoftGeometry()));
71  }
72 
73 } // 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.
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
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:67
BEGIN_PROLOG TPC
Detector interface for ICARUS.
Definition: ICARUS.h:20
T abs(T value)
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.
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:58
unsigned int CryostatID_t
Type for the ID number.
Definition: geo_types.h:191
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:387
Drift towards positive X values.
Definition: geo_types.h:161
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:47
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:36
art framework interface to geometry description