Classes | Typedefs | Enumerations | Functions | Variables
rb Namespace Reference

Perform a "2 point" Hough transform on a collection of hits. More...

Classes

class  CellHit
 A rawdata::RawDigit with channel information decoded. More...
 
class  Cluster
 A collection of associated CellHits. More...
 
class  Energy
 A container for energy information. More...
 
class  FilterList
 A simple list of products that have been marked "filtered out". More...
 
class  FitSum
 A container for kinematic information. More...
 
class  Hit2D
 Hits from the x or y view. More...
 
class  HitList
 Just the essential information required for track fitting. More...
 
class  HitMap
 Provides efficient lookup of CellHits by plane and cell number. More...
 
class  HoughPeak
 Data for a single peak in Hough space. More...
 
class  HoughResult
 Summary from a Hough transform applied to a group of cell hits. More...
 
class  Interaction
 A single interaction in the detector, grouping tracks and showers at a common vertex. More...
 
class  PID
 A pid value and corresponding pdg code. More...
 
class  Prong
 A Cluster with defined start position and direction. More...
 
class  RecoHit
 Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb::RecoHit you need a reconstructed object to provide the assumed W position. More...
 
class  SecondaryInteraction
 
class  Shower
 A rb::Prong with a length. More...
 
class  Track
 A rb::Prong with full reconstructed trajectory. More...
 
class  Vertex
 A 3D position and time representing an interaction vertex. More...
 
struct  WeightedHit
 Simple hit+weight pair, returned from rb::Cluster::WeightedHits. More...
 
class  WeightedProng
 A rb::Prong which has energy weighted by shared hits. More...
 

Typedefs

typedef std::pair< art::Ptr< rb::Shower >, art::Ptr< rb::Shower > > DiPhoton
 
typedef std::pair< art::Ptr< rb::Track >, rb::PIDInteractionTrack
 
typedef std::pair< art::Ptr< rb::Shower >, rb::PIDInteractionShower
 
typedef std::pair< DiPhoton, rb::PIDInteractionDiPhoton
 

Enumerations

enum  AveragingScheme { kByClusterWeightOnly, kByEnergy }
 

Functions

