LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
geo::WireReadoutSorterStandard Class Reference

#include "WireReadoutSorterStandard.h"

Inheritance diagram for geo::WireReadoutSorterStandard:
geo::WireReadoutSorter

Public Member Functions

 WireReadoutSorterStandard ()
 
 WireReadoutSorterStandard (fhicl::ParameterSet const &)
 

Private Member Functions

bool compareWires (WireGeo const &w1, WireGeo const &w2) const override
 

Detailed Description

Definition at line 15 of file WireReadoutSorterStandard.h.

Constructor & Destructor Documentation

geo::WireReadoutSorterStandard::WireReadoutSorterStandard ( )
default
geo::WireReadoutSorterStandard::WireReadoutSorterStandard ( fhicl::ParameterSet const &  )
explicit

Definition at line 14 of file WireReadoutSorterStandard.cxx.

14 {}

Member Function Documentation

bool geo::WireReadoutSorterStandard::compareWires ( WireGeo const &  w1,
WireGeo const &  w2 
) const
overrideprivatevirtual

Implements geo::WireReadoutSorter.

Definition at line 17 of file WireReadoutSorterStandard.cxx.

References c1, c2, and geo::WireGeo::GetCenter().

18  {
19  auto const [c1, c2] = std::pair{w1.GetCenter(), w2.GetCenter()};
20 
21  // sort by z first
22  if (cmp.nonEqual(c1.Z(), c2.Z())) return c1.Z() < c2.Z();
23 
24  // if same z sort by y
25  if (cmp.nonEqual(c1.Y(), c2.Y())) return c1.Y() < c2.Y();
26 
27  // if same y sort by x
28  return c1.X() < c2.X();
29  }
TCanvas * c1
Definition: plotHisto.C:7
TCanvas * c2
Definition: plot_hist.C:75

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