19 : epsilon(pset.
get<
float >(
"epsilon"))
20 , minpts(pset.
get<unsigned
int>(
"minpts"))
21 , badchannelweight(pset.
get<double>(
"badchannelweight"))
22 , neighbors(pset.
get<unsigned
int>(
"neighbors"))
38 unsigned int nbadchs = 0;
40 if (wid1==wid2)
continue;
47 std::cout<<
"Done building bad channel map."<<
std::endl;
51 for (
auto& spt : sps){
57 auto &hits = hitFromSp.at(spt.key());
58 for (
auto &
hit : hits){
69 perror(
"Failed to allocate node.");
85 if (en->
head == NULL) {
101 perror(
"Failed to allocate epsilon neighbours.");
104 for (
unsigned int i = 0; i <
points.size(); ++i) {
135 unsigned int i, cluster_id = 0;
136 for (i = 0; i <
points.size(); ++i) {
145 unsigned int cluster_id)
177 unsigned int cluster_id)
209 Double32_t
const* a_xyz = a->
sp->
XYZ();
210 Double32_t
const* b_xyz = b->
sp->
XYZ();
212 float const dx = a_xyz[0] - b_xyz[0];
213 float const dy = a_xyz[1] - b_xyz[1];
214 float const dz = a_xyz[2] - b_xyz[2];
std::map< geo::WireID, int > badchannelmap
Functions to help with numbers.
art::Ptr< recob::SpacePoint > sp
constexpr T sum_of_squares(T x, T y)
epsilon_neighbours_t * get_epsilon_neighbours(unsigned int index)
art framework interface to geometry description
IteratorBox< plane_id_iterator,&GeometryCore::begin_plane_id,&GeometryCore::end_plane_id > IteratePlaneIDs() const
Enables ranged-for loops on all plane IDs of the detector.
IteratorBox< wire_id_iterator,&GeometryCore::begin_wire_id,&GeometryCore::end_wire_id > IterateWireIDs() const
Enables ranged-for loops on all wire IDs of the detector.
void init(const std::vector< art::Ptr< recob::SpacePoint >> &sps, art::FindManyP< recob::Hit > &hitFromSp)
float dist(point_t *a, point_t *b) const
virtual bool IsGood(raw::ChannelID_t channel) const
Returns whether the specified channel is physical and good.
int expand(unsigned int index, unsigned int cluster_id)
Class providing information about the quality of channels.
static int max(int a, int b)
Description of geometry of one entire detector.
Detector simulation of raw signals on wires.
constexpr auto absDiff(A const &a, B const &b)
Returns the absolute value of the difference between two values.
node_t * create_node(unsigned int index)
int append_at_end(unsigned int index, epsilon_neighbours_t *en)
std::vector< TrajPoint > seeds
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
Declaration of signal hit object.
DBScan3DAlg(fhicl::ParameterSet const &pset)
Interface for experiment-specific channel quality info provider.
const Double32_t * XYZ() const
Access the description of detector geometry.
std::vector< point_t > points
int spread(unsigned int index, epsilon_neighbours_t *seeds, unsigned int cluster_id)
auto const & get(AssnsNode< L, R, D > const &r)
Interface for experiment-specific service for channel quality info.
unsigned int nbadchannels
QTextStream & endl(QTextStream &s)
void destroy_epsilon_neighbours(epsilon_neighbours_t *en)