74 fCCAlg (pset.get<
fhicl::ParameterSet>(
"ClusterCrawlerAlg")),
78 "\nClusterCrawler module has been deprecated and will be removed." 79 "\nIt is now replaced by HitFinder and LineCluster modules." 89 produces< std::vector<recob::Cluster> >();
90 produces< std::vector<recob::Vertex> >();
91 produces< art::Assns<recob::Cluster, recob::Hit> >();
92 produces< art::Assns<recob::Cluster, recob::Vertex, unsigned short> >();
125 std::unique_ptr<std::vector<recob::Hit>> FinalHits
134 std::vector<recob::Cluster> sccol;
135 std::vector<recob::Vertex> sv3col;
137 std::unique_ptr<art::Assns<recob::Cluster, recob::Hit> >
139 std::unique_ptr<art::Assns<recob::Cluster, recob::Vertex, unsigned short>>
148 for(
unsigned int icl = 0; icl < tcl.size(); ++icl) {
150 if(clstr.
ID < 0)
continue;
152 unsigned short plane = planeID.
Plane;
153 for(
unsigned short ii = 0; ii < clstr.
tclhits.size(); ++ii) {
154 unsigned int iht = clstr.
tclhits[ii];
155 recob::Hit const& theHit = FinalHits->at(iht);
157 std::cout<<
"CC: cluster-hit plane mis-match "<<theHit.
WireID().
Plane<<
" "<<plane
161 if(inClus[iht] != clstr.
ID) {
162 std::cout <<
"CC: InClus mis-match " << inClus[iht]
163 <<
" ID " << clstr.
ID <<
" in cluster " << icl <<
"\n";
170 std::vector<ClusterCrawlerAlg::Vtx3Store>
const& Vertices
173 double xyz[3] = {0, 0, 0};
174 unsigned int vtxID = 0,
end;
177 if(vtx3.Ptr2D[0] < 0)
continue;
178 if(vtx3.Ptr2D[1] < 0)
continue;
179 if(vtx3.Ptr2D[2] < 0)
continue;
184 sv3col.emplace_back(xyz, vtxID);
187 std::unique_ptr<std::vector<recob::Vertex> > v3col(
new std::vector<recob::Vertex>(std::move(sv3col)));
190 float sumChg, sumADC;
191 unsigned int clsID = 0, nclhits;
192 for(
unsigned int icl = 0; icl < tcl.size(); ++icl) {
194 if(clstr.
ID < 0)
continue;
199 unsigned short plane = planeID.
Plane;
200 nclhits = clstr.
tclhits.size();
201 std::vector<unsigned int> clsHitIndices;
203 for(
unsigned int itt = 0; itt < nclhits; ++itt) {
204 unsigned int iht = clstr.
tclhits[itt];
210 unsigned int iht = clstr.
tclhits[0];
242 *
this, evt, *hc_assn, sccol.size()-1, clstr.
tclhits.begin(), clstr.
tclhits.end())
246 <<
"Failed to associate hit "<<iht<<
" with cluster "<<icl;
252 unsigned short vtxIndex = 0;
255 if(vtx3.Ptr2D[0] < 0)
continue;
256 if(vtx3.Ptr2D[1] < 0)
continue;
257 if(vtx3.Ptr2D[2] < 0)
continue;
258 if(vtx3.Ptr2D[plane] == clstr.
BeginVtx) {
262 <<
"Failed to associate cluster "<<icl<<
" with vertex";
272 unsigned short vtxIndex = 0;
275 if(vtx3.Ptr2D[0] < 0)
continue;
276 if(vtx3.Ptr2D[1] < 0)
continue;
277 if(vtx3.Ptr2D[2] < 0)
continue;
278 if(vtx3.Ptr2D[plane] == clstr.
EndVtx) {
282 <<
"Failed to associate cluster "<<icl<<
" with endpoint";
292 std::unique_ptr<std::vector<recob::Cluster> > ccol(
new std::vector<recob::Cluster>(std::move(sccol)));
294 shcol.
use_hits(std::move(FinalHits));
301 evt.
put(std::move(ccol));
302 evt.
put(std::move(hc_assn));
303 evt.
put(std::move(v3col));
304 evt.
put(std::move(cv_assn));
void RunCCHitFinder(std::vector< recob::Wire > const &Wires)
virtual void reconfigure(fhicl::ParameterSet const &pset)
Encapsulate the construction of a single cyostat.
virtual void reconfigure(fhicl::ParameterSet const &pset)
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
geo::WireID WireID() const
Initial tdc tick for hit.
Declaration of signal hit object.
hit::CCHitFinderAlg fCCHFAlg
Procedures to create maps of object locations.
The data type to uniquely identify a Plane.
std::vector< ClusterStore > const & GetClusters() const
Returns a constant reference to the clusters found.
Definition of basic raw digits.
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
struct of temporary clusters
void use_hits(std::unique_ptr< std::vector< recob::Hit >> &&srchits)
Uses the specified collection as data product.
Cluster finding and building.
static void declare_products(ModuleType &producer, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Declares the hit products we are going to fill.
struct of temporary 3D vertices
Hit finder algorithm designed to work with Cluster Crawler.
static const SentryArgument_t Sentry
An instance of the sentry object.
static geo::PlaneID DecodeCTP(CTP_t CTP)
virtual ~ClusterCrawler()
ProductID put(std::unique_ptr< PROD > &&product)
ClusterCrawler(fhicl::ParameterSet const &pset)
Helper functions to create a hit.
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.
#define DEFINE_ART_MODULE(klass)
void RunCrawler(std::vector< recob::Hit > const &srchits)
bool CreateAssnD(PRODUCER const &prod, art::Event &evt, art::Assns< T, U, D > &assn, size_t first_index, size_t second_index, typename art::Assns< T, U, D >::data_t &&data)
Creates a single one-to-one association with associated data.
A class handling a collection of hits and its associations.
T get(std::string const &key) const
void produce(art::Event &evt) override
Wrapper for ClusterParamsAlgBase objects to accept arbitrary input.
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
PlaneID_t Plane
Index of the plane within its TPC.
Declaration of cluster object.
Definition of data types for geometry description.
Detector simulation of raw signals on wires.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::string fCalDataModuleLabel
label of module producing input wires
void reconfigure(fhicl::ParameterSet const &pset)
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
std::vector< Vtx3Store > const & GetVertices() const
Returns a constant reference to the 3D vertices found.
std::vector< unsigned int > tclhits
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void put_into(art::Event &)
Moves the data into the event.
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
Declaration of basic channel signal object.
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
std::vector< short > const & GetinClus() const
Returns (and loses) the collection of reconstructed hits.
2D representation of charge deposited in the TDC/wire plane
Interface to class computing cluster parameters.
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Namespace collecting geometry-related classes utilities.
art framework interface to geometry description
Encapsulate the construction of a single detector plane.