#include <PointIdAlg.h>
Classes | |
struct | Config |
Public Member Functions | |
PointIdAlg (const fhicl::ParameterSet &pset) | |
PointIdAlg (const Config &config) | |
~PointIdAlg () override | |
std::vector< std::string > const & | outputLabels () const |
network output labels More... | |
float | predictIdValue (unsigned int wire, float drift, size_t outIdx=0) const |
calculate single-value prediction (2-class probability) for [wire, drift] point More... | |
std::vector< float > | predictIdVector (unsigned int wire, float drift) const |
calculate multi-class probabilities for [wire, drift] point More... | |
std::vector< std::vector< float > > | predictIdVectors (std::vector< std::pair< unsigned int, float >> points) const |
std::vector< std::vector< float > > const & | patchData2D () const |
std::vector< float > | patchData1D () const |
bool | isInsideFiducialRegion (unsigned int wire, float drift) const |
bool | isCurrentPatch (unsigned int wire, float drift) const |
bool | isSamePatch (unsigned int wire1, float drift1, unsigned int wire2, float drift2) const |
test if two wire/drift coordinates point to the same patch More... | |
![]() | |
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 |
Static Public Member Functions | |
static std::vector< float > | flattenData2D (std::vector< std::vector< float >> const &patch) |
Private Member Functions | |
bool | bufferPatch (size_t wire, float drift, std::vector< std::vector< float >> &patch) const |
bool | bufferPatch (size_t wire, float drift) const |
void | resizePatch () |
void | deleteNNet () |
Private Attributes | |
std::string | fNNetModelFilePath |
std::vector< std::string > | fNNetOutputs |
nnet::ModelInterface * | fNNet |
std::vector< std::vector< float > > | fWireDriftPatch |
size_t | fPatchSizeW |
size_t | fPatchSizeD |
size_t | fCurrentWireIdx |
size_t | fCurrentScaledDrift |
Additional Inherited Members | |
![]() | |
enum | EDownscaleMode { kMax = 1, kMaxMean = 2, kMean = 3 } |
![]() | |
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) |
![]() | |
DataProviderAlgView | fAlgView |
EDownscaleMode | fDownscaleMode |
size_t | fDriftWindow |
bool | fDownscaleFullView |
float | fDriftWindowInv |
calo::CalorimetryAlg | fCalorimetryAlg |
geo::GeometryCore const * | fGeometry |
Definition at line 88 of file PointIdAlg.h.
|
inline |
Definition at line 104 of file PointIdAlg.h.
nnet::PointIdAlg::PointIdAlg | ( | const Config & | config | ) |
Definition at line 152 of file PointIdAlg.cxx.
|
override |
Definition at line 183 of file PointIdAlg.cxx.
|
inlineprivate |
Definition at line 158 of file PointIdAlg.h.
|
inlineprivate |
Definition at line 181 of file PointIdAlg.h.
|
inlineprivate |
Definition at line 188 of file PointIdAlg.h.
|
static |
Definition at line 294 of file PointIdAlg.cxx.
bool nnet::PointIdAlg::isCurrentPatch | ( | unsigned int | wire, |
float | drift | ||
) | const |
test if wire/drift coordinates point to the current patch (so maybe the cnn output does not need to be recalculated)
Definition at line 277 of file PointIdAlg.cxx.
bool nnet::PointIdAlg::isInsideFiducialRegion | ( | unsigned int | wire, |
float | drift | ||
) | const |
Definition at line 316 of file PointIdAlg.cxx.
bool nnet::PointIdAlg::isSamePatch | ( | unsigned int | wire1, |
float | drift1, | ||
unsigned int | wire2, | ||
float | drift2 | ||
) | const |
test if two wire/drift coordinates point to the same patch
Definition at line 259 of file PointIdAlg.cxx.
|
inline |
|
inline |
Definition at line 134 of file PointIdAlg.h.
|
inline |
Definition at line 129 of file PointIdAlg.h.
float nnet::PointIdAlg::predictIdValue | ( | unsigned int | wire, |
float | drift, | ||
size_t | outIdx = 0 |
||
) | const |
calculate single-value prediction (2-class probability) for [wire, drift] point
Definition at line 199 of file PointIdAlg.cxx.
std::vector< float > nnet::PointIdAlg::predictIdVector | ( | unsigned int | wire, |
float | drift | ||
) | const |
calculate multi-class probabilities for [wire, drift] point
Definition at line 221 of file PointIdAlg.cxx.
std::vector< std::vector< float > > nnet::PointIdAlg::predictIdVectors | ( | std::vector< std::pair< unsigned int, float >> | points | ) | const |
Definition at line 240 of file PointIdAlg.cxx.
|
private |
Definition at line 190 of file PointIdAlg.cxx.
|
mutableprivate |
Definition at line 156 of file PointIdAlg.h.
|
mutableprivate |
Definition at line 156 of file PointIdAlg.h.
|
private |
Definition at line 151 of file PointIdAlg.h.
|
private |
Definition at line 149 of file PointIdAlg.h.
|
private |
Definition at line 150 of file PointIdAlg.h.
|
private |
Definition at line 154 of file PointIdAlg.h.
|
private |
Definition at line 154 of file PointIdAlg.h.
|
mutableprivate |
Definition at line 153 of file PointIdAlg.h.