LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "APAGeometryAlg.h"
Public Member Functions | |
APAGeometryAlg (fhicl::ParameterSet const &pset) | |
APAGeometryAlg () | |
void | reconfigure (fhicl::ParameterSet const &p) |
void | Init () |
Initialize some chanel numbers to speed up other methods. More... | |
bool | APAChannelsIntersect (uint32_t chan1, uint32_t chan2, std::vector< geo::WireIDIntersection > &IntersectVector) const |
If the channels intersect, get all intersections. More... | |
bool | LineSegChanIntersect (TVector3 xyzStart, TVector3 xyzEnd, uint32_t chan, std::vector< geo::WireID > &widsCrossed, bool ExtendLine) const |
If a line given by start/end points intersects a channel. More... | |
std::vector< geo::WireID > | ChanSegsPerSide (uint32_t chan, unsigned int side) const |
std::vector< geo::WireID > | ChanSegsPerSide (std::vector< geo::WireID > wids, unsigned int side) const |
std::vector< double > | ThreeChanPos (uint32_t u, uint32_t v, uint32_t z) const |
Find the center of the 3 intersections, choose best if multiple. More... | |
geo::WireID | NearestWireIDOnChan (const double WorldLoc[3], uint32_t chan, unsigned int const plane, unsigned int const tpc=0, unsigned int const cstat=0) const |
unsigned int | ChannelToAPA (uint32_t chan) const |
Get number of the APA containing the given channel. More... | |
void | ChannelToAPA (uint32_t chan, unsigned int &apa, unsigned int &cryo) const |
APAView_t | APAView (uint32_t chan) const |
Get which of the 4 APA views the channel is in. More... | |
unsigned int | ChannelsInView (geo::View_t geoview) const |
uint32_t | FirstChannelInView (geo::View_t geoview, unsigned int apa, unsigned int cryo) const |
uint32_t | FirstChannelInView (geo::View_t geoview, uint32_t chan) const |
uint32_t | FirstChannelInView (uint32_t chan) const |
unsigned int | ChannelsInAPAView (APAView_t apaview) const |
unsigned int | ChannelsPerAPA () const |
Private Attributes | |
art::ServiceHandle< geo::Geometry const > | fGeom |
unsigned int | fChannelsPerAPA |
All APAs have this same number of channels. More... | |
unsigned int | fAPAsPerCryo |
uint32_t | fFirstU |
uint32_t | fLastU |
uint32_t | fFirstV |
uint32_t | fLastV |
uint32_t | fFirstZ0 |
uint32_t | fLastZ0 |
uint32_t | fFirstZ1 |
uint32_t | fLastZ1 |
double | fChannelRange [2] |
Definition at line 33 of file APAGeometryAlg.h.
apa::APAGeometryAlg::APAGeometryAlg | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 29 of file APAGeometryAlg.cxx.
References Init(), and reconfigure().
apa::APAGeometryAlg::APAGeometryAlg | ( | ) |
Definition at line 36 of file APAGeometryAlg.cxx.
References Init().
bool apa::APAGeometryAlg::APAChannelsIntersect | ( | uint32_t | chan1, |
uint32_t | chan2, | ||
std::vector< geo::WireIDIntersection > & | IntersectVector | ||
) | const |
If the channels intersect, get all intersections.
Definition at line 446 of file APAGeometryAlg.cxx.
References ChannelToAPA(), geo::GeometryCore::ChannelToWire(), fGeom, geo::GeometryCore::View(), and geo::GeometryCore::WireIDsIntersect().
Referenced by ThreeChanPos(), and apa::DisambigAlg::UseEndPts().
APAView_t apa::APAGeometryAlg::APAView | ( | uint32_t | chan | ) | const |
Get which of the 4 APA views the channel is in.
Definition at line 191 of file APAGeometryAlg.cxx.
References fChannelsPerAPA, fFirstZ1, fGeom, fLastV, fLastZ0, apa::kU, geo::kU, apa::kUnknown, apa::kV, geo::kV, geo::kZ, apa::kZ0, apa::kZ1, and geo::GeometryCore::View().
unsigned int apa::APAGeometryAlg::ChannelsInAPAView | ( | APAView_t | apaview | ) | const |
unsigned int apa::APAGeometryAlg::ChannelsInView | ( | geo::View_t | geoview | ) | const |
Definition at line 126 of file APAGeometryAlg.cxx.
References ChannelsInAPAView(), apa::kU, geo::kU, apa::kV, geo::kV, geo::kZ, apa::kZ0, and apa::kZ1.
Referenced by apa::DisambigAlg::FindChanTimeEndPts(), and apa::DisambigAlg::MakeCloseHits().
|
inline |
Definition at line 76 of file APAGeometryAlg.h.
unsigned int apa::APAGeometryAlg::ChannelToAPA | ( | uint32_t | chan | ) | const |
Get number of the APA containing the given channel.
Definition at line 120 of file APAGeometryAlg.cxx.
References fChannelsPerAPA.
Referenced by APAChannelsIntersect(), FirstChannelInView(), apa::DisambigAlg::MakeCloseHits(), and apa::DisambigAlg::RunDisambig().
void apa::APAGeometryAlg::ChannelToAPA | ( | uint32_t | chan, |
unsigned int & | apa, | ||
unsigned int & | cryo | ||
) | const |
Definition at line 105 of file APAGeometryAlg.cxx.
References fAPAsPerCryo, and fChannelsPerAPA.
std::vector< geo::WireID > apa::APAGeometryAlg::ChanSegsPerSide | ( | uint32_t | chan, |
unsigned int | side | ||
) | const |
Definition at line 213 of file APAGeometryAlg.cxx.
References geo::GeometryCore::ChannelToWire(), and fGeom.
std::vector< geo::WireID > apa::APAGeometryAlg::ChanSegsPerSide | ( | std::vector< geo::WireID > | wids, |
unsigned int | side | ||
) | const |
Definition at line 221 of file APAGeometryAlg.cxx.
uint32_t apa::APAGeometryAlg::FirstChannelInView | ( | geo::View_t | geoview, |
unsigned int | apa, | ||
unsigned int | cryo | ||
) | const |
Definition at line 156 of file APAGeometryAlg.cxx.
References fAPAsPerCryo, fChannelsPerAPA, fFirstU, fFirstV, fFirstZ0, geo::kU, geo::kV, and geo::kZ.
Referenced by apa::DisambigAlg::FindChanTimeEndPts(), FirstChannelInView(), and apa::DisambigAlg::MakeCloseHits().
uint32_t apa::APAGeometryAlg::FirstChannelInView | ( | geo::View_t | geoview, |
uint32_t | chan | ||
) | const |
Definition at line 182 of file APAGeometryAlg.cxx.
References ChannelToAPA(), and FirstChannelInView().
uint32_t apa::APAGeometryAlg::FirstChannelInView | ( | uint32_t | chan | ) | const |
Definition at line 172 of file APAGeometryAlg.cxx.
References ChannelToAPA(), fGeom, FirstChannelInView(), and geo::GeometryCore::View().
void apa::APAGeometryAlg::Init | ( | ) |
Initialize some chanel numbers to speed up other methods.
Definition at line 45 of file APAGeometryAlg.cxx.
References geo::GeometryCore::ChannelToWire(), fAPAsPerCryo, fChannelRange, fChannelsPerAPA, fFirstU, fFirstV, fFirstZ0, fFirstZ1, fGeom, fLastU, fLastV, fLastZ0, fLastZ1, geo::kU, geo::kV, geo::kZ, geo::GeometryCore::Nchannels(), geo::GeometryCore::NTPC(), geo::TPCID::TPC, geo::GeometryCore::View(), and geo::GeometryCore::WirePitch().
Referenced by APAGeometryAlg().
bool apa::APAGeometryAlg::LineSegChanIntersect | ( | TVector3 | xyzStart, |
TVector3 | xyzEnd, | ||
uint32_t | chan, | ||
std::vector< geo::WireID > & | widsCrossed, | ||
bool | ExtendLine = true |
||
) | const |
If a line given by start/end points intersects a channel.
Definition at line 272 of file APAGeometryAlg.cxx.
References geo::GeometryCore::ChannelToWire(), fGeom, geo::GeometryCore::NearestWireID(), geo::GeometryCore::PositionToTPCID(), geo::vect::toPoint(), lar::util::ValueInRange(), w, and geo::WireID::Wire.
geo::WireID apa::APAGeometryAlg::NearestWireIDOnChan | ( | const double | WorldLoc[3], |
uint32_t | chan, | ||
unsigned int const | plane, | ||
unsigned int const | tpc = 0 , |
||
unsigned int const | cstat = 0 |
||
) | const |
Definition at line 236 of file APAGeometryAlg.cxx.
References util::abs(), geo::GeometryCore::ChannelToWire(), fChannelRange, fGeom, geo::kZ, geo::GeometryCore::NearestWireID(), and geo::GeometryCore::View().
Referenced by ThreeChanPos(), and apa::DisambigAlg::UseEndPts().
void apa::APAGeometryAlg::reconfigure | ( | fhicl::ParameterSet const & | p | ) |
std::vector< double > apa::APAGeometryAlg::ThreeChanPos | ( | uint32_t | u, |
uint32_t | v, | ||
uint32_t | z | ||
) | const |
Find the center of the 3 intersections, choose best if multiple.
Definition at line 320 of file APAGeometryAlg.cxx.
References util::abs(), APAChannelsIntersect(), geo::GeometryCore::ChannelToWire(), fGeom, geo::WireGeo::GetCenter(), geo::TPCGeo::Length(), NearestWireIDOnChan(), geo::GeometryCore::TPC(), geo::GeometryCore::WireIDsIntersect(), geo::GeometryCore::WireIDToWireGeo(), geo::WireIDIntersection::y, and geo::WireIDIntersection::z.
Referenced by apa::DisambigAlg::UseEndPts().
|
private |
Definition at line 82 of file APAGeometryAlg.h.
Referenced by ChannelToAPA(), FirstChannelInView(), and Init().
|
private |
Definition at line 94 of file APAGeometryAlg.h.
Referenced by Init(), and NearestWireIDOnChan().
|
private |
All APAs have this same number of channels.
Definition at line 81 of file APAGeometryAlg.h.
Referenced by APAView(), ChannelToAPA(), FirstChannelInView(), and Init().
|
private |
Definition at line 85 of file APAGeometryAlg.h.
Referenced by ChannelsInAPAView(), FirstChannelInView(), and Init().
|
private |
Definition at line 87 of file APAGeometryAlg.h.
Referenced by ChannelsInAPAView(), FirstChannelInView(), and Init().
|
private |
Definition at line 89 of file APAGeometryAlg.h.
Referenced by ChannelsInAPAView(), FirstChannelInView(), and Init().
|
private |
Definition at line 91 of file APAGeometryAlg.h.
Referenced by APAView(), ChannelsInAPAView(), and Init().
|
private |
Definition at line 76 of file APAGeometryAlg.h.
Referenced by APAChannelsIntersect(), APAView(), ChanSegsPerSide(), FirstChannelInView(), Init(), LineSegChanIntersect(), NearestWireIDOnChan(), and ThreeChanPos().
|
private |
Definition at line 86 of file APAGeometryAlg.h.
Referenced by Init().
|
private |
Definition at line 88 of file APAGeometryAlg.h.
|
private |
Definition at line 90 of file APAGeometryAlg.h.
|
private |
Definition at line 92 of file APAGeometryAlg.h.
Referenced by ChannelsInAPAView(), and Init().