Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ICARUS.h
Go to the documentation of this file.
1
10
11#include "larcore/Geometry/Geometry.h"
12
13#include <cmath>
14
15namespace lar_pandora {
16
21 public:
22 geo::View_t TargetViewU(const geo::TPCID::TPCID_t tpc,
23 const geo::CryostatID::CryostatID_t cstat) const override;
24
25 geo::View_t TargetViewV(const geo::TPCID::TPCID_t tpc,
26 const geo::CryostatID::CryostatID_t cstat) const override;
27
28 geo::View_t TargetViewW(const geo::TPCID::TPCID_t tpc,
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 ICARUS::TargetViewU(const geo::TPCID::TPCID_t tpc,
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
46 inline geo::View_t ICARUS::TargetViewV(const geo::TPCID::TPCID_t tpc,
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
57 inline geo::View_t ICARUS::TargetViewW(const geo::TPCID::TPCID_t tpc,
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 {
68 return std::abs(detector_functions::WireAngle(
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....
Detector interface for ICARUS.
Definition ICARUS.h:20
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
geo::View_t TargetViewU(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora's U view.
Definition ICARUS.h:35
geo::View_t TargetViewW(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora's W view.
Definition ICARUS.h:57
geo::View_t TargetViewV(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const override
Map a LArSoft view to Pandora's V view.
Definition ICARUS.h:46
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.
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.