-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathSuperaBBoxInteraction.h
84 lines (65 loc) · 2.03 KB
/
SuperaBBoxInteraction.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
/**
* \file SuperaBBoxInteraction.h
*
* \ingroup Package_Name
*
* \brief Class def header for a class SuperaBBoxInteraction
*
* @author kazuhiro
*/
/** \addtogroup Package_Name
@{*/
#ifndef __SUPERABBOXINTERACTION_H__
#define __SUPERABBOXINTERACTION_H__
//#ifndef __CINT__
//#ifndef __CLING__
#include "SuperaBase.h"
namespace larcv {
/**
\class ProcessBase
User defined class SuperaBBoxInteraction ... these comments are used to generate
doxygen documentation!
*/
class SuperaBBoxInteraction : public SuperaBase {
public:
/// Default constructor
SuperaBBoxInteraction(const std::string name = "SuperaBBoxInteraction");
/// Default destructor
~SuperaBBoxInteraction() {}
void configure(const PSet&);
void initialize();
template <class T> void AdaptBBoxToSED(std::vector<T> const& sedep_v, larcv::BBox3D& bbox);
bool process(IOManager& mgr);
void finalize();
private:
bool _use_sed_lite; ///< whether to use sim::SimEnergyDeposit or sim::SimEnergyDepositLite
unsigned short _origin;
double _xlen, _ylen, _zlen;
double _xvox, _yvox, _zvox;
larcv::BBox3D _world_bounds;
larcv::BBox3D _bbox;
std::vector<std::string> _cluster3d_labels;
std::vector<std::string> _tensor3d_labels;
bool _use_fixed_bbox;
std::vector<double> _bbox_bottom;
bool update_bbox(larcv::BBox3D& bbox, const larcv::Point3D& pt);
void randomize_bbox_center(larcv::BBox3D& bbox);
};
/**
\class larcv::SuperaBBoxInteractionFactory
\brief A concrete factory class for larcv::SuperaBBoxInteraction
*/
class SuperaBBoxInteractionProcessFactory : public ProcessFactoryBase {
public:
/// ctor
SuperaBBoxInteractionProcessFactory() { ProcessFactory::get().add_factory("SuperaBBoxInteraction", this); }
/// dtor
~SuperaBBoxInteractionProcessFactory() {}
/// creation method
ProcessBase* create(const std::string instance_name) { return new SuperaBBoxInteraction(instance_name); }
};
}
//#endif
//#endif
#endif
/** @} */ // end of doxygen group