Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
dt::Channel Class Reference

Representation of the state of a single detector channel. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/DiscreteTracker/Channel.h"

Inheritance diagram for dt::Channel:
geo::OfflineChan

Public Types

enum  Type_t { kHit, kUnhit, kDead, kFound }
 

Public Member Functions

 Channel (int plane, int cell)
 
void SetDead ()
 
void SetHit (art::Ptr< rb::CellHit > chit)
 
void MarkHitFound ()
 
bool EverHit () const
 
Type_t Type () const
 
art::Ptr< rb::CellHitGetHit () const
 
int ToDBValidityChan () const
 
unsigned short Plane () const
 
unsigned short Cell () const
 
bool operator== (const OfflineChan &rhs) const
 
bool operator< (const OfflineChan &rhs) const
 

Static Public Member Functions

static OfflineChan FromDBValidityChan (int chan)
 

Protected Attributes

Type_t fType
 
art::Ptr< rb::CellHitfHit
 
unsigned short fPlane
 
unsigned short fCell
 

Detailed Description

Representation of the state of a single detector channel.

Definition at line 19 of file Channel.h.

Member Enumeration Documentation

Enumerator
kHit 
kUnhit 
kDead 
kFound 

Definition at line 27 of file Channel.h.

Constructor & Destructor Documentation

dt::Channel::Channel ( int  plane,
int  cell 
)

Definition at line 13 of file Channel.cxx.

Member Function Documentation

unsigned short geo::OfflineChan::Cell ( ) const
inlineinherited
bool dt::Channel::EverHit ( ) const

Definition at line 39 of file Channel.cxx.

References fType, kFound, and kHit.

40  {
41  return fType == kHit || fType == kFound;
42  }
Type_t fType
Definition: Channel.h:31
OfflineChan OfflineChan::FromDBValidityChan ( int  chan)
staticinherited
art::Ptr< rb::CellHit > dt::Channel::GetHit ( ) const

Definition at line 51 of file Channel.cxx.

References ana::assert(), fHit, fType, and kHit.

52  {
53  assert(fType == kHit);
54  return fHit;
55  }
art::Ptr< rb::CellHit > fHit
Definition: Channel.h:32
assert(nhit_max >=nhit_nbins)
Type_t fType
Definition: Channel.h:31
void dt::Channel::MarkHitFound ( )

Definition at line 32 of file Channel.cxx.

References ana::assert(), fType, kFound, and kHit.

Referenced by dt::DiscreteTracker::RecoDiscrete().

33  {
34  assert(fType == kHit);
35  fType = kFound;
36  }
assert(nhit_max >=nhit_nbins)
Type_t fType
Definition: Channel.h:31
bool OfflineChan::operator< ( const OfflineChan rhs) const
inherited

Definition at line 27 of file OfflineChan.cxx.

References geo::OfflineChan::fCell, and geo::OfflineChan::fPlane.

Referenced by geo::OfflineChan::operator==().

28  {
29  if(fPlane < rhs.fPlane) return true;
30  if(fPlane > rhs.fPlane) return false;
31  return fCell < rhs.fCell;
32  }
unsigned short fCell
Definition: OfflineChan.h:41
unsigned short fPlane
Definition: OfflineChan.h:41
bool geo::OfflineChan::operator== ( const OfflineChan rhs) const
inlineinherited

Definition at line 35 of file OfflineChan.h.

References geo::OfflineChan::fCell, geo::OfflineChan::fPlane, and geo::OfflineChan::operator<().

36  { return fPlane == rhs.fPlane && fCell == rhs.fCell; }
unsigned short fCell
Definition: OfflineChan.h:41
unsigned short fPlane
Definition: OfflineChan.h:41
unsigned short geo::OfflineChan::Plane ( ) const
inlineinherited
void dt::Channel::SetDead ( )

Definition at line 19 of file Channel.cxx.

References fType, and kDead.

Referenced by dt::View::Channel(), and dt::View::View().

20  {
21  fType = kDead;
22  }
Type_t fType
Definition: Channel.h:31
void dt::Channel::SetHit ( art::Ptr< rb::CellHit chit)

Definition at line 25 of file Channel.cxx.

References fHit, fType, and kHit.

Referenced by dt::View::View().

26  {
27  fType = kHit;
28  fHit = chit;
29  }
art::Ptr< rb::CellHit > fHit
Definition: Channel.h:32
Type_t fType
Definition: Channel.h:31
int OfflineChan::ToDBValidityChan ( ) const
inherited
Channel::Type_t dt::Channel::Type ( ) const

Definition at line 45 of file Channel.cxx.

References fType.

Referenced by dt::View::MakeChunkCombos(), dt::View::MakeChunks(), and dt::View::View().

46  {
47  return fType;
48  }
Type_t fType
Definition: Channel.h:31

Member Data Documentation

unsigned short geo::OfflineChan::fCell
protectedinherited
art::Ptr<rb::CellHit> dt::Channel::fHit
protected

Definition at line 32 of file Channel.h.

Referenced by GetHit(), and SetHit().

unsigned short geo::OfflineChan::fPlane
protectedinherited
Type_t dt::Channel::fType
protected

Definition at line 31 of file Channel.h.

Referenced by EverHit(), GetHit(), MarkHitFound(), SetDead(), SetHit(), and Type().


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