15 : fDim(dim), fViews(views), fUsePixelTruth(usePixelTruth)
32 if (coordinates.size() !=
fDim) {
34 <<
"Coordinate vector with size " << coordinates.size()
35 <<
" does not match sparse pixel map dimension " <<
fDim;
40 <<
"Pixel truth is enabled for this SparsePixelMap, so you must include pixel PDG and " 41 <<
"track ID when calling AddHit.";
51 std::vector<float> energies, std::vector<std::string> processes) {
53 if (coordinates.size() !=
fDim) {
55 <<
"Coordinate vector with size " << coordinates.size()
56 <<
" does not match sparse pixel map dimension " <<
fDim;
61 <<
"Pixel truth is disabled for this SparsePixelMap, but AddHit call includes " 62 <<
"pixel PDG, track ID and Energy";
76 std::vector<unsigned int> ret(
fViews);
77 for (
size_t it = 0; it <
fViews; ++it) {
void AddHit(unsigned int view, std::vector< float > coordinates, std::vector< float > features)
Default AddHit implementation, which just adds pixel value and coordinates.
std::vector< std::vector< std::vector< std::string > > > fProcesses
unsigned int fViews
Number of views.
std::vector< std::vector< std::vector< int > > > fPixelPDGs
True particle PDG responsible for pixel.
std::vector< std::vector< std::vector< int > > > fPixelTrackIDs
G4 track IDs responsible for pixelel.
std::vector< std::vector< std::vector< float > > > fFeatures
Features of non-zero pixels.
Utility class for truth labels.
std::vector< unsigned int > GetNPixels() const
std::vector< std::vector< std::vector< float > > > fCoordinates
Coordinates of non-zero pixels.
std::vector< std::vector< std::vector< float > > > fPixelEnergies
bool fUsePixelTruth
Whether to use a per-pixel ground truth for pixel segmentation.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Sparse pixel map for CVN.
unsigned int fDim
Dimensionality of each pixel map.