Calculation and representation of a straight line passing through several "segment" windows. More...
#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-02-25/DiscreteTracker/Cand.h"
Public Member Functions | |
Cand (geo::View_t view, bool up) | |
void | AddChunk (const Chunk &chunk, Direction dir) |
Simply store the chunk in the list. Need to call AddSeg too. More... | |
void | PopFirstChunk () |
void | PopLastChunk () |
bool | operator< (const Cand &rhs) const |
void | EstimateStraightLine (double &z1, double &y1, double &z2, double &y2) const |
double | MinGradient () const |
double | MaxGradient () const |
double | EstimateGradient () const |
geo::View_t | View () const |
unsigned int | NChunks () const |
unsigned int | NDeadChunks () const |
int | NHitPlanes () const |
const Chunk & | FirstChunk () const |
const Chunk & | LastChunk () const |
const Chunk & | ExtremalChunk (Direction dir) const |
bool | IsExtremalChunkComplete (Direction dir) const |
void | MarkExtremalChunkShower (Direction dir) |
bool | IsAllShower () const |
const Segment & | FirstSeg () const |
const Segment & | LastSeg () const |
const Segment & | ExtremalSeg (Direction dir) const |
bool | Up () const |
art::PtrVector< rb::CellHit > | AllHits () const |
rb::Track | ToTrack () const |
std::list< Chunk > | AllChunks () const |
Sorted in plane order. More... | |
unsigned int | FirstPlane () const |
unsigned int | LastPlane () const |
unsigned int | ExtremalPlane (Direction dir) const |
bool | TryAddSeg (const Segment &seg, Direction dir, bool check=true) |
Appends seg to fSegs and updates internal state reflecting limits on the possible straight lines. If the new seg is impossible to accomodate, returns false and guarantees not to change any state. More... | |
bool | TryAddSegOutOfOrder (const Segment &seg) |
void | PopFirstSeg () |
void | PopLastSeg () |
int | NSegs () const |
void | TrimFront () |
void | TrimBack () |
void | ShortenOne (Direction dir) |
Cand | MaybeFlip (bool &ok) const |
bool | FindChunk (int plane, Chunk &chunk) const |
bool | operator== (const Cand &rhs) const |
Protected Member Functions | |
void | MinMaxLines (const Segment &segi, const Segment &segj, double &mmax, double &mmin, double &cmax, double &cmin) const |
Helper for TryAddSeg. More... | |
void | MinMaxLines (const SubSeg &segi, const SubSeg &segj, double &mmax, double &mmin, double &cmax, double &cmin) const |
void | PopSegHelper (const Segment &segi, Direction end) |
double | ClosestToEndCell (bool left) const |
Z position. More... | |
double | MAvg () const |
double | CAvg () const |
Protected Attributes | |
geo::View_t | fView |
bool | fUp |
double | fAllMMax |
double | fAllMMin |
double | fAllCMax |
double | fAllCMin |
int | fNChunks |
int | fNDeadChunks |
std::list< Segment > | fSegs |
std::list< Chunk > | fChunks |
bool | fAllHitsDirty |
art::PtrVector< rb::CellHit > | fAllHits |
Always access via AllHits. More... | |
Calculation and representation of a straight line passing through several "segment" windows.
dt::Cand::Cand | ( | geo::View_t | view, |
bool | up | ||
) |
Simply store the chunk in the list. Need to call AddSeg too.
Definition at line 36 of file Cand.cxx.
References ana::assert(), fAllHitsDirty, fChunks, fNChunks, fNDeadChunks, fUp, dt::Chunk::HasHits(), dt::kDownstream, and dt::Chunk::Up().
Referenced by dt::DiscreteTracker::BestSeed(), MaybeFlip(), and dt::DiscreteTracker::TryExtendCandOne().
|
inline |
art::PtrVector< rb::CellHit > dt::Cand::AllHits | ( | ) | const |
Definition at line 424 of file Cand.cxx.
References CAvg(), art::PtrVector< T >::clear(), fAllHits, fAllHitsDirty, fChunks, FirstSeg(), fNChunks, fSegs, it, LastChunk(), LastSeg(), dt::Segment::left, m, MAvg(), dt::Chunk::Plane(), art::PtrVector< T >::push_back(), and art::PtrVector< T >::size().
Referenced by ClosestToEndCell(), operator<(), and dt::DiscreteTracker::TryExtendChainOne().
|
inlineprotected |
Definition at line 113 of file Cand.h.
Referenced by AllHits(), ClosestToEndCell(), and EstimateStraightLine().
|
protected |
Z position.
Definition at line 469 of file Cand.cxx.
References AllHits(), CAvg(), geo::PlaneGeo::Cell(), geo::ClosestApproach(), dir, Dot(), fView, geom(), geo::CellGeo::GetCenter(), CLHEP::L, MAvg(), getGoodRuns4SAM::n, geo::GeometryBase::Plane(), art::PtrVector< T >::size(), and febshutoff_auto::start.
Referenced by EstimateStraightLine().
void dt::Cand::EstimateStraightLine | ( | double & | z1, |
double & | y1, | ||
double & | z2, | ||
double & | y2 | ||
) | const |
Definition at line 284 of file Cand.cxx.
References a, ana::assert(), b, CAvg(), ClosestToEndCell(), FirstChunk(), fSegs, geom(), geo::kPLANE_NOT_FOUND, LastChunk(), MAvg(), and dt::Chunk::Plane().
Referenced by ToTrack().
Definition at line 46 of file Cand.h.
References dt::kUpstream.
Referenced by dt::DiscreteTracker::TryExtendCand().
Definition at line 68 of file Cand.h.
References dt::kUpstream.
Referenced by dt::Chain::ExtremalPlane(), dt::DiscreteTracker::PossibleNextSegs(), and dt::DiscreteTracker::SpliceChains().
Definition at line 56 of file Cand.h.
References dt::kUpstream.
Referenced by TryAddSeg().
const Chunk & dt::Cand::FirstChunk | ( | ) | const |
Definition at line 353 of file Cand.cxx.
References fChunks.
Referenced by EstimateStraightLine(), dt::Chain::FirstChunk(), dt::Chain::FirstPlane(), operator<(), dt::DiscreteTracker::PossibleNextSegs(), and dt::Chain::ToTrack().
|
inline |
Definition at line 66 of file Cand.h.
References dt::Segment::plane.
Referenced by dt::DiscreteTracker::PossibleNextSegs().
const Segment & dt::Cand::FirstSeg | ( | ) | const |
Definition at line 365 of file Cand.cxx.
References fSegs.
Referenced by AllHits(), dt::Chain::FirstSeg(), IsExtremalChunkComplete(), dt::DiscreteTracker::PossibleNextSegs(), and ShortenOne().
bool dt::Cand::IsAllShower | ( | ) | const |
bool dt::Cand::IsExtremalChunkComplete | ( | Direction | dir | ) | const |
Definition at line 377 of file Cand.cxx.
References FirstSeg(), dt::kUpstream, LastSeg(), and dt::Segment::left.
Referenced by MarkExtremalChunkShower(), and dt::DiscreteTracker::TryExtendCand().
const Chunk & dt::Cand::LastChunk | ( | ) | const |
Definition at line 359 of file Cand.cxx.
References fChunks.
Referenced by AllHits(), EstimateStraightLine(), dt::Chain::LastChunk(), dt::Chain::LastPlane(), and dt::DiscreteTracker::PossibleNextSegs().
|
inline |
Definition at line 67 of file Cand.h.
References dt::Segment::plane.
Referenced by dt::DiscreteTracker::PossibleNextSegs().
const Segment & dt::Cand::LastSeg | ( | ) | const |
Definition at line 371 of file Cand.cxx.
References fSegs.
Referenced by AllHits(), IsExtremalChunkComplete(), dt::Chain::LastSeg(), dt::DiscreteTracker::PossibleNextSegs(), and ShortenOne().
Definition at line 384 of file Cand.cxx.
References ana::assert(), fChunks, IsExtremalChunkComplete(), dt::kDownstream, dt::kUpstream, PopFirstSeg(), PopLastSeg(), and TryAddSeg().
Referenced by dt::DiscreteTracker::TryExtendCand().
|
inlineprotected |
Definition at line 112 of file Cand.h.
Referenced by AllHits(), ClosestToEndCell(), and EstimateStraightLine().
|
inline |
Cand dt::Cand::MaybeFlip | ( | bool & | ok | ) | const |
Definition at line 547 of file Cand.cxx.
References AddChunk(), make_associated_cosmic_defs::chunk, fChunks, fSegs, fUp, fView, dt::Chunk::GetSegs(), it, dt::kDownstream, runNovaSAM::ret, dt::Chunk::SetUp(), and TryAddSeg().
Referenced by dt::DiscreteTracker::DotScore(), and dt::DiscreteTracker::TryExtendCand().
|
inline |
|
protected |
Definition at line 127 of file Cand.cxx.
References cmax, dz, dt::Segment::GetSubSeg(), dt::kDownstream, dt::kUpstream, and dt::Segment::zL.
Referenced by PopSegHelper(), and TryAddSeg().
|
protected |
Definition at line 110 of file Cand.cxx.
References ana::assert(), dz, std::max(), std::min(), dt::SubSeg::y0, dt::SubSeg::y1, and dt::SubSeg::z.
|
inline |
Definition at line 41 of file Cand.h.
Referenced by dt::Chain::Add(), dt::Chain::AddFront(), and dt::DiscreteTracker::TryExtendChainOne().
int dt::Cand::NHitPlanes | ( | ) | const |
Definition at line 342 of file Cand.cxx.
References fChunks, it, and runNovaSAM::ret.
Referenced by operator<().
|
inline |
Definition at line 85 of file Cand.h.
References cmax, febshutoff_auto::end, art::left(), operator==(), and NDAPDHVSetting::plane.
Referenced by dt::Chain::Add(), dt::Chain::AddFront(), dt::DiscreteTracker::BestSeed(), dt::DiscreteTracker::DotScore(), dt::DiscreteTracker::RecoDiscrete(), dt::DiscreteTracker::TryExtendCand(), dt::DiscreteTracker::TryExtendCandOne(), and dt::DiscreteTracker::TryExtendChainOne().
bool dt::Cand::operator< | ( | const Cand & | rhs | ) | const |
Definition at line 80 of file Cand.cxx.
References AllHits(), FirstChunk(), fNDeadChunks, fSegs, NHitPlanes(), dt::Chunk::Plane(), and art::PtrVector< T >::size().
bool dt::Cand::operator== | ( | const Cand & | rhs | ) | const |
void dt::Cand::PopFirstChunk | ( | ) |
Definition at line 53 of file Cand.cxx.
References fAllHitsDirty, fChunks, fNChunks, and fNDeadChunks.
Referenced by ShortenOne().
void dt::Cand::PopFirstSeg | ( | ) |
Definition at line 212 of file Cand.cxx.
References ana::assert(), fSegs, dt::kUpstream, and PopSegHelper().
Referenced by MarkExtremalChunkShower(), and ShortenOne().
void dt::Cand::PopLastChunk | ( | ) |
Definition at line 67 of file Cand.cxx.
References fAllHitsDirty, fChunks, fNChunks, and fNDeadChunks.
Referenced by ShortenOne().
void dt::Cand::PopLastSeg | ( | ) |
Definition at line 223 of file Cand.cxx.
References ana::assert(), fSegs, dt::kDownstream, and PopSegHelper().
Referenced by MarkExtremalChunkShower(), and ShortenOne().
Definition at line 234 of file Cand.cxx.
References ana::assert(), cmax, e, fAllCMax, fAllCMin, fAllMMax, fAllMMin, fSegs, it, dt::kDownstream, MinMaxLines(), and TryAddSeg().
Referenced by PopFirstSeg(), and PopLastSeg().
Definition at line 533 of file Cand.cxx.
References FirstSeg(), dt::kDownstream, LastSeg(), art::left(), PopFirstChunk(), PopFirstSeg(), PopLastChunk(), and PopLastSeg().
Referenced by dt::DiscreteTracker::TryExtendChainOne().
rb::Track dt::Cand::ToTrack | ( | ) | const |
Definition at line 453 of file Cand.cxx.
References rb::Cluster::Add(), rb::Track::AppendTrajectoryPoint(), EstimateStraightLine(), fChunks, fView, it, runNovaSAM::ret, y1, and submit_syst::y2.
Referenced by dt::DiscreteTracker::RecoOneTrack().
void dt::Cand::TrimBack | ( | ) |
Definition at line 520 of file Cand.cxx.
References fAllHitsDirty, fChunks, fSegs, and NDAPDHVSetting::plane.
void dt::Cand::TrimFront | ( | ) |
Definition at line 507 of file Cand.cxx.
References fAllHitsDirty, fChunks, fSegs, and NDAPDHVSetting::plane.
Appends seg to fSegs and updates internal state reflecting limits on the possible straight lines. If the new seg is impossible to accomodate, returns false and guarantees not to change any state.
Definition at line 150 of file Cand.cxx.
References ana::assert(), cmax, ExtremalSeg(), fAllCMax, fAllCMin, fAllHitsDirty, fAllMMax, fAllMMin, fSegs, fUp, it, dt::kDownstream, dt::Segment::left, std::max(), std::min(), and MinMaxLines().
Referenced by dt::DiscreteTracker::BestSeed(), MarkExtremalChunkShower(), MaybeFlip(), PopSegHelper(), TryAddSegOutOfOrder(), and dt::DiscreteTracker::TryExtendCandOne().
bool dt::Cand::TryAddSegOutOfOrder | ( | const Segment & | seg | ) |
Definition at line 202 of file Cand.cxx.
References fSegs, dt::kDownstream, and TryAddSeg().
|
inline |
Definition at line 61 of file Cand.h.
Referenced by dt::DiscreteTracker::BestSeed(), and dt::DiscreteTracker::PossibleNextSegs().
|
inline |
Definition at line 40 of file Cand.h.
Referenced by dt::Chain::ToTrack().
|
protected |
Definition at line 119 of file Cand.h.
Referenced by PopSegHelper(), and TryAddSeg().
|
protected |
Definition at line 119 of file Cand.h.
Referenced by PopSegHelper(), and TryAddSeg().
|
mutableprotected |
|
mutableprotected |
Definition at line 126 of file Cand.h.
Referenced by AddChunk(), AllHits(), PopFirstChunk(), PopLastChunk(), TrimBack(), TrimFront(), and TryAddSeg().
|
protected |
Definition at line 119 of file Cand.h.
Referenced by PopSegHelper(), and TryAddSeg().
|
protected |
Definition at line 119 of file Cand.h.
Referenced by PopSegHelper(), and TryAddSeg().
|
protected |
Definition at line 124 of file Cand.h.
Referenced by AddChunk(), AllHits(), FindChunk(), FirstChunk(), IsAllShower(), LastChunk(), MarkExtremalChunkShower(), MaybeFlip(), NHitPlanes(), PopFirstChunk(), PopLastChunk(), ToTrack(), TrimBack(), and TrimFront().
|
protected |
Definition at line 121 of file Cand.h.
Referenced by AddChunk(), AllHits(), PopFirstChunk(), and PopLastChunk().
|
protected |
Definition at line 121 of file Cand.h.
Referenced by AddChunk(), operator<(), PopFirstChunk(), and PopLastChunk().
|
protected |
Definition at line 123 of file Cand.h.
Referenced by AllHits(), EstimateStraightLine(), FirstSeg(), LastSeg(), MaybeFlip(), operator<(), operator==(), PopFirstSeg(), PopLastSeg(), PopSegHelper(), TrimBack(), TrimFront(), TryAddSeg(), and TryAddSegOutOfOrder().
|
protected |
Definition at line 117 of file Cand.h.
Referenced by AddChunk(), MaybeFlip(), operator==(), and TryAddSeg().
|
protected |
Definition at line 115 of file Cand.h.
Referenced by ClosestToEndCell(), MaybeFlip(), operator==(), and ToTrack().