#include <DataProviderAlg.h>
Classes | |
struct | Config |
Public Types | |
enum | EDownscaleMode { kMax = 1, kMaxMean = 2, kMean = 3 } |
Public Member Functions | |
DataProviderAlg (const fhicl::ParameterSet &pset) | |
DataProviderAlg (const Config &config) | |
virtual | ~DataProviderAlg () |
bool | setWireDriftData (const detinfo::DetectorClocksData &clock_data, const detinfo::DetectorPropertiesData &det_prop, const std::vector< recob::Wire > &wires, unsigned int plane, unsigned int tpc, unsigned int cryo) |
std::vector< float > const & | wireData (size_t widx) const |
std::vector< std::vector< float > > | getPatch (size_t wire, float drift, size_t patchSizeW, size_t patchSizeD) const |
float | getPixelOrZero (int wire, int drift) const |
double | getAdcSum () const |
size_t | getAdcArea () const |
float | poolMax (int wire, int drift, size_t r=0) const |
Pool max value in a patch around the wire/drift pixel. More... | |
unsigned int | Cryo () const |
Pool sum of pixels in a patch around the wire/drift pixel. More... | |
unsigned int | TPC () const |
unsigned int | Plane () const |
unsigned int | NWires () const |
unsigned int | NScaledDrifts () const |
unsigned int | NCachedDrifts () const |
unsigned int | DriftWindow () const |
float | ZeroLevel () const |
Level of zero ADC after scaling. More... | |
double | LifetimeCorrection (detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop, double tick) const |
Protected Member Functions | |
std::vector< float > | downscaleMax (std::size_t dst_size, std::vector< float > const &adc, size_t tick0) const |
std::vector< float > | downscaleMaxMean (std::size_t dst_size, std::vector< float > const &adc, size_t tick0) const |
std::vector< float > | downscaleMean (std::size_t dst_size, std::vector< float > const &adc, size_t tick0) const |
std::vector< float > | downscale (std::size_t dst_size, std::vector< float > const &adc, size_t tick0) const |
size_t | getDriftIndex (float drift) const |
std::optional< std::vector< float > > | setWireData (std::vector< float > const &adc, size_t wireIdx) const |
bool | patchFromDownsampledView (size_t wire, float drift, size_t size_w, size_t size_d, std::vector< std::vector< float >> &patch) const |
bool | patchFromOriginalView (size_t wire, float drift, size_t size_w, size_t size_d, std::vector< std::vector< float >> &patch) const |
virtual DataProviderAlgView | resizeView (detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop, size_t wires, size_t drifts) |
Protected Attributes | |
DataProviderAlgView | fAlgView |
EDownscaleMode | fDownscaleMode |
size_t | fDriftWindow |
bool | fDownscaleFullView |
float | fDriftWindowInv |
calo::CalorimetryAlg | fCalorimetryAlg |
geo::GeometryCore const * | fGeometry |
Private Member Functions | |
float | scaleAdcSample (float val) const |
void | scaleAdcSamples (std::vector< float > &values) const |
void | applyBlur () |
void | addWhiteNoise () |
void | addCoherentNoise () |
Private Attributes | |
std::vector< float > | fAmplCalibConst |
bool | fCalibrateAmpl |
bool | fCalibrateLifetime |
unsigned int | fCryo = 9999 |
unsigned int | fTPC = 9999 |
unsigned int | fPlane = 9999 |
float | fAdcMax |
float | fAdcMin |
float | fAdcScale |
float | fAdcOffset |
float | fAdcZero |
double | fAdcSumOverThr |
double | fAdcSumThr |
size_t | fAdcAreaOverThr |
CLHEP::HepJamesRandom | fRndEngine |
std::vector< float > | fBlurKernel |
float | fNoiseSigma |
float | fCoherentSigma |
Base class providing data for training / running image based classifiers. It can be used also for any other algorithms where 2D projection image is useful. Currently the image is 32-bit fp / pixel, as sson as have time will template it so e.g. byte pixels would be possible.
Definition at line 54 of file DataProviderAlg.h.
Enumerator | |
---|---|
kMax | |
kMaxMean | |
kMean |
Definition at line 56 of file DataProviderAlg.h.
|
inline |
Definition at line 93 of file DataProviderAlg.h.
img::DataProviderAlg::DataProviderAlg | ( | const Config & | config | ) |
Definition at line 26 of file DataProviderAlg.cxx.
|
virtualdefault |
|
private |
Definition at line 549 of file DataProviderAlg.cxx.
|
private |
Definition at line 530 of file DataProviderAlg.cxx.
|
private |
Definition at line 424 of file DataProviderAlg.cxx.
|
inline |
Pool sum of pixels in a patch around the wire/drift pixel.
Definition at line 167 of file DataProviderAlg.h.
|
inlineprotected |
Definition at line 237 of file DataProviderAlg.h.
|
protected |
Definition at line 192 of file DataProviderAlg.cxx.
|
protected |
Definition at line 214 of file DataProviderAlg.cxx.
|
protected |
Definition at line 250 of file DataProviderAlg.cxx.
|
inline |
Definition at line 198 of file DataProviderAlg.h.
|
inline |
Definition at line 155 of file DataProviderAlg.h.
|
inline |
Definition at line 150 of file DataProviderAlg.h.
|
inlineprotected |
Definition at line 248 of file DataProviderAlg.h.
|
inline |
Return patch of data centered on the wire and drift, witht the size in (downscaled) pixels givent with patchSizeW and patchSizeD. Pad with the zero-level calue if patch extends beyond the event projection.
Definition at line 120 of file DataProviderAlg.h.
|
inline |
Return value from the ADC buffer, or zero if coordinates are out of the view; will scale the drift according to the downscale settings.
Definition at line 139 of file DataProviderAlg.h.
|
inline |
Definition at line 211 of file DataProviderAlg.h.
|
inline |
Definition at line 193 of file DataProviderAlg.h.
|
inline |
Definition at line 188 of file DataProviderAlg.h.
|
inline |
Definition at line 183 of file DataProviderAlg.h.
|
protected |
Definition at line 450 of file DataProviderAlg.cxx.
|
protected |
Definition at line 488 of file DataProviderAlg.cxx.
|
inline |
Definition at line 177 of file DataProviderAlg.h.
float img::DataProviderAlg::poolMax | ( | int | wire, |
int | drift, | ||
size_t | r = 0 |
||
) | const |
Pool max value in a patch around the wire/drift pixel.
Definition at line 140 of file DataProviderAlg.cxx.
|
protectedvirtual |
Reimplemented in nnet::TrainingDataAlg.
Definition at line 109 of file DataProviderAlg.cxx.
|
private |
Definition at line 369 of file DataProviderAlg.cxx.
|
private |
Definition at line 384 of file DataProviderAlg.cxx.
|
protected |
Definition at line 272 of file DataProviderAlg.cxx.
bool img::DataProviderAlg::setWireDriftData | ( | const detinfo::DetectorClocksData & | clock_data, |
const detinfo::DetectorPropertiesData & | det_prop, | ||
const std::vector< recob::Wire > & | wires, | ||
unsigned int | plane, | ||
unsigned int | tpc, | ||
unsigned int | cryo | ||
) |
Definition at line 296 of file DataProviderAlg.cxx.
|
inline |
Definition at line 172 of file DataProviderAlg.h.
|
inline |
Definition at line 111 of file DataProviderAlg.h.
|
inline |
|
private |
Definition at line 289 of file DataProviderAlg.h.
|
private |
Definition at line 287 of file DataProviderAlg.h.
|
private |
Definition at line 287 of file DataProviderAlg.h.
|
private |
Definition at line 287 of file DataProviderAlg.h.
|
private |
Definition at line 287 of file DataProviderAlg.h.
|
private |
Definition at line 288 of file DataProviderAlg.h.
|
private |
Definition at line 288 of file DataProviderAlg.h.
|
private |
Definition at line 287 of file DataProviderAlg.h.
|
protected |
Definition at line 219 of file DataProviderAlg.h.
|
private |
Definition at line 284 of file DataProviderAlg.h.
|
private |
Definition at line 294 of file DataProviderAlg.h.
|
private |
Definition at line 285 of file DataProviderAlg.h.
|
private |
Definition at line 285 of file DataProviderAlg.h.
|
protected |
Definition at line 276 of file DataProviderAlg.h.
|
private |
Definition at line 300 of file DataProviderAlg.h.
|
private |
Definition at line 286 of file DataProviderAlg.h.
|
protected |
Definition at line 224 of file DataProviderAlg.h.
|
protected |
Definition at line 220 of file DataProviderAlg.h.
|
protected |
Definition at line 223 of file DataProviderAlg.h.
|
protected |
Definition at line 225 of file DataProviderAlg.h.
|
protected |
Definition at line 279 of file DataProviderAlg.h.
|
private |
Definition at line 297 of file DataProviderAlg.h.
|
private |
Definition at line 286 of file DataProviderAlg.h.
|
private |
Definition at line 291 of file DataProviderAlg.h.
|
private |
Definition at line 286 of file DataProviderAlg.h.