84 if (allHits.size() == 0) {
93 HitIter != allHits.end();
96 unsigned int p(0),
w(0),
t(0),
cs(0);
112 for (
unsigned int ip = 0; ip <
fNPlanes; ip++) {
117 std::cout <<
"At plane " << ip <<
", found " <<
hitlistrefined[ip].size() <<
" hits with " 149 for (
unsigned int iplane = 0; iplane <
fNPlanes; iplane++) {
156 std::vector<art::Ptr<recob::Hit>> splittingVector =
hitlistrefined[iplane];
158 while (splittingVector.size() != 0) {
166 std::vector<int>
index;
167 std::vector<art::Ptr<recob::Hit>> thiscluster;
176 unsigned int plane(0), cstat(0), tpc(0), wire(0);
182 std::cout <<
"Done writing " << thiscluster.size() <<
" hits to cluster with ID " 188 while (index.size() != 0) {
189 splittingVector.erase(splittingVector.begin() + (index.back()));
223 double radlimit)
const 227 hitIter != hitlist.end();
231 unsigned int plane, cstat, tpc, wire;
236 double linear_dist = gser.
Get2DDistance(wire, time, wire_start, time_start);
238 if (linear_dist < radlimit) hitlistlocal.push_back(theHit);
253 std::vector<int>&
index)
const 258 hitIter != hitlist.end();
262 unsigned int plane, cstat, tpc, wire;
267 double linear_dist = gser.
Get2DDistance(wire, time, wire_start, time_start);
269 if (linear_dist < radlimit) {
270 hitlistlocal.push_back(theHit);
279 std::sort(index.begin(), index.end());
287 std::vector<art::Ptr<recob::Hit>>
294 std::vector<art::Ptr<recob::Hit>>
297 std::vector<art::Ptr<recob::Hit>> hitlistlocal;
299 for (
unsigned int ix = 0; ix < hitlist.size(); ix++) {
304 unsigned int plane(0), cstat(0), tpc(0), wire(0);
314 hitlist_total.push_back(theHit);
316 std::cout <<
" adding hit @ w,t " << wire <<
" " << time <<
" on plane " << plane
321 leftovers.push_back(theHit);
324 hitlistlocal.clear();
333 return hitlist_total;
341 unsigned int&
w)
const 344 unsigned int channel =
a->Channel();
346 p =
a->WireID().Plane;
348 w =
a->WireID().Wire;
354 std::vector<std::vector<art::Ptr<recob::Hit>>>
360 std::vector<std::vector<art::Ptr<recob::Hit>>> vec;
365 std::vector<art::Ptr<recob::Hit>>
371 std::vector<art::Ptr<recob::Hit>> vec;
std::vector< art::Ptr< recob::Hit > > CreateHighHitlist(util::GeometryUtilities const &gser, std::vector< art::Ptr< recob::Hit >> const &hitlist, std::vector< art::Ptr< recob::Hit >> &hitlistleftover) const
Double_t Get2DDistance(Double_t wire1, Double_t time1, Double_t wire2, Double_t time2) const
std::vector< std::vector< art::Ptr< recob::Hit > > > hitlistbyplane
std::vector< std::vector< std::vector< art::Ptr< recob::Hit > > > > smallClustList
void ClearandResizeVectors()
double Temperature() const
In kelvin.
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
void FindSmallClusters(util::GeometryUtilities const &gser, detinfo::DetectorClocksData const &dataClocks, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> allHits)
int GetPlaneAndTPC(art::Ptr< recob::Hit > a, unsigned int &plane, unsigned int &cryostat, unsigned int &time, unsigned int &wire) const
void SelectLocalHitlist(util::GeometryUtilities const &gser, std::vector< art::Ptr< recob::Hit >> hitlist, std::vector< art::Ptr< recob::Hit >> &hitlistlocal, double wire_start, double time_start, double radlimit) const
std::vector< std::vector< art::Ptr< recob::Hit > > > hitlistleftover
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
art framework interface to geometry description
double Efield(unsigned int planegap=0) const
kV/cm
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
std::vector< art::Ptr< recob::Hit > > GetLeftoversByPlane(unsigned int iPlane)
T get(std::string const &key) const
double DriftVelocity(double efield=0., double temperature=0.) const
cm/us
std::vector< std::vector< art::Ptr< recob::Hit > > > hitlistrefined
Definition of data types for geometry description.
float PeakTime() const
Time of the signal peak, in tick units.
Declaration of signal hit object.
Contains all timing reference information for the detector.
std::vector< std::vector< art::Ptr< recob::Hit > > > GetSmallClustersByPlane(unsigned int iPlane)
art::ServiceHandle< geo::Geometry const > geom
SmallClusterFinderAlg(fhicl::ParameterSet const &pset)
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
QTextStream & endl(QTextStream &s)