#include <DataProviderAlg.h>
Classes | |
struct | Config |
Public Types | |
enum | EDownscaleMode { kMax = 1, kMaxMean = 2, kMean = 3 } |
Public Member Functions | |
DataProviderAlg (const fhicl::ParameterSet &pset) | |
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 60 of file DataProviderAlg.h.
Enumerator | |
---|---|
kMax | |
kMaxMean | |
kMean |
Definition at line 62 of file DataProviderAlg.h.
|
inline |
Definition at line 99 of file DataProviderAlg.h.
|
virtualdefault |
|
private |
Definition at line 555 of file DataProviderAlg.cxx.
|
private |
Definition at line 536 of file DataProviderAlg.cxx.
|
private |
Definition at line 430 of file DataProviderAlg.cxx.
|
inline |
Pool sum of pixels in a patch around the wire/drift pixel.
Definition at line 173 of file DataProviderAlg.h.
|
inlineprotected |
Definition at line 243 of file DataProviderAlg.h.
|
protected |
Definition at line 198 of file DataProviderAlg.cxx.
|
protected |
Definition at line 220 of file DataProviderAlg.cxx.
|
protected |
Definition at line 256 of file DataProviderAlg.cxx.
|
inline |
Definition at line 204 of file DataProviderAlg.h.
|
inline |
Definition at line 161 of file DataProviderAlg.h.
|
inline |
Definition at line 156 of file DataProviderAlg.h.
|
inlineprotected |
Definition at line 254 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 126 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 145 of file DataProviderAlg.h.
|
inline |
Definition at line 217 of file DataProviderAlg.h.
|
inline |
Definition at line 199 of file DataProviderAlg.h.
|
inline |
Definition at line 194 of file DataProviderAlg.h.
|
inline |
Definition at line 189 of file DataProviderAlg.h.
|
protected |
Definition at line 456 of file DataProviderAlg.cxx.
|
protected |
Definition at line 494 of file DataProviderAlg.cxx.
|
inline |
Definition at line 183 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 146 of file DataProviderAlg.cxx.
|
protectedvirtual |
Definition at line 115 of file DataProviderAlg.cxx.
|
private |
Definition at line 375 of file DataProviderAlg.cxx.
|
private |
Definition at line 390 of file DataProviderAlg.cxx.
|
protected |
Definition at line 278 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 302 of file DataProviderAlg.cxx.
|
inline |
Definition at line 178 of file DataProviderAlg.h.
|
inline |
Definition at line 117 of file DataProviderAlg.h.
|
inline |
|
private |
Definition at line 295 of file DataProviderAlg.h.
|
private |
Definition at line 293 of file DataProviderAlg.h.
|
private |
Definition at line 293 of file DataProviderAlg.h.
|
private |
Definition at line 293 of file DataProviderAlg.h.
|
private |
Definition at line 293 of file DataProviderAlg.h.
|
private |
Definition at line 294 of file DataProviderAlg.h.
|
private |
Definition at line 294 of file DataProviderAlg.h.
|
private |
Definition at line 293 of file DataProviderAlg.h.
|
protected |
Definition at line 225 of file DataProviderAlg.h.
|
private |
Definition at line 290 of file DataProviderAlg.h.
|
private |
Definition at line 300 of file DataProviderAlg.h.
|
private |
Definition at line 291 of file DataProviderAlg.h.
|
private |
Definition at line 291 of file DataProviderAlg.h.
|
protected |
Definition at line 282 of file DataProviderAlg.h.
|
private |
Definition at line 306 of file DataProviderAlg.h.
|
private |
Definition at line 292 of file DataProviderAlg.h.
|
protected |
Definition at line 230 of file DataProviderAlg.h.
|
protected |
Definition at line 226 of file DataProviderAlg.h.
|
protected |
Definition at line 229 of file DataProviderAlg.h.
|
protected |
Definition at line 231 of file DataProviderAlg.h.
|
protected |
Definition at line 285 of file DataProviderAlg.h.
|
private |
Definition at line 303 of file DataProviderAlg.h.
|
private |
Definition at line 292 of file DataProviderAlg.h.
|
private |
Definition at line 297 of file DataProviderAlg.h.
|
private |
Definition at line 292 of file DataProviderAlg.h.