13 , _light_yield ( 40000. )
19 _gap = pset.get<
double > (
"SegmentSize" );
21 _dEdxMIP = pset.get<
double > (
"MIPdEdx" );
25 const ::geoalgo::Vector& pt_2,
31 double dist = pt_1.Dist(pt_2);
33 FLASH_INFO() <<
"Filling points between (" << pt_1[0] <<
"," << pt_1[1] <<
"," << pt_1[2] <<
")"
34 <<
" => (" << pt_2[0] <<
"," << pt_2[1] <<
"," << pt_2[2] <<
") ... dist="<<dist<<std::endl;
41 FLASH_DEBUG() <<
"Smaller than gap threshold (" <<
_gap <<
")" << std::endl
42 <<
"Traj pt (" << q_pt.
x <<
"," << q_pt.
y <<
"," << q_pt.
z <<
") q=" << q_pt.
q << std::endl;
43 Q_cluster.emplace_back(q_pt);
47 int num_div = int(dist /
_gap);
51 Q_cluster.reserve(Q_cluster.size() + num_div);
53 for (
int div_index = 0; div_index < num_div + 1; div_index++) {
54 if (div_index < num_div) {
55 auto const mid_pt = pt_2 + direct * (
_gap * div_index +
_gap / 2.);
60 FLASH_DEBUG() <<
"Traj pt (" << q_pt.
x <<
"," << q_pt.
y <<
"," << q_pt.
z <<
") q=" << q_pt.
q << std::endl;
61 Q_cluster.emplace_back(q_pt);
64 double weight = (dist - int(dist /
_gap) *
_gap);
65 auto const mid_pt = pt_2 + direct * (
_gap * div_index + weight / 2.);
70 FLASH_DEBUG() <<
"Traj pt (" << q_pt.
x <<
"," << q_pt.
y <<
"," << q_pt.
z <<
") q=" << q_pt.
q << std::endl;
71 Q_cluster.emplace_back(q_pt);
81 for (
size_t i = 0; i < trj.size() - 1; i++) {
82 auto const& this_loc(trj[i]);
83 auto const& last_loc(trj[i + 1]);
89 double _vol_xmax = bbox.
Max()[0];
90 double _vol_ymax = bbox.Max()[1];
91 double _vol_zmax = bbox.Max()[2];
93 double _vol_xmin = bbox.Min()[0];
94 double _vol_ymin = bbox.Min()[1];
95 double _vol_zmin = bbox.Min()[2];
99 for (
size_t idx = 0; idx < result.size(); ++idx) {
100 auto pt = result[idx];
101 if (pt.x >= _vol_xmin && pt.x <= _vol_xmax && pt.y >= _vol_ymin && pt.y <= _vol_ymax && pt.z >= _vol_zmin && pt.z <= _vol_zmax) {
102 final_result.push_back(pt);
const geoalgo::AABox & ActiveVolume() const
Detector active volume.
Struct to represent an energy deposition point in 3D space.
double z
Spatial position in [cm].
#define FLASH_INFO()
Compiler macro for INFO message.
Class def header for a class LightPath.
fhicl::ParameterSet Config_t
Configuration object.
static DetectorSpecs & GetME(std::string filename="detector_specs.cfg")
flashmatch::QCluster_t MakeQCluster(const ::geoalgo::Trajectory &trj) const
LightPath(const std::string name="LightPath")
Default constructor.
static LightPathFactory __global_LightPathFactory__
Collection of charge deposition 3D point (cluster)
Algorithm type that does not play a role in the framework execution but inherits from BaseAlgorithm...
#define FLASH_DEBUG()
Compiler macro for DEBUG message.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
const Point_t & Max() const
Maximum point getter.
void _Configure_(const Config_t &pset)