Public Types | Public Member Functions | Private Attributes | List of all members
IcebergChannelGeo Class Reference

#include <IcebergChannelGeo.h>

Public Types

using Index = unsigned int
 
using Point = TVector3
 
using EndPoints = std::pair< Point, Point >
 
using EndPointsVector = std::vector< EndPoints >
 

Public Member Functions

 IcebergChannelGeo (Index icha, const geo::GeometryCore *pgeo)
 
 IcebergChannelGeo (Index icha)
 
Index channel () const
 
bool isValid () const
 
Index nWires () const
 
const EndPointsVectorwires () const
 
const Pointtop () const
 
const Pointbottom () const
 

Private Attributes

Index m_icha
 
bool m_valid
 
EndPointsVector m_ends
 
Point m_top
 
Point m_bot
 

Detailed Description

Definition at line 23 of file IcebergChannelGeo.h.

Member Typedef Documentation

Definition at line 29 of file IcebergChannelGeo.h.

Definition at line 30 of file IcebergChannelGeo.h.

using IcebergChannelGeo::Index = unsigned int

Definition at line 27 of file IcebergChannelGeo.h.

using IcebergChannelGeo::Point = TVector3

Definition at line 28 of file IcebergChannelGeo.h.

Constructor & Destructor Documentation

IcebergChannelGeo::IcebergChannelGeo ( Index  icha,
const geo::GeometryCore pgeo 
)

Definition at line 21 of file IcebergChannelGeo.cxx.

22 : m_icha(icha), m_valid(false) {
23  const string myname = "IcebergChannelGeo::ctor: ";
24  if ( pgeo == nullptr ) return;
25  if ( icha >= pgeo->Nchannels() ) return;
26  m_valid = true;
27  if ( pgeo->DetectorName() != "iceberg" ) {
28  cout << myname << "WARNING: Iceberg mod is applied to non-Iceberg detector channels." << endl;
29  }
30  double ylo = 173.819 - 95.23;
31  for ( geo::WireID wid : pgeo->ChannelToWire(icha) ) {
32  EndPoints ends = pgeo->WireEndPoints<TVector3>(wid);
33  if ( ends.first.y() > ends.second.y() ) {
34  Point firstPoint = ends.first;
35  ends.first = ends.second;
36  ends.second = firstPoint;
37  }
38  Point& plo = ends.first;
39  Point& phi = ends.second;
40  if ( phi.y() < ylo ) continue;
41  if ( plo.y() < ylo ) {
42  // Set lower limit to ylo.
43  double slop = (plo.z() - phi.z())/(plo.y() - phi.y());
44  double zlo = phi.z() + slop*(ylo - phi.y());
45  plo.SetY(ylo);
46  plo.SetZ(zlo);
47  }
48  if ( m_ends.size() == 0 ) {
49  m_bot = ends.first;
50  m_top = ends.second;
51  } else {
52  if ( ends.first.y() < m_bot.y() ) m_bot = ends.first;
53  if ( ends.second.y() > m_top.y() ) m_top = ends.second;
54  }
55  m_ends.push_back(ends);
56  }
57 }
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
EndPointsVector m_ends
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
std::pair< Point, Point > EndPoints
if(!yymsg) yymsg
QTextStream & endl(QTextStream &s)
IcebergChannelGeo::IcebergChannelGeo ( Index  icha)

Definition at line 16 of file IcebergChannelGeo.cxx.

IcebergChannelGeo(Index icha, const geo::GeometryCore *pgeo)

Member Function Documentation

const Point& IcebergChannelGeo::bottom ( ) const
inline

Definition at line 52 of file IcebergChannelGeo.h.

52 { return m_bot; }
Index IcebergChannelGeo::channel ( ) const
inline

Definition at line 39 of file IcebergChannelGeo.h.

39 { return m_icha; }
bool IcebergChannelGeo::isValid ( ) const
inline

Definition at line 42 of file IcebergChannelGeo.h.

42 { return m_valid; }
Index IcebergChannelGeo::nWires ( ) const
inline

Definition at line 45 of file IcebergChannelGeo.h.

45 { return m_ends.size(); }
EndPointsVector m_ends
const Point& IcebergChannelGeo::top ( ) const
inline

Definition at line 51 of file IcebergChannelGeo.h.

51 { return m_top; }
const EndPointsVector& IcebergChannelGeo::wires ( ) const
inline

Definition at line 48 of file IcebergChannelGeo.h.

48 { return m_ends; }
EndPointsVector m_ends

Member Data Documentation

Point IcebergChannelGeo::m_bot
private

Definition at line 60 of file IcebergChannelGeo.h.

EndPointsVector IcebergChannelGeo::m_ends
private

Definition at line 58 of file IcebergChannelGeo.h.

Index IcebergChannelGeo::m_icha
private

Definition at line 56 of file IcebergChannelGeo.h.

Point IcebergChannelGeo::m_top
private

Definition at line 59 of file IcebergChannelGeo.h.

bool IcebergChannelGeo::m_valid
private

Definition at line 57 of file IcebergChannelGeo.h.


The documentation for this class was generated from the following files: