5 #include "larevt/CalibrationDBI/Interface/ChannelStatusService.h" 6 #include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h" 14 : epsilon(pset.get< float >(
"epsilon"))
15 , minpts(pset.get<unsigned int>(
"minpts"))
16 , badchannelweight(pset.get<double>(
"badchannelweight"))
17 , 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());
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)
156 points[index].cluster_id = cluster_id;
177 unsigned int cluster_id)
214 if ( dist < 0 ) dist = 0;
std::map< geo::WireID, int > badchannelmap
Functions to help with numbers.
art::Ptr< recob::SpacePoint > sp
Declaration of signal hit object.
epsilon_neighbours_t * get_epsilon_neighbours(unsigned int index)
float dist(point_t *a, point_t *b)
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.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
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)
int expand(unsigned int index, unsigned int cluster_id)
const Double32_t * XYZ() const
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.
DBScan3DAlg(fhicl::ParameterSet const &pset)
std::vector< point_t > points
int spread(unsigned int index, epsilon_neighbours_t *seeds, unsigned int cluster_id)
unsigned int nbadchannels
void destroy_epsilon_neighbours(epsilon_neighbours_t *en)