bool standard_compare (const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
 
std::ostream & operator<< (std::ostream &o, const Cluster &c)
 
template<class T >
bool IsFiltered (const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
 Is this Ptr marked "filtered out"? More...
 
template<class T >
bool IsFiltered (const art::Event &evt, art::Ptr< T > x, const std::string &label)
 Check a single label. If label is blank, check all. More...
 
template<class T >
bool IsFiltered (const art::Event &evt, art::Ptr< T > x)
 Check all labels. More...
 
template<class T >
bool IsFiltered (const art::Event &evt, art::Handle< std::vector< T > > h, int idx, const std::vector< std::string > &labels)
 Express Ptr as a Handle and offset. More...
 
template<class T >
bool IsFiltered (const art::Event &evt, art::Handle< std::vector< T > > h, int idx, const std::string &label)
 Express Ptr as a Handle and offset, check a single label. More...
 
template<class T >
bool IsFiltered (const art::Event &evt, art::Handle< std::vector< T > > h, int idx)
 Express Ptr as a Handle and offset, check all labels. More...
 
static bool compare_peaks (const HoughPeak &a, const HoughPeak &b)
 
bool CompareTracksByTime (const art::Ptr< rb::Track > &a, const art::Ptr< rb::Track > &b)
 Helper for SortTracksByTime. Is a earlier than b? More...
 
void SortTracksByTime (std::vector< art::Ptr< rb::Track >> &t)
 Sort t in time order (earliest to latest). More...
 
void SortTracksByTime (art::PtrVector< rb::Track > &t)
 Sort t in time order (earliest to latest). More...
 
std::ostream & operator<< (std::ostream &o, const CellHit &c)
 
bool CompareByPlane (const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
 Helper for SortByPlane. Is a on a lower number plane than b? More...
 
bool CompareByTime (const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
 Helper for SortByTime. Is a earlier than b? More...
 
bool CompareByCell (const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
 Helper for SortByCell. Is a on a lower cell number than b? More...
 
bool CompareByPlaneAndCell (const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
 
void SortByPlane (std::vector< art::Ptr< rb::CellHit > > &c)
 Sort c in plane order (low to high). More...
 
void SortByPlane (art::PtrVector< rb::CellHit > &c)
 Sort c in plane order (low to high). More...
 
void SortByTime (std::vector< art::Ptr< rb::CellHit > > &c)
 Sort c in time order (earliest to latest). More...
 
void SortByTime (art::PtrVector< rb::CellHit > &c)
 Sort c in time order (earliest to latest). More...
 
void SortByCell (std::vector< art::Ptr< rb::CellHit > > &c)
 Sort c in cell order (low to high) More...
 
void SortByCell (art::PtrVector< rb::CellHit > &c)
 Sort c in cell order (low to high) More...
 
void SortByPlaneAndCell (std::vector< art::Ptr< rb::CellHit > > &c)
 
void SortByPlaneAndCell (art::PtrVector< rb::CellHit > &c)
 
void SortByPlaneAndCell (std::vector< rb::CellHit > &c)
 
std::ostream & operator<< (std::ostream &o, const RecoHit &r)
 

Variables

const AveragingScheme kDefaultScheme = kByEnergy
 

Detailed Description

Perform a "2 point" Hough transform on a collection of hits.

TODO.

Cosmic track selection code.

CellHit class.

Authors
messi.nosp@m.er@i.nosp@m.ndian.nosp@m.a.ed.nosp@m.u, mibai.nosp@m.rd@i.nosp@m.ndian.nosp@m.a.ed.nosp@m.u
Date
Author
C. Backhouse - bckho.nosp@m.use@.nosp@m.calte.nosp@m.ch.e.nosp@m.du
Date

Upon instantiation the histograms are loaded. Ideally one would reuse an instance of this class to save reloading of the histograms.

Author
smith.nosp@m.@phy.nosp@m.sics..nosp@m.umn..nosp@m.edu
Brian Rebel - brebe.nosp@m.l@fn.nosp@m.al.go.nosp@m.v
Date
Author
ricke.nosp@m.n@fn.nosp@m.al.go.nosp@m.v
Date
Sept. 2012

Typedef Documentation

Definition at line 28 of file Interaction.h.

Definition at line 31 of file Interaction.h.

Definition at line 30 of file Interaction.h.

Definition at line 29 of file Interaction.h.

Enumeration Type Documentation

Enumerator
kByClusterWeightOnly 
kByEnergy 

In addition to the intrinsic weights.

Definition at line 27 of file Cluster.h.

28  {
30  kByEnergy ///< In addition to the intrinsic weights
31  };
In addition to the intrinsic weights.
Definition: Cluster.h:30

Function Documentation

static bool rb::compare_peaks ( const HoughPeak a,
const HoughPeak b 
)
static

Definition at line 77 of file HoughResult.cxx.

References rb::HoughPeak::fH.

Referenced by rb::HoughResult::SortPeaks().

78  {
79  return a.fH>b.fH;
80  }
const double a
const hit & b
Definition: hits.cxx:21
bool rb::CompareByCell ( const art::Ptr< rb::CellHit > &  a,
const art::Ptr< rb::CellHit > &  b 
)

Helper for SortByCell. Is a on a lower cell number than b?

Definition at line 106 of file CellHit.cxx.

References rb::CellHit::Cell().

Referenced by SortByCell().

108  {
109  return a->Cell() < b->Cell();
110  }
unsigned short Cell() const
Definition: CellHit.h:40
bool rb::CompareByPlane ( const art::Ptr< rb::CellHit > &  a,
const art::Ptr< rb::CellHit > &  b 
)

Helper for SortByPlane. Is a on a lower number plane than b?

Definition at line 92 of file CellHit.cxx.

References rb::CellHit::Plane().

Referenced by SortByPlane().

94  {
95  return a->Plane() < b->Plane();
96  }
unsigned short Plane() const
Definition: CellHit.h:39
bool rb::CompareByPlaneAndCell ( const art::Ptr< rb::CellHit > &  a,
const art::Ptr< rb::CellHit > &  b 
)

Helper for SortByPlaneAndCell. Is a on a lower (plane,cell) number than b?

Definition at line 113 of file CellHit.cxx.

References rb::CellHit::Cell(), and rb::CellHit::Plane().

Referenced by SortByPlaneAndCell().

115  {
116  if( a->Plane() < b->Plane() )
117  return true;
118  if( a->Plane() > b->Plane() )
119  return false;
120  return a->Cell() < b->Cell();
121  }
unsigned short Plane() const
Definition: CellHit.h:39
unsigned short Cell() const
Definition: CellHit.h:40
bool rb::CompareByTime ( const art::Ptr< rb::CellHit > &  a,
const art::Ptr< rb::CellHit > &  b 
)

Helper for SortByTime. Is a earlier than b?

Definition at line 99 of file CellHit.cxx.

References rb::CellHit::TNS().

Referenced by SortByTime().

101  {
102  return a->TNS() < b->TNS();
103  }
float TNS() const
Definition: CellHit.h:46
bool rb::CompareTracksByTime ( const art::Ptr< rb::Track > &  a,
const art::Ptr< rb::Track > &  b 
)

Helper for SortTracksByTime. Is a earlier than b?

Definition at line 532 of file Track.cxx.

References rb::Cluster::MinTNS().

Referenced by SortTracksByTime().

534  {
535  return a->MinTNS() < b->MinTNS();
536  }
double MinTNS() const
Definition: Cluster.cxx:482
template<class T >
bool rb::IsFiltered ( const art::Event evt,
art::Ptr< T x,
const std::vector< std::string > &  labels 
)

Is this Ptr marked "filtered out"?

Parameters
evtThe current event
xCheck if this Ptr is marked "filtered"
labelsOnly check FilterLists under these labels. If empty check all labels.

Definition at line 96 of file FilterList.h.

References filt, art::DataViewImpl::getByLabel(), art::DataViewImpl::getManyByType(), and label.

Referenced by comi::NumiFilteringAna::analyze(), trk::KalmanTrackAna::analyze(), showere::ShowerEnergyAna::analyze(), hough::HoughValidate::analyze(), cvn::CVNEventDump::analyze(), cvn::CVNCosmicEventDump::analyze(), cvn::CVNEventProngDump::analyze(), bpf::BPFCVNAna::analyze(), slid::LIDTraining::analyze(), lem::ApplyFilter::filter(), showere::ShowerEnergyFilterMC::filter(), evd::SliceNavigator::GetProducts(), evd::SliceNavigator::GetProductsImplFull(), IsFiltered(), evd::SliceNavigator::postProcessEvent(), lem::LEMAssociator::produce(), hv::HoughVertex::produce(), trk::KalmanTrack::produce(), lem::UnTranspose::produce(), lem::LEMSummarizer::produce(), trk::KalmanTrackMerge::produce(), slid::Recluster::produce(), lem::Preselection::produce(), hough::MultiHoughT::produce(), slid::SliceLIDBuilder::produce(), earms::ElasticArmsHS::produce(), dt::ViewMerger::produce(), dt::DiscreteTracker::produce(), cvn::CVNMapper::produce(), ncpi0::MakeNCPi0BkgRej::produce(), slid::LIDBuilder::produce(), jmshower::NueSel::produce(), rvp::RecVarPID::produce(), cvntf::CVNProngEvaluatorTF::produce(), crvtx::CosmicRayVertex::produce(), xnue::XnuePID::produce(), cvn::RegCVNMapper::produce(), slid::SPIDBuilder::produce(), jmshower::NueSelLID::produce(), cvn::CVNAddTrainingData::produce(), murem::MuonRemove::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), caf::CAFMaker::produce(), and jmshower::RecoJMShower::RecoShowers().

99  {
100  std::vector<art::Handle<rb::FilterList<T> > > filts;
101  if(labels.empty()){
102  evt.getManyByType(filts);
103  }
104  else{
105  for(const std::string& label: labels){
106  filts.emplace_back();
107  evt.getByLabel(label, filts.back());
108  if(filts.back().failedToGet()){
109  // mf::LogWarning("FilterList")
110  // << "FilterList not found with label: "
111  // << label;
112  filts.pop_back();
113  }
114  }
115  }
116 
117  for(const art::Handle<rb::FilterList<T>>& filt: filts){
118  for(const art::Ptr<T>& ptr: filt->fFiltered){
119  if(x == ptr) return true;
120  }
121  }
122 
123  return false;
124  }
A simple list of products that have been marked "filtered out".
Definition: FilterList.h:74
const char * label
void getManyByType(std::vector< Handle< PROD >> &results) const
Definition: DataViewImpl.h:446
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
TString filt[ntarg]
Definition: Style.C:28
Definition: fwd.h:28
template<class T >
bool rb::IsFiltered ( const art::Event evt,
art::Ptr< T x,
const std::string &  label 
)

Check a single label. If label is blank, check all.

Definition at line 28 of file FilterList.h.

References IsFiltered().

31  {
32  if(label.empty())
33  return IsFiltered(evt, x, std::vector<std::string>());
34  else
35  return IsFiltered(evt, x, std::vector<std::string>(1, label));
36  }
bool IsFiltered(const art::Event &evt, art::Handle< std::vector< T > > h, int idx)
Express Ptr as a Handle and offset, check all labels.
Definition: FilterList.h:64
const char * label
template<class T >
bool rb::IsFiltered ( const art::Event evt,
art::Ptr< T x 
)

Check all labels.

Definition at line 39 of file FilterList.h.

References IsFiltered().

41  {
42  return IsFiltered(evt, x, "");
43  }
bool IsFiltered(const art::Event &evt, art::Handle< std::vector< T > > h, int idx)
Express Ptr as a Handle and offset, check all labels.
Definition: FilterList.h:64
template<class T >
bool rb::IsFiltered ( const art::Event evt,
art::Handle< std::vector< T > >  h,
int  idx,
const std::vector< std::string > &  labels 
)

Express Ptr as a Handle and offset.

Definition at line 46 of file FilterList.h.

References make_syst_table_plots::h, and IsFiltered().

50  {
51  return IsFiltered(evt, art::Ptr<T>(h, idx), labels);
52  }
bool IsFiltered(const art::Event &evt, art::Handle< std::vector< T > > h, int idx)
Express Ptr as a Handle and offset, check all labels.
Definition: FilterList.h:64
Definition: fwd.h:28
template<class T >
bool rb::IsFiltered ( const art::Event evt,
art::Handle< std::vector< T > >  h,
int  idx,
const std::string &  label 
)

Express Ptr as a Handle and offset, check a single label.

Definition at line 55 of file FilterList.h.

References make_syst_table_plots::h, and IsFiltered().

59  {
60  return IsFiltered(evt, art::Ptr<T>(h, idx), label);
61  }
bool IsFiltered(const art::Event &evt, art::Handle< std::vector< T > > h, int idx)
Express Ptr as a Handle and offset, check all labels.
Definition: FilterList.h:64
const char * label
Definition: fwd.h:28
template<class T >
bool rb::IsFiltered ( const art::Event evt,
art::Handle< std::vector< T > >  h,
int  idx 
)

Express Ptr as a Handle and offset, check all labels.

Definition at line 64 of file FilterList.h.

References make_syst_table_plots::h, and IsFiltered().

67  {
68  return IsFiltered(evt, art::Ptr<T>(h, idx));
69  }
bool IsFiltered(const art::Event &evt, art::Handle< std::vector< T > > h, int idx)
Express Ptr as a Handle and offset, check all labels.
Definition: FilterList.h:64
Definition: fwd.h:28
std::ostream& rb::operator<< ( std::ostream &  o,
const CellHit c 
)

Definition at line 66 of file CellHit.cxx.

References rawdata::RawDigit::ADC(), rb::CellHit::Cell(), rawdata::RawDigit::Channel(), rb::CellHit::ID(), msf_helper::o, rb::CellHit::PE(), rb::CellHit::Plane(), art::right(), rawdata::RawDigit::TDC(), rb::CellHit::TNS(), and rb::CellHit::View().

67  {
68  o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
69  o << " View = " << std::setw(5) << std::right << c.View()
70  << " ID = " << std::setw(5) << std::right << c.ID()
71  << " Plane = " << std::setw(5) << std::right << c.Plane()
72  << " Cell = " << std::setw(5) << std::right << c.Cell()
73  << " Channel = "<< std::setw(5) << std::right << c.Channel()
74  << " TDC = " << std::setw(5) << std::right << c.TDC()
75  << " TNS = " << std::setw(5) << std::right << c.TNS()
76  << " ADC = " << std::setw(5) << std::right << c.ADC()
77  << " PE = " << std::setw(5) << std::right << c.PE();
78  return o;
79  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
std::ostream& rb::operator<< ( std::ostream &  o,
const RecoHit r 
)

Definition at line 80 of file RecoHit.cxx.

References rb::RecoHit::GeV(), rb::RecoHit::MIP(), msf_helper::o, rb::RecoHit::PECorr(), art::right(), rb::RecoHit::X(), rb::RecoHit::Y(), and rb::RecoHit::Z().

81  {
82  o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
83  o << "PECor = " << std::setw(5) << std::right << r.PECorr()
84  << " MIP = " << std::setw(5) << std::right << r.MIP()
85  << " GeV = " << std::setw(5) << std::right << r.GeV()
86  << " X = " << std::setw(5) << std::right << r.X()
87  << " Y = " << std::setw(5) << std::right << r.Y()
88  << " Z = " << std::setw(5) << std::right << r.Z();
89  return o;
90  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
TRandom3 r(0)
std::ostream& rb::operator<< ( std::ostream &  o,
const Cluster c 
)

Definition at line 770 of file Cluster.cxx.

References rb::Cluster::ID(), rb::Cluster::Is3D(), rb::Cluster::NCell(), msf_helper::o, art::right(), rb::Cluster::TotalADC(), and rb::Cluster::View().

771  {
772  o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
773  o << "View = " << std::setw(1) << std::right << c.View()
774  << " ID = " << std::setw(1) << std::right << c.ID()
775  << " #Cells = " << std::setw(3) << std::right << c.NCell()
776  << " Is3D = " << std::setw(1) << std::right << c.Is3D()
777  << " TotalADC = " << std::setw(5) << std::right << c.TotalADC();
778 
779  return o;
780  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
void rb::SortByCell ( std::vector< art::Ptr< rb::CellHit > > &  c)

Sort c in cell order (low to high)

Definition at line 145 of file CellHit.cxx.

References make_syst_table_plots::c, and CompareByCell().

146  {
147  std::stable_sort(c.begin(), c.end(), CompareByCell);
148  }
bool CompareByCell(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Helper for SortByCell. Is a on a lower cell number than b?
Definition: CellHit.cxx:106
void rb::SortByCell ( art::PtrVector< rb::CellHit > &  c)

Sort c in cell order (low to high)

Definition at line 149 of file CellHit.cxx.

References art::PtrVector< T >::begin(), CompareByCell(), and art::PtrVector< T >::end().

150  {
151  std::stable_sort(c.begin(), c.end(), CompareByCell);
152  }
iterator begin()
Definition: PtrVector.h:223
bool CompareByCell(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Helper for SortByCell. Is a on a lower cell number than b?
Definition: CellHit.cxx:106
iterator end()
Definition: PtrVector.h:237
void rb::SortByPlane ( std::vector< art::Ptr< rb::CellHit > > &  c)

Sort c in plane order (low to high).

Definition at line 124 of file CellHit.cxx.

References make_syst_table_plots::c, and CompareByPlane().

Referenced by calib::HitEfficiency::analyze(), htk::HoughTrack::analyze(), trk::KalmanTrackMerge::CalcMatchScore(), nuesand::FillNueSandbox::GetdEdx(), trk::CosmicTrackAlg::MakeTrack(), murem::FindParent::MatchToOrigSlice(), zcl::SMMCluster::MissC(), murem::MuonRemove::MuonInfo(), jmshower::JMClusterMerge::produce(), slicer::MMSlicer::WindowSliceZ(), and slicer::Slicer::WindowSliceZ().

125  {
126  std::stable_sort(c.begin(), c.end(), CompareByPlane);
127  }
bool CompareByPlane(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Helper for SortByPlane. Is a on a lower number plane than b?
Definition: CellHit.cxx:92
void rb::SortByPlane ( art::PtrVector< rb::CellHit > &  c)

Sort c in plane order (low to high).

Definition at line 128 of file CellHit.cxx.

References art::PtrVector< T >::begin(), CompareByPlane(), and art::PtrVector< T >::end().

129  {
130  std::stable_sort(c.begin(), c.end(), CompareByPlane);
131  }
iterator begin()
Definition: PtrVector.h:223
bool CompareByPlane(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Helper for SortByPlane. Is a on a lower number plane than b?
Definition: CellHit.cxx:92
iterator end()
Definition: PtrVector.h:237
void rb::SortByPlaneAndCell ( std::vector< rb::CellHit > &  c)

Sort c in plane order (low to high). Within a plane, order them by cell

void rb::SortByPlaneAndCell ( std::vector< art::Ptr< rb::CellHit > > &  c)

Definition at line 155 of file CellHit.cxx.

References make_syst_table_plots::c, and CompareByPlaneAndCell().

Referenced by slid::Recluster::produce().

156  {
157  std::stable_sort(c.begin(), c.end(), CompareByPlaneAndCell);
158  }
bool CompareByPlaneAndCell(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Definition: CellHit.cxx:113
void rb::SortByPlaneAndCell ( art::PtrVector< rb::CellHit > &  c)

Sort c in plane order (low to high). Within a plane, order them by cell

Definition at line 159 of file CellHit.cxx.

References art::PtrVector< T >::begin(), CompareByPlaneAndCell(), and art::PtrVector< T >::end().

160  {
161  std::stable_sort(c.begin(), c.end(), CompareByPlaneAndCell);
162  }
iterator begin()
Definition: PtrVector.h:223
iterator end()
Definition: PtrVector.h:237
bool CompareByPlaneAndCell(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Definition: CellHit.cxx:113
void rb::SortByTime ( std::vector< art::Ptr< rb::CellHit > > &  c)
void rb::SortByTime ( art::PtrVector< rb::CellHit > &  c)

Sort c in time order (earliest to latest).

Definition at line 138 of file CellHit.cxx.

References art::PtrVector< T >::begin(), CompareByTime(), and art::PtrVector< T >::end().

139  {
140  std::stable_sort(c.begin(), c.end(), CompareByTime);
141  }
iterator begin()
Definition: PtrVector.h:223
bool CompareByTime(const art::Ptr< rb::CellHit > &a, const art::Ptr< rb::CellHit > &b)
Helper for SortByTime. Is a earlier than b?
Definition: CellHit.cxx:99
iterator end()
Definition: PtrVector.h:237
void rb::SortTracksByTime ( std::vector< art::Ptr< rb::Track >> &  t)

Sort t in time order (earliest to latest).

Definition at line 539 of file Track.cxx.

References CompareTracksByTime(), and confusionMatrixTree::t.

Referenced by sn::SNBackgroundRejection::produce(), and sn::TrackActivityRemover::remove().

540  {
541  std::stable_sort(t.begin(), t.end(), CompareTracksByTime);
542  }
bool CompareTracksByTime(const art::Ptr< rb::Track > &a, const art::Ptr< rb::Track > &b)
Helper for SortTracksByTime. Is a earlier than b?
Definition: Track.cxx:532
void rb::SortTracksByTime ( art::PtrVector< rb::Track > &  t)

Sort t in time order (earliest to latest).

Definition at line 545 of file Track.cxx.

References art::PtrVector< T >::begin(), CompareTracksByTime(), and art::PtrVector< T >::end().

546  {
547  std::stable_sort(t.begin(), t.end(), CompareTracksByTime);
548  }
iterator begin()
Definition: PtrVector.h:223
iterator end()
Definition: PtrVector.h:237
bool CompareTracksByTime(const art::Ptr< rb::Track > &a, const art::Ptr< rb::Track > &b)
Helper for SortTracksByTime. Is a earlier than b?
Definition: Track.cxx:532
bool rb::standard_compare ( const art::Ptr< rb::CellHit > &  a,
const art::Ptr< rb::CellHit > &  b 
)

Definition at line 719 of file Cluster.cxx.

References rb::CellHit::Cell(), rawdata::RawDigit::fADC, rawdata::RawDigit::fTDC, rb::CellHit::ID(), and rb::CellHit::Plane().

Referenced by rb::Cluster::StandardSort().

721  {
722  if (a->fTDC[0]!=b->fTDC[0]) return a->fTDC[0]<b->fTDC[0];
723  if (a->Plane()!=b->Plane()) return a->Plane()<b->Plane();
724  if (a->Cell() !=b->Cell()) return a->Cell() <b->Cell();
725  if (a->fADC[0]!=b->fADC[0]) return a->fADC[0]<b->fADC[0];
726  if (a->ID() !=b->ID()) return a->ID() <b->ID();
727  return false; // Should never get here...
728  }
unsigned short Plane() const
Definition: CellHit.h:39
unsigned short Cell() const
Definition: CellHit.h:40
std::vector< int32_t > fTDC
TDC(-like) time value. Event time is subtracted. Vector structure is a historical artifact...
Definition: RawDigit.h:50
std::vector< int16_t > fADC
list of ADC(-like) charge values
Definition: RawDigit.h:49
const int ID() const
Definition: CellHit.h:47

Variable Documentation

const AveragingScheme rb::kDefaultScheme = kByEnergy

Definition at line 32 of file Cluster.h.