LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Class holding the deconvoluted signals from a channel. More...
#include "Wire.h"
Public Types | |
typedef lar::sparse_vector< float > | RegionsOfInterest_t |
a region of interest is a pair (TDC offset, readings) More... | |
Public Member Functions | |
Wire () | |
Default constructor: a wire with no signal information. More... | |
Wire (RegionsOfInterest_t const &sigROIlist, raw::ChannelID_t channel, geo::View_t view) | |
Constructor: uses specified signal in regions of interest. More... | |
Wire (RegionsOfInterest_t &&sigROIlist, raw::ChannelID_t channel, geo::View_t view) | |
Constructor: uses specified signal in regions of interest. More... | |
bool | operator< (const Wire &than) const |
Returns whether this channel ID is smaller than the other. More... | |
Accessors | |
std::vector< float > | Signal () const |
Return a zero-padded full length vector filled with RoI signal. More... | |
const RegionsOfInterest_t & | SignalROI () const |
Returns the list of regions of interest. More... | |
size_t | NSignal () const |
Returns the number of time ticks, or samples, in the channel. More... | |
geo::View_t | View () const |
Returns the view the channel belongs to. More... | |
raw::ChannelID_t | Channel () const |
Returns the ID of the channel (or InvalidChannelID) More... | |
Private Attributes | |
raw::ChannelID_t | fChannel |
ID of the associated channel. More... | |
geo::View_t | fView |
View corresponding to the plane of this wire. More... | |
RegionsOfInterest_t | fSignalROI |
Signal on the channel. More... | |
Friends | |
class | WireCreator |
Class holding the deconvoluted signals from a channel.
The channel content is expected to have been filtered from noise and corrected for electronics response. The content is presented as calibrated ADC counts, pedestal removed, as function of time in discrete TDC units (use TimeService to discover the exact extent of each tick). The content is organized as time intervals where some signal is present ("regions of interest", RoI), outside which we assume no signal, i.e, calibrated ADC counts of 0. Strictly speaking, the definition of the regions of interest is a negative one: we first define where we are sure no signal is present; the rest will constitute regions of interest. The identification of such regions is responsibility of the algorithm creating the Wire object. In the simple approach, the whole readout window is stored in a single region of interest, meaning that we don't claim any of the channel signal to be definitely signal free.
Algorithms using the regions of interest can access the channel signal information either ignoring the regions of interest, and being potentially flooded by zeroes from the non-signal regions:
for (float ADCcount: wire.Signal()) ...
or they can analyze region by region:
for (auto iROI = wire.begin_range(); wire.end_range(); ++iROI) { const datarange_t& ROI = *iROI; const int FirstTick = ROI.begin_index(); const int EndTick = ROI.end_index(); const float FirstADC = ROI[FirstTick]; // index access is by absolute tick number for (float ADC: ROI) // ... or you can just iterate through // ... } // for
Note that the indexed access is always by absolute tick number. More examples of the use of SignalROI() return value are documented in lar::sparse_vector .
Each channel is associated with a raw::RawDigit object. These associations should be stored together with recob::Wire by the producer in a art::Assns data product.
typedef lar::sparse_vector<float> recob::Wire::RegionsOfInterest_t |
recob::Wire::Wire | ( | ) |
Default constructor: a wire with no signal information.
Definition at line 17 of file Wire.cxx.
recob::Wire::Wire | ( | RegionsOfInterest_t const & | sigROIlist, |
raw::ChannelID_t | channel, | ||
geo::View_t | view | ||
) |
Constructor: uses specified signal in regions of interest.
sigROIlist | signal organized in regions of interest |
channel | the ID of the channel |
view | the view the channel belongs to |
The information used from the raw digit are the channel ID and the length in samples (TDC ticks) of the original readout window.
Signal is copied into the Wire object. If possible, use the other constructor that moves the data instead.
Definition at line 24 of file Wire.cxx.
recob::Wire::Wire | ( | RegionsOfInterest_t && | sigROIlist, |
raw::ChannelID_t | channel, | ||
geo::View_t | view | ||
) |
Constructor: uses specified signal in regions of interest.
sigROIlist | signal organized in regions of interest |
channel | the ID of the channel |
view | the view the channel belongs to |
The information used from the raw digit are the channel ID and the length in samples (TDC ticks) of the original readout window.
Signal information is moved from sigROIlist, that becomes empty.
Definition at line 35 of file Wire.cxx.
|
inline |
Returns the ID of the channel (or InvalidChannelID)
Definition at line 164 of file Wire.h.
Referenced by hit::RFFHitFinderAlg::EmplaceHit(), lar_pandora::PFParticleHitDumper::FillRecoWires(), hit::HitAnaAlg::FillWireInfo(), operator<(), recob::HitCollectionAssociator::prepare_associations(), recob::HitRefinerAssociator::prepare_associations(), caldata::DumpWires::PrintWire(), hit::TTHitFinder::produce(), hit::HitCheater::produce(), hit::FFTHitFinder::produce(), hit::GausHitFinder::produce(), hit::DPRawHitFinder::produce(), hit::CCHitFinderAlg::RunCCHitFinder(), and hit::CCHitFinderAlg::StoreHits().
|
inline |
Returns the number of time ticks, or samples, in the channel.
Definition at line 162 of file Wire.h.
Referenced by caldata::DumpWires::PrintWire().
|
inline |
Returns whether this channel ID is smaller than the other.
Definition at line 165 of file Wire.h.
References Channel().
std::vector< float > recob::Wire::Signal | ( | ) | const |
Return a zero-padded full length vector filled with RoI signal.
Definition at line 47 of file Wire.cxx.
References lar::sparse_vector< T >::begin(), lar::sparse_vector< T >::end(), and fSignalROI.
Referenced by hit::GausHitFinderAna::analyze(), lar_pandora::PFParticleHitDumper::FillRecoWires(), hit::TTHitFinder::produce(), hit::FFTHitFinder::produce(), and hit::CCHitFinderAlg::RunCCHitFinder().
|
inline |
Returns the list of regions of interest.
Definition at line 161 of file Wire.h.
Referenced by hit::HitAnaAlg::FillWireInfo(), caldata::DumpWires::PrintWire(), hit::GausHitFinder::produce(), and hit::DPRawHitFinder::produce().
|
inline |
Returns the view the channel belongs to.
Definition at line 163 of file Wire.h.
Referenced by hit::RFFHitFinderAlg::EmplaceHit(), hit::HitAnaAlg::FillWireInfo(), caldata::DumpWires::PrintWire(), and hit::CCHitFinderAlg::StoreHits().
|
friend |
|
private |
|
private |
|
private |