84 if (allHits.size() == 0) {
85 if (
verbose) std::cout <<
" no hits received! exiting " << std::endl;
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 " 183 << plane * 100 + i << std::endl;
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);
252 std::vector<int>& index)
const 257 hitIter != hitlist.end();
261 unsigned int plane, cstat, tpc, wire;
266 double linear_dist = gser.
Get2DDistance(wire, time, wire_start, time_start);
268 if (linear_dist < radlimit) {
269 hitlistlocal.push_back(theHit);
276 std::sort(index.begin(), index.end());
286 std::vector<art::Ptr<recob::Hit>>
289 std::vector<art::Ptr<recob::Hit>> hitlistlocal;
291 for (
unsigned int ix = 0; ix < hitlist.size(); ix++) {
296 unsigned int plane(0), cstat(0), tpc(0), wire(0);
306 hitlist_total.push_back(theHit);
308 std::cout <<
" adding hit @ w,t " << wire <<
" " << time <<
" on plane " << plane
313 leftovers.push_back(theHit);
316 hitlistlocal.clear();
325 return hitlist_total;
333 unsigned int&
w)
const 336 unsigned int channel = a->Channel();
338 p = a->WireID().Plane;
340 w = a->WireID().Wire;
346 std::vector<std::vector<art::Ptr<recob::Hit>>>
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 Get2DDistance(double wire1, double time1, double wire2, double time2) const
Utilities related to art service access.
std::vector< WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
std::vector< std::vector< art::Ptr< recob::Hit > > > hitlistbyplane
std::vector< std::vector< std::vector< art::Ptr< recob::Hit > > > > smallClustList
Declaration of signal hit object.
void ClearandResizeVectors()
double Temperature() const
In kelvin.
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
double Efield(unsigned int planegap=0) const
kV/cm
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
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.
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
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
SmallClusterFinderAlg(fhicl::ParameterSet const &pset)
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
Length_t WirePitch(PlaneID const &planeid=plane_zero) const
Returns the distance between two consecutive wires.
art framework interface to geometry description