Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
detvar::SortChansByZ Class Reference

Public Member Functions

bool operator() (const raw::ChannelID_t &a, const raw::ChannelID_t &b) const
 

Protected Member Functions

double GetZ (const raw::ChannelID_t &c) const
 

Protected Attributes

art::ServiceHandle< geo::Geometrygeom
 

Detailed Description

Definition at line 108 of file RandomChannelStatusService_service.cc.

Member Function Documentation

double detvar::SortChansByZ::GetZ ( const raw::ChannelID_t c) const
inlineprotected

Definition at line 117 of file RandomChannelStatusService_service.cc.

118  {
119  double z = 0;
120  double y = -1e9;
121 
122  // Search through all the wires associated with this channel for the
123  // top-most position (where it attaches to the APA frame) and quote that
124  // Z position.
125  const std::vector<geo::WireID> wires = geom->ChannelToWire(c);
126  for(const geo::WireID& wire: wires){
127  const geo::WireGeo& wg = geom->Wire(wire);
128  if(wg.GetStart().Y() > y){
129  y = wg.GetStart().Y();
130  z = wg.GetStart().Z();
131  }
132  if(wg.GetEnd().Y() > y){
133  y = wg.GetEnd().Y();
134  z = wg.GetEnd().Z();
135  }
136  }
137 
138  return z;
139  }
void GetStart(double *xyz) const
Definition: WireGeo.h:157
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:65
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
art::ServiceHandle< geo::Geometry > geom
WireGeo const & Wire(geo::WireID const &wireid) const
Returns the specified wire.
void GetEnd(double *xyz) const
Definition: WireGeo.h:163
bool detvar::SortChansByZ::operator() ( const raw::ChannelID_t a,
const raw::ChannelID_t b 
) const
inline

Definition at line 111 of file RandomChannelStatusService_service.cc.

113  {
114  return GetZ(a) < GetZ(b);
115  }
const double a
double GetZ(const raw::ChannelID_t &c) const
static bool * b
Definition: config.cpp:1043

Member Data Documentation

art::ServiceHandle<geo::Geometry> detvar::SortChansByZ::geom
protected

Definition at line 141 of file RandomChannelStatusService_service.cc.


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