forked from kvtsang/Supera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Voxel3DSlicer.h
96 lines (71 loc) · 2.19 KB
/
Voxel3DSlicer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
* \file Voxel3DSlicer.h
*
* \ingroup Package_Name
*
* \brief Class def header for a class Voxel3DSlicer
*
* @author kazuhiro
*/
/** \addtogroup Package_Name
@{*/
#ifndef __VOXEL3DSLICER_H__
#define __VOXEL3DSLICER_H__
#include "FMWKInterface.h"
#include "WireRange3D.h"
#include "ImageMetaMakerBase.h"
namespace supera {
/**
\class Voxel3DSlicer
User defined class Voxel3DSlicer ... these comments are used to generate
doxygen documentation!
*/
class Voxel3DSlicer : public ImageMetaMakerBase {
public:
/// Default constructor
Voxel3DSlicer() : ImageMetaMakerBase("Voxel3DSlicer")
, _slicer()
{}
/// Default destructor
~Voxel3DSlicer() {}
static bool Is(const ImageMetaMakerBase* ptr)
{ return (ptr && ptr->name() == "Voxel3DSlicer"); }
void configure(const supera::Config_t&);
void AddConstraint(double x, double y, double z);
void AddConstraint(const supera::LArMCTruth_t& mctruth);
void AddConstraint(const std::vector<supera::LArMCTruth_t>& mctruth_v);
void
GenerateMeta(const std::vector<supera::LArSimCh_t>& simch_v,
const int time_offset);
void
GenerateMeta(const std::vector<supera::LArSimCh_t>& simch_v,
const int time_offset,
const std::vector<int>& trackid_v);
void
GenerateMeta(const int time_offset);
void ClearEventData();
bool Test() const;
inline const std::vector<larcv::ImageMeta>& Meta() const
{ return _meta_v;}
inline const larcv::Voxel3DMeta& Meta3D() const
{ return _meta3d; }
private:
unsigned short _origin;
supera::WireRange3D _slicer;
bool _apply_sce;
double _t0_g4ns;
std::vector<larcv::ImageMeta> _meta_v;
larcv::Voxel3DMeta _meta3d;
void DeriveMeta(std::vector<larcv::ImageMeta>& meta_v,
larcv::Voxel3DMeta& meta3d,
const std::vector<supera::GridPoint3D>& point_v,
const int time_offset ) const;
void
GenerateMeta(const std::vector<supera::LArSimCh_t>& simch_v,
const int time_offset,
const std::vector<int>& trackid_v,
const bool use_track_id);
};
}
#endif
/** @} */ // end of doxygen group